Sunday Times Teaser 3066 – Leaning Tower of Pesos
by Howard Williams
Published Sunday June 27 2021 (link)
I have six old coins worth an odd number of pesos, comprising a mixture of one- and two-peso coins. Both denominations are of the same diameter and made of the same metal, but the two-peso coins are twice the thickness of the one-peso coins.
After making a vertical stack of the coins I then slid each of the top five coins as far as possible to the right, to make the pile lean as much as possible in that direction, without toppling. I managed to get the rightmost edge of the top coin a distance of one and a quarter times its diameter further right than the rightmost edge of the bottom coin.
Starting from the top, what is the value of each of the six coins?
2 Comments
Leave one →
-
Brian Gladman permalink12345678910111213141516171819202122232425262728293031323334# +---------------------+# previous coins | Σ(w) ↓ |# +-----+---------------------+# current coin | w ↓ |< d >|# +---------------------+# |<- R ->| ↓ Σ(w) + w# coin radius R |<-- d' -->|## d'.(Σ(w) + w) = d.Σ(w) + (R + d).w# d' = d + R.w / (Σ(w) + w)from itertools import productfrom fractions import Fraction as RF# use the coin radius as the unit of length# consider the weights of the top five coins# from the top downfor c5 in product((1, 2), repeat=5):# the top coin has a displacement of oned, ws = 1, c5[0]for w in c5[1:]:# the cumulative weightws += w# the cumulative displacementd += RF(w, ws)# we need a final displacement of 5/2if d == RF(5, 2):# the sixth (base) coin must make the# total value of the six coins oddc6 = c5 + (sum(c5) % 2 + 1,)print(f"Coins (top down): {c6}")
-
GeoffR permalink12345678910111213141516171819# Reference: Brian's diagram for weights/offsetsfrom itertools import productd1 = 1.0 # radius of top coin and initial offset# d2, d3, d4, d5 are offsets of 2nd, 3rd, 4th, 5th coinsfor W in product(range(1,3), repeat=6):W1, W2, W3, W4, W5, W6 = Wd2 = d1 + W2 / (W1 + W2)d3 = d2 + W3 / (W1 + W2 + W3)d4 = d3 + W4 / (W1 + W2 + W3 + W4)d5 = d4 + W5 / (W1 + W2 + W3 + W4 + W5)# The cumulative top coin offset is 2.5 (5/2 of the radius)if abs(d5 - 2.5) < 0.000001:# Six old coins are worth an odd number of pesosif (W1 + W2 + W3 + W4 + W5 + W6) % 2 == 1:print(f"Coin Values (from top)= {W1},{W2},{W3},{W4},{W5},{W6}")