1 lecture 2 (part 1) partial orders reading: epp chp 10.5

40
1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

Upload: maurice-lester

Post on 18-Jan-2018

223 views

Category:

Documents


0 download

DESCRIPTION

3 1. Revision Concrete World Abstract World a. ___ has been to ___ {John, Mary, Peter} {Tokyo, NY, HK}{(John,Tokyo), (John,NY), (Peter, NY)} b. ___ is in ___ {Tokyo, NY} {Japan, USA}{(Tokyo,Japan), (NY,USA)} c. ___ divides ___{1,2,3,4} {10,11,12} {(1,10),(1,11),(1,12), (2,10), (2,12),(3,12), (4,12)} d. ___ less than ___ {1,2,3} {(1,2),(1,3),(2,3)} ___ R ___ AB R  A  BR  A  B Q: What can you do with relations? A: (1) Set Operations; (2) Complement; (3) Inverse; (4) Composition Relation R from A to B Q: What happens if A = B ?

TRANSCRIPT

Page 1: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

1

Lecture 2 (part 1)

Partial OrdersReading: Epp Chp 10.5

Page 2: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

2

Outline1. Revision2. Definition of poset3. Examples of posets

a. In lifeb. Finite posetsc. Infinite posets

4. Notation5. Visualization Tool: Hasse Diagram6. Definitions

– maximal, greatest, minimal, least.– 2 Theorems

7. More Definitions– Comparable, chain, total-order, well-order

Page 3: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

3

1. RevisionConcrete World

Abstract World

a. ___ has been to ___ {John, Mary, Peter} {Tokyo, NY, HK} {(John,Tokyo), (John,NY), (Peter, NY)}

b. ___ is in ___ {Tokyo, NY} {Japan, USA} {(Tokyo,Japan),(NY,USA)}

c. ___ divides ___ {1,2,3,4} {10,11,12} {(1,10),(1,11),(1,12), (2,10), (2,12),(3,12), (4,12)}

d. ___ less than ___ {1,2,3} {1,2,3} {(1,2),(1,3),(2,3)}

___ R ___ A B R A B

Q: What can you do with relations?A: (1) Set Operations; (2) Complement; (3) Inverse; (4) Composition

Relation R from A to B

Q: What happens if A = B?

Page 4: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

4

1. RevisionConcrete World

a. ___ same age as ___ {John, Mary, Peter} {(John,John), (Mary,Mary) (Peter,Peter),(Mary,Peter), (Peter,Mary)}

b. ___ same # of elements as ___

