CSE 21 Mathematics for Algorithm and System Analysis

Size: px
Start display at page:

Download "CSE 21 Mathematics for Algorithm and System Analysis"

Transcription

1 CSE 21 Mathematics for Algorithm and System Analysis Unit 1: Basic Count and List Section 3: Set CSE21: Lecture 3 1

2 Reminder Piazza forum address: e Notes on the course website will be updated after class. CSE21: Lecture 3 2

3 Review : Set Set: a collection of distinct objects where order does not matter. Cardinality of a set A: A. k-set: a set with k elements, also called a set with cardinality k. CSE21: Lecture 3 3

4 Review : Rule of Product and Sum When to use the Two Rules? Count the number of structures in a set and describe how to construct the structures in terms of subconstructions that are connected by and and or. If this leads to the construction of each structure in a unique way, then the Rules of Sum and Product apply. Which Rule to use? and means products if the two parts are independent; or means sums. CSE21: Lecture 3 4

5 Learning Outcomes By the end of this lesson, you should be able to Understand and apply the operations and algebraic rules of Sets. Understand the meanings of Binomial Coefficient and Multinomial Coefficients, and calculate their values. Understand how recursion works. CSE21: Lecture 3 5

6 Why do we need to learn them? Set operation and listing are useful in many real world problems. Recursion is one of the central ideas of computer science. CSE21: Lecture 3 6

7 Definition 3: Set Notation Two ways to describe a set Condition Form: S = {x condition(x)} Enumeration Form: S = {1, 2, 3} Membership x S: x is an element of S x S: x is not an element of S Subsets: A B: if every member of set A is also a member of set B. It is the same with B A. Empty set: CSE21: Lecture 3 7

8 Universal Set: U When dealing with sets, we usually have a universal set U in mind, and the sets we discuss are subsets of U. Universal Set Example U = Z = {all integers}, its subsets include: N = {0, 1, 2,...}: all natural numbers N+ = {1, 2, 3, } : all positive integers CSE21: Lecture 3 8

9 Set Equality Checking Two sets A and B are equal if and only if every element of A is an element of B and every element of B is an element of A. Examples: {a, b, c} = {a, b, c} {a, b, c} = {b, a, c} {a, b, c} = {a, b, b, c, b} CSE21: Lecture 3 9

10 Set Operation Intersection: A B = {x x Aand x B} Union: A B= {x x Aor x B} Set Difference: A \ B or A B = {x x Aand x B} Complement of A (relative to U): U \ A or A c or A = {x x A} = U A Symmetric Difference: A B= (A \ B) (B \ A). Cartesian Product (also called product): A B = {(x, y) x A, y B} CSE21: Lecture 3 10

11 Theorem 6: Algebraic rules for sets Name Intersection Union Associative (P Q) R = P (Q R) (P Q) R = P (Q R) Distributive P (Q R) = (P Q) (P R) P (Q R) = (P Q) (P R) Idempotent P P = P P P = P Double Negation P = P DeMorgan: (P Q) = P Q (P Q) = P Q Absorption P (P Q) = P P (P Q) = P Commutative P Q = Q P P Q= Q P CSE21: Lecture 3 11

12 Subset and Subset Number P(A) : the set of all subsets of A P(A) = 2 A : for each element of A we have two choices - include the element in the subset or not include it. P k (A) : the set of all subsets of A of size (or cardinality) k n P k (A) is denoted as C(n, k) or k, called binomial coefficients, are read n choose k. CSE21: Lecture 3 12

13 Theorem 7: Binomial coefficient formula n k n(n 1) (n k +1) k! =C(n, k) = = n! k!(n k)! k = n n n k Reason for the formula k-list number from n-set: (n) k =n!/(n-k)! k-list number from k-set: k! Based on Rule of Product (k-set number from n-set k-list number from k-set = k-list number from n-set), result is n! k!(n k)! CSE21: Lecture 3 13

14 Example of Binomial Coefficient Calculation 5 3 = Divide out common factor Generate 3-sets from a 5-set: {a, b, c, d, e} {a, b, c}, {a, b, d}, {a, b, e}, {a, c, d}, {a, c, e}, {a, d, e} {b, c, d}, {b, c, e}, {b, d, e} {c, d, e} 5! = 3!(5 3)! (1 2 3) (1 2) = 10 CSE21: Lecture 3 14

15 Example 15: Full House Card Hands A standard deck of cards contains 52 cards, each marked with two labels. The first label, called the suit, suits = {,,, } called club, heart, diamond and spade. The second label, called the value, belongs to set {2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A} A hand is a subset of a deck. Pair: two cards have the same value. Triple: three cards have the same value. How many 5 card hands consist of a pair and a triple (called full house in poker)? CSE21: Lecture 3 15

