You may want to re-think this


[ Follow Ups ] [ Post Followup ] [ Main Message Board ] [ FAQ ]

Posted by Brad Paul on September 22, 2002 at 16:00:07:

In Reply to: my results are CORRECT ! posted by Denis Borris on September 22, 2002 at 14:38:54:

Denis Borris

Your idea of counting the sets is correct but you do not count them
all with your method. You should also think why Soroban and my way of
thinking about the problem works.

I have written the following Perl script to explicitly print out every
combination that you suggest that your method counts. The result of
this Perl script is 53130 unique ordered sets. I have placed the
output of this script on the web at:

http://calc.bdp-optics.com/combo.txt

#!/usr/bin/perl

$n=0;
for($i=1;$i<=21;$i++){
for($j=$i+1;$j<=22;$j++){
for($k=$j+1;$k<=23;$k++){
for($l=$k+1;$l<=24;$l++){
for($m=$l+1;$m<=25;$m++){
print "$i, $j, $k, $l, $m\n";
$n++;
}
}
}
}
}
print "There are $n total sets.\n";




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Main Message Board ] [ FAQ ]