## Problem 084

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

Don't post any spoilers
juanchodepisa
Posts: 10
Joined: Mon Sep 12, 2011 6:06 am
Location: Costa Rica

### Problem 084

Oh! Goode ol' Monopoly Problem 84 (View Problem), I'm tempted to buy two 4-sided dice and try this variant.

Just need clarification about the rules. I roll doubles and land on Community Chest, they tell me "Advance to Go". So, do I advance to Go and then roll again? What if they send me to Jail?
In other words, how exactly does the roll-doubles => roll-again rule interact with the other rules, as for movement?

P.S. I have played under a wide variety of house rules over the years.

-- I play Baduk at online-go --
rayfil
Posts: 1407
Joined: Sun Mar 26, 2006 5:30 am
Contact:

### Re: Problem 084

Not that it should make much of a difference, but
and it is the final square that the player finishes at on each roll that we are interested in
And, if you roll a double (unless it's the third consecutive one), the square you land on is only temporary and you continue rolling the dice.
When you assume something, you risk being wrong half the time.
Mathmannix
Posts: 3
Joined: Tue May 01, 2012 2:45 pm

### Re: Problem 084

I still need clarification on this, which I interpret as the original post's question:

What happens if you roll doubles on your first roll and land on the Go to Jail square (or, similarly, if you land on Chance or Community Chest with doubles on your first roll and draw a "Go directly to Jail" card) ? Do you keep rolling, or is your turn over and you stay on Jail?

This was always a debate for us in the actual game (or at least our house version of it...) In our playing the "real" game, sometimes we would say that if you landed in jail on your first set of doubles, then you got to roll immediately to get out of jail, and if you rolled doubles a second time, you would get to move that many spaces. (We also played that if you rolled to get out of jail and rolled doubles, you moved that amount immediately, although this was another point of contention, whether you should re-roll.) (In playing this way, a turn can theoretically last forever!) (Also, it's not terribly uncommon to get a double 4, 5, or 6 from Jail and then roll a 12, 10, or 8 to get back in jail on the Go to Jail square.)
rayfil
Posts: 1407
Joined: Sun Mar 26, 2006 5:30 am
Contact:

### Re: Problem 084

From the actual problem description (which one could consider as "house rules"):
and we shall also ignore the rule about requiring a double to "get out of jail", assuming that they pay to get out on their next turn.
When you assume something, you risk being wrong half the time.
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

### Re: Problem 084

I don't think either of those actually answer the OP's question - the confusion lies over rayfil's earlier statement:
And, if you roll a double (unless it's the third consecutive one), the square you land on is only temporary and you continue rolling the dice.
This is not the case - if you roll a double, the square you end up on (either the one you land on, or wherever that sends you to) is counted as visiting that square. There is no rule in the problem statement about getting an extra turn if you roll a double and not counting that square that double took you to.

In other words, the 'final square' is the square you land on after rolling the dice and follow any instructions resulting from that, regardless of what the dice were. As such, it makes no difference whether 'your turn is over' after you get sent to jail or not - this is a one player game; your turn is over after every roll of the dice.
rayfil
Posts: 1407
Joined: Sun Mar 26, 2006 5:30 am
Contact:

### Re: Problem 084

your turn is over after every roll of the dice
That is not the way it is being interpreted according to the rules of the game. Your turn is not over if you have rolled a double (unless it's the third consecutive one).
When you assume something, you risk being wrong half the time.
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

### Re: Problem 084

Where does it say that in the problem statement? I can't see it anywhere, nor in the code for any of the accepted solutions in the forum - all of the ones I've looked through assume what I wrote above.

In fact, it specifically says:
That is, the probability of finishing at that square after a roll.
and it is the final square that the player finishes at on each roll that we are interested in.
and nothing about doubles giving you a second roll.
olleicua
Posts: 8
Joined: Fri Oct 07, 2011 5:00 am

### Re: Problem 084

So I understand that this is effectively a 1 player game. That much was clear but what I'm wondering is this. If I roll doubles twice in a row and as a result of the second land on, for example G2J. Then I roll doubles a third time, what happens. Are my last three rolls reset when I get sent to jail? Relatedly, if I roll doubles four times in a row do I return to Jail again?
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

### Re: Problem 084

You can assume that after rolling three doubles in a row, the doubles count gets reset to 0, so a 4th double wouldn't send you straight back to jail.
Flogo
Posts: 1
Joined: Sat Oct 20, 2012 11:31 am

### Re: Problem 084

Sorry to dig this up after such a long time, but I'm still not clear on some points

1.)
What happens if you roll doubles on your first roll and land on the Go to Jail square (or, similarly, if you land on Chance or Community Chest with doubles on your first roll and draw a "Go directly to Jail" card) ? Do you keep rolling, or is your turn over and you stay on Jail?
I don't think this has been answered or, if so, I don't understand the answer. The quote by rayfil in the next post doesn't answer this for me, because it says players pay to get out of jail in their next turn. So it is still not clear if the current turn would be over in the above situation (player stays in jail for the remainder of this turn and pays to get out in the next turn) or not (player rolls again because he had doubles in the first roll and does not end up on jail).

2.) How many turns are played? The way I see it, the probability to be on a certain field starts with (GO -> 1, all_other_fields -> 0) but shifts after the first turn and then keeps changing with each turn. Are we only looking at one turn (up to three rolls with doubles) or an endless game?

3)
A player starts on the GO square and adds the scores on two 6-sided dice to determine the number of squares they advance in a clockwise direction. Without any further rules we would expect to visit each square with equal probability: 2.5%
This might be connected with question 2. But I wouldn't assume equal probability here. If we just advance from GO without any further rules, it is much more likely that we move 7 fields (6 possible dice rolls) than 2 (only on the roll (1,1)) and there is no way to move over 12 fields.
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

### Re: Problem 084

1) Rayfil's post was mistaken. There is no concept of 'turns'; all that counts are the squares you end up on after each roll of the dice (and then follow any instructions on that square/card/etc).

