Re: Combinatoric question
- From: israel@xxxxxxxxxxx (Robert Israel)
- Date: 12 May 2006 18:12:44 GMT
In article <4463FB4E.281D@xxxxxxx>, Larry Coon <lmcoon_nospam@xxxxxxx> 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."
The number of n-digit numbers (with leading zeros allowed)
having the digit d exactly x times may be obtained as
follows. Think of how you might select such a number.
1) choose x places out of n to put the digit d
2) fill the other n-x places with the other 9 digits.
So the number of ways to do this is (n choose x) 9^(n-x).
The number of n-digit numbers (with leading zeros allowed)
having the digit d at least x times is thus
sum_{y=x}^n (n choose y) 9^(n-y)
This can be written using a hypergeometric function, but
it's easier to just do the sum.
As was mentioned, if you don't allow leading zeros (and d
is not 0), just subtract the value for n-1 from the value
for n.
Robert Israel israel@xxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.
- Follow-Ups:
- Re: Combinatoric question
- From: Larry Coon
- Re: Combinatoric question
- References:
- Combinatoric question
- From: Larry Coon
- Combinatoric question
- Prev by Date: Re: Omar`s Golden Inequality
- Next by Date: Re: complex analysis question
- Previous by thread: Re: Combinatoric question
- Next by thread: Re: Combinatoric question
- Index(es):
Relevant Pages
|