16 Solution of Example 15 To construct such a hand: Choose the value for the pair AND Choose the value for the triple different from the pair AND Choose the 2 suits for the pair AND Choose the 3 suits for the triple Based on Rule of Product, result is C(4, 2) C(4, 3) = 3,744 CSE21: Lecture 3 16

17 Example 16: Two Pair Card Hands How many 5 card hands consist of two pairs? A description of a hand always means that there is nothing better in the hand, so two pairs means we do not have a full house or four of a kind. Tricky part: make sure there is no duplications; the calculation similar to the last example is C(4, 2) C(4, 2) C(4, 1), this calculation counts each hand exactly twice, e.g.: {5, 4} for the values of the two pair is counted by <5, 4> and <4, 5>. Solution: divide the above number by 2 or use solution from the textbook. CSE21: Lecture 3 17

18 Example 18: Multinomial Coefficient Given k boxes (labeled 1 to k) and an n-set S How many ways to distribute the elements of S among the boxes so that the ith box contains exactly m i elements? (m m k =n) Fill the first box (C(n, m 1 ) ways) AND Fill the second box (C(n m 1, m 2 ) ways) AND Fill the kth box (C(n (m m k-1 ), m k ) = C(m k, m k ) = 1 ways) CSE21: Lecture 3 18

19 Solution of Example 18 By Rule of Product and formula C(n, k)= n!/k!(n-k)!, the result is: C(n, m 1 ) C(n m 1, m 2 ) C(n (m m k-1 ), m k )= n! m!( n m )! ( n m1)! m!( n m1 m... )! ( n ( m )!( n ( m Divide out common factor, final result is called multinomial coefficient ( m n n! = m1, m2,, mk m1! m2! mk! m m k 1 ))! + m k 1 2 k 1 k 1 + m + m 2 ))! CSE21: Lecture 3 19

20 Example 17: Rearranging MISSISSIPPI Question: How many ways to rearrange the letters in the word MISSISSIPPI? How to describe/get one way? Describe a placement of letters by assigning positions to each letter, e.g., I {2, 5, 8, 11}, M {1}, P {9, 10}, S {3, 4, 6, 7} means the word MISSISSIPPI. We can get a eligible result by distributing 4 elements of set {1, 2,, 11} into a box labeled as I, 1 element to box M, 2 to box P, 4 to box S. How to get all the ways? It becomes a multinomial coefficient problem. Result: 11 4,1, 2, 4 = 11! 4!1!2!4! = ( ) 1 (2 1) ( ) CSE21: Lecture 3 20

21 Example 20: Words from a collection of Question: letters How many words of length k can be formed from the letters in TOOL when no letter may be used more often than it appears in TOOL? The same with Example 10. Let m 1, m 2, m 3 be the numbers of T, O, L, respectively. It becomes a multinomial coefficient problem. List and add possible values for m i for each possible k. k=1: k=2: k=3: k=4: 1 0, 0,1 2 0, 2,0 3 0, 2,1 4 1, 2, ,1, ,1, , 2,0 = , 0, , 0, ,1,1 = ,1, 0 =12 = 7 CSE21: Lecture 3 21

22 Example 22: Card hands and multinomial coefficients Full house: multiply the following numbers Face values: one for the triple, one for the pair, and leave eleven face values unused: 13 1,1,11 Choose the suits for the triple: Choose the suits for the pair: Two pair Face values: two for the pairs, one for the single card, and leave ten face values unused: 13 2,1,10 The suits for the two pairs and the single card: CSE21: Lecture 3 22

23 Recursion of Binomial Coefficient How to compute C(n, k) from values of the function with smaller arguments? Let S = {x 1,..., x n }, C(n, k) is k-subset number of S. x n may be in k-subset, may be not. If x n is not in k-subset, the number is the same with taking x n out of S : C(n-1, k) If x n is in k-subset, the number is the same with getting (k-1)-subset and add x n to every subset: C(n-1, k-1) 1 By the Rule of Sum: C(n, k) = C(n-1, k) + C(n-1, k-1) CSE21: Lecture 3 23

24 Two Ways of Deriving Recursion Breaking down (Top-down): How can I break down the things I want to count into smaller things of the same type? Constructing (Bottom-up): How can I construct the things I want to count of a given size by using the same type of things of a smaller size? Note: no matter which way to choose, the recursion only works when we have some (smallest) values to start with. CSE21: Lecture 3 24

25 Example 23 : Deriving Recursions How to construct the things of a given size by using the same type of things of a smaller size? A complete recursion formula of binomial coefficient. C(0,0) = 1, C(0,k)=0 for k 0 and C(n,k)=C(n 1,k 1)+C(n 1,k) for n > 0; or C(1,0) = C(1,1) = 1, C(1,k) = 0 for k 0,1 and C(n,k)=C(n 1,k 1)+C(n 1,k) for n > 1; CSE21: Lecture 3 25

