{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Combinations-4

# Combinations-4 - 3 1 n 1 C(n,k number of solutions...

This preview shows pages 1–4. Sign up to view the full content.

1 Recursive definition of The number of ways to select k objects from a set of n objects. k n Let’s write a function C(n, k) C(n,k) C(n,k) Select any one of the n points in the group C(n,k) Separate this point from the rest

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 C(n,4) Let’s consider specific problem C(n, 4) C(n,4) This point can be included in the 4 points we choose C(n,4) Or, it can be excluded from the 4 points we choose C(n,k) number of solutions including + number of solutions not including Total number of solutions is

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3 1 n - 1 C(n,k) number of solutions including + number of solutions not including Total number of solutions is number of solutions including 1 n - 1 C(n-1, k-1) C(n,k) number of solutions including 1 n - 1 C(n-1, k-1) C(n,k) number of solutions not including C(n-1, k) 1 n - 1 C(n-1, k-1) + C(n-1, k) C(n,k) Total number of solutions is 4 int C(int n, int k) { if (k == 0 || n == k) return (1); return (C(n-1, k-1) + C(n-1, k)); } 1 n - 1 C(n,k)...
View Full Document

{[ snackBarMessage ]}

### Page1 / 4

Combinations-4 - 3 1 n 1 C(n,k number of solutions...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online