{ {}, {1}, {2}, {3.4} } { ({},{}), ({1},{1}), ({2},{2}) ({3,4},{3,4})({1},{2}), ({2},{1})

c. ___ ___ { {}, {1}, {2}, {1,2} } { ({},{}), ({},{1}), ({},{2}), ({},{1,2}),({1},{1}), ({1},{1,2}), ({2},{2}), ({2},{1,2})

({1,2},{1,2}) }

d. ___ ___ {1,2,3} {(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)}

___ R ___ A R A2 Relation R on A

“Everyone is related to himself” Reflexive

“If x is related to y and y is related to z, then x is related to z.” Transitive

“If x is related to y, then y is related to x” Symmetric

“If x is related to y and y is related to x, then x = y.” Anti-Symmetric

Page 5: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

5

1. Revision Given a relation R on a set A,

– R is reflexive iffxA, x R x– R is symmetric iffx,yA, x R y y R x– R is anti-symmetric iffx,yA, x R y y R x x=y– R is transitive iffx,yA, x R y y R z x R z

Page 6: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

6

2. Definition Given a relation R on a set A,

– R is an equivalence relation iff R is reflexive, symmetric and transitive. ( Last Lecture)

– R is a partial order iff R is reflexive, anti-symmetric and transitive.(This Lecture)

Page 7: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

7

2. Definition Given a relation R on a set A,

– R is an partial order (or partially-ordered set; or poset) iff R is reflexive, anti-symmetric and transitive.

Q: How do I check whether a relation is an partial order?

A: Just check whether it is reflexive, anti-symmetric and transitive. Always go back to the definition.

Q: How do I check whether a relation is reflexive, symmetric and transitive?

A: Go back to the definitions of reflexive, symmetric and transitive.

Page 8: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

8

3.1 Examples (Partial Orders in life) PERT - Program Evaluation and Review

Technique. CPM - Critical Path Method Used to deal with the complexities of

scheduling individual activities needed to complete very large projects.

Let T be the set of all tasks. We define a relation R on T such that x R y iff x = y or task x must be done before task y.

Page 9: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

9

3.1 Examples (Partial Orders in life)

Let T be the set of all tasks. We define a relation R on T such that x R y iff x = y or task x must be done before task y.

Task 1 7 hrs

Task 2 6 hrs

Task 3 3 hrs

Task 7 1 hrs

Task 5 3 hrs

Task 8 2 hrs

Task 9 5 hrs

Task 6 1 hrs

Task 4 6 hrs

Q: How long does it take to complete the entire project?

(7)

(13)

(10) (14)

(16)

(19)

(21)

(20)

(26)

Page 10: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

10

3.1 Examples (Partial Orders in life)

Let T be the set of all tasks. We define a relation R on T such that x R y iff x = y or task x must be done before task y.

Task 1 7 hrs

Task 2 6 hrs

Task 3 3 hrs

Task 7 1 hrs

Task 5 3 hrs

Task 8 2 hrs

Task 9 5 hrs

Task 6 1 hrs

Task 4 6 hrs

Q: Critical Path?

(7)

(13)

(10) (14)

(16)

(19)

(21)

(20)

(26)

Page 11: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

11

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Page 12: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

12

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q1: Is R reflexive? Reflexive : xA, x R x

(Always go back to the definition) Yes, R is reflexive.

Page 13: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

13

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q2: Is R anti-symmetric? Anti-symmetric :

x,yA, x R y y R x x=y(Again, the definition!)

Page 14: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

14

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q2: Is R anti-symmetric? Anti-symmetric :

x,yA, x R y y R x x=y(Again, the definition!)

True Always false

LHS: False

Page 15: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

15

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q2: Is R anti-symmetric? Anti-symmetric :

x,yA, x R y y R x x=y(Again, the definition!)

LHS: False

Vacuously/blankly/stupidly True

Page 16: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

16

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q2: Is R anti-symmetric? Anti-symmetric :

x,yA, x R y y R x x=y(Again, the definition!)

LHS: False

Vacuously True

Page 17: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

17

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q2: Is R anti-symmetric? Anti-symmetric :

x,yA, x R y y R x x=y(Again, the definition!)

LHS: False

Vacuously True

Page 18: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

18

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q2: Is R anti-symmetric? Anti-symmetric :

x,yA, x R y y R x x=y(Again, the definition!)

Carry on checking… Yes, it’s anti-symmetric

Page 19: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

19

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q3: Is R transitive? Transitive :

x,y,zA, x R y y R z x R z(DEFINITION!!!)

Page 20: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

20

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q3: Is R transitive? Transitive :

x,y,zA, x R y y R z x R z(DEFINITION!!!)

True True True

True

Page 21: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

21

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q3: Is R transitive? Transitive :

x,y,zA, x R y y R z x R z(DEFINITION!!!)

True True True

True

Page 22: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

22

3.2 Examples (Finite Partial Orders) Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4)} Is R a partial order?

Q3: Is R transitive? Transitive :

x,y,zA, x R y y R z x R z(DEFINITION!!!)

Carry on checking… Yes, R is transitive.

Page 23: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

23

3.3 Examples (Common Infinite Posets) Let R be a relation on Z, such that

x R y iff x y R is a partial order

Reflexive: xZ, x x Anti-symmetric:x,yZ, xy yx x=y Transitive: x,y,zZ, xy yz xz

We will abbreviate the description of this relation to R = (Z, )

Page 24: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

24

3.4 Examples (Common Infinite Posets) Let R be a relation on Z+, such that

x R y iff x | y R is a partial order

Reflexive: xZ+, x | x Anti-symmetric:x,yZ+, x|y y|x x=y Transitive: x,y,zZ+, x|y y|z x|z

We will abbreviate the description of this relation to R = (Z+, |)

Page 25: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

25

3.5 Examples (Common Infinite Posets) Let R be a relation on P(A), such that

X R Y iff X Y R is a partial order