26 Example 23 : Deriving Recursions Tabular representation of C(n,k), called Pascal s Triangle CSE21: Lecture 3 26

27 Homework and Pre-Reading Assignment Homework: Exercise 3.2, 3.3, 3.4, 3.5, 3.6, in page CL-26 to CL- 27 For next class, please read remaining pages of Section 3 (CL-25 to CL-26) and first six pages of Section 4 (CL-28 to CL-34). Try to understand set partition definition and examples. Try to understand probability and Venn diagram through examples. CSE21: Lecture 3 27

Multiple Choice Questions for Review

Multiple Choice Questions for Review Review Questions Multiple Choice Questions for Review 1. Suppose there are 12 students, among whom are three students, M, B, C (a Math Major, a Biology Major, a Computer Science Major. We want to send

More information

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1: Block 1 - Sets and Basic Combinatorics Main Topics in Block 1: A short revision of some set theory Sets and subsets. Venn diagrams to represent sets. Describing sets using rules of inclusion. Set operations.

More information

Slide 1 Math 1520, Lecture 13

Slide 1 Math 1520, Lecture 13 Slide 1 Math 1520, Lecture 13 In chapter 7, we discuss background leading up to probability. Probability is one of the most commonly used pieces of mathematics in the world. Understanding the basic concepts

More information

Compound Probability. Set Theory. Basic Definitions

Compound Probability. Set Theory. Basic Definitions Compound Probability Set Theory A probability measure P is a function that maps subsets of the state space Ω to numbers in the interval [0, 1]. In order to study these functions, we need to know some basic

More information

Reading 14 : Counting

Reading 14 : Counting CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti, Gautam Prakriya Reading 14 : Counting In this reading we discuss counting. Often, we are interested in the cardinality

More information

It is important that you show your work. The total value of this test is 220 points.

It is important that you show your work. The total value of this test is 220 points. June 27, 2001 Your name It is important that you show your work. The total value of this test is 220 points. 1. (10 points) Use the Euclidean algorithm to solve the decanting problem for decanters of sizes

More information

Define and Diagram Outcomes (Subsets) of the Sample Space (Universal Set)

Define and Diagram Outcomes (Subsets) of the Sample Space (Universal Set) 12.3 and 12.4 Notes Geometry 1 Diagramming the Sample Space using Venn Diagrams A sample space represents all things that could occur for a given event. In set theory language this would be known as the

More information

Jong C. Park Computer Science Division, KAIST

Jong C. Park Computer Science Division, KAIST Jong C. Park Computer Science Division, KAIST Today s Topics Basic Principles Permutations and Combinations Algorithms for Generating Permutations Generalized Permutations and Combinations Binomial Coefficients

More information

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics DISCUSSION #8 FRIDAY MAY 25 TH 2007 Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics 2 Homework 8 Hints and Examples 3 Section 5.4 Binomial Coefficients Binomial Theorem 4 Example: j j n n

More information

Combinatorial Proofs

Combinatorial Proofs Combinatorial Proofs Two Counting Principles Some proofs concerning finite sets involve counting the number of elements of the sets, so we will look at the basics of counting. Addition Principle: If A

More information

Introductory Probability

Introductory Probability Introductory Probability Combinations Nicholas Nguyen nicholas.nguyen@uky.edu Department of Mathematics UK Agenda Assigning Objects to Identical Positions Denitions Committee Card Hands Coin Toss Counts

More information

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis Lecture 3 Class URL: http://vlsicad.ucsd.edu/courses/cse21-s14/ Lecture 3 Notes Goal for today: CL Section 3 Subsets,

More information

Counting integral solutions

Counting integral solutions Thought exercise 2.2 20 Counting integral solutions Question: How many non-negative integer solutions are there of x 1 +x 2 +x 3 +x 4 = 10? Thought exercise 2.2 20 Counting integral solutions Question:

More information

Class 8 - Sets (Lecture Notes)

Class 8 - Sets (Lecture Notes) Class 8 - Sets (Lecture Notes) What is a Set? A set is a well-defined collection of distinct objects. Example: A = {1, 2, 3, 4, 5} What is an element of a Set? The objects in a set are called its elements.

More information

Sets. Definition A set is an unordered collection of objects called elements or members of the set.

Sets. Definition A set is an unordered collection of objects called elements or members of the set. Sets Definition A set is an unordered collection of objects called elements or members of the set. Sets Definition A set is an unordered collection of objects called elements or members of the set. Examples:

More information

Discrete Structures Lecture Permutations and Combinations

Discrete Structures Lecture Permutations and Combinations Introduction Good morning. Many counting problems can be solved by finding the number of ways to arrange a specified number of distinct elements of a set of a particular size, where the order of these

More information

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7 CSCI 00 Foundations of Computer Science (FoCS) Solutions for Homework 7 Homework Problems. [0 POINTS] Problem.4(e)-(f) [or F7 Problem.7(e)-(f)]: In each case, count. (e) The number of orders in which a

More information

4. Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, X = {2, 3, 4}, Y = {1, 4, 5}, Z = {2, 5, 7}. Find a) (X Y) b) X Y c) X (Y Z) d) (X Y) Z

4. Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, X = {2, 3, 4}, Y = {1, 4, 5}, Z = {2, 5, 7}. Find a) (X Y) b) X Y c) X (Y Z) d) (X Y) Z Exercises 1. Write formal descriptions of the following sets. a) The set containing the numbers 1, 10, and 100 b) The set containing all integers that are greater than 5 c) The set containing all natural

More information

Combinatorics and Intuitive Probability

Combinatorics and Intuitive Probability Chapter Combinatorics and Intuitive Probability The simplest probabilistic scenario is perhaps one where the set of possible outcomes is finite and these outcomes are all equally likely. A subset of the

More information

CSE 1400 Applied Discrete Mathematics Permutations

CSE 1400 Applied Discrete Mathematics Permutations CSE 1400 Applied Discrete Mathematics Department of Computer Sciences College of Engineering Florida Tech Fall 2011 1 Cyclic Notation 2 Re-Order a Sequence 2 Stirling Numbers of the First Kind 2 Problems

More information

8.2 Union, Intersection, and Complement of Events; Odds

8.2 Union, Intersection, and Complement of Events; Odds 8.2 Union, Intersection, and Complement of Events; Odds Since we defined an event as a subset of a sample space it is natural to consider set operations like union, intersection or complement in the context

More information

Probability. Ms. Weinstein Probability & Statistics

Probability. Ms. Weinstein Probability & Statistics Probability Ms. Weinstein Probability & Statistics Definitions Sample Space The sample space, S, of a random phenomenon is the set of all possible outcomes. Event An event is a set of outcomes of a random

More information

Such a description is the basis for a probability model. Here is the basic vocabulary we use.

Such a description is the basis for a probability model. Here is the basic vocabulary we use. 5.2.1 Probability Models When we toss a coin, we can t know the outcome in advance. What do we know? We are willing to say that the outcome will be either heads or tails. We believe that each of these

More information

Mat 344F challenge set #2 Solutions

Mat 344F challenge set #2 Solutions Mat 344F challenge set #2 Solutions. Put two balls into box, one ball into box 2 and three balls into box 3. The remaining 4 balls can now be distributed in any way among the three remaining boxes. This

More information

Math 3012 Applied Combinatorics Lecture 2

Math 3012 Applied Combinatorics Lecture 2 August 20, 2015 Math 3012 Applied Combinatorics Lecture 2 William T. Trotter trotter@math.gatech.edu The Road Ahead Alert The next two to three lectures will be an integrated approach to material from

More information

Chapter 2. Permutations and Combinations

Chapter 2. Permutations and Combinations 2. Permutations and Combinations Chapter 2. Permutations and Combinations In this chapter, we define sets and count the objects in them. Example Let S be the set of students in this classroom today. Find

More information

Chapter 1. Probability

Chapter 1. Probability Chapter 1. Probability 1.1 Basic Concepts Scientific method a. For a given problem, we define measures that explains the problem well. b. Data is collected with observation and the measures are calculated.

More information

Math 166: Topics in Contemporary Mathematics II

Math 166: Topics in Contemporary Mathematics II Math 166: Topics in Contemporary Mathematics II Xin Ma Texas A&M University September 30, 2017 Xin Ma (TAMU) Math 166 September 30, 2017 1 / 11 Last Time Factorials For any natural number n, we define

More information

More Probability: Poker Hands and some issues in Counting

More Probability: Poker Hands and some issues in Counting More Probability: Poker Hands and some issues in Counting Data From Thursday Everybody flipped a pair of coins and recorded how many times they got two heads, two tails, or one of each. We saw that the

More information

Section Summary. Permutations Combinations Combinatorial Proofs

Section Summary. Permutations Combinations Combinatorial Proofs Section 6.3 Section Summary Permutations Combinations Combinatorial Proofs Permutations Definition: A permutation of a set of distinct objects is an ordered arrangement of these objects. An ordered arrangement

More information

Section Introduction to Sets

Section Introduction to Sets Section 1.1 - Introduction to Sets Definition: A set is a well-defined collection of objects usually denoted by uppercase letters. Definition: The elements, or members, of a set are denoted by lowercase

More information

Elementary Combinatorics

Elementary Combinatorics 184 DISCRETE MATHEMATICAL STRUCTURES 7 Elementary Combinatorics 7.1 INTRODUCTION Combinatorics deals with counting and enumeration of specified objects, patterns or designs. Techniques of counting are

