Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: coding question

by oiskuu (Hermit)
on Jan 04, 2014 at 19:46 UTC ( #1069312=note: print w/replies, xml ) Need Help??


in reply to coding question

If subset size were known, you'd be counting the combinations.

for my $n (100) { for my $m (1..100) { my $i = 1; $i *= ($n+1-$_)/$_ for 1..$m; printf "C($m,$n) = $i (%.3f bits)\n", log($i)/log(2); } }
Sadly, representing even three elements requires > 16 bits.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1069312]
help
Chatterbox?
marioroy running LWP::Simple on Cygwin in parallel completes in 1 second. Pre-loading essential modules is necessary only on MSWin32 Re: Crash with ForkManager on Windows.
marioroy LWP::Simple works best with Perl v5.26 on Windows. Any Perl version is fine on Cygwin and Unix.
[karlgoethebier]: Hi mario
[marioroy]: Hi karlgoethebier.
[karlgoethebier]: "Long time No See" ;-)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-09-23 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (272 votes). Check out past polls.

    Notices?