• retagged by
2,977 views
3 3 votes

2 Answers

Best answer
3 3 votes

Although shaik answered this question but way back I have solved similar kind of question-

1st case-

[91,2,13,24,77][62,72,82]  now first bolded part can be arrange in how many ways = 5! = 120 ways

 

2nd case-

now take one element from 1st partition and put in 2nd partition but you can not put 2,13,24 because if you will move that then 62,72 wil not come at position 6 and 7. So move 91 and 77 one by one

a) now take 91, we can arrange in following ways [62,_,72,82],  [62,72,_,82],[62,72,82,_] (place 91 at each blank) so there are only 3 ways and 4 elements in 1st partition can be arranged in 4! ways. So total ways = 3*4! = 72 ways

b) now take 77, we can arrange in following ways [62,_,72,82],  [62,72,_,82] (place 77 at blanks and we can't put 77 after 82) so there are only 2 ways and 4 elements in 1st partition can be arranged in 4! ways. So total ways = 2*4! = 48 ways

 

3rd case-

now take two elements at one time (91,77).

a)take (91,77), we can arrange in following manner[62,_,77,_,72_,82_] and [62,_,72,_,77_,82_] (place 91 at each blank and look we can't use [62,_,72,_,_,82_,77,_] because 77 can't come after 82)so there are 8 ways and 3 elements in 1st partition can be arranged in 3! ways. So total ways for (91,77) = 8*3! = 48

 

 

Total ways = 120 + 72 + 48 + 48 = 288 ways

• selected by
10 10 votes

Total Places = 8

   ___    ___   ___    ___    ___    ___   ___    ___

    1       2       3       4         5      6        7       8

 

From the Data we can observe that 91 can be inserted at any time ===> 8C1 = 8

 

now, remaining positions are 7

   ___    ___   ___    ___    ___    ___   ___

    1       2        3       4        5       6       7     

82 should be at the end ====> 1

 

now, remaining positions are 6

   ___    ___   ___    ___    ___    ___

    1       2        3       4        5       6     

From the Data now, we can observe that 77 can be inserted at any time ===> 6C1 = 6

 

now, remaining positions are 5

   ___    ___   ___    ___    ___

    1        2       3       4        5      

From the Data now, we can observe that 12 and 62 should be inserted at last and in-order ===>1

 

now, remaining positions are 3

   ___    ___   ___

    1        2        3  

From the Data now, we can observe that 2,13 and 34 can be inserted at any order ===> 3 !

 

From Multiplication rule = 8 * 1 * 6 * 1* 3 ! = 8*6*6 = 36 * 8 = 288

Position:
Show:

Related questions

61 61 votes
4 answers 4 answers
25.3k
25.3k views
Arjun asked Feb 12, 2020
25,276 views
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Ass...
0 0 votes
2 2 answers
1.2k
1.2k views
1 1 vote
1 1 answer
1.8k
1.8k views
MiNiPanda asked Jan 1, 2019
1,832 views
Consider the hashing table with ‘m’ slots and ‘n’ keys. If the expected number of probes in an unsuccessful search is 3, the expected number of probes in successful sear...
11 11 votes
1 1 answer
5.9k
5.9k views
Ayush Upadhyaya asked Sep 22, 2018
5,935 views
Consider an initially empty hash table of length 10. Following are the keys in hash table inserted using mod function h(k)=k mod 10.Slot NumberValue0 1912 333444523664777...