Teaser 2822: Losing weight
From The Sunday Times, 23rd October 2016 [link] [link]
The members of our local sports club are split into two groups. Originally the groups had the same number of members, and the first group contained member Waites who weighed 100kg (and indeed that was the average weight of the members of the first group). Then the club trainer decided that the groups were overweight and that, for each of the next ten weeks, for each group the average weight of the members should be reduced by one kilogram.
This was achieved by simply transferring a member from the first group to the second group each week, and Waites was the tenth member to be transferred.
How many members are there in the club?
[teaser2822]
Jim Randell 9:42 am on 14 September 2021 Permalink |
This Python program considers the number of members in each group, and performs the transfers to see if the conditions of the puzzle are met.
It runs in 54ms.
Run: [ @replit ]
from enigma import irange, inf, printf # S = starting average weight of group A # K = number of transfers from A -> B # W = weight of transfer number K (S, K, W) = (100, 10, 100) # suppose each group has n members for n in irange(K + 1, inf): m = 2 * n printf("n={n} ({m} members)") # initial total weight of the group is... t0 = S * n # K members of the group are transferred for k in irange(1, K): # the total weight becomes t1 = (S - k) * (n - k) w = t0 - t1 # average weights for group A and group B (a, b) = (S - k, w + n + k - 1) printf("{k}: transfer = {w}, A avg {a0} -> {a}, B avg {b0} -> {b}", a0=a + 1, b0=b + 1) t0 = t1 if w == W: printf("*** SOLUTION: n={n} ({m} members) ***") break printf()Solution: There are 38 members in the club.
The average weight in Group 1 decreases by 1 kg per week from 100 to 90, and the average weight in Group 2 decreases by 1 kg per week from 138 to 128. After 10 weeks there are 9 members in Group 1 and 29 members in Group 2.
Analytically:
If we suppose each group has n members, the the total weight of Group 1 starts out at 100n.
After the first transfer the average weight of Group 1 is 99 kg, so the total weight is 99(n − 1).
And the difference between these two totals accounts for the weight of the first person transferred:
After second transfer the average weight of Group 1 is 98kg, so the weight of the second person transferred is:
In general at the kth transfer, we have:
And we are told the weight of the 10th person transferred is 100 kg:
So, there are 2n = 38 members in total.
LikeLike