Combinations-6

Combinations-6 - 1 n - 1 C(n,k) number of solutions...

This preview shows pages 1–3. 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 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

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

View Full Document
2 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 is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 3 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

This document was uploaded on 12/24/2011.

Page1 / 3

Combinations-6 - 1 n - 1 C(n,k) number of solutions...

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

View Full Document
Ask a homework question - tutors are online