stack overload

The Riddle this week is rather straightforward to explain: stacking identical objects (bars of length and mass two, say) on top of one another so that the center of each new bar is uniformly distributed along the previous bar, what is the distribution of the number of bars when the stack collapses? If I am not confused, the stack collapses the first time the centre of gravity of an upper stack leaves the interval represented by the bar just below. Namely

\left|\frac{1}{N-j} \sum_{i=j+1}^N x_i -x_j\right|>1

when the xi are the bar centres, or equivalently

\max_{2\le j\le N-1} \left|\frac{1}{N-j} \sum_{i=j+1}^N \sum_{k=j+1}^i\epsilon_i \right|>1

where the ε_i‘s are U(-1,1). Which is straightforward to code in R by looking at means of cumulated sums.

3 Responses to “stack overload”

  1. How about a variant: what’s the maximum allowable offset to guarantee the tower never collapses? Consider the related game where you stack blocks (or playing cards) until the top one lies entirely outside the location of the first one. In that game, the cards’ positions follow a log curve when the number of cards required is a minimum.

  2. […] article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.