Sett problem 
Author Message
 Sett problem

Roger Hui asks for solutions to the logic came called Sett. The following is
a solution in J. It uses an auxiliary function 'comb' which is the well-known
Hui function to generate all x!y combinations of y things taken x at a time.

 NB. arg is deal =. 12 ? deck =. 81.  
 NB. Try ans=.Sett deal (which gives triplets of items of deal)
 NB. then g ans to see that the items of ans indeed solve the problem.

     w=.k#]

        i=.e.&0 5 7 11 13 15 19 21 26 NB. winners
        j=.3:#.[:|:"2]
        g=.3 3 3 3&#:
     c=.(3 comb 12)&{

Eugene McDonnell



Sun, 27 Sep 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problems, problems, problems

2. Eiffel Problems, Problems, Problems

3. Finn Idiom problems and Re: {rho} problem

4. Combinatorial Problem [ & a new Combinatorial Problem ]

5. Database problem/Memory problem??

6. CW 2003 - Focus problem & a select problem

7. 32bit problem - one problem solved & another found

8. GForth problem or my problem?

9. REXX DLL problems solved (was Re: Problems getting C subcommand to work)

10. HTTP-Access2 problem (was Ruby Google problem)

11. Problem with this excercise problem.

12. RSX problems and texture problems

 

 
Powered by phpBB® Forum Software