Let A(m,n) = the number of ways two sorted arrays of size m and n can
be merged. Then A satisfies the recurrence

A(m,n) = A(m-1,n) + A(m,n-1)
A(m,0) = 1
A(0,n) = 1

The solution is A(m,n) = (m+n) choose m, the binomial coefficient.

If m = n = N, then A(N,N) = 2N choose N.

Dave

On Jan 12, 3:23 am, Arindam Chatterjee
<[email protected]> wrote:
> Can anyone help:
>
> *In how many ways can 2 sorted arrays of combined size N be merged?*
>
> --
>
> Thanks and regards,
> ARINDAM CHATTERJEE,
> Mtech Second Year,
> Department of Computer Science and Engineering,
> IIT Bombay,
> Powai,
> Mumbai-400076
> Contacts : +919022313724
>
> Living is about making tomorrow better than today !!

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to