MathGroup Archive 2002

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

Search the Archive

Need a algorithm

  • To: mathgroup at
  • Subject: [mg33857] Need a algorithm
  • From: "Juan" <erfa11 at>
  • Date: Sat, 20 Apr 2002 02:49:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I ask for help to find an algorithm to resolve this question:

There is 36 numbers T={1,2,3,&#8230;,36}, and we play 7 numbers,  for 
example : w={3,9,11,19,22,27,33}, then we compare w with the price , for 
example : p={2,7,11,22,30,31,33}, and in this case we have 3 goods: 

One way to play is to buy for example 1000 w (7 random numbers from T, 1000 
times), and to compare each with p, to see if you have been lucky.

Another way if to choose 12 numbers from T , for example: 
q={8,11,13,14,16,22,23,28,31,32,34,35}, and to play for all combinations: 

If you have q, and you want to get at least k rights, assuming that the 
numbers in the prize p are in q, then you don&#8217;t need to buy all the 
792 w.
I have bought that for k=3 and I got only 12 w.
W= {{8,11,13,14,16,22,23},{8,11,13,14,28,31,32},{8,11,16,22,28,31,34},  
(This is one of the solutions, and you get at least 3 rights).

  If you want at least k=5 rights then you have to select more combinations 
of the all 792.

Knowing T=Range[36], q=(n numbers from T) and k<7. How do we get W?

Thanks. Juan

MSN Photos es la manera más sencilla de compartir e imprimir sus fotos:

  • Prev by Date: MathLink dynamic parameter in function
  • Next by Date: Re: Help with 3D graphics
  • Previous by thread: MathLink dynamic parameter in function
  • Next by thread: RE: Need a algorithm