let the numbers be i1,i2,i3....i8
Array A has to contain 5 sorted numbers.. So basically u have to make 5 choices among given 8. Standard formula of it is 8C5 (8!/(3! * 5!)). After creating array A there will be 3 elements left which will suffice to create array B (no choice is left in this case so it will be 1C1=1). No shuffling among the numbers in array A and B will be there as numbers have to be sorted and so only one possible arrangment is possible to maintain the array sorted. so total number of arrangements will be 8C5 * 1C1 = 8C5= 56. On Wed, Oct 13, 2010 at 5:25 PM, Divya Jain <[email protected]>wrote: > ignore the above post of mine > @ shiyam > u r doing wrong. we hv been the size of both array b and c which is 5 n 3 > respectively > > @ AlgoSAu > can u please explain ur method? > > > On 13 October 2010 17:23, Divya Jain <[email protected]> wrote: > >> @above >> can u plz explain hw did u apply this formula? >> >> >> On 13 October 2010 16:14, Shiyam code_for_life >> <[email protected]>wrote: >> >>> Lets say 8 integers are 1 to 8 >>> >>> So first way array can be split is 1,7 >>> >>> 1st array can have one among 8 integers so in 8 ways and 2nd array has >>> just one arrangement of other integers in sorted manner and same goes >>> on for other ways to split the array. >>> >>> Whats wrong here? >>> >>> -- >>> 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]<algogeeks%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >>> >> > -- > 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]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- 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.
