Question: The formula for computing the number of ways of choosing r different things from a set of n things is the following: In this formula,

The formula for computing the number of ways of choosing r different things from a set of n things is the following:

п! C(n, r) %3D r!(n –r)! II

In this formula, the factorial function is represented by an exclamation point (!) and defined as the product:

n! = n × (n – 1) × (n – 2) × … × 1

Discover a recursive version of the C(n, r) formula, and write a recursive method that computes the value of the formula. Embed the method in a program and test it.

! C(n, r) %3D r!(n r)! II

Step by Step Solution

3.26 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The recursive formula for Cn r can be written as follows Cn r Cn1 r1 Cn1 r where Cn 0 1 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Data Structures and Other Objects Using Java Questions!