More information

Week 1: Probability models and counting

Week 1: Probability models and counting Week 1: Probability models and counting Part 1: Probability model Probability theory is the mathematical toolbox to describe phenomena or experiments where randomness occur. To have a probability model

More information

CIS 2033 Lecture 6, Spring 2017

CIS 2033 Lecture 6, Spring 2017 CIS 2033 Lecture 6, Spring 2017 Instructor: David Dobor February 2, 2017 In this lecture, we introduce the basic principle of counting, use it to count subsets, permutations, combinations, and partitions,

More information

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions) CSE 31: Foundations of Computing II Quiz Section #: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions) Review: Main Theorems and Concepts Binomial Theorem: x, y R, n N: (x + y) n

More information

10.2.notebook. February 24, A standard deck of 52 playing cards has 4 suits with 13 different cards in each suit.

10.2.notebook. February 24, A standard deck of 52 playing cards has 4 suits with 13 different cards in each suit. Section 10.2 It is not always important to count all of the different orders that a group of objects can be arranged. A combination is a selection of r objects from a group of n objects where the order

More information

Chapter 5: Probability: What are the Chances? Section 5.2 Probability Rules

Chapter 5: Probability: What are the Chances? Section 5.2 Probability Rules + Chapter 5: Probability: What are the Chances? Section 5.2 + Two-Way Tables and Probability When finding probabilities involving two events, a two-way table can display the sample space in a way that

More information

n! = n(n 1)(n 2) 3 2 1

n! = n(n 1)(n 2) 3 2 1 A Counting A.1 First principles If the sample space Ω is finite and the outomes are equally likely, then the probability measure is given by P(E) = E / Ω where E denotes the number of outcomes in the event

More information

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = = Math 115 Discrete Math Final Exam December 13, 2000 Your name It is important that you show your work. 1. Use the Euclidean algorithm to solve the decanting problem for decanters of sizes 199 and 98. In

More information

Chapter 1. Probability

Chapter 1. Probability Chapter 1. Probability 1.1 Basic Concepts Scientific method a. For a given problem, we define measures that explains the problem well. b. Data is collected with observation and the measures are calculated.

More information

Probability. Engr. Jeffrey T. Dellosa.

Probability. Engr. Jeffrey T. Dellosa. Probability Engr. Jeffrey T. Dellosa Email: jtdellosa@gmail.com Outline Probability 2.1 Sample Space 2.2 Events 2.3 Counting Sample Points 2.4 Probability of an Event 2.5 Additive Rules 2.6 Conditional

More information

Sample Spaces, Events, Probability

Sample Spaces, Events, Probability Sample Spaces, Events, Probability CS 3130/ECE 3530: Probability and Statistics for Engineers August 28, 2014 Sets A set is a collection of unique objects. Sets A set is a collection of unique objects.

More information

Week 3 Classical Probability, Part I

Week 3 Classical Probability, Part I Week 3 Classical Probability, Part I Week 3 Objectives Proper understanding of common statistical practices such as confidence intervals and hypothesis testing requires some familiarity with probability

More information

Solution: This is sampling without repetition and order matters. Therefore

Solution: This is sampling without repetition and order matters. Therefore June 27, 2001 Your name It is important that you show your work. The total value of this test is 220 points. 1. (10 points) Use the Euclidean algorithm to solve the decanting problem for decanters of sizes

More information

Discrete Mathematics. Spring 2017

Discrete Mathematics. Spring 2017 Discrete Mathematics Spring 2017 Previous Lecture Binomial Coefficients Pascal s Triangle The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must

More information

MATHEMATICS 152, FALL 2004 METHODS OF DISCRETE MATHEMATICS Outline #10 (Sets and Probability)

MATHEMATICS 152, FALL 2004 METHODS OF DISCRETE MATHEMATICS Outline #10 (Sets and Probability) MATHEMATICS 152, FALL 2004 METHODS OF DISCRETE MATHEMATICS Outline #10 (Sets and Probability) Last modified: November 10, 2004 This follows very closely Apostol, Chapter 13, the course pack. Attachments

More information

Counting. Chapter 6. With Question/Answer Animations

Counting. Chapter 6. With Question/Answer Animations . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Counting Chapter

More information

Permutations and Combinations Section

Permutations and Combinations Section A B I L E N E C H R I S T I A N U N I V E R S I T Y Department of Mathematics Permutations and Combinations Section 13.3-13.4 Dr. John Ehrke Department of Mathematics Fall 2012 Permutations A permutation

More information

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability Review: Main Theorems and Concepts Binomial Theorem: Principle of Inclusion-Exclusion

