tag:blogger.com,1999:blog-2433841880619171855.post1412818950378306220..comments2024-08-03T13:11:45.247+01:00Comments on Pat'sBlog: Pancakes on My MindUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2433841880619171855.post-46383842337395901142013-01-15T05:19:40.829+00:002013-01-15T05:19:40.829+00:00This reminds me of a card "game" that I ...This reminds me of a card "game" that I saw in an article by Martin Gardner many years ago. In actual fact, the game is really another look at the same thing.<br /><br />You take all cards of one suit (say Spades) and shuffle them. Then you turn the stack face up. Let's say the top card is a 5; you deal off five cards, one by one, and put them back on your stack (in essence "flipping" the top five "pancakes.") Whatever the new card showing, you now flip that many cards. When the card showing is an Ace (counted as a one), of course the game is over.<br /><br />There are all kinds of associated probability questions, such as: What is the probability that following the sequence will result in a perfect K through Ace arrangement once the Ace is on top? What's the maximum number of moves possible for a given stack? IS there a maximum, or is it possible to have a stack that would keep going in a "loop" under the given instructions?<br /><br />Answer to that one: it's not possible; the game will always reach an end. The proof, which I thought was quite clever, involved assigning each arrangement a "value" based on binary powers of the cards in "correct" positions. In other words, if the five is in the correct position—fifth card down from the top—that's worth 2^5, or 32. If the King is on the very bottom of the stack—13th position—that's worth 2^13. Then it can be noted that a move from any arrangement will always increase the "value" of the stack, and also it is noted that there is a maximum value for all the cards.<br /><br />The cards may serve as a useful model for this pancake problem as well.mwildcardhttps://www.blogger.com/profile/15079341524208450172noreply@blogger.comtag:blogger.com,1999:blog-2433841880619171855.post-45689672689934506632009-02-28T18:52:00.000+00:002009-02-28T18:52:00.000+00:0031542 13542 flip top two45312 flip top four54312 f...31542 <BR/>13542 flip top two<BR/>45312 flip top four<BR/>54312 flip top two<BR/>21345 flip all five<BR/>12345 flip top two<BR/><BR/>(flips them in five flips)... <BR/><BR/>So the flipping process can take advantage of the configuration of the entire stack and it is not necessarily optimum to put the biggest pancake on the bottom first. Adding a pancake does not add one more layer to the process, but in some cases it will provide the freedom to take a shortcut. <BR/><BR/>Does this problem lend itself to induction in a more subtle manner than what I so cavalierly and incorrectly assumed?Natehttps://www.blogger.com/profile/02447378242231039304noreply@blogger.com