+26 votes
3.3k 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$
asked
edited | 3.3k views

## 3 Answers

+31 votes
Best answer
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.$

Correct Answer: $C$
answered by Veteran (56.4k points)
edited
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.
+31 votes

answer - C

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

answered by Loyal (8.7k points)
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

+12 votes
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.
answered by (409 points)
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
Answer:

+13 votes
5 answers
1
+25 votes
2 answers
2
+39 votes
3 answers
3
+18 votes
2 answers
4
+33 votes
4 answers
5
+21 votes
4 answers
6
+32 votes
5 answers
7