1 Discrete and Combinatorial Mathematics R. P. Grimaldi, 5 th edition, 2004 Chapter 3 Set Theory.

Slides:



Advertisements
Similar presentations
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
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.
布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
Basic Probability Sets, Subsets Sample Space Event, E Probability of an Event, P(E) How Probabilities are assigned Properties of Probabilities.
1 集合論 Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very.
Chapter 1 General Probability Theory. 1.1 Infinite Probability Spaces Finite Infinite –Counterable (enumerate) –Uncounterable (real 、無理數 )
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Section 4.2 Probability Models 機率模式. 由實驗看機率 實驗前先列出所有可能的實驗結果。 – 擲銅板:正面或反面。 – 擲骰子: 1~6 點。 – 擲骰子兩顆: (1,1),(1,2),(1,3),… 等 36 種。 決定每一個可能的實驗結果發生機率。 – 實驗後所有的實驗結果整理得到。
演算法 8-1 最大數及最小數找法 8-2 排序 8-3 二元搜尋法.
:Count the Trees ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10007:Count the Trees 解題者:楊家豪 解題日期: 2006 年 3 月 題意: 給 n 個點, 每一個點有自己的 Label,
Set Theory Sets 許多數學上的討論中(例如: algebra 、 analysis 、 geometric 等等) 經常藉助集合論中的符號或術語來說 明。集合論是十九世紀後期由 Boole ( 布爾; 1815~1864) 及 Cantor ( 康托爾; 1845 ~ 1918) 所發展出來的。
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
Chapter 1 Probability Spaces 主講人 : 虞台文. Content Sample Spaces and Events Event Operations Probability Spaces Conditional Probabilities Independence of.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
Chapter 11 Probability Sample spaces, events, probabilities, conditional probabilities, independence, Bayes’ formula.
Chapter 3 – Set Theory  .
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Discrete Mathematics Chapter 2 Basic Structures : Sets, Functions, Sequences, and Sums 大葉大學 資訊工程系 黃鈴玲 (Lingling Huang)
Discrete Structure Sets. 2 Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 4 Counting methods and the pigeonhole principle.
CS201: Data Structures and Discrete Mathematics I
Discrete Mathematics R. Johnsonbaugh
CompSci 102 Discrete Math for Computer Science
Set Theory Chapter 3. Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very.
확률및공학통계 (Probability and Engineering Statistics) 이시웅.
Sets 2/10/121. What is a Set? Informally, a collection of objects, determined by its members, treated as a single mathematical object Not a real definition:
Probability: Terminology  Sample Space  Set of all possible outcomes of a random experiment.  Random Experiment  Any activity resulting in uncertain.
Discrete Mathematics Section 3.7 Applications of Number Theory 大葉大學 資訊工程系 黃鈴玲.
Chapter 2 With Question/Answer Animations. Section 2.1.
Introduction to Set theory. Ways of Describing Sets.
Ch. 2 Basic Structures Section 1 Sets. Principles of Inclusion and Exclusion | A  B | = | A | + | B | – | A  B| | A  B  C | = | A | + | B | + | C.
Discrete Mathematics. Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing.
Discrete Mathematics Set.
Probability theory is the branch of mathematics concerned with analysis of random phenomena. (Encyclopedia Britannica) An experiment: is any action, process.
UNIT 3. OUTLINE: Sets and Subsets Set Operations the Laws of Set Theory Counting and Venn Diagrams. A First Word on Probability. The Axioms of Probability.
1 Section 1.2 Sets A set is a collection of things. If S is a set and x is a member or element of S we write x  S. Othewise we write x  S. The set with.
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.
Chapter 1: Outcomes, Events, and Sample Spaces men 1.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Set Theory Two's company, three is none. Chapter 3.
Dr. Ameria Eldosoky Discrete mathematics
Discrete Mathematical The Set Theory
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
CS 2210:0001 Discrete Structures Sets and Functions
What is Probability? Quantification of uncertainty.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CS100: Discrete structures
Set Operations Section 2.2.
Probability Models Section 6.2.
Chapter 2 Notes Math 309 Probability.
Discrete Mathematics R. Johnsonbaugh
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Sets A set is simply any collection of objects
Mrs.Volynskaya Alg.2 Ch.1.6 PROBABILITY
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Two's company, three is none.
Sets, Unions, Intersections, and Complements
Probability Notes Math 309.
Presentation transcript:

