How many five-digit numbers are there that do not have two consecutive digits the same? For example, you would count 12104 and 12397 but not 6321 (it is not five digits) or 43356 (it has two consecutive 3s). Scheinerman, edward
a.. Mathematics: a discrete introduction (page 39). Cengage textbook. Kindle edition?

Respuesta :

We can choose the first digit in any of 9 ways, 1,2,3,4,5,6,7,9 or 9 .

We can then choose the second digit in any of the 9 ways, 0 or any of 8 ways not chosen for the first digit.

We can then choose the third digit in any of the 9 ways, other than the second digit.

We can choose the fourth digit in any of the 9 ways, other than the third digit.

And we can choose the fifth digit in any of the 9 ways, other than fourth digit.

Hence number of ways = 9*9*9*9*9 = [tex]9^{5}  = 59049[/tex]

So, total number of five digit numbers which don't have consecutive digits same is 59049.