Reflexive: XP(A), XX Anti-symmetric:X,YP(A), XY YX X=Y Transitive: X,Y,ZP(A), XY YZ XZ

We will abbreviate the description of this relation to R = (P(A), )

Page 26: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

26

4. Notation In general, if we describe a partial order

relation as:

Let R be a relation on A, such thatx R y iff x op y

…we will shorten the description toR = (A, op)

Of course, this can be done only when the relation can be described in terms of a simple operator. We will not be able to this if the relation is described by a complicated logical expression

Page 27: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

27

4. Notation In general, if we describe a partial order

relation as:

Let R be a relation on A, such thatx R y iff x op y

…we will shorten the description toR = (A, op)

Hence we have: 1. R = (Z, )

2. R = (Z+, | )

3. R = (P(A), )

Page 28: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

28

4. Notation There are times when we discuss partial

orders in general. In such cases we may write:

R = (A, )as a general partial order.

We choose the ‘’ symbol to represent a general ordering operator because it looks like ‘’.

This is done due to the fact that the ordering of the elements in the set convey the idea of one below the other (something like on Z).

Page 29: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

29

5. Visualisation Tool: Hasse Diagram Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4), (1,4)}

0

3 1

4

2

Let’s simplify the diagram1. Eliminate all reflexive loops.

0

3 1

4

2

Page 30: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

30

5. Visualisation Tool: Hasse Diagram Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4), (1,4)}

0

3 1

4

2

Let’s simplify the diagram2. Eliminate all transitive arrows.

0

3 1

4

2

0

3 1

4

2

Page 31: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

31

5. Visualisation Tool: Hasse Diagram Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4), (1,4)}

0

3 1

4

2

Let’s simplify the diagram3. (a) Draw all arrow heads pointing upwards, and (b) eliminate arrow heads.

0

3 1

4

2

0

3 1

4

2

0

3

1

4

2

Page 32: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

32

5. Visualisation Tool: Hasse Diagram Let A = {0,1,2,3,4} Let R = {(0,0), (3,1), (1,1), (0,4), (2,2), (3,4),

(3,3), (4,4), (1,4)}

0

3 1

4

2

The result is a Hasse Diagram.

0

3 1

4

2

0

3 1

4

2

0

3

1

4

2

Page 33: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

33

5. Visualisation Tool: Hasse Diagram

Let A = {0,1,2,3,4}. Let R = (A, Draw the Hasse Diagram.

0

4 2

1

3

1. Eliminate all reflexive loops.

Page 34: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

34

5. Visualisation Tool: Hasse Diagram

Let A = {0,1,2,3,4}. Let R = (A, Draw the Hasse Diagram.

0

4 2

1

3

1. Eliminate all reflexive loops.2. Eliminate all transitive arrows.

Page 35: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

35

5. Visualisation Tool: Hasse Diagram

Let A = {0,1,2,3,4}. Let R = (A, Draw the Hasse Diagram.

0

4 2

1

3

1. Eliminate all reflexive loops.2. Eliminate all transitive arrows.

Page 36: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

36

5. Visualisation Tool: Hasse Diagram

Let A = {0,1,2,3,4}. Let R = (A, Draw the Hasse Diagram.

0

4 2

1

3

1. Eliminate all reflexive loops.2. Eliminate all transitive arrows.3. (a) Draw all arrow heads pointing upwards, and (b) eliminate arrow heads.

Page 37: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

37

5. Visualisation Tool: Hasse Diagram

Let A = {0,1,2,3,4}. Let R = (A, Draw the Hasse Diagram.

0

4

2

1

3

1. Eliminate all reflexive loops.2. Eliminate all transitive arrows.3. (a) Draw all arrow heads pointing upwards, and (b) eliminate arrow heads.

Page 38: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

38

5. Visualisation Tool: Hasse Diagram

Let A = {1,2,3,…,10}. Let R = (A, | Draw the Hasse Diagram.

1

2 3 5 7

10

4

8 96

You may draw the Hasse Diagram immediately if you are able to.

Page 39: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

39

5. Visualisation Tool: Hasse Diagram

Let A = {1,2,3}. Let R = (P(A), Draw the Hasse Diagram.

R = ({ {}, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} } , )

{}

{1} {3}{2}

{1,2} {1,3}

{1,2,3}

{2,3}

Page 40: 1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5

40

To be continued