We have to form 3 digit numbers such that two consecutive digits are same. I approached as
- First and second digit be same.
- Second and third be same.
Now i am confused as in how to really fill in the numbers ?
EDIT: leading digit cannot be zero.
We have to form 3 digit numbers such that two consecutive digits are same. I approached as
Now i am confused as in how to really fill in the numbers ?
EDIT: leading digit cannot be zero.
By "two consecutive numbers" I will assume that it means the first two are the same or the last two are the same. Then let $A = \{\text{First two same}\}, B = \{\text{Last two same}\}$. Then $AB$ means that all three are the same. Recalling inclusion-exclusion $$|A\cup B| = |A|+|B|-|AB| = 9(10)+ 9(10) - 9 = 171.$$ For $|A|$, you have 9 different options for the first two then anything for the last digit, since the last digit can be zero. Similar for $|B|$. For $|AB|$ there are only 9 different ways all three digits can be the same.
Given that the first slot can't be $0$, the possible patterns are:
I. $AAB$, with $9$ cases for $A$, $9$ for $B$ (With $B\neq A$ but $B$ might be $0$), so $\fbox {81}$
II. $ABB$ with $9$ cases for $A$ and $9$ for $B$ (same conditions) so $\fbox {81}$,
III. the $9$ cases $AAA$ so $\fbox 9$
Hence $\fbox {171}$
I will still edit the question :)
– san A Dec 27 '15 at 14:13