3.1k views

Let $A$ be a sequence of $8$ distinct integers sorted in ascending order. How many distinct pairs of sequences, $B$ and $C$ are there such that

1. each is sorted in ascending order,
2. $B$ has $5$ and $C$ has $3$ elements, and
3. the result of merging $B$ and $C$ gives $A$
1. $2$
2. $30$
3. $56$
4. $256$
edited | 3.1k views

If you pick any $3$ numbers in the given order from the array(sorted) remaining $5$ elements are already sorted. You can not change the relative position of those $5$ elements because they are distinct and already sorted. So no of ways $= {}^8C_3.$

Same argument holds for picking up $5$ elements initially. No of ways $= {}^8C_5.$
selected by
0
Thanks @ Debashish Deka

here the question asks only for selection and not for an arrangement of the selected nos. This is where I got confused. pick 3 or 5 elements, remaining elements will remain sorted since all are distinct nos.

select any $3$ elements from given $8$ elements - $^8C_3$

edited by
+1
Let the sequence be

1 2 3 4 5 6 7 8 (=A)

if i select any  3 elements say 3,4,5 (=C) then B would be 1,2,6,7,8

On merging B and C i get 1,2,6,7,8,3,4,5 which is not in ascending order as A..

Can you please explain the case as here i am not getting A on merging....
+21
You didn't merge. You just appended. Merging is a process - the same one used in merge sort.
+1

8C= 8C3
picking 3 elemts and picking 5 elements  means same thing , rt ?

0

why its not 8C3+ 8C5

as we have two way to do it

1) Pick element for B first then C = 8C5 * 3C3= 8C5

2)Pick element for C first then B = 8C3 * 5C5= 8C3

The question actually is based on combinations not merging.Firstl y two arrays are taken : B having 3 elements and C having 5 elements sorted in ascending order and then merged into a single array A having 8 elements.We have to find no of distinct sequences. 8 elements can be arranged in 8! ways out of that 3 elements of array B can be arranged in 3! ways and 5 elements of C can be arranged in 5! ways. Now, No. of distinct sequences = 8!/3! 5! = 56 Ans.
0

@arjun sir "We have to find no of distinct sequences. "

could u plz explain this ?what does it mean

0
C(8,5)  produces distinct sequences

1
2