Teaser 2999: Triangular card tower
From The Sunday Times, 15th March 2020 [link] [link]
Robbie leans two very thin playing cards together, then another two together, placing an identical card across the top forming a platform, and proceeding sideways and upwards to build a roughly triangular tower.
For the bottom layers, he uses a whole number of 53-card packs of large cards (integer length above 70mm), the number of packs equalling the number of bottom layers. He then uses small cards (75% size) to complete the tower, which is 1428mm high. The distance between the bases of two leaning cards is always 0.56 of the length of each card.
Robbie would like to extend the tower sideways and upwards to the next possible integer height (measured in mm), still using large cards only for the bottom layers.
How many extra cards would be needed in total?
[teaser2999]
Jim Randell 5:49 pm on 13 March 2020 Permalink |
I assumed a classic “house of cards” construction, where the bottom layer has n triangular supports, each constructed from 2 cards, and (n − 1) horizontal cards bridging between the supports. Each higher layer has one fewer supports than the layer below it, until we reach the top, which is composed of a single triangular support. (See my comment below for a justification of this assumption).
For the bottom layer, if there are n supports, that uses 2n cards, and then (n − 1) horizontal cards to make the platform for the next layer. In total it requires (3n − 1) cards.
So the total number of cards required in a tower with n layers is:
The supports are isosceles triangles. If the length of card is x, and the base of the support is 0.56x across, then the height of the support is 0.96x.
The cards are described as “very thin”, which I am assuming means they have zero thickness (even when multiple cards are measured).
This makes the height of a tower with n layers, of which the top m layers are constructed with cards that are 75% smaller as:
And in the first tower this total height is 1428 mm. Giving:
So the height of the larger cards is a divisor of 5950, and we are told it is greater than 70.
This Python program runs in 76ms.
Run: [ @repl.it ]
from enigma import (divisors_pairs, irange, inf, div, printf) # consider the length of the larger cards for (x, d) in divisors_pairs(5950, every=1): if not (x > 70): continue # consider the number of top rows m # and the total number of rows n for m in irange(1, inf): (n, r) = divmod(d + m, 4) if not (n > m): break if r != 0: continue # the total number of cards required (for the n rows) t = n * (3 * n + 1) // 2 # the number of smaller cards required (for the top m rows) s = m * (3 * m + 1) // 2 # and so the number of larger cards required (for the bottom n-m rows) b = t - s # the number of 53 card packs used is equal to the number of bottom rows if 53 * (n - m) != b: continue printf("x={x} -> m={m} n={n}; t={t} s={s} b={b}") # start adding k extra rows, counting the additional cards a = 0 for k in irange(1, inf): # add 3 cards for each bottom row a += 3 * (n - m) # and 3 cards for each top row, plus 2 for the new top a += 3 * (m + k) - 1 # calculate the new height h = div(6 * x * (4 * n + 3 * k - m), 25) # is it an integer? if h is not None: printf("-> additional cards = {a} [k={k} h={h}]") breakSolution: 355 extra cards are required.
The larger cards are 85 mm long (so the smaller cards are 63.75 mm long).
The original tower consisted of 21 layers. The top 14 layers being built using the smaller cards.
This requires 672 cards in total. 301 smaller cards are required, and 371 larger cards (= 7× 53).
Adding 5 extra layers to the tower requires 105 larger cards (1 short of 2 extra packs), and 250 smaller cards. Making the total number of extra cards required 355.
The height of the new tower is 1734 mm.
Analytically:
If n is the total number of layers in the tower (= the number of supports in the base layer), and m is the number of layers of smaller cards (so: m < n), then the requirement that the number of packs of larger cards used is the same as the number larger layers is:
This gives us a limited number of (n, m) pairs.
Then considering values for x:
And given that x > 70, this narrows (n, m, x) down to a single value, which defines the initial tower.
We then want to know how many lots of 0.72x we need to get an integer number of millimetres height increase.
And this gives us the number of extra oblique columns we need to add to the initial tower, and from this we can calculate the number of extra cards required.
All this can easily be tackled manually, or here is a quick program which looks at the possibilities:
from enigma import (divisors_pairs, irange, div, printf) # consider possible card sizes for (n, x) in divisors_pairs(1190): if not (x > 70): break # calculate n and m n += 7 m = 35 - n if not (n > m): continue # how many extra obliques to add? for k in irange(1, 25): h = div(18 * x * k, 25) if h is None: continue # calculate the additional number of cards a = k * (3 * k + 6 * n + 1) // 2 printf("x={x} n={n} m={m} -> k={k} h={h} a={a}") breakLikeLike
Jim Randell 4:45 pm on 15 March 2020 Permalink |
Here is a diagram of the solution found by my program, which assumes that each layer has one fewer supports than the layer below it.
However, if the spacing of the supports is constant, then the result is only “very roughly triangular”:
I also looked for a solution where a more “roughly triangular” shape is maintained, but this means that number of supports on the bottom layer of the smaller cards does not necessarily have one fewer supports than the layer of larger cards it is resting on (it will probably have more supports).
And I did find a solution:
However it does require the wording “layers” and “packs” in the puzzle text to include the possibility of a single layer and a single pack.
I think that my original solution is probably the one the setter is looking for.
In the original solution we can narrow the gaps between the supports in the lower part of the tower, and widen them in the upper part of the tower, to get a “roughly pentagonal” shape that is perhaps closer to the “rough triangle” that the setter is looking for. (Although applying it to the second solution would make it look even more triangular).
Here is the first solution rendered with altered spacing (but still constant within the sections):
And by varying the spacing within the sections it should be possible to reduce the kink in the oblique sides of the triangle, and possibly even eliminate it completely.
In fact the idea of varying the spacing opens up the possibility of many more possible towers where the number of supports in bottom layer of smaller cards is not one less than the number of supports in the top layer of the larger cards. (Or even violating this rule within a section). So I think it makes sense to restrict the towers considered to those where the number of supports decreases by one from the layer below.
LikeLike