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.)
 an itemized result Comment 12 of 12 |
This article by Steve Shaffer on mathrec.org discusses various ways to count and arrives at a few different totals:

255,168 different sequences of moves
31,896 different sequences after eliminating reflections and rotations of the final positions
26,830 possible games if two games are the same when the players faced the same choices at each move of the game (i.e., considering symmetry at each step of the game.)
23,129 possible games under the same symmetry restrictions, if the players quit when the outcome is determined.

 Posted by Ady TZIDON on 2015-07-25 02:30:52

 Search: Search body:
Forums (0)