The Baker Vs Annoying Customer

A new bakery shop presented 3 3 sizes of cakes on the shelf: big, medium, and small. Originally, the prices were set at whole numbers of dollars for each cake of a kind such that the price ratio of any 2 cake types can be expressed as fraction of 2 consecutive numbers, where only 4 consecutive numbers were used. However, for the grand opening day, the prices were discounted by 1 1 dollar each.

Later on that day, a casual customer came to this shop and spoke with the lady baker.

Customer : How much does it cost to buy 1 1 big, 1 1 medium, and 1 1 small cakes, in total?

When the baker told him the total cost, the easy-looking customer took out such amount of cash onto the counter but, then suddenly, added 1 1 extra dollar into it, much to her surprise.

Customer : Now, can you arrange a combination of cakes for all this money?

Baker : I'm sorry. I'm afraid that's not possible, but if you add just one or some more dollars into it, I can arrange the cakes at whatever price you want.

How much would each size of cake cost, in dollars, on this grand opening day? Submit your answer as the sum of all types combined.


The answer is 36.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Mark Hennings
May 31, 2019

For the cake starting prices, suppose that the four integers used in the ratios are a , a + 1 , a + 2 , a + 3 a,a+1,a+2,a+3 , so we are playing with three ratios, a + 1 a \tfrac{a+1}{a} , a + 2 a + 1 \tfrac{a+2}{a+1} , a + 3 a + 2 \tfrac{a+3}{a+2} . If r S M , r M B , r S B r_{SM}, r_{MB}, r_{SB} are the ratios of the costs of small to medium, medium to big and small to big, then r S B = r S M r M B r_{SB} = r_{SM}r_{MB} is greater than both r S M r_{SM} and r M B r_{MB} . If the two ratios r S M = r M B r_{SM} = r_{MB} then the equation of ratios r S B = r S M r M B r_{SB} = r_{SM}r_{MB} must be ( a + 3 ) 2 ( a + 2 ) 2 = a + 1 a \tfrac{(a+3)^2}{(a+2)^2} = \tfrac{a+1}{a} , which has no solutions in integers. Thus the two ratios r S M , r M B r_{SM},r_{MB} are distinct, and so the equation of ratios r S B = r S M r M B r_{SB} = r_{SM}r_{MB} is a + 1 a = a + 2 a + 1 a + 3 a + 2 = a + 3 a + 1 \tfrac{a+1}{a} = \tfrac{a+2}{a+1}\tfrac{a+3}{a+2} = \tfrac{a+3}{a+1} , and hence a = 1 a=1 is the only positive integer solution. Thus r S M , r M B = 3 2 , 4 3 r_{SM},r_{MB} = \tfrac32, \tfrac43 in some order, with r S B = 2 1 = 2 r_{SB} = \tfrac21=2 . There are thus two cases: the small/medium/big prices being 2 n , 3 n , 4 n 2n,3n,4n for some positive integer n n , or 3 n , 4 n , 6 n 3n,4n,6n for some positive integer n n .

Suppose that prices are of the form 2 n , 3 n , 4 n 2n,3n,4n . Then the opening day prices are 2 n 1 , 3 n 1 , 4 n 1 2n-1,3n-1,4n-1 , and 9 n 2 9n-2 cannot be achieved, but 9 n 1 9n-1 can be achieved using these opening day prices. Since 7 7 can be achieved using 1 , 2 , 3 1,2,3 , n 1 n \neq 1 . Since 16 16 can be achieved using 3 , 5 , 7 3,5,7 , n 2 n \neq 2 . Since 25 25 can be achieved using 5 , 8 , 11 5,8,11 , n 3 n \neq 3 . Since 35 35 cannot be achieved using 7 , 11 , 15 7,11,15 , n 4 n \neq 4 . Hence we deduce that n 5 n \ge 5 . Since 9 n 1 9n-1 can be achieved using 2 n 1 , 3 n 1 , 4 n 1 2n-1,3n-1,4n-1 , we can find nonnegative integers a , b , c a,b,c such that a ( 2 n 1 ) + b ( 3 n 1 ) + c ( 4 n 1 ) = 9 n 1 a(2n-1) + b(3n-1) + c(4n-1) \; = \; 9n-1 , and hence ( 2 a + 3 b + 4 c 9 ) n = a + b + c 1 (2a + 3b + 4c - 9)n \; = \; a+b+c-1 Thus a + b + c 1 5 ( 2 a + 3 b + 4 c 9 ) a+b+c-1 \ge 5(2a+3b+4c-9) , so we have 2 a + 3 b + 4 c 10 9 a + 14 b + 19 c 44 2a + 3b + 4c \ge 10 \hspace{2cm} 9a + 14b + 19c \le 44 Thus 9 ( 10 3 b 4 c ) 18 a 2 ( 44 14 b 19 c ) 9(10 - 3b - 4c) \le 18a \le 2(44 - 14b - 19c) , and so b + 2 c 2 b + 2c \le -2 . Thus there are no solutions to these inequalities in nonnegative integers. This case is impossible.

