edited by
762 views
10 votes
10 votes

An integer is called snakelike if its decimal representation  $a_1a_2a_3...a_n$ satisfies $a_i < a_{i+1} $  if $i$ is odd and $a_i > a_{i+1}$ if $i$ is even. How many snakelike integers between $1000$ and $9999$ have four distinct digits?

edited by

1 Answer

Best answer
10 votes
10 votes

Here we need to decompose the problem into 2 subproblems :

a) Numbers which do not include zero in any of its digits..

Let we have digits w , x , y and z such that  w < x < y < z..This can be done in 9C4 ways

Now according to the definition of snake like integers , the possible permutation of these digits are :

i) w y x z       ii)  w z x y    iii)   x y w z       iv) x z w y    v) y z w x

Hence number of valid permutations for the given selection of 4 digits  =  5

Thus total number of ways under this case    =   9C4 * 5

b) Numbers which include 0 :

Here we need to choose only three digits out of 9 which can be done in 9C3 ways..

Let the digits are x , y and z such that 0 < x < y < z

Now valid permutations for each selection :

i) x y 0 z     ii)  x z 0 y     iii) y z 0 x

Hence total number of ways in this case                              =       9C* 3 ways

Thus total snake like numbers  having 4 digits                    =       9C4 * 5   + 9C* 3

                                                                                            =       882

selected by

Related questions

0 votes
0 votes
0 answers
1
Swarnava Bose asked Jun 8, 2023
224 views
What is the total number of integer partitions ( unordered Summation) of the natural number 8 ?I am getting 22. Is it correct ?
0 votes
0 votes
0 answers
2
kidussss asked Jul 8, 2022
482 views
Solve the recurrence relation $a^{2}n-5a^{2}_{n-1}+4a^{2} _{n-2}=0$, if $a_{0}=4, a_{1}=13, n>1$
0 votes
0 votes
1 answer
4
Swarnava Bose asked Jun 3, 2023
401 views
Consider the set of 4 -digit positive integers. How many of them have their digits in :-a) strictly decreasing order ?b) non decreasing order ?c) non increasing order ?...