CS1802 Week 6: Sets Operations, Product Sum Rule Pigeon Hole Principle (Ch )

Similar documents
CS1802 Week 6: Sets Operations, Product Sum Rule Pigeon Hole Principle (Ch )

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

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

Chapter 1. Set Theory

1. The empty set is a proper subset of every set. Not true because the empty set is not a proper subset of itself! is the power set of A.

Counting: Basics. Four main concepts this week 10/12/2016. Product rule Sum rule Inclusion-exclusion principle Pigeonhole principle

Sample Spaces, Events, Probability

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

Reading 14 : Counting

DVA325 Formal Languages, Automata and Models of Computation (FABER)

With Question/Answer Animations. Chapter 6

Grade 7/8 Math Circles February 21 st /22 nd, Sets

Slide 1 Math 1520, Lecture 13

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

Counting. Chapter 6. With Question/Answer Animations

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

Class 8 - Sets (Lecture Notes)

CSE 21 Mathematics for Algorithm and System Analysis

Multiple Choice Questions for Review

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE

TOPOLOGY, LIMITS OF COMPLEX NUMBERS. Contents 1. Topology and limits of complex numbers 1

The probability set-up

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

Section Introduction to Sets

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

Chapter 1. Probability

Topics to be covered

Chapter 1 Math Set: a collection of objects. For example, the set of whole numbers is W = {0, 1, 2, 3, }

SETS OBJECTIVES EXPECTED BACKGROUND KNOWLEDGE 1.1 SOME STANDARD NOTATIONS. Sets. MODULE - I Sets, Relations and Functions

Counting in Algorithms

8.2 Union, Intersection, and Complement of Events; Odds

Elementary Combinatorics

Lecture 1, CS 2050, Intro Discrete Math for Computer Science

Lecture 2: Sum rule, partition method, difference method, bijection method, product rules

The probability set-up

MATH 135 Algebra, Solutions to Assignment 7

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C

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

An art collector might own a collection of paintings, while a music lover might keep a collection of CDs. Any collection of items can form a set.

G E N E R A L A P T I T U D E

EDULABZ INTERNATIONAL SETS AND VENN DIAGRAMS

7.4, 9.42, 55,

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

POLYA'S FOUR STEP PROBLEM SOLVING PROCESS Understand. Devise a Plan. Carry out Plan. Look Back. PROBLEM SOLVING STRATEGIES (exmples) Making a Drawlnq

CSE 20 DISCRETE MATH. Fall

Math236 Discrete Maths with Applications

Probability. Ms. Weinstein Probability & Statistics

1) 1) 2) 2) 3) 3) 4) 4) 5) 5) 6) 6) 7) 7) 8) 8) 9) 9) 10) 10) 11) 11) 12) 12)

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

Probability Models. Section 6.2

4.3 Finding Probability Using Sets

Math Exam 2 Review. NOTE: For reviews of the other sections on Exam 2, refer to the first page of WIR #4 and #5.

Probability MAT230. Fall Discrete Mathematics. MAT230 (Discrete Math) Probability Fall / 37

FOM 11 Ch. 1 Practice Test Name: Inductive and Deductive Reasoning

Math Exam 2 Review. NOTE: For reviews of the other sections on Exam 2, refer to the first page of WIR #4 and #5.

Sets, Venn Diagrams & Counting

Launchpad Maths. Arithmetic II

SET THEORY AND VENN DIAGRAMS

Fall. Spring. Possible Summer Topics

Principles of Counting. Notation for counting elements of sets

NIM Games: Handout 1

Final Exam, Math 6105

Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, Outline Sets Equality Subset Empty Set Cardinality Power Set

Solutions to Exercises on Page 86

There are three types of mathematicians. Those who can count and those who can t.

Example: If A = {1, 2, 3} and B = {3, 4, 5}, then A B= {3}.

Compound Probability. Set Theory. Basic Definitions

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions

