Overhanging CardsGreg Warrington - 08.05.05Fact: To make a stack of cards to overhang a table by a given amount (without using any trickery) you should make the overhang of each card over the one below proceed according to the harmonic numbers. More precisely: Assume each card is two units in length. The top card should overhang the one below by 1 unit. The second card from the top should overhang the one below by 1/2 of a unit. The third card from the top should overhang the one below by 1/3 of a unit. The fourth card from the top should overhang the one below by 1/4 of a unit. Etc..... If you know the formula for computing center of mass, then it is not too hard to prove this by induction. The above procedure will yield the maximum possible overhang for a given number of cards.The following program displays such a stack of cards.This Maple program has been modified from http://www.xmath.ous.ac.jp/~shimeno/maple/overhang-e.htmlIt is based on an idea from Graham, Knuth, & Patashnik, Concrete Mathematics. A Foundation for Computer Science 2nd ed., Addison Wesley, 1994which they credit to R. T. Sharp, "Problem 52: Overhaning dominoes," Pi Mu Epsilon Journal, 1, 10 (1954) 411-412.Run the worksheet (e.g., Edit->Execute->Worksheet from the menus).The maximal overhang for 10 cards should appear.Code for plotting cards# These two commands tell maple to load some useful plotting stuff
# such as the "rectangle" command
with(plottools): with(plots):
# This defines a procedure which will plot a stack n cards that overhangs maximally
# Just use overhang(5) to draw a stacking picture with 5 cards
overhang := proc(n::posint)
local lcx, lcy, i, len, hgt, table, vline;
# len is the length of the card (viewed from the side)
# hgt is the height of the card
len := 2:
hgt := 1:
# This rectangle will be a table
table := rectangle([-2*len,-2*hgt], [0,0], color=brown):
# This line makes it clear which cards don't overlap the table
vline := line([0,0],[0,n*hgt],color=black,linestyle=3,thickness=3):
# lcx stores the left x-coordinate of each card, initialized for the bottom card
# lcy stores the bottom y-coordinate of each card, initialized for the bottom card
lcx := -len:
lcy := -hgt:
# The following loop creates cards card1, card2, card3, ...
# with the cards being counted from the top
for i from 1 to n do
# the i'th card is shifted 1/(n+1-i) to the right of the one below
lcx := lcx+1/(n+1-i):
# each card is hgt units higher than the one below
lcy := lcy+hgt:
# || is the concatenation operator
card||i := rectangle([lcx,lcy+hgt], [lcx+len,lcy], color=blue):
od:
# Now we plot both the table and all the cards
# We also put a few helpful labels on the axes
display({table, vline, seq(card||i, i=1..n)},
xtickmarks=[-2,0,sum(1/k, k=1..n)], ytickmarks = [0,n], axes=frame);
end:overhang(10);Now try plugging in some different (reasonable) values.Whats the minimum number of cards do you need to get the top card to completely overhang the table? (Hint: It's less than 10).How does the shape of the stack change as you increase the number of cards?You can type "overhang(100)" on the line below to get a new picture with 100 cards.