If the allowable moves are : one step towards Right, and one step towards bottom Explanation for (m+n) C n: you may represent the path using a String consisting of only R and D, where R is a right move and D is a downward move. To go from (1,1) to (m,n) the length of the string will be (m+n) as there are m rows so m 'D's' and n columns so n 'R's'. Now the problem is to find the number of strings of size m+n of only Rs and Ds such that it has exactly m Ds and n Rs. So the answer is (m+n) C n.
On Thu, Feb 21, 2013 at 2:14 PM, kumar ankit <k.anki...@gmail.com> wrote: > Well, (m+n) C (n) is the answer only in the case the allowable moves are : > one step towards Right, and one step towards bottom. > > > > On Thu, Feb 21, 2013 at 2:05 PM, shady <sinv...@gmail.com> wrote: > >> How did you directly arrive at that solution ? Can you please explain >> >> >> On Thu, Feb 21, 2013 at 1:52 PM, Gaurav Rana <gauravran...@gmail.com>wrote: >> >>> (m+n)C(n) >>> >>> >>> On Thu, Feb 21, 2013 at 1:26 PM, shady <sinv...@gmail.com> wrote: >>> >>>> Given a matrix of size mXn, find the number of paths from the top left >>>> cell to the bottom right cell. >>>> >>>> BFS is one way... any other approach ? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to algogeeks+unsubscr...@googlegroups.com. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Algorithm Geeks" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to algogeeks+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to algogeeks+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Kumar Ankit > Senior Undergraduate > Department of Computer Engineering > Institute of Technology > Banaras Hindu University > Varanasi > Ph: +91 9473629892 > -- Kumar Ankit Senior Undergraduate Department of Computer Engineering Institute of Technology Banaras Hindu University Varanasi Ph: +91 9473629892 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.