Lesson 4. Unit 2. Home Gardening. Diagramming Numbers

Principle of Inclusion-Exclusion Notes

FOM 11 Ch. 1 Practice Test Name: Inductive and Deductive Reasoning

Modular arithmetic Math 2320

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

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

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

Combinatorics and Intuitive Probability

Cardinality revisited

CPCS 222 Discrete Structures I Counting

Crossing Game Strategies

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

Probability: Terminology and Examples Spring January 1, / 22

Chapter 1 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal.

12. 6 jokes are minimal.

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5

Week 3 Classical Probability, Part I

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

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

Worksheets for GCSE Mathematics. Probability. mr-mathematics.com Maths Resources for Teachers. Handling Data

MATHEMATICS E-102, FALL 2005 SETS, COUNTING, AND PROBABILITY Outline #1 (Probability, Intuition, and Axioms)

SALES AND MARKETING Department MATHEMATICS. Combinatorics and probabilities. Tutorials and exercises

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

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

Chapter 5 - Elementary Probability Theory

Final exam. Question Points Score. Total: 150

Math 365 Wednesday 2/20/19 Section 6.1: Basic counting

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

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

LEVEL I. 3. In how many ways 4 identical white balls and 6 identical black balls be arranged in a row so that no two white balls are together?

7.1 Experiments, Sample Spaces, and Events

Transcription:

CS1802 Discrete Structures Recitation Fall 2017 October 9-12, 2017 CS1802 Week 6: Sets Operations, Product Sum Rule Pigeon Hole Principle (Ch 8.5-9.3) Sets i. Set Notation: Draw an arrow from the box on the left to the box on the right to match notation or phrases to the equivalent definition. 1. Notation Definition A B Intersection A B Subset and not equal (i.e. a proper subset such that A is inside B but not equal. A has less elements) A B The complement A B Union A B Subset and may be equal (i.e. A = B) Ā The union of A and B without the intersection of A and B (i.e.a B disjoint (Also a gate we have learned about)) The empty set 1. Notation Definition A B Subset and not equal (i.e. a proper subset such that A is inside B but not equal. A has less elements) A B Subset and may be equal (i.e. A = B) A B The union of A and B without the intersection of A and B (i.e.a B disjoint (Also a gate we have learned about)) A B Union A B Intersection Ā The complement The empty set ii. Express the following in English. Then write the equivalent set expressed and its cardinality. 1. x = 5 : {x, x 2, x 3, x 4 } 1

2. {x x Z and x < 4} 1. Given x equals 5, the set is equivalent to {5, 25, 125, 625} with a cardinality of 4 2. Given x such that x is in the domain of integers, and the absolute value is less than 4. The set is {-3,-2,-1,0,1,2,3 } with a cardinality of 7 2

iii. Compute the following set given: A = {1, 2, 3, 4, 5}, B = { 1, 2, 3, 4, 5}, C = { 4, 2, 0, 2, 4}. Draw a Venn Diagram to visually represent each resulting set (Note you do not need to add in the numbers). Let U = set of all integers 1. A B 2. A B 3. (A B) C 4. C U (Note Venn Diagrams are omitted) 1. {2, 4} 2. { 5, 3, 1, 1, 2, 3, 4, 5} 3. {2, 4} 4. { 4, 2, 0, 2, 4} iv. Compute the Cartesian product of the given sets to generate all of the ordered tuples. A = {a, b, c}, B = {1, 2, 3}, C = {6}. 1. A B 2. A C 1. {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3), (c, 1), (c, 2), (c, 3)} 3

