The 6 digit number 794880 has exactly one pair of adjacent digits , that differ by 5 ( the number 94) . How many such six- digit numbers are there ?
Also , how many six- digit numbers have exactly two pair of adjacent digits that differ by 5?
Asked by piyabhattacharya
Answer (1)
This is a combinatorics problem involving constraints on adjacent digits. The number of such 6-digit numbers can be calculated using state diagrams or inclusion-exclusion, depending on the allowed differences.