0 0 votes Consider the following function that computes the value of $\binom{m}{n}$ correctly for legal m and n int func(int m,int n) { if(n==0)||(m==n) return 1; else return E; } In the function which is correct expression for E? a)func(m-1,n)+func(m-1,n-1) b)func(m-1,n+1)+func(m-1,n) c)func(m,n)+func(m,n-1) d)None Programming in C programming-in-c + – srestha 1.3k views answer comment Share Follow Print See 1 comment 1 1 comment reply joshi_nitish commented Oct 31, 2017 i edited by joshi_nitish Oct 31, 2017 reply Follow flag ..... 0 0 replyShare Please log in or register to add a comment.
Best answer 2 2 votes Using Pascal's identity, $\binom{m}{n} = \binom{m-1}{n} +\binom{m-1}{n-1}$ Hence, option A is correct. just_bhavana answered Oct 31, 2017 • selected Oct 31, 2017 by joshi_nitish just_bhavana comment Share Follow See all 7 Comments 7 7 Comments reply joshi_nitish commented Oct 31, 2017 reply Follow flag yes option A is correct, i was using, $\binom{n}{r} =\binom{n}{r-1} + \binom{n+1}{r}$ which is also correct but not in option.. 0 0 replyShare just_bhavana commented Oct 31, 2017 reply Follow flag What you wrote is incorrect You mean $\binom{n}{r} + \binom{n}{r-1} = \binom{n+1}{r}$ right ? 0 0 replyShare joshi_nitish commented Oct 31, 2017 reply Follow flag ohh yes i was doing mistake, it should be, $\binom{n+1}{r}=\binom{n}{r}+\binom{n}{r-1}$ thankyou !! 1 1 replyShare Anu007 commented Oct 31, 2017 reply Follow flag What (n,r); choose r from n people: Do it in two part: Assume you already choose an person Then number of ways to select = (n-1 ,r-1) Now exclude that person Then number of ways to select r people = (n-1, r) 0 0 replyShare srestha commented Oct 31, 2017 reply Follow flag It can also simply be done with taking example like $\binom{4}{3}$ and then chk if lhs=rhs rt? 0 0 replyShare Anu007 commented Oct 31, 2017 reply Follow flag yes ..... 0 0 replyShare srestha commented Oct 31, 2017 reply Follow flag now try next one, beautiful question that is:) 0 0 replyShare Please log in or register to add a comment.