1 Discrete and Combinatorial Mathematics R. P. Grimaldi, 5 th edition, 2004 Chapter 3 Set Theory

2 Sets Set = a collection of distinct unordered objects How to designate a set  Listing  A = {1,3,5,7}  Description  B = {x | x = 2k + 1, 0 < k < 3} Members of a set are called elements  Examples  1  {1,3,5,7}; 2  {1,3,5,7}

3 Universe and empty sets Universe  is the set of all elements about which we make assertions. The empty set  or { } has no elements. Also called null set or void set.

4 Finite and infinite sets Finite sets  Examples  A = {1, 2, 3, 4}  B = {x | x is an integer, 1 < x < 4} Infinite sets  Examples  Z = {integers} = {…, -3, -2, -1, 0, 1, 2, 3,…}  S={x| x is a real number and 1 < x < 4} = [0, 4]

5 Some important sets  = {all integers} = {0, 1, -1, 2, -2, …}  + = {all positive integers} = {1, 2, 3, …}  = {all natural numbers or nonnegative integers} = {0, 1, 2, …}  = {all rational numbers} = {a/b| a,b  , b  0}  = {all real numbers}  = {all complex numbers} = { x+yi | x,y  , i 2 = -1}

6 Cardinality Cardinality or size of a set A (in symbols |A|) is the number of elements in A  Examples  If A = {1, 2, 3} then |A| = 3  If B = {x | x is a natural number and 1< x< 9} then |B| = 9 Infinite cardinality  Countable (e.g., natural numbers, integers, rational numbers)  Uncountable (e.g., real numbers)

7 Subsets X is a subset of Y if every element of X is also contained in Y (in symbols X  Y) X is a proper subset of Y if X  Y but Y  X (Y  X) Equality: X = Y iff X  Y and Y  X

8 Theorem 3.1 Let A, B, C  . If A  B and B  C, then A  C. Proof.  A  B   x [x  A  x  B]  B  C   x [x  B  x  C]   x [x  A  x  C]  A  C (Law of Syllogism)  A  B   y [y  B and y  A]  B  C  y  C and y  A  A  C. #

9 Theorem 3.2 For any universe , let A  . Then   A, and if A  , then   A. Proof. Assume   A.   x [x   and x  A]      A (by Contradiction)  A     y [y  A]    A. #

10 Power set The power set of X is the set of all subsets of X, in symbols P (X), i.e., P (X)= {A | A  X}  Example  if X = {1, 2, 3}, then P (X) = { , {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}} If |X| = n, then (1) there are C(n,k) subsets of size k for 0  k  n; and (2) | P (X)| = 2 n.

11 Union and intersection Given two sets X and Y The union of X and Y is defined as the set X ∪ Y = { x | x  X or x  Y} The intersection of X and Y is defined as the set X ∩ Y = { x | x  X and x  Y} Two sets X and Y are disjoint if X ∩ Y = 

12 Difference and complement The difference ( 差集 ) of two sets X and Y X – Y = { x | x  X and x  Y} The symmetric difference of two sets X and Y X Δ Y = (X – Y) ∪ (Y – X) The complement ( 補集 ) of a set A contained in a universe  is the set A c =  – A

13 Laws of set operations (1) For any sets A, B and C taken from a universe . 1) Law of Double Complement ( 回歸律 ): (A c ) c = A 2) De Morgan’s laws: (A ∪ B) c = A c ∩B c (A∩B) c = A c ∪ B c 3) Commutative laws ( 交換律 ): A ∪ B = B ∪ A A ∩ B = B ∩ A

14 Laws of set operations (2) 4) Associative laws ( 結合律 ): (A ∪ B) ∪ C = A ∪ (B ∪ C) (A ∩ B) ∩ C = A ∩ (B ∩ C) 5) Distributive laws ( 分配律 ): A ∩ (B ∪ C) = (A∩B) ∪ (A∩C) A ∪ (B∩C) = (A ∪ B) ∩ (A ∪ C) 6) Idempotent laws ( 等冪律 ): A ∪ A = A A∩A = A 7) Identity laws ( 同一律 ): A ∩  = A A ∪  = A

15 Laws of set operations (3) 8) Inverse laws ( 互補律 ): A ∪ A c =  A ∩ A c =  9) Domination laws ( 支配律 ): A ∪  =  A∩  =  10) Absorption laws ( 吸收律 ): A ∪ (A∩B) = A A∩ (A ∪ B) = A

