Statistics complement rule - help understand solution

MaryStew

New member
Joined
Jan 23, 2020
Messages
18
What is the number of dec-strings d1,…,dn of length n such that d1d2≠00. In other words, what is the number of dec-strings of length n that don't begin with 00?

So the solution provided in the textbook states that its 99*(10^(n-2)) which I don't quite understand.

I know that the number of dec-strings of length n is 10^n. And I understand that to calculate the possibilities for the remaining digits past the first two, it'd be 10^(n-2). But I don't understand where the 99 came from.

Should it not be 9 * 9 * (10^(n-2)) since there's 9 choices for the first digit {1, 2,...9) and 9 choices for the second digit as well since it just can't start with 0? I'm confused as to where 99 came from and would appreciate some clarification.
 
There are 100 ways of writing 2 digits: 00, 01, 02, ... , 99.
If you exclude 00, then there are 100-1=99 ways.
Initially you said it can't start with 00. But can it start with 01, 02 ... or 10, 20, ... ?
Your answer including 9x9 implies that neither of the first two digits can be 0.
Does d1d2 not equal 00 mean d1 x d2 not equal 0? Or are we talking about concatenation rather multiplication?
 
there are 99 sequences of 2 decimal digits that aren't 00.

Pick one, that's 99 choices.

You now have [MATH]n-2[/MATH] bits left that can be anything. There are \(\displaystyle 10^{n-2}\) of those.

Hence a total of \(\displaystyle 99\cdot 10^{n-2}\)
 
Top