A new bakery shop presented 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 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 big, 1 medium, and 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 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.
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.
I will only use ratios r in the range 0<r<1
Suppose that the original prices were p 1 , p 2 , p 3 with p 1 < p 2 < p 3 , then the three ratios are { p 2 p 1 , p 3 p 2 , p 3 p 1 }
Let the 4 consecutive numbers be x , x + 1 , x + 2 and x + 3 , then the possible fractions of 2 consecutive numbers are { x + 1 x , x + 2 x + 1 , x + 3 x + 2 }
First, we must construct a mapping between these sets.
Picking the smallest fraction from each set we must have p 3 p 1 = x + 1 x .
The product of the other two fractions is p 2 p 1 p 3 p 2 = p 3 p 1 so that we must have x + 3 x + 2 x + 2 x + 1 = x + 1 x which simplifies to
( x + 1 ) 2 = x ( x + 3 ) ⇔ x 2 + 2 x + 1 = x 2 + 3 x ⇔ x = 1 so that the fractions must be 2 1 , 3 2 , 4 3
Now there are two possibilities:
Case A
p 2 p 1 = 3 2 and p 3 p 2 = 4 3 so that there is a positive integer k such that p 1 = 2 k , p 2 = 3 k , p 3 = 4 k
Discount prices are p 1 − 1 = 2 k − 1 , p 2 − 1 = 3 k − 1 , p 3 − 1 = 4 k − 1
The amount on the counter is 9 k − 2
k | on counter | p 1 − 1 | p 2 − 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 2 p 1 = 4 3 and p 3 p 2 = 3 2 so that there is a positive integer k so that p 1 = 3 k , p 2 = 4 k , p 3 = 6 k
Discount prices are p 1 − 1 = 3 k − 1 , p 2 − 1 = 4 k − 1 , p 3 − 1 = 6 k − 1
The amount on the counter is 1 3 k − 2
k | on counter | p 1 − 1 | p 2 − 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 , the discount prices are 8 , 1 1 , 1 7 . 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 + 1 1 + 1 7 = 3 6
Lets label the cake prizes (Big, Medium, small) = $ A , B , C , with A ≥ B ≥ C .
Clearly, if there are any equalities, the ratio would be 1 : 1 and invalid.
C A = c 1 c 1 + 1 = 1 + c 1 1 , C B = c 2 c 2 + 1 = 1 + c 2 1 , so c 2 > c 1 .
For there to be only 4 consecutive integers between the 3 ratios, 1) c 2 = c 1 + 1 OR 2) c 2 = c 1 + 2 .
1) C = k ( k + 1 ) n , B = k ( k + 2 ) n , A = ( k + 1 ) 2 n
C A = k k + 1
C B = k + 1 k + 2
B A = k ( k + 2 ) ( k + 1 ) 2 = k 2 + 2 k k 2 + 2 k + 1 )
These are 4 consecutive numbers if k 2 + 2 k = k ( k + 2 ) = k − 1 OR k + 2 .
k ( 2 k + 1 ) ≥ ( k + 2 ) with equality iff k = 1 .
So ( A , B , C ) = ( 4 , 3 , 2 ) n .
2) i) Consider the case when ( 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 A = 2 k 2 k + 1
C B = 2 k + 2 2 k + 3
B A = k ( 2 k + 3 ) ( k + 1 ) ( 2 k + 1 ) = 2 k 2 + 3 k 2 k 2 + 3 k + 1 )
These are 4 consecutive numbers if 2 k 2 + 3 k = k ( 2 k + 3 ) = 2 k OR 2 k + 1 OR 2 k + 2 .
But k ( 2 k + 3 ) ≥ ( 2 k + 3 ) . So no solutions.
ii) ( c 2 , c 1 ) = 1: (With 2 ∤ k )
C = k ( k + 2 ) n , B = k ( k + 3 ) n , A = ( k + 1 ) ( k + 2 ) n
C A = k k + 1
C B = k + 2 k + 3
B A = k ( k + 3 ) ( k + 1 ) ( k + 2 ) = k 2 + 3 k k 2 + 3 k + 2 ) = k 2 k + 3 k 2 k + 3 + 1 .
These are 4 consecutive numbers if k 2 k + 3 = k OR k + 1 OR k + 2 .
k 2 k + 3 > k .
k 2 k + 3 = k + 1 ⟹ k ( k + 3 ) = 2 ( k + 1 ) ⟹ k 2 + k − 2 = 0 ⟹ k = 1 .
k 2 k + 3 = k + 2 ⟹ k ( k + 3 ) = 2 ( k + 2 ) ⟹ k 2 + k − 4 = 0 , which has no integral solutions.
So ( A , B , C ) = ( 6 , 4 , 3 ) n .
Possibilities are ( A , B , C ) = ( 4 , 3 , 2 ) n OR ( A , B , C ) = ( 6 , 4 , 3 ) n .
Let A ′ = A − 1 etc, N = A ′ + B ′ + C ′ .
If the difference between 2 sizes is 1, N + 1 is reachable.
For N + 2 to be reachable:
a) x B ′ + y C ′ = N + 2 x , y ≥ 0 .
b) A ′ + 2 B ′ = N + 2
c) A ′ + y C ′ = N + 2 , y > 1
d) 2 A ′ = N + 2
e) 2 A ′ + B ′ = N + 2
f) 2 A ′ + C ′ = N + 2
b) B ′ = C ′ + 2
1) n = 2 : ( A ′ , B ′ , C ′ ) = ( 7 , 5 , 3 )
but 3 + 3 + 5 + 5 = N + 1 .
2) n = 2 : ( A ′ , B ′ , C ′ ) = ( 1 1 , 7 , 5 )
but 5 + 5 + 7 + 7 = N + 1 .
c) ( y − 1 ) C ′ = B ′ + 2
C ′ < B ′ ,
1) 2 C ′ − B ′ = n − 1
n = 3 : ( A ′ , B ′ , C ′ ) = ( 1 1 , 8 , 5 )
but 5 × 5 = N + 1 .
2) 2 C ′ − B ′ = 2 n − 1 X
d) A ′ = B ′ + C ′ + 2
A ′ − B ′ − C ′ = 1 − n X
e) A ′ = C ′ + 2 ⟹ A ′ = B ′ + 1 X
f) A ′ = B ′ + 2
1) n = 2 X
2) n = 1 X
finally a) x B ′ + y C ′ = A ′ + 2 where x , y ≥ − 1 .
i) x = − 1 : y C ′ = A ′ + B ′ + 2 :
1) ( 2 n − 1 ) y = 7 n
y = 4 : n = 4 : ( A ′ , B ′ , C ′ ) = ( 1 5 , 1 1 , 7 )
34 isn't reachable but neither is 3 8 . X and any larger y and n will be smaller, and these have already been tested.
2) ( 3 n − 1 ) y = 1 0 n
y = 4 : n = 2 X Any larger y and n will be smaller.
ii) x = 0 : y C ′ = A ′ + 2 :
1) ( 2 n − 1 ) y = 4 n + 1
y = 3 : n = 2 X
2) ( 3 n − 1 ) y = 6 n + 1
y = 3 : n < 2 X
iii) x = 1 : y C ′ = A ′ − B ′ + 2 :
1) ( 2 n − 1 ) y = n + 2
y = 1 : n = 3 X
2) ( 3 n − 1 ) y = 2 n + 2
y = 1 : n = 3 : ( A ′ , B ′ , C ′ ) = ( 1 7 , 1 1 , 8 )
3 6 = 1 7 + 1 1 + 8
3 7 X
3 8 = 2 × 1 1 + 2 × 8
3 9 = 1 7 + 2 × 1 1
4 0 = 5 × 8
4 1 = 1 7 + 3 × 8
4 2 = 2 × 1 7 + 8
4 3 = 1 1 + 4 × 8
4 4 = 3 6 + 8
4 5 = 2 × 1 7 + 1 1
subsequent combinations can be made by adding 8 to existing ones.
iv) x ≤ 2 : y C ′ ≤ A ′ − 2 B ′ + 2 < 0 for 1) and 2), so y = − 1 :
x B ′ = A ′ + C ′ + 2
1) ( 3 n − 1 ) x = 6 n :
x = 3 : n = 1 X
2) ( 4 n − 1 ) x = 9 n :
x = 3 : n = 1 X.
This is all the possibilities, hence the only solution is ( A ′ , B ′ , C ′ ) = ( 1 7 , 1 1 , 8 )
Originally this is 1 8 , 1 2 , 9 .
TL;DR:
The only possible prices satisfying the ration conditions are of the forms ( 4 , 3 , 2 ) n and ( 6 , 4 , 3 ) n .
For N = total for one of each with the reduced price. The only possible way to miss N + 1 but reach N + 2 , is if had (in reduced price):
( 1 5 , 1 1 , 7 ) OR 1 7 , 1 1 , 8 .
The prior cannot reach 3 8 .
The latter can reach all numbers greater than 3 7 .
Problem Loading...
Note Loading...
Set Loading...
For the cake starting prices, suppose that the four integers used in the ratios are a , a + 1 , a + 2 , a + 3 , so we are playing with three ratios, a a + 1 , a + 1 a + 2 , a + 2 a + 3 . If r S M , r M B , r S B 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 is greater than both r S M and r M B . If the two ratios r S M = r M B then the equation of ratios r S B = r S M r M B must be ( a + 2 ) 2 ( a + 3 ) 2 = a a + 1 , which has no solutions in integers. Thus the two ratios r S M , r M B are distinct, and so the equation of ratios r S B = r S M r M B is a a + 1 = a + 1 a + 2 a + 2 a + 3 = a + 1 a + 3 , and hence a = 1 is the only positive integer solution. Thus r S M , r M B = 2 3 , 3 4 in some order, with r S B = 1 2 = 2 . There are thus two cases: the small/medium/big prices being 2 n , 3 n , 4 n for some positive integer n , or 3 n , 4 n , 6 n for some positive integer n .
Suppose that prices are of the form 2 n , 3 n , 4 n . Then the opening day prices are 2 n − 1 , 3 n − 1 , 4 n − 1 , and 9 n − 2 cannot be achieved, but 9 n − 1 can be achieved using these opening day prices. Since 7 can be achieved using 1 , 2 , 3 , n = 1 . Since 1 6 can be achieved using 3 , 5 , 7 , n = 2 . Since 2 5 can be achieved using 5 , 8 , 1 1 , n = 3 . Since 3 5 cannot be achieved using 7 , 1 1 , 1 5 , n = 4 . Hence we deduce that n ≥ 5 . Since 9 n − 1 can be achieved using 2 n − 1 , 3 n − 1 , 4 n − 1 , we can find nonnegative integers a , b , c such that a ( 2 n − 1 ) + b ( 3 n − 1 ) + c ( 4 n − 1 ) = 9 n − 1 , and hence ( 2 a + 3 b + 4 c − 9 ) n = a + b + c − 1 Thus a + b + c − 1 ≥ 5 ( 2 a + 3 b + 4 c − 9 ) , so we have 2 a + 3 b + 4 c ≥ 1 0 9 a + 1 4 b + 1 9 c ≤ 4 4 Thus 9 ( 1 0 − 3 b − 4 c ) ≤ 1 8 a ≤ 2 ( 4 4 − 1 4 b − 1 9 c ) , and so b + 2 c ≤ − 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 , making the opening day prices 3 n − 1 , 4 n − 1 , 6 n − 1 , and 1 3 n − 2 cannot be achieved, but 1 3 n − 1 can be achieved using the opening day prices. Since 1 1 can be achieved using 2 , 3 , 5 , n = 1 . Since 2 4 can be achieved using 5 , 7 , 1 1 , n = 2 . Suppose now that n ≥ 4 . Since 1 3 n − 1 can be achieved, we can find nonnegative integers a , b , c such that a ( 3 n − 1 ) + b ( 4 n − 1 ) + c ( 6 n − 1 ) = 1 3 n − 1 , and hence ( 3 a + 4 b + 6 c − 1 3 ) n = a + b + c − 1 Thus we deduce that a + b + c − 1 ≥ 4 ( 3 a + 4 b + 6 c − 1 3 ) , and hence 3 a + 4 b + 6 c ≥ 1 4 1 1 a + 1 5 b + 2 3 c ≤ 5 1 Thus 1 1 ( 1 4 − 4 b − 6 c ) ≤ 3 3 a ≤ 3 ( 5 1 − 1 5 b − 2 3 c ) , and so b + 3 c ≤ − 1 . Thus there are no nonnegative integer solutions to these inequalities. Thus the only option left is that n = 3 .
The original prices are 9 , 1 2 , 1 8 , and the opening day prices are 8 , 1 1 , 1 7 . The Frobenius number of 8 , 1 1 , 1 7 is 3 7 = 8 + 1 1 + 1 7 + 1 , so the answer is 3 6 .