-1

We have to form 3 digit numbers such that two consecutive digits are same. I approached as

  1. First and second digit be same.
  2. Second and third be same.

Now i am confused as in how to really fill in the numbers ?

EDIT: leading digit cannot be zero.

san A
  • 27
  • Is $001$ a $3$ digit number? – lulu Dec 27 '15 at 13:48
  • No. It cannot start with a zero. – san A Dec 27 '15 at 13:50
  • You should edit the question to reflect that. I have posted a solution below. – lulu Dec 27 '15 at 13:59
  • I safely presumed that if it is a digit number, how can the leading digit be 0 ? Is that wrong ? – san A Dec 27 '15 at 14:02
  • Both of the people who responded to your question were confused about this point, so I don't see how you can assume it was clear. In combination problems of this sort people use "number" to refer to ordinary numbers (as you intended) but also to formal strings. It is standard practice to simply clarify the meaning. – lulu Dec 27 '15 at 14:09
  • Well, when the other user calculated the answer, he did so keeping in mind that leading digit is not zero. You can read his solution.

    I will still edit the question :)

    – san A Dec 27 '15 at 14:13

2 Answers2

2

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.

Em.
  • 15,981
1

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}$

lulu
  • 70,402