Time & Work

RoadmapsAptitude

Scenario

Imagine two developers: Dev A can finish an API in 10 days, Dev B in 15 days. If they pair program, how fast does it ship? This is the exact math tech companies test you on.

Mental model

Work = Time x Rate. Instead of adding days, add their per-day speed (rates).

Never add time directly. If A takes 10 days and B takes 15 days, they do not take 25 days together. Convert everything to 'work done per day' (efficiency) and add those rates.

Formula

If A takes x days and B takes y days, together they take (x x y) / (x + y) days. Rate of A = 1/x per day. Work done in t days = t / x. For 3+ workers: use LCM method - assume total work = LCM of their individual times, assign each worker their units per day, sum the rates. If A is k times as efficient as B, A takes time = B's time / k. Work remaining after t days of one worker = 1 - (t/x).

The formula (xy)/(x+y) is the algebraic simplification of 1/(1/x + 1/y). For 3+ people, the LCM method is faster: set total work = LCM of given days, compute each person's daily output, sum outputs, then divide total by combined daily output.

Pattern discovery

Calculate A and B's combined rate, then find time.

Why do you add rates (1/10 + 1/15) and not times (10 + 15)?

Rule: To find combined time, add their individual rates (reciprocals of time), then flip it back. Rates add; times do not.

Worked example

Problem: A can complete a piece of work in 12 days. B is 50% more efficient than A. How long do they take to finish together?

  1. A's rate = 1/12 work per day. B is 50% more efficient: B's rate = 1.5 x (1/12) = 1/8 per day.
  2. Combined rate = 1/12 + 1/8 = 2/24 + 3/24 = 5/24 per day.
  3. Time = 1 / (5/24) = 24/5 = 4.8 days.
  4. Sanity-check via LCM method: LCM(12, 8) = 24 units. A does 2 units/day, B does 3 units/day. Together 5 units/day. Time = 24/5 = 4.8 days. Matches.

Answer: 4.8 days (24/5 days).

Problem: X and Y together finish a job in 6 days. X alone takes 10 days. After X and Y work together for 3 days, X leaves. How many more days will Y take to finish?

  1. X's rate = 1/10, Y's rate = 1/6 - 1/10 = 5/30 - 3/30 = 2/30 = 1/15. Y alone takes 15 days.
  2. Work done in 3 days together = 3 x (1/6) = 1/2.
  3. Remaining work = 1 - 1/2 = 1/2.
  4. Y alone does 1/15 per day. Time for Y to finish 1/2 = (1/2) / (1/15) = 15/2 = 7.5 days.
  5. Sanity-check: 7.5 x (1/15) = 0.5. Remaining work matches.

Answer: Y needs 7.5 more days.

Shortcuts

Common mistakes

Glossary

efficiency
How much work a person or machine can get done in a certain amount of time.
algebraic
Using letters and formulas in math to solve problems.
output
The amount of work produced or finished in a day.

Recall questions

Questions & answers

A can do a piece of work in 8 days. B is 3 times as efficient as A. In how many days can they complete it together?

2 days

Approach: LCM method: total work = 8 units. A does 1 unit/day, B does 3 units/day (3x efficient). Together = 4 units/day. Time = 8/4 = 2 days.

A takes 15 days and B takes 20 days. They work together for 4 days, then A leaves. How many days will B take to finish the remaining work?

10.67 days

Approach: LCM(15,20) = 60 units. A=4/day, B=3/day. In 4 days together: (4+3)*4 = 28 units done. Remaining = 32 units. B takes 32/3 = 10.67 days.

Continue learning

Next: Pipes & Cisterns

Return to Aptitude Roadmap