How many partial permutations are there for a 4-digit number where no two consecutive numbers are the same?

146 Views Asked by At

Q.How many partial permutations are there for a 4-digit number where no two consecutive numbers are the same?

A.7290?

Came across this question and would like to validate my logic or get a more robust answer. Assuming integers range from 0 to 9, we have 4 positions to be filled. 1st position can take 10 digits, 2nd position can only take 9 digits due to our constraint. Subsequently 3rd and 4th positions can also only take 9 possible digits as we cannot repeat any two consecutive numbers.

Therefore we arrive at: (10 x 9 x 9 x 9) = 7290