Chicken Problem from Terry Tao's blog (system of Diophantine equations)

Solution 1:

If $u>v>w$ are the number of chickens that the three farmers sold at the higher price, then, by linearity*, $(26-16)(u-v) = (16-10)(v-w)$, and so $u-v$ is divisible by $3$, and $v-w$ is divisible by $5$. It follows that $(u,v,w) \in \{(8,5,0),(9,6,1), (10,7,2)\}$.

Only the middle solution gives prices that can be measured in USD (or most currencies), namely $\$3.75$ and $\$1.25$.


* To elaborate on this point: If a farmer begins with $n$ chickens, sells $f(n)$ at the higher price point $A$ and $n-f(n)$ at the lower price point $B$, and earns a profit $P$, then the points $(n,f(n))$ are collinear (assuming that $A,B,P$ are constant).

This is because these points are the solutions to a linear equation in two variables, namely $Af(n) + B(n-f(n)) = P$. A line has constant slope, so the equation in my first paragraph follows.

Solution 2:

Let $c$ be the morning price and let $d$ be the difference between the morning and afternoon prices. Now we attempt to solve for how many did each seller sell at each of the two prices.

Think of it this way: if the seller sold everything at $c$ after lunchtime, the total sales will be $kc$, where $k$ is the number of chickens. However, when he "switches" a chicken from the "after-lunchtime" price to the "before-lunchtime" price, there will be a price increase of $d$ (which is the difference between the after-lunchtime and before-lunchtime prices). Hence every chicken sold at the before-lunchtime price rather than the after-lunchtime price will incur an increase of sales of $d$. With this, we can know how many chickens were sold at the higher price.

For the one who sold $10$ chickens, if he sold everything at the after-lunchtime price, his sales will be $10c$. The difference is $35-10c$, so the number of chickens sold before lunchtime is $\frac{35-10c}{d}$. Similarly, the number of chickens sold before lunchtime for the other 2 sellers are $\frac{35-16c}{d}$ and $\frac{35-26c}{d}$. It is to note that all of those are integers. $\frac{35-10c}{d} \leq 10$, so the others: $\frac{35-16c}{d}$ and $\frac{35-26c}{d}$ are less than $10$.

Express the 3 quantities, $\frac{35-10c}{d}$, $\frac{35-16c}{d}$, and $\frac{35-26c}{d}$ and $x$, $y$, and $z$, which are integers. Then $x-y:y-z=\frac{6c}{d}:\frac{10c}{d}=3:5$. Since $x$, $y$, and $z$ are integers and $gcd(3,5)=1$, $x-y$ is a multiple of $3$ and $y-z$ is a multiple of $5$. Thus we can write $x-y=3k$, so $y-z=5k$, and $x-z=(x-y)+(y-z)=3k+5k=8k$, where $k$ is an integer. Since $x \leq 10$ and $z \geq 0$, $x-z \leq 10$, so $k=8$. Hence $x=z+5+3=z+8$, $y=z+5$.

$z=x-8$, but $z \geq 0$, so $x \geq 8$. Thus we only need to consider $3$ cases: $x=8$, $x=9$, $x=10$, as $x \leq 10$.

If $x=8$, then $y=5$, $z=0$. Plugging in back, $z=\frac{35-26c}{d}=0$, so $c=\frac{35}{26}$. With $y=5$, we get that $\frac{35-16c}{d}=5$, so $35-16c=5d$. Since $c=\frac{35}{26}$, $35-16(\frac{35}{26})=5d$. Simplifying, $7-16(\frac{7}{26})=d$. Thus $d=\frac{70}{26}=\frac{35}{13}$. The price before lunchtime is then $\frac{35}{26}+\frac{35}{13}=\frac{105}{26}$.

If $x=9$, then $y=6$, $z=1$. Plugging in back, $1=z=\frac{35-26c}{d}$ and $6=y=\frac{35-16c}{d}$. Cross-multiplying, we get $d+26c=35$ and $6d+16c=35$. $d+26c=6d+16c$, so $10c=5d$, $2c=d$. Hence $6d=12c$, so going back to $6d+16c=35$, we get that $12c+16c=35$, $28c=35$, so $c=\frac{5}{4}$, $d=\frac{5}{2}$. Thus the before lunchtime price is $\frac{5}{4}+\frac{5}{2}=\frac{15}{4}$.

If $x=10$, then $y=7$, $z=2$. Plugging in back, we get $2=z=\frac{35-26c}{d}$ and $7=y=\frac{35-16c}{d}$. Cross-multiplying, we get $2d+26c=35$ and $7d+16c=35$. $2d+26c=7d+16c$, so $5d=10c$, $d=2c$. Going back to $2d+26c=35$, we get $4c+26c=35$, so $30c=35$ and $c=\frac{7}{6}$. $d=2c$, so $d=\frac{7}{3}$, and the before-lunchtime price is $\frac{21}{6}\frac{7}{2}$.

We have now 3 cases to possible solutions. Let $e$ be the before-lunchtime price

Case 1: $(x,y,z)=(10,7,2)$, $(10-x,10-y,10-z)=(0,3,8)$. $(p,e)=(\frac{7}{6},\frac{7}{2})$.

There are several problems with this answer - the prices cannot be given in cash (or even in check), since they are not a whole number of dollars/cents: if they round this, the total will not be 35 dollars. - Why should the first farmer still lower his prices if he sold everything?

Case 2: $(x,y,z)=(9,6,1)$, $(10-x,10-y,10-z)=(1,4,9)$. $(p,e)=(\frac{5}{4},\frac{15}{4})$.

I don't see any problem with this answer

Case 3: $(x,y,z)=(8,5,0)$, $(10-x,10-y,10-z)=(2,5,10)$ $(p,e)=(\frac{35}{26},\frac{105}{26})$.

There is a problem with this answer - the prices cannot be given in cash (or even in check), since they are not a whole number of dollars/cents: if they round this, the total will not be 35 dollars.

Wrapping up, there are $3$ possible ordered sets of after-lunchtime and before-lunchtime prices: $\boxed{(\frac{7}{6},\frac{7}{2}),(\frac{5}{4},\frac{15}{4}),(\frac{35}{26},\frac{105}{26})}$. However, only $1$ answer is possible in real life because dollars are subdivided into $100$ cents, and the other answers would yield a fraction number of cents, which is impossible. Hence the only possible answer is $\boxed{(\frac{5}{4},\frac{15}{4})}$

Whew! Took me 30 minutes to type

Solution 3:

There does not seem to be a unique solution to this problem: there are two $5$-tuples $(x,y,z,p,q)$ satisfying the given conditions, namely $$(x,y,z,p,q) \in \left\{\left(8,5,0,\tfrac{105}{26},\tfrac{35}{26}\right), \left(9,6,1,\tfrac{15}{4},\tfrac{5}{4}\right)\right\}.$$ It is not stated that all farmers sold at least one chicken prior to lunchtime, and the difference between the first and second solution (one chicken each) is not, in my opinion, subjectively large enough to justify saying that the farmers were unhappy with the rate of sales for the former but not the latter. The only plausible qualitative difference between the solutions is that the latter corresponds to an exact amount to the penny; the former does not (but why should this matter from a mathematical standpoint?). A full solution is not difficult although it can be a bit tedious to obtain, but one key is to derive the Diophantine condition $$5x - 8y + 3z = 0,$$ in conjunction with the obvious constraint $10 \ge x > y > z \ge 0$.