Thus the prices must be of the form 3 n , 4 n , 6 n 3n,4n,6n , making the opening day prices 3 n 1 , 4 n 1 , 6 n 1 3n-1,4n-1,6n-1 , and 13 n 2 13n-2 cannot be achieved, but 13 n 1 13n-1 can be achieved using the opening day prices. Since 11 11 can be achieved using 2 , 3 , 5 2,3,5 , n 1 n \neq 1 . Since 24 24 can be achieved using 5 , 7 , 11 5,7,11 , n 2 n \neq 2 . Suppose now that n 4 n \ge 4 . Since 13 n 1 13n-1 can be achieved, we can find nonnegative integers a , b , c a,b,c such that a ( 3 n 1 ) + b ( 4 n 1 ) + c ( 6 n 1 ) = 13 n 1 a(3n-1) + b(4n-1) + c(6n-1) = 13n-1 , and hence ( 3 a + 4 b + 6 c 13 ) n = a + b + c 1 (3a + 4b + 6c - 13)n \; = \; a + b + c - 1 Thus we deduce that a + b + c 1 4 ( 3 a + 4 b + 6 c 13 ) a+b+c-1 \ge 4(3a + 4b + 6c - 13) , and hence 3 a + 4 b + 6 c 14 11 a + 15 b + 23 c 51 3a + 4b + 6c \ge 14 \hspace{2cm} 11a + 15b + 23c \le 51 Thus 11 ( 14 4 b 6 c ) 33 a 3 ( 51 15 b 23 c ) 11(14 - 4b - 6c) \le 33a \le 3(51 - 15b - 23c) , and so b + 3 c 1 b + 3c \le -1 . Thus there are no nonnegative integer solutions to these inequalities. Thus the only option left is that n = 3 n=3 .

The original prices are 9 , 12 , 18 9,12,18 , and the opening day prices are 8 , 11 , 17 8,11,17 . The Frobenius number of 8 , 11 , 17 8,11,17 is 37 = 8 + 11 + 17 + 1 37 = 8 + 11 + 17 + 1 , so the answer is 36 \boxed{36} .

K T
Jul 15, 2019

I will only use ratios r in the range 0<r<1

Suppose that the original prices were p 1 , p 2 , p 3 p_1, p_2, p_3 with p 1 < p 2 < p 3 p_1<p_2<p_3 , then the three ratios are { p 1 p 2 , p 2 p 3 , p 1 p 3 } \{\frac{p_1}{p_2}, \frac{p_2}{p_3}, \frac{p_1}{p_3}\}

Let the 4 consecutive numbers be x , x + 1 , x + 2 x, x+1, x+2 and x + 3 x+3 , then the possible fractions of 2 consecutive numbers are { x x + 1 , x + 1 x + 2 , x + 2 x + 3 } \{\frac {x}{x+1}, \frac{x+1}{x+2},\frac{x+2}{x+3}\}

First, we must construct a mapping between these sets.

Picking the smallest fraction from each set we must have p 1 p 3 = x x + 1 \frac{p_1}{p_3} = \frac{x}{x+1} .

The product of the other two fractions is p 1 p 2 p 2 p 3 = p 1 p 3 \frac{p_1}{p_2} \frac{p_2}{p_3} =\frac{ p_1}{p_3} so that we must have x + 2 x + 3 x + 1 x + 2 = x x + 1 \frac{x+2}{x+3} \frac{x+1}{x+2} = \frac{x}{x+1} which simplifies to

( x + 1 ) 2 = x ( x + 3 ) (x+1)^2 = x(x+3) x 2 + 2 x + 1 = x 2 + 3 x \Leftrightarrow x^2+2x+1 = x^2+3x x = 1 \Leftrightarrow x=1 so that the fractions must be 1 2 , 2 3 , 3 4 \frac12, \frac23, \frac34

