How many distinct positive four-digit integers can be formed using the digits 1, 2, 3 and 4 each once, such that no adjacent digits differ by more than 2?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The only case in which adjacent digits differ by more than 2 is when 1 and 4 are next to each other. By complementary counting, we can count all the cases that 1 and 4 are together, and subtract that from the total.
We can treat 1 and 4 as a "supernumber" and only 1 digit, since they have to be together. Now, there are 3 "digits", so the number of numbers is just 3 ! = 6 . But we have to multiply this by 2 , because we could easily get all the same numbers by switching the order of 1 and 4 around. Now we have 6 × 2 = 1 2 numbers that are not allowed.
Finding the total is easy: it is just 4 ! = 2 4 . Now, the number of ways meet the standards are 2 4 − 1 2 = 1 2 .