2, 3) An infinite number of turns.
DNS
Posts: 30
Joined: Thu Oct 16, 2008 9:32 am
Location: Ukraine, Nikolaev

### Re: Problem 084

should I calculate a probability of CH and CC visiting
OR these squares are transitional and have only the effect of prob. distribution for other cells?
2 x 2 = 4 = true
DNS
Posts: 30
Joined: Thu Oct 16, 2008 9:32 am
Location: Ukraine, Nikolaev

### Re: Problem 084

Understand (in experimental way):
prob. of CC CH G2J is 0
2 x 2 = 4 = true
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

### Re: Problem 084

DNS wrote:should I calculate a probability of CH and CC visiting
OR these squares are transitional and have only the effect of prob. distribution for other cells?
There are CH/CC cards which do not cause a move.

CH has 14/16 probabilty of staying; CC has 6/16.
DNS
Posts: 30
Joined: Thu Oct 16, 2008 9:32 am
Location: Ukraine, Nikolaev

### Re: Problem 084

thundre wrote:CH has 14/16 probabilty of staying; CC has 6/16.
Thanks!
I miss it...
2 x 2 = 4 = true
Posts: 79
Joined: Mon Jun 10, 2013 7:31 am

### Re: Problem 084

I need clarifying on 1 issue.

The problem states that after a Chance card or Community Chest card is drawn, they are put on the bottom of the deck.

-- After all other cards are drawn, does the drawing continue to the where the top card was before? (IE no shuffling occurs)

Thanks

Rishada is the gateway to free trade—but the key will cost you.
andreyv
Posts: 2
Joined: Sat Aug 03, 2013 2:27 pm

### Re: Problem 084

RishadanPort wrote:I need clarifying on 1 issue.

The problem states that after a Chance card or Community Chest card is drawn, they are put on the bottom of the deck.

-- After all other cards are drawn, does the drawing continue to the where the top card was before? (IE no shuffling occurs)
The problem statement says
(…) take a card from the top of the respective pile and, after following the instructions, it is returned to the bottom of the pile.
So the pile never ends and the cards in the pile are shifted cyclically from the bottom to the top, maintaining the same relative sequence.
andreyv
Posts: 2
Joined: Sat Aug 03, 2013 2:27 pm

### Re: Problem 084

TripleM wrote:You can assume that after rolling three doubles in a row, the doubles count gets reset to 0, so a 4th double wouldn't send you straight back to jail.
I spent quite some time on this problem until I decided to read this thread and saw this post. Indeed, after taking this information into account, I got the correct answer. However, the problem statement does not seem to mention this in any way. It says
(…) if a player rolls three consecutive doubles, they do not advance the result of their 3rd roll. Instead they proceed directly to jail.
But this doesn't imply that the consecutive double count is reset after this event. The way the problem statement is written now, it states that after rolling three consecutive doubles and going to jail, if the player rolls a fourth double, he/she goes to jail again due to the same rule.

I think the problem statement should be clarified to include TripleM's remark.
jukka2003
Posts: 1
Joined: Fri Jan 06, 2017 11:17 am
Location: Krakow

### Re: Problem 084

All in all the problem description seems to miss one important fact. When having double (not third time) - move continues and the intermediate field is passed by.
wancl
Posts: 2
Joined: Sat Aug 06, 2016 1:50 pm

### Re: Problem 084

Hi all,
I could do with a clarification on the 'Chance' cards: what is the difference between 'Go to next R (railway)' and 'Go to next R'? Am I missing something obvious here?
Cheers,
Claude