3. Lavandaria (7º e 8º Anos, EN)

Cadets Task Examples

Ages 13-14

          

Fast laundry

(Age group: Cadets; Difficulty: easy; Category: ALG)

Beaver Joe has started a new laundry business. He has got three machines: a washer, a dryer and a pressing iron. Every machine is connected through its own timer which provides for half an hour of electricity.

So, when a client arrives, he needs 90 minutes for all of the three procedures. And three clients using the machinery consequently need 270 minutes.

But now, there are three beavers arriving which are really busy. Each one them has enough clothes for a load of its own. But they agree that they want to finish as quickly as possible.

How many minutes does it take for all three of them to finish their laundry?

>Answer:

A) 90 minutes B) 120 minutes C) 150 minutes D) 270 minutes

Solution:

Answer C) is correct: beaver 1 needs 90 minutes anyway. During his use of the dryer, beaver 2 starts with washing, and finishes drying at the same time that beaver 1 is finishing with the iron and beaver 3 finishes his washing. So beaver 3 needs two more turns (dryer and iron). This is a total of the 90 minutes for beaver 1 plus the two turns of beaver 3 (60 minutes), which is 150 minutes.

It's Informatics

CPUs are working in a similar way as the laundry. If every device is used as soon it is free, computation becomes faster. Pipelining is an important idea for constructing CPUs. It’s a cheap way to speed up computation.