16 Proof of Associative laws Associative laws: x  (A ∪ B) ∪ C  x  (A ∪ B) or x  C  (x  A or x  B) or x  C  x  A or (x  B or x  C)  x  A or x  (B ∪ C)  x  A ∪ (B ∪ C) 同法可證 (A ∩ B) ∩ C = A ∩ (B ∩ C). #

17 Proof of De Morgan’s laws De Morgan’s laws: x  (A ∪ B) c  x  (A ∪ B)  x  A and x  B  x  A c and x  B c  x  A c ∩ B c 同法可證 (A ∩ B) c = A c ∪ B c. #

18 Generalized De Morgan’s laws Let I be an index set and A i   for all i  I. Then a) b) Proof of a). x   x    i  I [x  A i ]   i  I [x  A i c ]  x . #

19 Venn diagrams A Venn diagram provides a graphic view of sets. Set union, intersection, difference, symmetric difference and complements can be identified.

20 Counting vs. Venn diagrams If A, B, C are finite sets, then |A  B  C| = |A| + |B| + |C| - |A  B| - |A  C| - |B  C| + |A  B  C|. A B C

21 An experiment is a process that yields an outcome An event is an outcome or a set of outcomes from an experiment The sample space is the event of all possible outcomes Introduction to probability

22 Probability Probability of an event is the number of outcomes in the event divided by the number of outcomes in the sample space. If S is a finite sample space and E is an event (E is a subset of S) then the probability of E is P(E) = |E| / |S|

23 Discrete probability theory When all outcomes are equally likely and there are n possible outcomes, each one has a probability 1/n. BUT this is not always the case. When all probabilities are not equal, then some probability (possibly different numbers) must be assigned to each outcome.

24 A probability function P is a function from the set of all outcomes (sample space S) to the interval [0, 1], in symbols P : S  [0, 1] The probability of an event E  S is the sum of the probabilities of every outcome in E P(E) = Probability function

25 Probability of an event Given E  S, we have 0 < P(E) < P(S) = 1 If S = {x 1, x 2,…, x n } is a sample space, then P(S) = = 1 If E c is the complement of E in S, then P(E) + P(E c ) = 1

26 Events in a sample space Given any two events E 1 and E 2 in a sample space S. Then P(E 1  E 2 ) = P(E 1 ) + P(E 2 ) – P(E 1  E 2 ) We also have P(  ) = 0 Events E 1 and E 2 are mutually exclusive if and only if E 1  E 2 = . In this case P(E 1  E 2 ) = P(E 1 ) + P(E 2 )

27 Conditional probability Conditional probability is the probability of an event E, given that another event F has occurred. In symbols P(E|F). If P(F) > 0 then P(E|F) = P(E  F) / P(F) Two events E and F are independent if P(E  F) = P(E)P(F)

28 Pattern recognition Pattern recognition places items into classes, based on various features of the items. Given a set of features F we can calculate the probability of a class C, given F: P(C|F) Place the item into the most probable class, i.e. the one C for which P(C|F) is the highest. Example: Wine can be classified as Table wine (T), Premium (R) or Swill (S). Let F  {acidity, body, color, price} Suppose a wine has feature F, and P(T|F) = 0.5, P(R|F) = 0.2 and P(S|F) = 0.3. Since P(T|F) is the highest number, this wine will be classified as table wine.

29 Bayes’ Theorem Given pairwise disjoint classes C 1, C 2,…, C n and a feature set F, then P(C j |F) = A / B, where A = P(F|C j )P(C j ) and B = P(F|C i )P(C i ) F C1C1 C2C2 C3C3

30 Proof of Bayes’ Theorem

31 Detecting HIV Virus Classes: H: has the HIV virus H c : does not have HIV virus Feature: Pos: ELISA test positive Given Information: P(H)=0.15, P(H c )=0.85, P(Pos|H)=0.95, P(Pos|H c )=0.02

32 Brainstorm 小明昨晚從 9 點到 11:30 間持續讀完五個科目:國文、數學、 英文、化學、生物(順序未知)。其中沒有同時讀兩個 科目的情形。另外每一科所花的時間也不同: 10 分、 20 分、 30 分、 40 分、 50 分(順序也未知)。已知 ( 1 )小明 10:05 正在讀數學。 ( 2 )第三順位只用 10 分鐘,第四順位則用 50 分鐘。 ( 3 )讀完國文後,讀數學;讀完英文( 20 分鐘)後, 讀化學。 問題: 請推算出小明在不同時段分別讀那一科。