6

The seller was asked how many cheese pieces he had sold. He replied: "Today there were $4$ buyers, each buyer bought half of the remaining cheese pieces and half of one cheese." As a result, all cheeses was sold." How many cheeses has been sold?

All I got: $x$ - number of cheeses, $$x-\left({8 \over16}x+{1 \over64}x\right)-\left({4 \over16}x+{1 \over64}x\right)-\left({2 \over16}x+{1 \over64}x\right)-\left({1 \over16}x+{1 \over64}x\right)=0$$

But it doesn't seem right. Does anyone know how to solve this?

enter image description here

Asaf Karagila
  • 393,674

5 Answers5

29

Proceed backward: add half a cheese and double, four times.

$$0\to1\to3\to7\to15.$$

12

Working forward with $x$ amount of cheese:

having served the first customer

$$\frac x2-\frac12=\frac{x-1}2$$

having served the second customer

$$\frac{x-1}4-\frac12=\frac{x-3}{4}$$

having served the third customer

$$\frac{x-3}{8}-\frac12=\frac{x-7}8$$ having served the fourth customer

$$\frac{x-7}{16}-\frac12=\frac{x-15}{16}=0.$$

From the last step:

$$x=15.$$

zoli
  • 20,452
6

I would work backwards. So the last buyer bought half a cheese plus half of what was left, and that was the end of the cheeses, meaning that if $x_4$ was the amount of cheese that was left right before the fourth buyer, we have:

$$x_4-\frac{x_4}{2}-\frac{1}{2}=0$$

From this, we can quickly get that $x_4 = 1$, i.e. there was $1$ cheese left before the last buyer.

OK, so moving on to the third buyer:

$$x_3-\frac{x_3}{2}-\frac{1}{2}=x_4=1$$

meaning that $x_3=3$, i.e there were $3$ cheeses left before the third buyer bought their cheese.

...can you take the last two steps?

Bram28
  • 100,612
  • 6
  • 70
  • 118
1

Update/edit:

There are two correct answers, 15 and 11. Below are both laid out:

*1st buyer: 5.5 pieces + 1/2 *2nd buyer: 2.5 pieces + 1/2 *3rd buyer: 1 piece + 1/2 *4th buyer: 1/2

Total cheese sold: 11 pieces.

OR

*1st buyer: 7.5 pieces + 1/2 *2nd buyer: 3.5 pieces + 1/2 *3rd buyer: 1.5 pieces + 1/2 *4th buyer: .5 + 1/2

Total cheese sold: 15 pieces.

Great post!

Russell
  • 11
  • No, only 15 works. The requirement breaks down in the last step in case of 11. – alwayslearning Dec 16 '17 at 02:38
  • More specifically, the 4th buyer must buy half of what is left plus a half-cheese. For 11, your fourth buyer finds a half cheese upon entering, and so should buy half of it (1/4 cheese) plus another half-cheese, for 3/4 cheese total. – Paul Sinclair Dec 16 '17 at 04:25
  • But when the 4th buyer arrives there is only 1/2 a cheese piece left - therefore buying 3/4 of a piece is not an option. – Russell Dec 16 '17 at 04:44
  • RE comment from alwayslearning - which requirement breaks down for the last step in the example where 11 pieces are sold? Can you be more specific? In both answers the 4th buyer purchases 1/2 the balance plus another 1/2 piece. – Russell Dec 16 '17 at 04:47
  • @Russel In the second answer, the 4th buyer purchases 1/2 the balance (1/4 a piece of cheese) plus 1/4 a piece, for a total of 1/2 a piece. That's different from 1/2 the balance plus 1/2 a piece, which is 3/4, which is of course impossible. – Joey Marianer Dec 16 '17 at 06:54
  • @Joey & others - I see that logic and your answers make sense; thank you all. That said, unless there is a requirement to fulfill the 1/2 balance purchase before the 1/2 piece purchase the answer of 11 is still potentially correct. The last buyer just buys the 1/2 piece first which leaves a balance of 0 for the other requirement. Does that not work (honest question)? thanks – Russell Dec 16 '17 at 08:32
  • @Russell: your last step "$4^{th}$ buyer $1/2$" is wrong. The previous steps indicate that there is one half left, not enough to deliver a quarter plus a half. Reversing the rule for the last step (one half plus the half of the remaining) would be "cheating". (You can reverse everywhere, which works for $15/2$.) This problem equation is in fact linear and has a single solution. Alternating the rule at will would yield up to $16$ solutions, but I doubt this is in the spirit of the puzzle. –  Dec 16 '17 at 10:18
1

The iterations follow an arithmetico-geometric progression

$$x\to\\ ax+b\to\\ a(ax+b)+b=a^2x+ab+b\to\\ a(a^2x+ab+b)+b=a^3x+a^2b+ab+b\to\cdots$$

and after $n$ steps,

$$x\to a^nx+\frac{1-a^n}{1-a}b.$$

In the given case, $a=\frac12,b=-\frac12$,

$$\frac x{16}-2\left({1-\frac1{16}}\right)\frac12=0,$$ or $x=15$.