Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2. A builder has three types of workers i. type A ii. type B iii. type C. Construction
starts with type-A workers until their part of job is finished, then type-B workers
take over and continue working until their half work is done. Later, type C workers
join and work parallel to type B workers. Finally, construction is finished by type
C workers.
Following assumptions hold to keep things simple:
i. Every workers performs same amount of duties.
ii. Difference of gender, age, race is irrelevant
One building requires overall N workers (including all three type workers) to finish
the job in D days. The builder has a project of building three same type of buildings.
i. Write an algorithm that guarantees that all three buildings are finished in
2D days.
ii. If a worker charges R rupees per day, calculate overall workers’ cost (as
per above case)
iii. If the builder makes 50% more money than he spends on workers, how
much money did he make.
Section B