Now there are two possibilities:

Case A

p 1 p 2 = 2 3 \frac{p_1}{p_2}= \frac{2}{3} and p 2 p 3 = 3 4 \frac{p_2}{p_3}= \frac{3}{4} so that there is a positive integer k such that p 1 = 2 k , p 2 = 3 k , p 3 = 4 k p_1=2k,  p_2=3k , p_3=4k

Discount prices are p 1 1 = 2 k 1 , p 2 1 = 3 k 1 , p 3 1 = 4 k 1 p_1-1=2k-1, p_2-1=3k-1 , p_3-1=4k-1

The amount on the counter is 9 k 2 9k-2

k on counter p 1 1 p_1-1 p 2 1 p_2-1 p 3 1 p_3-1 comment
1 7 1 2 3 any price could be made
2 16 3 5 7 16=2×3+2×5
3 25 5 8 11 25=5×5
4 34 7 11 15 34 cannot be constructed, as a sum, but neither can 38

Case B

p 1 p 2 = 3 4 \frac{p_1}{p_2}= \frac{3}{4} and p 2 p 3 = 2 3 \frac{p_2}{p_3}= \frac{2}{3} so that there is a positive integer k so that p 1 = 3 k , p 2 = 4 k , p 3 = 6 k p_1=3k, p_2=4k, p_3=6k

Discount prices are p 1 1 = 3 k 1 , p 2 1 = 4 k 1 , p 3 1 = 6 k 1 p_1-1=3k-1, p_2-1=4k-1 , p_3-1=6k-1

The amount on the counter is 13 k 2 13k-2

k on counter p 1 1 p_1-1 p 2 1 p_2-1 p 3 1 p_3-1 comment
1 11 2 3 5 11=3×3+2
2 24 5 7 11 24=2×5+2×7
3 37 8 11 17 37 cannot be constructed as a sum, all higher integers can

Conclusion In case B, with k = 3 k=3 , the discount prices are 8 , 11 , 17 8,11,17 . Construction of a sum of 37 is not possible, but I could construct 38 through 45 and hence all higher numbers by adding multiples of 8.

So the answer is 8 + 11 + 17 = 36 8+11+17=\boxed{36}

Alex Burgess
May 28, 2019

Lets label the cake prizes (Big, Medium, small) = $ A , B , C A, B, C , with A B C A \geq B \geq C .

Clearly, if there are any equalities, the ratio would be 1 : 1 1:1 and invalid.

A C = c 1 + 1 c 1 = 1 + 1 c 1 , B C = c 2 + 1 c 2 = 1 + 1 c 2 , \frac{A}{C} = \frac{c_1+1}{c_1} = 1 + \frac{1}{c_1}, \frac{B}{C} = \frac{c_2+1}{c_2} = 1 + \frac{1}{c_2}, so c 2 > c 1 c_2 > c_1 .

For there to be only 4 consecutive integers between the 3 ratios, 1) c 2 = c 1 + 1 c_2 = c_1 + 1 OR 2) c 2 = c 1 + 2 c_2 = c_1 + 2 .


1) C = k ( k + 1 ) n , B = k ( k + 2 ) n , A = ( k + 1 ) 2 n C = k(k+1) n, B = k(k+2) n, A = (k+1)^2 n

A C = k + 1 k \frac{A}{C} = \frac{k+1}{k}

B C = k + 2 k + 1 \frac{B}{C} = \frac{k+2}{k+1}

A B = ( k + 1 ) 2 k ( k + 2 ) = k 2 + 2 k + 1 ) k 2 + 2 k \frac{A}{B} = \frac{(k+1)^2}{k(k+2)} = \frac{k^2 + 2k + 1)}{k^2 + 2k}

These are 4 consecutive numbers if k 2 + 2 k = k ( k + 2 ) = k 1 k^2 + 2k = k(k+2) = k - 1 OR k + 2 k + 2 .

k ( 2 k + 1 ) ( k + 2 ) k(2k+1) \geq (k+2) with equality iff k = 1 k = 1 .

So ( A , B , C ) = ( 4 , 3 , 2 ) n (A,B,C) = (4,3,2) n .


2) i) Consider the case when ( c 2 , c 1 ) (c_2, c_1) = 2:

