Author |
Topic: Random Noughts-and-Crosses (Read 1336 times) |
|
ThudnBlunder
wu::riddles Moderator Uberpuzzler
The dewdrop slides into the shining Sea
Gender:
Posts: 4489
|
|
Random Noughts-and-Crosses
« on: Jul 28th, 2009, 12:49am » |
Quote Modify
|
If the players X and O randomly choose which square to play, what is the ratio X wins: O wins: Draw?
|
« Last Edit: Jul 28th, 2009, 6:33am by ThudnBlunder » |
IP Logged |
THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
|
|
|
rmsgrey
Uberpuzzler
Gender:
Posts: 2873
|
|
Re: Random Nought-and-Crosses
« Reply #1 on: Jul 28th, 2009, 1:09am » |
Quote Modify
|
An obvious solution is just to brute force it - look at the 362880 equiprobable orders of the 9 squares, and see which (if either) player wins first in each case. Estimated runtime is under a second, so there's not a lot of incentive to optimise the code - even if you run through all 387420489 9-digit 0-free numbers, runtime shouldn't be much more than a minute or two... Is there a more interesting/enlightening solution?
|
|
IP Logged |
|
|
|
ThudnBlunder
wu::riddles Moderator Uberpuzzler
The dewdrop slides into the shining Sea
Gender:
Posts: 4489
|
|
Re: Random Nought-and-Crosses
« Reply #2 on: Jul 28th, 2009, 1:15am » |
Quote Modify
|
on Jul 28th, 2009, 1:09am, rmsgrey wrote: Is there a more interesting/enlightening solution? |
| Well, once upon a time it would have been a challenge. Actually, my solution is not very complicated.
|
|
IP Logged |
THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
|
|
|
pex
Uberpuzzler
Gender:
Posts: 880
|
|
Re: Random Nought-and-Crosses
« Reply #3 on: Jul 28th, 2009, 2:08am » |
Quote Modify
|
Well, by complete enumeration, the ratio is 737 : 363 : 160. I can't really think of a more interesting/enlightening/not very complicated solution that would yield such numbers (for example, the ratio X wins : O wins is almost, but not quite, 2:1), but I look forward to seeing it.
|
|
IP Logged |
|
|
|
rmsgrey
Uberpuzzler
Gender:
Posts: 2873
|
|
Re: Random Nought-and-Crosses
« Reply #4 on: Jul 28th, 2009, 2:39am » |
Quote Modify
|
Interesting - I usually play that O plays first...
|
|
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: Random Nought-and-Crosses
« Reply #5 on: Jul 28th, 2009, 5:43am » |
Quote Modify
|
It depends whether you play noughts-and-crosses or crosses-and-noughts. I knew it as "X and O", where X goes first.
|
|
IP Logged |
|
|
|
pex
Uberpuzzler
Gender:
Posts: 880
|
|
Re: Random Nought-and-Crosses
« Reply #6 on: Jul 28th, 2009, 5:50am » |
Quote Modify
|
I knew the game as "butter, cheese and eggs" (in Dutch), for no apparent reason.
|
|
IP Logged |
|
|
|
ThudnBlunder
wu::riddles Moderator Uberpuzzler
The dewdrop slides into the shining Sea
Gender:
Posts: 4489
|
|
Re: Random Noughts-and-Crosses
« Reply #7 on: Jul 28th, 2009, 6:35am » |
Quote Modify
|
Aka tic-tac-toe, assume X goes first. I remember struggling with this one when I was a kid.
|
|
IP Logged |
THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
|
|
|
ThudnBlunder
wu::riddles Moderator Uberpuzzler
The dewdrop slides into the shining Sea
Gender:
Posts: 4489
|
|
Re: Random Noughts-and-Crosses
« Reply #8 on: Sep 5th, 2009, 8:31am » |
Quote Modify
|
As my internet access is presently confined to hotel lobbies and internet cafes, I will for the moment just post my answer: 737:363:160[
|
|
IP Logged |
THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
|
|
|
|