View Single Post
M.D. Holloway M.D. Holloway is offline
Targa, Panamera Turbo
 
M.D. Holloway's Avatar
 
Join Date: Aug 2004
Location: Houston TX
Posts: 22,366
From Dr Math...

Here is a way to get the formula you asked for. Let's say there are N in all (so your question sets N equal to 7). List the combinations in increasing order, but to make things a little clearer, I will put an X every time you are finished listing all of one kind of number and go on to the next. For example, instead of

1 1 2 3 5 5 5

write

1 1 X 2 X 3 X X 5 5 5 X .

Notice there are 2 X's after the 3, or rather that there are
zero 4's between the third and fourth X. So now the list of
combinations begins like this:

1 1 1 1 1 1 1 X X X X X

1 1 1 1 1 1 X 2 X X X X

1 1 1 1 1 1 X X 3 X X X

1 1 1 1 1 1 X X X 4 X X

1 1 1 1 1 1 X X X X 5 X

1 1 1 1 1 1 X X X X X 6

1 1 1 1 1 X 2 2 X X X X

1 1 1 1 1 X 2 X 3 X X X

and so on. The useful thing about writing it this way is that
you can tell what the combination is merely by knowing the
positions of the five X's. In other words, there is a 1 to 1
correspondence between combinations of N dice and ways of
choosing 5 places to put an X out of a total of N+5 positions.
(Do you see why there are N+5 positions? In the above examples,
7 of the positions are filled by numbers and 5 get X's .) Now the
problem is easily solved: it is the binomial coefficient "N+5
choose 5", which is equal to:

(N+5) (N+4) (N+3) (N+2) (N+1) / 120 .

So for N=1 you get 6, for N=2 you get 21, for N=3 you get 56,
and so on.
__________________
Michael D. Holloway
https://simple.m.wikipedia.org/wiki/Michael_D._Holloway
https://5thorderindustry.com/
https://www.amazon.com/s?k=michael+d+holloway&crid=3AWD8RUVY3E2F&sprefix= michael+d+holloway%2Caps%2C136&ref=nb_sb_noss_1
Old 09-10-2007, 01:23 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #2 (permalink)