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

Algebra ->  Customizable Word Problem Solvers  -> Numbers -> SOLUTION: How many three-digit numbers are there such that no two adjacent digits of the number are consecutive      Log On

Ad: Over 600 Algebra Word Problems at edhelper.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) About Me  (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