<?xml version="1.0" encoding="windows-1252"?>
<node id="83136" title="Re: Golf: Selection from sets (Choose)" created="2001-05-24 21:11:34" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="36507">
jynx</author>
<data>
<field name="doctext">
&lt;br&gt;
i'm posting this just to show some different code.  The methodolgy doesn't use factorials per se, just lists of numbers.  There are probably some ways to optimize, but i don't have enough time to really try right now.&lt;code&gt;
sub c{
   my($c,$d)=@_;my%n=map{$_=&gt;1}1..$c;delete$n{$_}for 1..($c-$d);
   eval join'/',map"($_)",(join'*',keys%n),(join'*',1..$d)
}
&lt;/code&gt;
It's warnings and strict compliant, and returns all the right answers.&lt;p&gt;
nuf evah,&lt;br&gt;
jynx
</field>
<field name="root_node">
83013</field>
<field name="parent_node">
83013</field>
</data>
</node>