C = 2 k ( k + 1 ) n , B = k ( 2 k + 3 ) n , A = ( k + 1 ) ( 2 k + 1 ) n C = 2k(k+1) n, B = k(2k+3) n, A = (k+1)(2k+1) n

A C = 2 k + 1 2 k \frac{A}{C} = \frac{2k+1}{2k}

B C = 2 k + 3 2 k + 2 \frac{B}{C} = \frac{2k+3}{2k+2}

A B = ( k + 1 ) ( 2 k + 1 ) k ( 2 k + 3 ) = 2 k 2 + 3 k + 1 ) 2 k 2 + 3 k \frac{A}{B} = \frac{(k+1)(2k+1)}{k(2k+3)} = \frac{2k^2 + 3k + 1)}{2k^2 + 3k}

These are 4 consecutive numbers if 2 k 2 + 3 k = k ( 2 k + 3 ) = 2 k 2k^2 + 3k = k(2k+3) = 2k OR 2 k + 1 2k + 1 OR 2 k + 2 2k + 2 .

But k ( 2 k + 3 ) ( 2 k + 3 ) k(2k+3) \geq (2k+3) . So no solutions.

ii) ( c 2 , c 1 ) (c_2, c_1) = 1: (With 2 k 2 \nmid k )

C = k ( k + 2 ) n , B = k ( k + 3 ) n , A = ( k + 1 ) ( k + 2 ) n C = k(k+2) n, B = k(k+3) n, A = (k+1)(k+2) n

A C = k + 1 k \frac{A}{C} = \frac{k+1}{k}

B C = k + 3 k + 2 \frac{B}{C} = \frac{k+3}{k+2}

A B = ( k + 1 ) ( k + 2 ) k ( k + 3 ) = k 2 + 3 k + 2 ) k 2 + 3 k = k k + 3 2 + 1 k k + 3 2 \frac{A}{B} = \frac{(k+1)(k+2)}{k(k+3)} = \frac{k^2 + 3k + 2)}{k^2 + 3k} = \frac{k \frac{k+3}{2} + 1}{k \frac{k+3}{2}} .

These are 4 consecutive numbers if k k + 3 2 = k k \frac{k+3}{2} = k OR k + 1 k + 1 OR k + 2 k + 2 .

k k + 3 2 > k k \frac{k+3}{2} > k .

k k + 3 2 = k + 1 k ( k + 3 ) = 2 ( k + 1 ) k 2 + k 2 = 0 k = 1 k \frac{k+3}{2} = k + 1 \implies k(k+3) = 2(k+1) \implies k^2 + k - 2 = 0 \implies k = 1 .

k k + 3 2 = k + 2 k ( k + 3 ) = 2 ( k + 2 ) k 2 + k 4 = 0 k \frac{k+3}{2} = k + 2 \implies k(k+3) = 2(k+2) \implies k^2 + k - 4 = 0 , which has no integral solutions.

So ( A , B , C ) = ( 6 , 4 , 3 ) n (A,B,C) = (6,4,3) n .


Possibilities are ( A , B , C ) = ( 4 , 3 , 2 ) n (A,B,C) = (4,3,2) n OR ( A , B , C ) = ( 6 , 4 , 3 ) n (A,B,C) = (6,4,3) n .

Let A = A 1 A' = A - 1 etc, N = A + B + C N = A' + B' + C' .

If the difference between 2 sizes is 1, N + 1 N + 1 is reachable.

For N + 2 N + 2 to be reachable:

a) x B + y C = N + 2 xB' + yC' = N + 2 x , y 0 x,y \geq 0 .

b) A + 2 B = N + 2 A' + 2B' = N + 2

c) A + y C = N + 2 A' + yC' = N + 2 , y > 1 y > 1

d) 2 A = N + 2 2A' = N + 2

e) 2 A + B = N + 2 2A' + B' = N + 2

f) 2 A + C = N + 2 2A' + C' = N + 2


b) B = C + 2 B' = C' + 2

1) n = 2 n=2 : ( A , B , C ) = ( 7 , 5 , 3 ) (A',B',C') = (7,5,3)

but 3 + 3 + 5 + 5 = N + 1 3 + 3 + 5 + 5 = N + 1 .

2) n = 2 n=2 : ( A , B , C ) = ( 11 , 7 , 5 ) (A',B',C') = (11,7,5)

but 5 + 5 + 7 + 7 = N + 1 5 + 5 + 7 + 7 = N + 1 .


c) ( y 1 ) C = B + 2 (y-1)C' = B' + 2

