Discrete Mathematics Lecture 5

Slides:



Advertisements
Similar presentations
Copyright © Cengage Learning. All rights reserved.
Advertisements

Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Chapter 2 Probability. 2.1 Sample Spaces and Events.
Week 21 Basic Set Theory A set is a collection of elements. Use capital letters, A, B, C to denotes sets and small letters a 1, a 2, … to denote the elements.
Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice,
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
Discrete Mathematics Lecture 7 More Probability and Counting Harper Langston New York University.
Discrete Mathematics Lecture 2 Logic of Quantified Statements,
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
Discrete Mathematics Lecture 4 Harper Langston New York University.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
Sets 1.
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
Counting Elements in a List How many integers in the list from 1 to 10? How many integers in the list from m to n? (assuming m
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
1 Set Theory. 2 Set Properties Commutative Laws: Associative Laws: Distributive Laws:
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
Discrete Mathematics Lecture 7 Harper Langston New York University.
Lecture II.  Using the example from Birenens Chapter 1: Assume we are interested in the game Texas lotto (similar to Florida lotto).  In this game,
Set Theory A B C.
4. Counting 4.1 The Basic of Counting Basic Counting Principles Example 1 suppose that either a member of the faculty or a student in the department is.
Chapter 1 Probability and Distributions Math 6203 Fall 2009 Instructor: Ayona Chatterjee.
Probability – Models for random phenomena
Chapter 11: Counting Methods
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Chapter 8 Probability Section R Review. 2 Barnett/Ziegler/Byleen Finite Mathematics 12e Review for Chapter 8 Important Terms, Symbols, Concepts  8.1.
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Discrete Mathematical Structures (Counting Principles)
1 2. Independence and Bernoulli Trials Independence: Events A and B are independent if It is easy to show that A, B independent implies are all independent.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
3.1Set Notation Venn Diagrams Venn Diagram is used to illustrate the idea of sets and subsets. Example 1 X  U(b) A  B X U B A U.
CPSC 531: Probability Review1 CPSC 531:Probability & Statistics: Review Instructor: Anirban Mahanti Office: ICT Class.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Chapter 6, Counting and Probability
Week 11 What is Probability? Quantification of uncertainty. Mathematical model for things that occur randomly. Random – not haphazard, don’t know what.
Week 7 - Monday.  What did we talk about last time?  Sets.
CS201: Data Structures and Discrete Mathematics I
CompSci 102 Discrete Math for Computer Science
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.1,
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Aaron Tan October Counting and Probability 1 IntroductionPossibility Trees and Multiplication RuleCounting Elements of Disjoint SetsThe Pigeonhole.
Discrete Mathematics Lecture # 25 Permutation & Combination.
Chapter 2 With Question/Answer Animations. Section 2.1.
Some other set notation We will use the notation to mean that e is an element of A. We will use the notation to mean that e is not an element of A.
+ Chapter 5 Overview 5.1 Introducing Probability 5.2 Combining Events 5.3 Conditional Probability 5.4 Counting Methods 1.
Basic probability Sep. 16, Introduction Our formal study of probability will base on Set theory Axiomatic approach (base for all our further studies.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Basic Probability. Introduction Our formal study of probability will base on Set theory Axiomatic approach (base for all our further studies of probability)
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Discrete Mathematics Lecture 3 (and 4)
Discrete Mathematics Lecture 8 Probability and Counting
Week 7 - Monday CS322.
What is Probability? Quantification of uncertainty.
9. Counting and Probability 1
Chapter 5, Set Theory 1.
9. Counting and Probability 1 Summary
Set Theory A B C.
COUNTING AND PROBABILITY
COUNTING AND PROBABILITY
Presentation transcript:

Discrete Mathematics Lecture 5 Harper Langston New York University

Empty Set S = {x  R, x2 = -1} X = {1, 3}, Y = {2, 4}, C = X  Y (X and Y are disjoint) Empty set has no elements  Empty set is a subset of any set There is exactly one empty set Properties of empty set: A   = A, A   =  A  Ac = , A  Ac = U Uc = , c = U

Set Partitioning Two sets are called disjoint if they have no elements in common Theorem: A – B and B are disjoint A collection of sets A1, A2, …, An is called mutually disjoint when any pair of sets from this collection is disjoint A collection of non-empty sets {A1, A2, …, An} is called a partition of a set A when the union of these sets is A and this collection consists of mutually disjoint sets

Power Set Power set of A is the set of all subsets of A Example on board Theorem: if A  B, then P(A)  P(B) Theorem: If set X has n elements, then P(X) has 2n elements (proof in Section 5.3 – will show if have time)

Cartesian Products Ordered n-tuple is a set of ordered n elements. Equality of n-tuples Cartesian product of n sets is a set of n-tuples, where each element in the n-tuple belongs to the respective set participating in the product

Set Properties Inclusion of Intersection: Inclusion in Union: A  B  A and A  B  B Inclusion in Union: A  A  B and B  A  B Transitivity of Inclusion: (A  B  B  C)  A  C Set Definitions: x  X  Y  x  X  y  Y x  X  Y  x  X  y  Y x  X – Y  x  X  y  Y x  Xc  x  X (x, y)  X  Y  x  X  y  Y

Set Identities Commutative Laws: A  B = A  B and A  B = B  A Associative Laws: (A  B)  C = A  (B  C) and (A  B)  C = A  (B  C) Distributive Laws: A  (B  C) = (A  B)  (A  C) and A  (B  C) = (A  B)  (A  C) Intersection and Union with universal set: A  U = A and A  U = U Double Complement Law: (Ac)c = A Idempotent Laws: A  A = A and A  A = A De Morgan’s Laws: (A  B)c = Ac  Bc and (A  B)c = Ac  Bc Absorption Laws: A  (A  B) = A and A  (A  B) = A Alternate Representation for Difference: A – B = A  Bc Intersection and Union with a subset: if A  B, then A  B = A and A  B = B

Proving Equality First show that one set is a subset of another (what we did with examples before) To show this, choose an arbitrary particular element as with direct proofs (call it x), and show that if x is in A then x is in B to show that A is a subset of B Example (step through all cases)

Disproofs, Counterexamples and Algebraic Proofs Is is true that (A – B)  (B – C) = A – C? (No via counterexample) Show that (A  B) – C = (A – C)  (B – C) (Can do with an algebraic proof, slightly different)

Boolean Algebra A Boolean Algebra is a set of elements together with two operations denoted as + and * and satisfying the following properties: Commutative: a + b = b + a, a * b = b * a Associative: (a + b) + c = a + (b + c), (a * b) *c = a * (b * c) Distributive: a + (b * c) = (a + b) * (a + c), a * (b + c) = (a * b) + (a * c) Identity: a + 0 = a, a * 1 = a for some distinct unique 0 and 1 Complement: a + ã = 1, a * ã = 0

Russell’s Paradox Set of all integers, set of all abstract ideas Consider S = {A, A is a set and A  A} Is S an element of S? Barber puzzle: a male barber shaves all those men who do not shave themselves. Does the barber shave himself? Consider S = {A  U, A  A}. Is S  S? Godel: No way to rigorously prove that mathematics is free of contradictions. (“This statement is not provable” is true but not provable) (consistency of an axiomatic system is not provable within that system)

Halting Problem There is no computer algorithm that will accept any algorithm X and data set D as input and then will output “halts” or “loops forever” to indicate whether X terminates in a finite number of steps when X is run with data set D. Proof is by contradiction

Counting and Probability Coin tossing Random process Sample space is the set of all possible outcomes of a random process. An event is a subset of a sample space Probability of an event is the ratio between the number of outcomes that satisfy the event to the total number of possible outcomes P(E) = N(E)/N(S) for event E and sample space S Rolling a pair of dice and card deck as sample random processes

Possibility Trees Teams A and B are to play each other repeatedly until one wins two games in a row or a total three games. What is the probability that five games will be needed to determine the winner? Suppose there are 4 I/O units and 3 CPUs. In how many ways can I/Os and CPUs be attached to each other when there are no restrictions?

Multiplication Rule Multiplication rule: if an operation consists of k steps each of which can be performed in ni ways (i = 1, 2, …, k), then the entire operation can be performed in ni ways. Number of PINs Number of elements in a Cartesian product Number of PINs without repetition Number of Input/Output tables for a circuit with n input signals Number of iterations in nested loops

Multiplication Rule Three officers – a president, a treasurer and a secretary are to be chosen from four people: Alice, Bob, Cindy and Dan. Alice cannot be a president, Either Cindy or Dan must be a secretary. How many ways can the officers be chosen?

Permutations A permutation of a set of objects is an ordering of these objects The number of permutations of a set of n objects is n! (Examples) An r-permutation of a set of n elements is an ordered selection of r elements taken from a set of n elements: P(n, r) (Examples) P(n, r) = n! / (n – r)! Show that P(n, 2) + P(n, 1) = n2

Addition Rule If a finite set A is a union of k mutually disjoint sets A1, A2, …, Ak, then n(A) = n(Ai) Number of words of length no more than 3 Number of 3-digit integers divisible by 5

Difference Rule If A is a finite set and B is its subset, then n(A – B) = n(A) – n(B) How many PINS contain repeated symbols? So, P(Ac) = 1 – P(A) (Example for PINS) How many students are needed so that the probability of two of them having the same birthday equals 0.5?

Inclusion/Exclusion Rule Page 327 for 2 sets 3 sets

Combinations An r-combination of a set of n elements is a subset of r elements: C(n, r) Permutation is an ordered selection, combination is an unordered selection Quantitative relationship between permutations and combinations: P(n, r) = C(n, r) * r! Permutations of a set with repeated elements Double counting

Team Selection Problems There are 12 people, 5 men and 7 women, to work on a project: How many 5-person teams can be chosen? If two people insist on working together (or not working at all), how many 5-person teams can be chosen? If two people insist on not working together, how many 5-person teams can be chosen? How many 5-person teams consist of 3 men and 2 women? How many 5-person teams contain at least 1 man? How many 5-person teams contain at most 1 man?

Poker Problems What is a probability to contain one pair? What is a probability to contain two pairs? What is a probability to contain a triple? What is a probability to contain royal flush? What is a probability to contain straight flush? What is a probability to contain straight? What is a probability to contain flush? What is a probability to contain full house?

Combinations with Repetition An r-combination with repetition allowed is an unordered selection of elements where some elements can be repeated The number of r-combinations with repetition allowed from a set of n elements is C(r + n –1, r) Soft drink example

Algebra of Combinations and Pascal’s Triangle The number of r-combinations from a set of n elements equals the number of (n – r)-combinations from the same set. Pascal’s triangle: C(n + 1, r) = C(n, r – 1) + C(n, r) C(n,r) = C(n,n-r)

Binomial Formula (a + b)n = C(n, k)akbn-k Show that C(n, k) = 2n Show that (-1)kC(n, k) = 0 Express kC(n, k)3k in the closed form