Using a single deck (52 cards) the rules of the solitaire game are as follows.
1. Draw a card, counting "one". Draw the next card, counting "two". Keep counting and drawing cards until you reach thirteen and start again from one. (1 = Ace, .. 11 = Jack, 12 = Queen, 13 = King)
2. If at any point the number you count matches the card drawn, the game is lost.
3. The game is won if you can count through the whole deck.
How many deck combinations out of 52! lead to a winning game in this game of solitaire?
Counting solitaire
Re: Counting solitaire
Interesting problem to think about, I make the answer 1309302175551177162931045000259922525308763433362019257020678406144
using the Python code (0.03seconds):
I found it very helpful to consider placing all the cards of the same rank at the same time, and keep track of how many gaps I have left (J) in placing the cards so far. For each rank, j is how many gaps to fill in, and k is how many of the spare cards to use up.
using the Python code (0.03seconds):
Code: Select all
def derange_cards(J,C):
if C==0: return J==0
return sum(nCr(4,k)*nCr(4,j)*nPr(J,j)*nPr(J,k)*derange_cards(Jj+4k,C4) for j in range(min(4,J)+1) for k in range(min(4,J)+1))
derange_cards=Memoize(derange_cards)
print derange_cards(0,52)

 Posts: 3
 Joined: Tue Oct 14, 2014 5:09 am
Re: Counting solitaire
Cool game. Best of luck everyone.
Tammara
Check this amazing dream dictionary site which discusses different dreams, you can visit the dream site at dreamdictionarynow is has a dream dictionary az.
Check this amazing dream dictionary site which discusses different dreams, you can visit the dream site at dreamdictionarynow is has a dream dictionary az.