C < B C' < B' ,

1) 2 C B = n 1 2C' - B' = n - 1

n = 3 n = 3 : ( A , B , C ) = ( 11 , 8 , 5 ) (A',B',C') = (11,8,5)

but 5 × 5 = N + 1 5 \times 5 = N + 1 .

2) 2 C B = 2 n 1 2C' - B' = 2n - 1 X


d) A = B + C + 2 A' = B' + C' + 2

A B C = 1 n A' - B' - C' = 1 - n X


e) A = C + 2 A = B + 1 A' = C' + 2 \implies A' = B' + 1 X


f) A = B + 2 A' = B' + 2

1) n = 2 n=2 X

2) n = 1 n=1 X


finally a) x B + y C = A + 2 xB' + yC' = A' + 2 where x , y 1 x,y \geq -1 .

i) x = 1 x = -1 : y C = A + B + 2 yC' = A' + B' + 2 :

1) ( 2 n 1 ) y = 7 n (2n-1)y = 7n

y = 4 y = 4 : n = 4 n = 4 : ( A , B , C ) = ( 15 , 11 , 7 ) (A',B',C') = (15,11,7)

34 isn't reachable but neither is 38 38 . X and any larger y y and n n will be smaller, and these have already been tested.

2) ( 3 n 1 ) y = 10 n (3n-1)y = 10n

y = 4 y = 4 : n = 2 n = 2 X Any larger y y and n n will be smaller.

ii) x = 0 x = 0 : y C = A + 2 yC' = A' + 2 :

1) ( 2 n 1 ) y = 4 n + 1 (2n-1)y = 4n + 1

y = 3 y = 3 : n = 2 n = 2 X

2) ( 3 n 1 ) y = 6 n + 1 (3n-1)y = 6n + 1

y = 3 y = 3 : n < 2 n < 2 X

iii) x = 1 x = 1 : y C = A B + 2 yC' = A' - B' + 2 :

1) ( 2 n 1 ) y = n + 2 (2n-1)y = n + 2

y = 1 y = 1 : n = 3 n = 3 X

2) ( 3 n 1 ) y = 2 n + 2 (3n-1)y = 2n + 2

y = 1 y = 1 : n = 3 n = 3 : ( A , B , C ) = ( 17 , 11 , 8 ) (A',B',C') = (17,11,8)

36 = 17 + 11 + 8 36 = 17 + 11 + 8

37 X 37 X

38 = 2 × 11 + 2 × 8 38 = 2 \times 11 + 2 \times 8

39 = 17 + 2 × 11 39 = 17 + 2 \times 11

40 = 5 × 8 40 = 5 \times 8

41 = 17 + 3 × 8 41 = 17 + 3 \times 8

42 = 2 × 17 + 8 42 = 2 \times 17 + 8

43 = 11 + 4 × 8 43 = 11 + 4 \times 8

44 = 36 + 8 44 = 36 + 8

45 = 2 × 17 + 11 45 = 2 \times 17 + 11

subsequent combinations can be made by adding 8 8 to existing ones.

iv) x 2 x \leq 2 : y C A 2 B + 2 < 0 yC' \leq A' - 2B' + 2 < 0 for 1) and 2), so y = 1 y = -1 :

x B = A + C + 2 xB' = A' + C' + 2

1) ( 3 n 1 ) x = 6 n (3n - 1)x = 6n :

x = 3 x = 3 : n = 1 n = 1 X

2) ( 4 n 1 ) x = 9 n (4n - 1)x = 9n :

x = 3 x = 3 : n = 1 n = 1 X.


This is all the possibilities, hence the only solution is ( A , B , C ) = ( 17 , 11 , 8 ) (A',B',C') = (17,11,8)

Originally this is 18 , 12 , 9 18, 12, 9 .

TL;DR:

The only possible prices satisfying the ration conditions are of the forms ( 4 , 3 , 2 ) n (4,3,2)n and ( 6 , 4 , 3 ) n (6,4,3)n .

For N = N = total for one of each with the reduced price. The only possible way to miss N + 1 N + 1 but reach N + 2 N + 2 , is if had (in reduced price):

( 15 , 11 , 7 ) (15, 11, 7) OR 17 , 11 , 8 17, 11, 8 .

The prior cannot reach 38 38 .

The latter can reach all numbers greater than 37 37 .

Alex Burgess - 2 years ago

2 pending reports

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...