Problem

Consider the following problem: How many ways can a committee of four people be selected f...

Consider the following problem: How many ways can a committee of four people be selected from a group of 10 people? There are many other similar problems, where you are asked to find the number of ways to select a set of items from a given set of items. The general problem can be stated as follows: Find the number of ways r different things can be chosen from a set of n items, where r and n are nonnegative integers and rn. Suppose C(n, r) denotes the number of ways r different things can be chosen from a set of n items. Then C(n, r) is given by the following formula:

where the exclamation point denotes the factorial function. Moreover, C(n, 0) = C(n, n) = 1. It is also known that C(n, r) = C(n − 1, r − 1) + C(n − 1, r).

a. Write a recursive algorithm to determine C(n, r). Identify the base case(s) and the general case(s).

b. Using your recursive algorithm, determine C(5, 3) and C(9, 4).

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 17
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT