# Jack and Jill went up the Hill to play

A Simple Card Game.

This deck of cards has only four cards simply labeled 1, 2, 3, 4. They are placed face down.

Jack and Jill take turns to draw a card. You sum up the numbers drawn so far after each turn. If the sum is divisible by 3, last player to draw the card wins.

Jack goes first. What are his chances of winning the game?

Please provide detailed reasoning and calculations needed to arrive at your deduction.

• Do you mind if I edit the question to reflect the selected answer? – LeppyR64 Jun 19 '19 at 17:56
• Eh. On one answer you indicated that "if nobody wins after all four drawn, it is a draw..play a new game." On the accepted answer, if nobody wins after all four draws, you do not "play a new game", you shuffle the cards and continue the same game. Either way, the question doesn't say what to do, and it needs to. But it would be pretty unfair to tell an earlier answerer something specific, then not accept their answer that relied on your comment - and, instead, accept an answer that doesn't fit what your earlier comment said. – Rubio Jun 20 '19 at 2:39
• The reason I accepted was..it was more compact , generalized with fewer steps. Sometimes I cannot think of all possible angles when problem is framed..readers help with missing info sometimes..I edit quickly to correct them..answer Given is better than algebraic path I took..I took some of your previous advice and I try to be as fair as possible.. – Uvc Jun 20 '19 at 2:58
• Moving the goalposts on a question in a way that invalidates existing answers is something we don’t want puzzle posters to do. See What should I do if I’ve made a mistake in my question? for some relevant advice. Here, you didn’t even make an invalidating edit, you just made a clarifying comment on an answer (whose author then incorporated into said answer) and then disregarded that clarifying comment altogether in selecting a different answer ... but that is changing the goalposts. Please avoid that. – Rubio Jun 20 '19 at 13:16

Assuming that when the final card of the deck is drawn, the running total remains and the deck is reshuffled.

The game will continue at most 3 times through the deck. The count begins at zero (0 modulo 3), after the first pass through the deck the sum is ten (1 modulo 3), and after the second it will be twenty (2 modulo 3), and then thirty (0 modulo 3).

There are 24 permutations of a deck of four unique cards.

In the first pass through the deck, Jack will win 10 of these permutations, 6 will be draws, and 8 will be losses.

In the second pass through the deck, they start with a sum of one. Jack will win 10 of these permutations, 8 will be draws, and 6 will be losses.

In the third pass through the deck, they start with a sum of two. Jack will win 14 of these permutations and 10 will be losses.

This makes the probability of winning: Pw = (10/24) + (6/24) * ( (10/24) + (8/24) * (14/24) ) = 56.94%

Of the 13284 permutiations of 3 decks in order, (1234)(1234)(1234), Jack wins 7872 of them.

I'm going to assume that if the fourth card is drawn, and a multiple of 3 is never reached, the game is considered drawn and this is not a win condition for Jack.

If Jack draws 3, he wins. That's 25% right off the bat

Now going through other possibilities:

If Jack draws 1:

If Jill draws 2, Jack loses, if Jill draws 4, Jack can then draw 2 or 3, neither of which reach a multiple of 3, if Jill draws 3, Jack will win if he draws a 2, giving him a 1/4*1/3*1/2 = 4.167%

If Jack draws 2:

If Jill draws 1, Jack loses, if Jill draws 4, Jack loses, if Jill draws 3, Jack wins if he draws either a 1 or a 4, giving him a 1/4*1/3 = 8.333%

If Jack draws 4:

If Jill draws a 2, Jack loses, if Jill draws a 1, neither a 2 or 3 will win for Jack, and if Jill draws a 3, Jack wins if he draws a 2, giving him a 1/4*1/3*1/2 = 4.167%

Ultimately, this gives him odds of:

41.667%

EDIT: Adjusting for the fact that the game instead reset if there is a draw rather than being considered a "loss," I will calculate the odds of winning for Jill.

We can know for a fact that Jill's second draw will not win the game, as the 4 cards always sum up to ten, which is not a multiple of 3

If Jack draws a 1:

If Jill draws 2, she wins, if she draws a 3 or 4, she will not. This gives her odds of 1/4*1/3 = 8.333%

If Jack draws a 2:

If Jill draws a 1 or 4, she wins, if she draws a 3, she will not. This gives her odds of 1/4*2/3 = 16.667%

If Jack draws a 4:

If Jill draws a 2, she wins, if she draws a 1 or 3, she will not. This gives her odds of 1/4*1/3 = 8.333%

This gives her total odds of:

33.333%

Comparing these probabilities gives us:

41.667 / (33.333 + 41.667) = 55.555%

• Actually I just realized this assumes the cards are not replaced, is this the case or are the cards returned to the deck? – Michael Moschella Jun 19 '19 at 12:04
• No..they are not returned to the deck..also, if nobody wins after all four drawn, it is a draw..play a new game.. – Uvc Jun 19 '19 at 12:11
• Ok, so the game is reset if there is a draw. I will adjust my answer to reflect this. – Michael Moschella Jun 19 '19 at 12:13

Wrote an R script:

install.packages("combinat")
require(combinat)

#Creates all permutations for drawing four cards
data<-permn(1:4)

table<-matrix(nrow=length(data),ncol=4)
table<-as.data.frame(table)

for(i in 1:length(data)){
for(j in 1:4){
table[i,j]<-data[[i]][j]
}
}

#Don't care about Jill's second pull
table$V4<-NULL table$sum<-rowSums(table)

# Checks divisibility by 3
table$$div <- table$$sum/3

# Calculates ratio of Jack's winning games to total games.
sum(table$$V1==3 | table$$div==3)/length(table\$V1)


Jack wins 10/24 games, or .4166666...

• This is the most ugly solution ever! – David Aug 23 '19 at 12:54