2. {(a, 6), (b, 6), (c, 6)} v. Compute the power sets below given the following. X = {1, 2, 3}, Y = { }. Note to yourself, if given a set of 3 elements, how many subsets total will you have in your power set? 1. P(X) 2. P(Y ) 1. P(X) = {, {1}, {2}, {3}, {1, 2}, {2, 3}, {1, 3}, {1, 2, 3, }}. Note that you should get 2 to the 3rd subsets. 2. P(Y ) = vi. Given the following Set, compute the computer representation(i.e. a bit-string) using 0s and 1s. 1. A = {0, 1, 2, 3, 4, 5, 7} 2. Ā = {6} 3. B = {0, 2, 4, 6} 4. B {1, 3, 5} 1. 11111101 2. 00000010 3. 1010101 4. 1111111 Set Operations 4

i. Given U = {pink, red, blue, white, yellow, black} A = {red, blue, yellow, black} B= {pink, red, white, yellow} C = {white} Determine: A-B B-A A B B-A-C P(A) {V P(A): V = 1} 1. A-B are the elements in A but not in B this is the set = { blue, black} 2. B-A are the elements in set B but not in A this is the set = {pink,white} 3. A B is the set {blue, black,pink,white} 4. B-A-C = {pink} 5. P(A) {, {red}, {blue}, {yellow}, {black}, {red, blue}, {red, yellow}, {red, black}, {blue, yellow}, {blue, black}, {yellow, black}, {red, blue, yellow}, {red, blue, black}, {blue, yellow, black}, {red, yellow, black}, {red, blue, yellow, black} } 6. {V P(A): V = 1} {{red}, {blue}, {yellow}, {black} } 5

Cross Product Operation i. Given the sets defined above, determine A B and draw the results in a color x color 2 dimensional coordinate system ii. { (red,pink), (red,red), (red,white),(red,yellow), (blue,pink),(blue,red),(blue,white),(blue,yellow) (yellow,pink),(yellow,red),(yellow,white),(yellow,yellow), (black,pink), (black,red),(black,white),(black,yellow)} Sets as bit strings i. Represent U, A, B, C, A-B, B-A, B-A-C, A B from problem 1 as a bit string. 1. A=011011 2. B=110110 3. C=000100 4. A-B = 001001 6

5. B-A = 100100 6. A B =101001 7. B-A-C = 100000 7

Proof with sets i. Prove that { x Z: 26 x} { x Z: 13 x} 1. Suppose {a Z: 26 x}. This means that a Z and 18 x. By the definition of divisibility, there is an integer c such that a=26c. Consequently, a=2(13c) and from this we can deduce that 13 a. Therefore a is one of the integers that 13 divides. So a { x Z: 13 x}. We ve shown a {Z: 26 x} implies { x Z: 13 x} so it follows that { x Z: 26 x} { x Z: 13 x} Counting i. Greta plans to register for one course at MyWay University. The school has 4 departments: English, Math, History and Science. The English department offers 7 courses Greta is eligible to take, the Math department offers 3 courses Greta is eligible to take, the History department offers 5 courses Greta is eligible to take and the Science department offers 9 courses Greta is eligible to take. How many different choices does Greta have for her course? 1. Greta chooses one course from either the English or the Math or the History or the Science department. There are 7 English courses, 3 Math courses, 9 Science courses and 5 History courses for a total of 24 different selections Greta could make. ii. Bob is building a garden. He has dug out 6 different plots. He arrives at the garden center to see that the store is offering seven different perennials for sale. How many different perennial garden configurations are available for Bob s garden? 1. For each of the 6 plots Bob has 7 choices, so 7 6 8

iii. How many positive integers less than 111 are divisible by 11 or 2 or 5? 1. {2, 4} 55 positive integers are divisible by 2 22 positive integers are divisible by 5 10 positive integers are divisible by 11 for a total of 76 numbers but this counted is inflated since we have counted the numbers that are divisible by 2 and 5 twice. There are 11 numbers divisible by 10. Similarly, we doubly counted the numbers divided by 11 and 2 (divisible by 22) and there are 5 of those. We also double counted the numbers that are divisible by 55 - there are 2 of those. We need to add in the number of integers that are divisible by 11 and 2 and 5 (i.e. 110), there is 1 such number. 55+22+10-11-5-2+1 = 70 positive integers. Basic Set Operations Consider subsets A = {a, f, d}, B = {b, d, h, e} of the universal set U = {a, b, c, d, e, f, g, h}. Compute each of the following. 1. A B {a, b, d, e, f, h} 2. A B {d} 3. B A 4. B {b, e, h} {a, c, f, g} 5. A B {a, b, e, f, h} 6. {a, b} {b, c} {(a, b), (a, c), (b, b), (b, c)} 7. (A B) (B A) {a, f} {b, e, h} = {(a, b), (a, e), (a, h), (f, b), (f, e), (f, h)} 9

