Wikipedia:Reference desk/Archives/Mathematics/2021 June 16

From Wikipedia, the free encyclopedia
Mathematics desk
< June 15 << May | June | Jul >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


June 16[edit]

What is the probability of winning this solitaire game?[edit]

This is a solitaire game played with a standard 48-card Hanafuda deck. To play the game, you shuffle the deck and make an array of 4x11. You take the last four cards for yourself, they will become your hand.

You start by flipping over any of the 44 cards on the playing surface. Hanafuda decks have 12 suits. If the card in your hand is the same suit as the card you flipped over, you put it in the same column. If not, you replace it. If that card is in the willow suit, however, you put the willow card to the side and replace it with the one in your hand. Your hand is now reduced by one card. You continue the game until either you draw four willow cards (loss) or flip over and arrange all 11 columns in the playing surface.

What is the probability of a player winning this game? Additionally, how can I make a line graph portraying probability of victory by turn number?

Courtesy link: Hanafuda.  --Lambiam 17:15, 16 June 2021 (UTC)[reply]
The rules are not entirely clear to me. "the card in your hand": do you mean, any of the cards in your hand? "... you put it in the same column": why or how does it matter where you put it? "If that card is in the willow suit": which card: the one in your hand, the one you just flipped over, or the replacement card? "You continue the game until ...": what if your hand has become empty? "flip over and arrange all 11 columns in the playing surface": I don't understand what this means. Until all cards have been flipped over?  --Lambiam 17:27, 16 June 2021 (UTC)[reply]
Here is a webpage that explains the game better than I can. http://hanafudahawaii.com/gsolitaire1.html — Preceding unsigned comment added by 2001:5B0:2958:32F8:D58:A6F4:5F4B:1369 (talk) 22:48, 16 June 2021 (UTC)[reply]
Please correct my thinking.
  1. The arrangement in rows and columns is a red herring. If the upturned cards are placed somewhere else, we can just think of them as being in the spots where they should be according to the rules of the game. The official arrangement is an easy visual check that at the end a winning player has upturned all cards, but their empty hand means just as much.
  2. The player cannot affect their chance of winning by their selection of which card to exchange and put under their stack, since any remaining unrevealed card is as likely to have any still possible value as any other. So they may as well all be added to the stack already in the beginning.
  3. The simplified rules are now as follows. Initially, all cards are face down in the stack, in a random order. They are upturned one by one. As soon as all four willow cards have been revealed, it is game over. The player wins if then all cards have been upturned.
  4. It follows that the player wins if and only if the bottom card in the stack is a willow card. The probability is 1/12.
 --Lambiam 07:32, 17 June 2021 (UTC)[reply]
According to the link posted above, the arrangement of the cards does matter. The OP's description of a "hand" is also a bit misleading (usually, a player's "hand" is something they can see and choose which card to play from).
I will go by the rules of the link, namely: the game starts with 44 cards face down in groups of eleven columns and a pile of four cards ("stock"). At each turn you flip the top card of the stock, switch it face up with one of the cards on the board, which is revealed (?) goes to the bottom of the stock. If the card you took from the board is one of four willows, it decreases the stock by one. You win if there are eleven columns of cards face up grouped by suit.
If that understanding is correct, picking up a willow last is still a necessary condition to win: if there is one card still face down when you pick up the fourth willow, you lose even if the face-down card is in the correct column. Furthermore, if we only care about win or lose (in which case the number of properly-grouped suits when we pick the last willow does not matter), we can simply draw the first 43 cards without caring about the grouping. If we lose, we lose, and if we do not, we can easily make all the group arrangements as required (we can see all the cards but one at this stage). Therefore, with perfect play, picking up a willow last is a sufficient condition.
It may be that the switched card is not revealed as it enters the stock, but only when it surfaces to the top of the stock. (The link is not clear on that point.) While this delays the reveal of the willows at the starting phases, it does not really matter because the loss occurs at a point where there is only one card in the stock (hence the last willow's reveal is not delayed). TigraanClick here for my talk page ("private" contact) 11:04, 17 June 2021 (UTC)[reply]