Question: 3 (a) A function, C(n,k), which computes the number of different ways of uniquely choosing k objects from n without repetition, is commonly used in

3 (a) A function, C(n,k), which computes the number of different ways of uniquely choosing k objects from n without repetition, is commonly used in many statistics applications. For example, how many three-flavored ice cream sundaes are there if there are 10 icecream flavors? To solve this problem we would have to compute C(10,3), the number of ways of choosing three unique icecream flavors from 10. The function C is commonly called n choose k. You may assume that n and k are integers. If n = k, then clearly C(n,k) = 1 because there is only way to choose n objects from n objects. If k = 1, then C(n,k) = n because choosing each of the n objects is a way of choosing one object from n. For all other cases, C(n,k) = C(n-1,k) + C(n-1,k-1). Write a python program to that includes the function C(n,k). = =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