More Basic Set Operations 1. If A B, what is A B? B 2. If A B, what is A B? A 3. When is A B =? when A = B 4. Do sets A B exist such that A B = B A? Yes, select A = and B any non empty set 5. Are there sets A and B such that A B = {(1, 2)}? Yes A = {1} and B = {2} 6. Are there sets A and B such that A B = {(1, 2), (1, 5), (2, 3), (2, 5), (3, 3), (3, 5)}? No as this would imply 1, 2, 3 A and 2, 3, 5 B, but then pairs (1,3), (2,2), (3,2) sould also be in A B Inclusion-Exclusion two sets, basic In a group of 20 students, 11 play the piano and 7 play the guitar. If two play both the piano and the guitar, how many play: 1. at least one of these instruments (piano or guitar)? piano + guitar - (piano guitar) = 11 + 7-2 = 16 2. neither instrument (neither the piano nor the guitar)? 20-16 = 4 Venn Diagrams True or false: The oldest chess player among mathematicians and the oldest mathematician amongst chess players can be two different people. 10

False. The set of mathematicians and chess players can be represented as M C. In both cases chess players in the mathematicians and mathematicians in the set of chess players is the same set (presuming the set of mathematicians and chess players being referred to in both cases are the same group...not New York Chess Players and Boston mathematicians for example. However age is the same measure for both set descriptions (and the same set). Thus false. The best chess player among mathematicians and the best mathematician among chess players can be two different people. True. Both sets can be represented as M C but if that intersection was { Virgil, David, Jay, Kevin, Jacek} Jay could be the best chess player while Jacek is the best mathematician. 11

Equality of Sets State True or False for each of the following. Justify your argument by either giving a proof or a counter-example. You may use Venn diagrams to present your argument. 1. (A B) C = A (B C) False. Elements in C but not in A are in the LHS but not RHS 2. (A B) = A B True. This is DeMorgan s for sets 3. (A C) B = A (C B) False. A = (123), B = (234)C = (345). LHS is (1) RHS is (1 2) 4. (A C) (A B) = A (B C) False. A B = A B. Thus (A C) (A = B) = ((A C) (A B)), then by the distributive law we get A ( C B) = A ( C B) = A (C B) Counter example: A = (123), B = (245)C = (345) gives LHS = (123) while RHS = (1) 5. (A (B C)) ((A C) (D C) (B C)) = ((A B) (C A) (A B)) (((A D) B) C) False. Draw the first part of the left hand side: (A (B C)) which is intersection of A with B and C. Now the second part is just C since it is the only common term for all the various parts in the intersect. That means the whole expression is just (A B) The RHS, is A, B and the intersection of AB and AC - A B C and D (union is associative and commutative). Therefore you remove EVERYTHING possible from the set. The RHS is while the LHS is A B. Take any 4 with unique elements in A and B and it will demonstrate this counter-example. 12

EXTRA: Cutting parts from a large sheet Can one cut three 3x3 squares and six 2x3 rectangles from a sheet of paper 8x8 square? Can one cut four 3x3 squares and eight 2x4 rectangles from a sheet of paper 10x10 square? Can one cut four 4x4 squares and and six 2x4 rectangles from a sheet of paper 11x11 square? EXTRA: remainders mod 15 Given any 7 integers, show that there are 2 of them with either sum or difference or product = multiple of 15. 13