P is for Practical PerlMonks

### Re^2: Wordfeud racks

by choroba (Bishop)
 on Jul 30, 2013 at 17:02 UTC ( #1047073=note: print w/replies, xml ) Need Help??

in reply to Re: Wordfeud racks
in thread Wordfeud racks

How did you get the number? Combinations
```\$ echo \$(echo {2..100} | sed 's/ /*/g') \
/ \$(echo {2..7} | sed 's= =/=g') \
/ \$(echo {2..93} | sed 's= =/=g') | bc
16007560800

Also confirmed at http://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html and http://easycalculation.com/statistics/permutation-combination.php.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^3: Wordfeud racks
by RichardK (Parson) on Jul 30, 2013 at 17:29 UTC

Sorry, I meant permutations, so there a N!/(N-K)! ways to select K tiles from a bag of N.

Or for 7 of 100 tiles = 100*99*98*97*96*95*94 permutations.

I think it will be easier to calculate the probabilities of the different combinations rather than count them, but it's still going to be a fair amount of work.

Create A New User
Node Status?
node history
Node Type: note [id://1047073]
help
Chatterbox?
 [ovedpo15]: its easy with three "if"s or one long "if" but is there a "nice" way :)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2018-04-22 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My travels bear the most uncanny semblance to ...

Results (82 votes). Check out past polls.

Notices?