More information

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6 CS100: DISCRETE STRUCTURES Lecture 8 Counting - CH6 Lecture Overview 2 6.1 The Basics of Counting: THE PRODUCT RULE THE SUM RULE THE SUBTRACTION RULE THE DIVISION RULE 6.2 The Pigeonhole Principle. 6.3

More information

Principle of Inclusion-Exclusion Notes

Principle of Inclusion-Exclusion Notes Principle of Inclusion-Exclusion Notes The Principle of Inclusion-Exclusion (often abbreviated PIE is the following general formula used for finding the cardinality of a union of finite sets. Theorem 0.1.

More information

Finite Math - Fall 2016

Finite Math - Fall 2016 Finite Math - Fall 206 Lecture Notes - /28/206 Section 7.4 - Permutations and Combinations There are often situations in which we have to multiply many consecutive numbers together, for example, in examples

More information

Topics to be covered

Topics to be covered Basic Counting 1 Topics to be covered Sum rule, product rule, generalized product rule Permutations, combinations Binomial coefficients, combinatorial proof Inclusion-exclusion principle Pigeon Hole Principle

More information

Important Distributions 7/17/2006

Important Distributions 7/17/2006 Important Distributions 7/17/2006 Discrete Uniform Distribution All outcomes of an experiment are equally likely. If X is a random variable which represents the outcome of an experiment of this type, then

More information

Fundamental. If one event can occur m ways and another event can occur n ways, then the number of ways both events can occur is:.

Fundamental. If one event can occur m ways and another event can occur n ways, then the number of ways both events can occur is:. 12.1 The Fundamental Counting Principle and Permutations Objectives 1. Use the fundamental counting principle to count the number of ways an event can happen. 2. Use the permutations to count the number

More information

CISC-102 Fall 2017 Week 8

CISC-102 Fall 2017 Week 8 Week 8 Page! of! 34 Playing cards. CISC-02 Fall 207 Week 8 Some of the following examples make use of the standard 52 deck of playing cards as shown below. There are 4 suits (clubs, spades, hearts, diamonds)

More information

With Question/Answer Animations. Chapter 6

With Question/Answer Animations. Chapter 6 With Question/Answer Animations Chapter 6 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and

More information

PROBABILITY FOR RISK MANAGEMENT. Second Edition

PROBABILITY FOR RISK MANAGEMENT. Second Edition Solutions Manual for PROBABILITY FOR RISK MANAGEMENT Second Edition by Donald G. Stewart, Ph.D. and Matthew J. Hassett, ASA, Ph.D. ACTEX Publications Winsted, Connecticut Copyright 2006, by ACTEX Publications,

More information

Section continued: Counting poker hands

Section continued: Counting poker hands 1 Section 3.1.5 continued: Counting poker hands 2 Example A poker hand consists of 5 cards drawn from a 52-card deck. 2 Example A poker hand consists of 5 cards drawn from a 52-card deck. a) How many different

More information

SET THEORY AND VENN DIAGRAMS

SET THEORY AND VENN DIAGRAMS Mathematics Revision Guides Set Theory and Venn Diagrams Page 1 of 26 M.K. HOME TUITION Mathematics Revision Guides Level: GCSE Higher Tier SET THEORY AND VENN DIAGRAMS Version: 2.1 Date: 15-10-2015 Mathematics

More information

DISCRETE STRUCTURES COUNTING

DISCRETE STRUCTURES COUNTING DISCRETE STRUCTURES COUNTING LECTURE2 The Pigeonhole Principle The generalized pigeonhole principle: If N objects are placed into k boxes, then there is at least one box containing at least N/k of the

More information

Poker: Probabilities of the Various Hands

Poker: Probabilities of the Various Hands Poker: Probabilities of the Various Hands 22 February 2012 Poker II 22 February 2012 1/27 Some Review from Monday There are 4 suits and 13 values. The suits are Spades Hearts Diamonds Clubs There are 13

More information

Poker: Further Issues in Probability. Poker I 1/29

Poker: Further Issues in Probability. Poker I 1/29 Poker: Further Issues in Probability Poker I 1/29 How to Succeed at Poker (3 easy steps) 1 Learn how to calculate complex probabilities and/or memorize lots and lots of poker-related probabilities. 2 Take

More information

Sec$on Summary. Permutations Combinations Combinatorial Proofs

Sec$on Summary. Permutations Combinations Combinatorial Proofs Section 6.3 Sec$on Summary Permutations Combinations Combinatorial Proofs 2 Coun$ng ordered arrangements Ex: How many ways can we select 3 students from a group of 5 students to stand in line for a picture?

More information

STAT 3743: Probability and Statistics

STAT 3743: Probability and Statistics STAT 3743: Probability and Statistics G. Jay Kerns, Youngstown State University Fall 2010 Probability Random experiment: outcome not known in advance Sample space: set of all possible outcomes (S) Probability

