MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Programming Probability of puzzle in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44901] Programming Probability of puzzle in Mathematica
  • From: mathtutoring at comcast.net (art burke)
  • Date: Sun, 7 Dec 2003 06:03:46 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi to all:

Not being a programmer, but yet inquisitive, I'd like to come up with
several small programs that compute the probability of random numbers
being
inserted into let's say, a magic cube, triangle, or such that all
rows, columns, and diagonals add up to a certain number.

Let's say a 3x3 magic square, using the numbers 1,2,3,4,5,6,7,8 and 9.
Of course, if you know how to put them into the magic square, all
rows, diagonals, and columns add up to 15.

Having Mathematica insert random numbers in cells, compute all sums
and see if it has it correct, and keep up the repetions until it comes
up with an average probability, let's say after 1000 tries....What
would be the probability?

I've been quit interested in this for a while, but am wondering how it
would be done??

Thanks for all the help,

Art


  • Prev by Date: Returning function with limitation on input
  • Next by Date: Re: Scoping, named patterns, local vs global variables
  • Previous by thread: Re: Returning function with limitation on input
  • Next by thread: Re: Programming Probability of puzzle in Mathematica