Combinations-4

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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
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

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 Right Arrow Icon
Ask a homework question - tutors are online