Counting nCr = n!/r!(n-r)!=nC(n-r) This equation reflects the fact that selecting r items is same as selecting n-r items in forming a combination from.

Slides:



Advertisements
Similar presentations
Basic Permutations and Combinations
Advertisements

Counting. Counting = Determining the number of elements of a finite set.
COUNTING AND PROBABILITY
Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
The Pigeonhole Principle
Ch. 10: What is a number?. MAIN DEFINITION OF THE COURSE: A symmetry of an object (in the plane or space) means a rigid motion (of the plane or space)
MASTERMIND  Did anyone play the game over the weekend?  Any thoughts on strategy?
Permutations r-permutation (AKA “ordered r-selection”) An ordered arrangement of r elements of a set of n distinct elements. permutation of a set of n.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 5.4 Distributions Prepared by Jo Ellis-Monaghan.
Arrangements & Selections with Repetition
Combinations We should use permutation where order matters
Combinatorics CSC 172 SPRING 2002 LECTURE 11 Assignments With Replacement  Example: Passwords  Are there more strings of length 5 built from three.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Analysis of Recursive Algorithms October 29, 2014
Applied Discrete Mathematics Week 9: Relations
7.4 Generating Functions Definition 1: The generation function for the sequence a 0, a 1,...,a k,... of real numbers is the infinite series G(x) = a 0.
Jessie Zhao Course page: 1.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Generalized Permutations and Combinations
Binomial Coefficients, Inclusion-exclusion principle
Data Structures and Algorithms Discrete Math Review.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Counting Subsets of a Set: Combinations Lecture 31 Section 6.4 Wed, Mar 21, 2007.
Basic Concepts in Number Theory Background for Random Number Generation 1.For any pair of integers n and m, m  0, there exists a unique pair of integers.
2 Permutations and Combinations Lesson 8 HAND OUT REFERENCE SHEET AND GO OVER IT.
CSCI 115 Chapter 3 Counting. CSCI 115 §3.1 Permutations.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
Module #15: Combinatorics Rosen 5 th ed., §§ & §6.5 Now we are moving on to Ch. 4 It is the study of arrangement of objects e.g. enumeration, counting.
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Permutations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Permutations Reading: Kolman, Section 3.1.
BEGINNING MULTIPLICATION BASIC FACTS Multiplication is REPEATED ADDITION. It is a shortcut to skip counting. The first number in the problem tells.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
Discrete Mathematics Lecture # 25 Permutation & Combination.
Discrete Structures Combinations. Order Doesn’t Matter In the previous section, we looked at two cases where order matters: Multiplication Principle –
3.2 Combinations.
CS Lecture 8 Developing Your Counting Muscles.
1 Chapter 2 Pigeonhole Principle. 2 Summary Pigeonhole principle –simple form Pigeonhole principle –strong form Ramsey’s theorem.
CSCI 115 Chapter 3 Counting. CSCI 115 §3.1 Permutations.
5.5 Generalized Permutations and Combinations
2. 99 Round the the nearest 10 QUIZ
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Introduction Suppose that a password on a computer system consists of 6, 7, or 8 characters. Each of these characters must be a digit or a letter of the.
Counting Subsets of a Set: Combinations Lecture 28 Section 6.4 Thu, Mar 30, 2006.
Sorting by placement and Shift Sergi Elizalde Peter Winkler By 資工四 B 周于荃.
SECTION 5.4 COUNTING. Objectives 1. Count the number of ways a sequence of operations can be performed 2. Count the number of permutations 3. Count the.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
Generalized Permutations and Combinations
Discrete Structures for Computer Science
COCS DISCRETE STRUCTURES
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
Permutations and Combinations
Permutations and Combinations
Mathematical Structures for Computer Science Chapter 6
CS100: Discrete structures
Arrangements & Selections with Repetition
Arrangements & Selections with Repetition
Permutations and Combinations
Basic Counting.
COUNTING AND PROBABILITY
CSE 321 Discrete Structures
Basic Counting Lecture 9: Nov 5, 6.
Miniconference on the Mathematics of Computation
Created by Tom Wegleitner, Centreville, Virginia
Presentation transcript:

Counting nCr = n!/r!(n-r)!=nC(n-r) This equation reflects the fact that selecting r items is same as selecting n-r items in forming a combination from n items.

Compare two problems Number of strings of 0,1, and length n 2 n Number of strings of 0,1, length n, and r 0s nCr Consider the set {1,2,…,n}, the positions of the digits in the strings. There are nCr ways to choose r positions to assign 0.

Theorem 2. Suppose k selections are to be made from n items without regards 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.

Example. Choose 3 CDs from 10 (allow repeats). Consider the CDs one by one. 1 means select one copy and 2 means no (more) copies from the current choice. E.g., represents selecting CD 4,6, represents CD 1,two copies 2 Conversely, any selection can be represented by such a sequence. The string has three 1’s and ten 2’s. The last digit is always 2. The first 3+9 digits can be either 1 or 2. Therefore, total number 12 C 3.

This problem is equivalent to find the number of ways to put r identical items (or tokens, to give another name) into n different boxes. This is easy to see. Associate an object with a box. Choosing a copy of a certain object is associated with putting a token into the associated box. E.g., selecting CD 3, two copies of CD 6 is associated with putting one token in box 3 and two tokens in box 6.

Let 0 denote a token. A string of r 0’s and (n-1) 1’s models one assignment of r tokens into n boxes. Consider the same example as before, with r=3 and n= represents putting one token each in box 4,6 and represents putting one token in box 1, two in box 2 Therefore, total number 12 C 3.