Re: Combinatoric question
- From: "Jules" <julianrosen@xxxxxxxxx>
- Date: 11 May 2006 20:12:57 -0700
Larry Coon wrote:
Not homework or anything like that -- just curiosity.
Been too long since college math classes, and I didn't
turn up anything via Google.
What's the correct approach to problems like, "find
how many n-digit numbers have the digit d at least x
times." E.g., "find how many 10-digit numbers have
at least five sevens."
Easy enough to write a program to iterate through the
numbers and count them, but that's cheating. (I
cheated anyway and got 16,349,374.)
I tried approaching it as 10,000,000,000 minus the
number of permutations of 10 items taken six at a time
where none of the digits is seven (i.e., eliminate the
permutations where at least six digits are not seven),
but that wasn't getting me anywhere.
In my judgement, the easiest way to do this is to count the number of
10 digit numbers that have exactly five sevens, then the number with
exactly 6 sevens, all the way up through 10. To count the number of 10
digit numbers with exactly five sevens, you take 10 choose 5, and
multiply by 9 ^ 5. That is, you choose which five of the digits are
sevens, then you pick which of the digits that are not seven fill in
each of the other 5 digits. You will have to make an adjustment,
though, because this method will count numbers with leading zeroes, and
these are not really ten-digit numbers.
.
- Follow-Ups:
- Re: Combinatoric question
- From: Proginoskes
- Re: Combinatoric question
- References:
- Combinatoric question
- From: Larry Coon
- Combinatoric question
- Prev by Date: Re: what does 'determinant Δ' mean
- Next by Date: Re: Calculating a 6th order polynomial in Excel...
- Previous by thread: Combinatoric question
- Next by thread: Re: Combinatoric question
- Index(es):
Relevant Pages
|