# How can I solve this problem using a formula?

Four friends ate $$7$$ different dishes in $$5$$ minutes. If they were joined by $$X$$ people the next day and ate at the same rate, how many dishes would they eat in $$Y$$ minutes?

For example if $$X = 4$$ and $$Y = 5$$, the answer would be $$14$$ dishes.

How can I solve this problem using a formula for unknowns $$X$$ and $$Y$$?

• Do you understand how to get $14$ if $X=4$ and $Y=5?$ – saulspatz Apr 19 at 17:44
• @saulspatz I got it by intuition because the number of minutes is constant. – Mohamed Magdy Apr 19 at 17:48

$$4$$ people ate $$7$$ dishes in $$5$$ minutes means that the rate at which they ate dishes was $$7/5=1.4$$ dishes/minute. From that we can conclude (rather assume) that each person ate dishes at a rate of $$1.4/4=0.35$$ dishes/minute.

If we have $$4$$ people plus $$X$$ people eating at the same rate of $$0.35$$ dishes/minute per person as stated in the problem, then in $$Y$$ minutes those $$4+X$$ people would eat:

$$(4+X)$$ $$\cdot$$ $$0.35$$ dishes/minute $$\cdot$$ $$Y$$ minutes $$=0.35\cdot Y\cdot(4+X)$$ dishes.

• Should I take ceil function for the result? – Mohamed Magdy Apr 19 at 18:48
• Why would you do that? I don't think you need to use the ceiling function here. If you have something like $30.8$ dishes as an answer, that's just what it means. So many people ate $30$ dishes and $8/10$ of another dish in a certain number of minutes. – Michael Rybkin Apr 20 at 21:35

In the end, you want a function that takes in the number of people and time, and outputs the number of dishes, $$f(X,Y) = Z$$, where Z is the number of dishes. You probably have to make the assumption that this function will be linear. That is, more friends don't affect the rate at which the others eat (linear with X), and that no one ever gets full or slows down eating (linear with Y).

You want to figure out how quickly one person eats a dish, which will have units of $$\frac{\textrm{dishes}}{\textrm{person}\cdot\textrm{minutes}}$$. This you figure out from the "Four friends ate 7 dishes in 5 minutes" part. Think about how to manipulate the 3 values you are given (number of friends, number of dishes, number of minutes) to produce a constant that has the units I mentioned above. This will give us the rate people eat, $$r$$.

So we have the rate that each person eats (r), how many people there are (X+4), and how long they have to eat (Y).

Now we want to manipulate the units (r~dishes per person per minute, X ~ people, Y ~ minutes) to get a unit of dishes. Pretty clearly, this is $$f(X,Y) = r\cdot (X+4) \cdot Y$$

• How to get $r$? – Mohamed Magdy Apr 19 at 18:02