exam 2 review 7.5, 7.6, 8.1-8.6. 7.5 |a1 a2 a3| =∑|ai| - ∑|ai ∩ aj| + |a1∩ a2 ∩ a3| |a1 ...

21
Exam 2 Review 7.5, 7.6, 8.1-8.6

Upload: dennis-davidson

Post on 11-Jan-2016

253 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Exam 2 Review

7.5, 7.6, 8.1-8.6

Page 2: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

7.5

|A1 A2 A3|=∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3|

|A1 A2 A3 A4|=∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| -

|A1∩ A2 ∩ A3∩ A4|

Page 3: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Sports

socialacademic

Page 4: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

7.6

Let Ai=subset containing elements with property Pi

N(P1P2P3…Pn)=|A1∩A2∩…∩An|

N(P1’ P 2 ‘ P 3 ‘…Pn ‘)= number of elements with none of the

properties P1, P2, …Pn=N - |A1 A2 … An|=N- (∑|Ai| - ∑|Ai ∩ Aj| + …

+(-1)n+1|A1∩ A2 ∩…∩ An|)= N - ∑ N (Pi) + ∑(PiPj) -∑N(PiPjPk) +…

+(-1)n N(P1P2…Pn)

Page 5: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Sample applications

• Ex 1: How many solutions does x1+x2+x3= 11 have where xi is a nonnegative integer with x1≤ 3, x2≤ 4, x3≤ 6 (note: harder than previous > problems)

• Ex: 2: How many onto functions are there from a set A of 7 elements to a set B of 3 elements

Page 6: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

• Ex. 3: Sieve- primes• Ex. 4: Hatcheck-- The number of

derangements of a set with n elements is Dn= n![1 - ]

• Derangement formula will be given.

Page 7: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

8.1- Relations

• Def. of Function: f:A→B assigns a unique element of B to each element of A

• Def of Relation?

Page 8: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

RSAT

A relation R on a set A is called:• reflexive if (a,a) R for every a A • symmetric if (b,a) R whenever (a,b) R for

a,b A• antisymmetric : (a,b) R and (b,a) R only if

a=b for a,b A• transitive if whenever (a,b) R and (b,c) R,

then (a,c) R for a,b,c A

Page 9: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

RSAT

A relation R on a set A is called:• reflexive if aRa for every a A• symmetric if bRa whenever aRb for every a,b A• antisymmetric : aRb and bRa only if a=b for a,b A• transitive if whenever aRb and bRc, then aRc for

every a, b, c A

• Do Proofs of these****

Page 10: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Combining relations

R∩SRSR – SS – RS ο R = {(a,c)| a A, c C, and there exists b B

such that (a,b) R and (b,c) S}Rn+1=Rn ⃘ R

Page 11: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Thm 1 on 8.1

• Theorem 1: Let R be a transitive relation on a set A. Then Rn is a subset of R for n=1,2,3,…

• Proof

• 8.2– not much on this – just joins and projections

Page 12: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

8.3

• Representing relations R on A as both matrices and as digraphs (directed graphs)

• Zero-one matrix operations: join, meet, Boolean product

• MR R6 = MR5 v MR6

• MR5∩R6 = MR5 ^ MR6

• MR6 °R5 = MR5 MR6

Page 13: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

8.4

• Def: Let R be a relation on a set A that may or may not have some property P. (Ex: Reflexive,…) If there is a relation S with property P containing R such that S is a subset of every relation with property P containing R, then S is called the closure of R with respect to P.

• Find reflexive and symmetric closures

Page 14: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Transitive closures

8.4: Theorem 1: Let R be a relation on a set A.There is a path of length n from a to b iff

(a,b)Rn

--In examples, find paths of length n that correspond to elements in Rn

Page 15: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

R*

• Find R*=

• Sample mid-level proofs:– R* is transitive

Page 16: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

8.5 and 8.6

• Equivalence Relations: R, S, T• Partial orders: R, A, T

• (see definitions in other notes)

Page 17: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Definitions to thoroughly know and use

• a divides b• ab mod m• Relation• Reflexive, symmetric, antisymmetric, transitive

(not ones like asymmetric, from hw)• Equivalence Relation- RST• Partial Order- RAT• Comparable• Total Order

Page 18: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Definitions to be apply to apply

• You won’t have to state word for word, but may need to apply:– Maximal, minimal, greatest, least element– Formulas in 7.5 and 7.6

Page 19: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Thereoms to know well and use

• 8.1: Theorem 1: Let R be a transitive relation on a set A. Then Rn is a subset of R for n=1,2,3,…

• 8.4: Theorem 1: Let R be a relation on a set A.There is a path of length n from a to b iff

(a,b)Rn • 8.4: Thm. 2: The transitive closure of a

relation R is R* =

Page 20: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Mid-level proofs to be able to do

• Prove that a given relation R, S, A, or T using the definitions– Ex: Show (Z+,|) is antisymmemetric– Ex: Show R={(a,b)|ab mod m} on Z+ is transitive

• Some basic proofs by induction• Let R be a transitive relation on a set A. Then Rn is a subset

of R for n=1,2,3,…• R* is transitive• Provide a counterexample to disprove that a relations is R,

S, A, or T– Ex: Show R={(1,1),(1,2),(1,4),(2,1),(2,2),(3,3),(4,),(4,4)} on

{1,2,3,4} is not transitive

Page 21: Exam 2 Review 7.5, 7.6, 8.1-8.6. 7.5 |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩

Procedures to do• Represent relations as ordered pairs, matrices, or digraphs• Find Pxy and Jx and composite keys (sed 8.2)• Create relations with designated properties (ex: reflexive, but not

symmetric• Determine whether a relation has a designated property• Find closures (ex: reflexive, transitive)• Find paths and circuits of a certain length and apply section 8.4 Thm. 1• Calculate R∩S,RS,R – S,S – R,S ο R,Rn+1=Rn ⃘ R• Given R, describe an ordered pair in R3

• Given an equivalence R on a set S, find the partition… and vice versa• Identify examples and non-examples of eq. relations and of posets• Create and work with Hasse diagrams: max, min, lub,…