More information

The probability set-up

The probability set-up CHAPTER 2 The probability set-up 2.1. Introduction and basic theory We will have a sample space, denoted S (sometimes Ω) that consists of all possible outcomes. For example, if we roll two dice, the sample

More information

CSE 21: Midterm 1 Solution

CSE 21: Midterm 1 Solution CSE 21: Midterm 1 Solution August 16, 2007 No books, no calculators. Two double-sided 3x5 cards with handwritten notes allowed. Before starting the test, please write your test number on the top-right

More information

In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors?

In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors? What can we count? In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors? In how many different ways 10 books can be arranged

More information

HOMEWORK ASSIGNMENT 5

HOMEWORK ASSIGNMENT 5 HOMEWORK ASSIGNMENT 5 MATH 251, WILLIAMS COLLEGE, FALL 2006 Abstract. These are the instructor s solutions. 1. Big Brother The social security number of a person is a sequence of nine digits that are not

More information

The Problem. Tom Davis December 19, 2016

The Problem. Tom Davis  December 19, 2016 The 1 2 3 4 Problem Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles December 19, 2016 Abstract The first paragraph in the main part of this article poses a problem that can be approached

More information

ACHS Math Team Lecture: Introduction to Set Theory Peter S. Simon

ACHS Math Team Lecture: Introduction to Set Theory Peter S. Simon ACHS Math Team Lecture: Introduction to Set Theory Peter S. Simon Introduction to Set Theory A set is a collection of objects, called elements or members of the set. We will usually denote a set by a capital

More information

Theory of Probability - Brett Bernstein

Theory of Probability - Brett Bernstein Theory of Probability - Brett Bernstein Lecture 3 Finishing Basic Probability Review Exercises 1. Model flipping two fair coins using a sample space and a probability measure. Compute the probability of

More information

( ) = A. 2. Write the following sets using the roster method. 3. Write the following sets using set-builder notation.

( ) = A. 2. Write the following sets using the roster method. 3. Write the following sets using set-builder notation. 2.6. EXERISES 1. True or False? a. The empty set has no subsets. b. No set has exactly 14 distinct subsets. c. For any two finite sets and,

More information

1 Permutations. 1.1 Example 1. Lisa Yan CS 109 Combinatorics. Lecture Notes #2 June 27, 2018

1 Permutations. 1.1 Example 1. Lisa Yan CS 109 Combinatorics. Lecture Notes #2 June 27, 2018 Lisa Yan CS 09 Combinatorics Lecture Notes # June 7, 08 Handout by Chris Piech, with examples by Mehran Sahami As we mentioned last class, the principles of counting are core to probability. Counting is

More information

Lecture 2.3: Symmetric and alternating groups

Lecture 2.3: Symmetric and alternating groups Lecture 2.3: Symmetric and alternating groups Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 4120, Modern Algebra M. Macauley (Clemson)

More information

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions)

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions) CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions Review: Main Theorems and Concepts Combinations (number of ways to choose k objects out of n distinct objects,

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

More information

Poker: Probabilities of the Various Hands

Poker: Probabilities of the Various Hands Poker: Probabilities of the Various Hands 19 February 2014 Poker II 19 February 2014 1/27 Some Review from Monday There are 4 suits and 13 values. The suits are Spades Hearts Diamonds Clubs There are 13

More information

6.1 Basics of counting

6.1 Basics of counting 6.1 Basics of counting CSE2023 Discrete Computational Structures Lecture 17 1 Combinatorics: they study of arrangements of objects Enumeration: the counting of objects with certain properties (an important

More information

CHAPTER 2 PROBABILITY. 2.1 Sample Space. 2.2 Events

CHAPTER 2 PROBABILITY. 2.1 Sample Space. 2.2 Events CHAPTER 2 PROBABILITY 2.1 Sample Space A probability model consists of the sample space and the way to assign probabilities. Sample space & sample point The sample space S, is the set of all possible outcomes

More information

Permutations and Combinations

Permutations and Combinations Motivating question Permutations and Combinations A) Rosen, Chapter 5.3 B) C) D) Permutations A permutation of a set of distinct objects is an ordered arrangement of these objects. : (1, 3, 2, 4) is a

More information

Lecture 14. What s to come? Probability. A bag contains:

Lecture 14. What s to come? Probability. A bag contains: Lecture 14 What s to come? Probability. A bag contains: What is the chance that a ball taken from the bag is blue? Count blue. Count total. Divide. Today: Counting! Later: Probability. Professor Walrand.

More information

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following: CS 70 Discrete Mathematics for CS Fall 2004 Rao Lecture 14 Introduction to Probability The next several lectures will be concerned with probability theory. We will aim to make sense of statements such

