MathGroup Archive 2002

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

Search the Archive

Need a algorithm

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

Hi,
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: 
{11,22,33}.

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: 
Binomial[12,7]=792.

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},  
{8,11,23,31,32,34,35},{8,13,14,22,32,34,35},{8,13,16,23,28,32,34},{8,14,16,23,28,31,35},{11,13,14,16,31,34,35}, 
        
{11,13,22,23,28,34,35},{11,14,16,22,28,32,35},{13,16,22,23,31,32,35},{14,22,23,28,31,32,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: 
http://photos.msn.com/support/worldwide.aspx



  • 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