1 / 6

Combinations

Combinations. We should use permutation where order matters We should use combination where order does not matter. Combination : An r-element subset of an n-element set A is a combination of A, taken r at a time. Example: A = {1, 2, 3, 4} Distinct combinations of A, taken three at a time:

vparham
Download Presentation

Combinations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Combinations • We should use permutation where order matters • We should use combination where order does not matter. • Combination: An r-element subset of an n-element set A is a combination of A, taken r at a time. Example: A = {1, 2, 3, 4} Distinct combinations of A, taken three at a time: (different subsets of A, each with r elements) A1 = {1, 2, 3], A2 = {1, 2, 4}, A3 = {1, 3, 4}, A4 = {2, 3, 4} Note: A1 = {1, 2, 3} = {2, 3, 1} = {3, 1, 2} = {3, 2, 1} = {2, 1, 3} These are subsets where order is not important. These are not sequence where order is important.

  2. Combinations • How to count the number of r-element subsets of an n-element set A? • Each permutation of the elements of A, taken r at a time, can be produced by doing the following tasks in sequence. • Task 1: Choose a subset B of A containing r elements • Task 2: Choose a particular permutation of B Suppose, C => No. of ways to choose B Task2 can be performed in r! ways. Total no. of ways of performing both task is (using multiplication principle) = C. r! Hence, C. r! = n P r or, C = nPr / r! = n! /r! (n – r)!

  3. Combinations • The number of combinations of the elements of A, taken r at a time (Number of r-element subsets of A) is given by nCr = n! r! (n – r)!

  4. Note: Counting • In general, • When order matters, we count the number of sequences or permutations. • When order does not matter, we count the number of subsets or combinations.

  5. Theorem on combinations Suppose k selections are to be made from n items without regard to order and that repeats are allowed, assuming at least k copies of each of the n items. The number of ways these selections can be made is (n+k-1) C k.

  6. Example • Suppose that a valid computer password consists of seven characters, the first of which is a letter chosen from the set {A, B, C, D, F, G} and the remaining six characters are letters chosen from the English alphabet or a digit. How many different passwords are possible? • We need to perform two tasks: Task 1: Choose a starting letter from the set given. Task 2: Choose a sequence of letter and digits. Repeats are allowed. Task 1 can be performed in 7C1 = 7 ways. Since there are 26 letters and 10 digits, task 2 can be performed in 36 6 = 2,176,782,336 ways. By using multiplication principle, the number of different passwords are 7. 2,176,782,336 = 15,237,476,352.

More Related