SOLUTION: How many three-digit numbers are there such that no two adjacent digits of the number are consecutive

Algebra.Com
Question 262673: How many three-digit numbers are there such that no two adjacent digits of the number are consecutive
Answer by Edwin McCravy(20056)   (Show Source): You can put this solution on YOUR website!

There are 900 3-digit numbers, for we can choose the first digit
9 ways, the 2nd digit 10 ways, and the 3rd digit 10 ways.

So we will subtract from 900 all the 3-digit numbers that
have at least one pair of consecutive digits.

Let A = the set of all 3 digit numbers with the first two digits
consecutive.

Let B = the set of all 3 digit numbers with the second two digits
consecutive.

Then we will use

N(A or B) = N(A) + N(B) - N(A and B) 

---
N(A) =

N(3-digit integers with the first two digits consecutive) 

1. There are 8 ways to choose the first digit as 1 through 8,
There are then 2 ways to choose the second digit consecutive with the
first digit. 
There are then 10 ways to choose the third digit.

That's 8x2x10 = 160

2. There is 1 way to choose the first digit as 9,
There is then 1 way to choose the second digit consecutive with the
first digit, namely to choose it as 8 
There are then 10 ways to choose the third digit.

That's 1x1x10 = 10

So N(A) = 160+10 = 170 ways,


------------------

N(B) =

N(3-digit integers with the last two digits consecutive)

1. There are 8 ways to choose the last digit as 1 through 8,
There are then 2 ways to choose the second digit consecutive with the
last digit. 
There are then 9 ways to choose the first digit.

That's 8x2x9 = 144

2. There are 2 ways to choose the last digit as 0 or 9,
There is then 1 way to choose the second digit consecutive with the
last digit 
There are then 9 ways to choose the first digit.

That's 2x1x9 = 18

Or a total of 144+18 = 162 ways,

------------------------------------

N(A and B)

N(3-digit integers with both the first two and the last two digits
consecutive) =

1. There are 6 ways to choose the first digit 2 through 7
There are then 2 ways to choose the second digit consecutive with
the first digit. There are then 2 ways to choose the third digit
consecutive with the second digit.

That's 6x2x2 = 24 ways.

2. There are 3 ways to choose the first digit 1, namely 101, 110, and 121

3. There are 3 ways to choose the first digit 8, namely 878, 879, and 898

4. There are 2 ways to choose the first digit 9, namely 987 and 989.

That's 8 ways.

So N(A and B = 24+8 = 32 

-------------------------

Therefore  N(A or B) = N(A) + N(B) - N(A and B) = 170 + 162 - 32 = 300,

Therefore the answer to the problem is 900 - 300 or 600.

Edwin

RELATED QUESTIONS

how many three digit numbers are there such that sum of the squares of any two digits is... (answered by Fombitz)
"In how many ways can the digits of the number 30348877 be arranged such that no two even (answered by ikleyn,greenestamps)
how many even three digit numbers are there such that the sum of the tens and unit digits (answered by Edwin McCravy)
How many three-digit counting numbers are there that are less than 300 such that all the... (answered by Zoop)
How many three-digit counting numbers that are less than 300 are there such that all the... (answered by 303795)
How many three digit numbers are such that the product of their digits is... (answered by Fombitz,toidayma,MathTherapy)
How many even numbers are there with three digits such that if 5 is one of the digits in... (answered by Edwin McCravy)
The sum of a two digit number and the number obtained by reversing its digits is a square (answered by KMST)
The product of the digits of a five digit number in 720. How many such numbers are... (answered by Edwin McCravy)