All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Tic Tac Toe (Posted on 2002-09-27)
A computer science teacher poses his students a problem.

"I want you write a computer program that plays tic-tac-toe legally and runs through ALL the possible combinations of the game, and finds out the total."

The students settle down to work..

An hour later, a student gets up and proclaims "I've got it! The number of possible combinations in a game is 344,242."

At which point another student quickly replies, "I haven't finished yet, but I'm sure Fred made a mistake in his program."

Why?

(Tic Tac Toe = Noughts and Crosses)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re(3): Solution | Comment 7 of 12 |
(In reply to re(2): Solution by levik)

You get 8 symmetries because not only can you rotate each game in four different directions, but you can also reflect all of them left-to-right. There is no complete game that exists solely along a single row, diagonal, or column or passing through the center square, so the reflections are distinct from the rotations.
 Posted by friedlinguini on 2002-09-29 10:39:21

 Search: Search body:
Forums (0)