More information

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself 9.5 Counting Subsets of a Set: Combinations 565 H 35. H 36. whose elements when added up give the same sum. (Thanks to Jonathan Goldstine for this problem. 34. Let S be a set of ten integers chosen from

More information

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees.

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees. 7 Symmetries 7 Permutations A permutation of a set is a reordering of its elements Another way to look at it is as a function Φ that takes as its argument a set of natural numbers of the form {, 2,, n}

More information

The probability set-up

The probability set-up CHAPTER The probability set-up.1. Introduction and basic theory We will have a sample space, denoted S sometimes Ω that consists of all possible outcomes. For example, if we roll two dice, the sample space

More information

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n Chapter 5 Chapter Summary 5.1 The Basics of Counting 5.2 The Pigeonhole Principle 5.3 Permutations and Combinations 5.5 Generalized Permutations and Combinations Section 5.1 The Product Rule The Product

More information

Combinatorics: The Fine Art of Counting

Combinatorics: The Fine Art of Counting Combinatorics: The Fine Art of Counting Week 6 Lecture Notes Discrete Probability Note Binomial coefficients are written horizontally. The symbol ~ is used to mean approximately equal. Introduction and

More information

If you roll a die, what is the probability you get a four OR a five? What is the General Education Statistics

If you roll a die, what is the probability you get a four OR a five? What is the General Education Statistics If you roll a die, what is the probability you get a four OR a five? What is the General Education Statistics probability that you get neither? Class Notes The Addition Rule (for OR events) and Complements

More information

Counting in Algorithms

Counting in Algorithms Counting Counting in Algorithms How many comparisons are needed to sort n numbers? How many steps to compute the GCD of two numbers? How many steps to factor an integer? Counting in Games How many different

More information

3 The multiplication rule/miscellaneous counting problems

3 The multiplication rule/miscellaneous counting problems Practice for Exam 1 1 Axioms of probability, disjoint and independent events 1 Suppose P (A 0, P (B 05 (a If A and B are independent, what is P (A B? What is P (A B? (b If A and B are disjoint, what is

More information

Section : Combinations and Permutations

Section : Combinations and Permutations Section 11.1-11.2: Combinations and Permutations Diana Pell A construction crew has three members. A team of two must be chosen for a particular job. In how many ways can the team be chosen? How many words

More information

Elementary Combinatorics CE 311S

Elementary Combinatorics CE 311S CE 311S INTRODUCTION How can we actually calculate probabilities? Let s assume that there all of the outcomes in the sample space S are equally likely. If A is the number of outcomes included in the event

More information

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count 18.440: Lecture 1 Permutations and combinations, Pascal s triangle, learning to count Scott Sheffield MIT 1 Outline Remark, just for fun Permutations Counting tricks Binomial coefficients Problems 2 Outline

More information

Def: The intersection of A and B is the set of all elements common to both set A and set B

Def: The intersection of A and B is the set of all elements common to both set A and set B Def: Sample Space the set of all possible outcomes Def: Element an item in the set Ex: The number "3" is an element of the "rolling a die" sample space Main concept write in Interactive Notebook Intersection:

More information

FOURTH LECTURE : SEPTEMBER 18, 2014

FOURTH LECTURE : SEPTEMBER 18, 2014 FOURTH LECTURE : SEPTEMBER 18, 01 MIKE ZABROCKI I started off by listing the building block numbers that we have already seen and their combinatorial interpretations. S(n, k = the number of set partitions

More information

Park Forest Math Team. Meet #5. Number Theory. Self-study Packet

Park Forest Math Team. Meet #5. Number Theory. Self-study Packet Park Forest Math Team Meet #5 Number Theory Self-study Packet Problem Categories for this Meet: 1. Mystery: Problem solving 2. Geometry: Angle measures in plane figures including supplements and complements

More information

Strings. A string is a list of symbols in a particular order.

Strings. A string is a list of symbols in a particular order. Ihor Stasyuk Strings A string is a list of symbols in a particular order. Strings A string is a list of symbols in a particular order. Examples: 1 3 0 4 1-12 is a string of integers. X Q R A X P T is a

More information

Math 42, Discrete Mathematics

Math 42, Discrete Mathematics c Fall 2018 last updated 10/29/2018 at 18:22:13 For use by students in this class only; all rights reserved. Note: some prose & some tables are taken directly from Kenneth R. Rosen, and Its Applications,

More information

1. Counting. 2. Tree 3. Rules of Counting 4. Sample with/without replacement where order does/doesn t matter.

1. Counting. 2. Tree 3. Rules of Counting 4. Sample with/without replacement where order does/doesn t matter. Lecture 4 Outline: basics What s to come? Probability A bag contains: What is the chance that a ball taken from the bag is blue? Count blue Count total Divide Today: Counting! Later: Probability Professor

More information