Computer Science, asked by rohitsalve1082, 1 year ago

Suppose a "secret pair" number is a four-digit number in which two adjacent digits are equal and the other two digits are not equal to either one of that pair or each other. for example, 2209 and 1600 are "secret pair" numbers, but 1333 or 2552 are not. how many "secret pair" numbers are there?

Answers

Answered by mirsaab786mirsp496bp
0
Approach:-

Pairs -{ 00,11,22,33,44,55,66,77,88,99}- 10 Pairs

Treat the 00 Pair separate i.e Case I and Other pairs Together separate i.e Case II

Case I :- 00 Pair

Since 4 digits each digit place is named as position 1,2,3,4 respectively

A) 00 pair in position 2 and 3
First Position has 9 Options to fill
Fourth Position has 8 Options
= 72 Ways

B) 00 in position 3 and 4
First Position has 9 Options to fill
Second Position has 8 Options
= 72 Ways

C) 00 in Position 1 and 2 cannot be considered as they are not Numbers

Total for Case I = 72+72 = 144 pairs

Case II Other Pairs{11,22,33,44,55,66,77,88,99}
Take Any one pair let say 11

A)Put 11 in First and second position
Third position can be filled in 9 ways
Fourth Position can be filled in 8 ways
= 72 ways

B) Put 11 in second and third position
First position can be filled in 8 ways
Fourth Position can be filled in 7 ways
= 56 Ways

C) Put 11 in third and fourth position
First position can be filled in 8 ways
Second Position can be filled in 7 ways
= 56 Ways

Total = 72+56+56 = 184 ways
This for 11 and for remaining 22,33,44,55,66,77,88,99
Total for case II 184*9 = 1656 Ways


Total ways = Case I + case II
= 144+1656
= 1800 ways


Similar questions