Ordering (examples) 2/43 1. The binary relation < orders the - - PowerPoint PPT Presentation

ordering examples
SMART_READER_LITE
LIVE PREVIEW

Ordering (examples) 2/43 1. The binary relation < orders the - - PowerPoint PPT Presentation

Ordering (examples) 2/43 1. The binary relation < orders the elements of { 3 , . . . , 4 } Z : Ordered sets -3 -2 -1 0 1 2 3 4 Lecture 13 (Chapter 20) 2. The binary relation | orders the elements of { 1 , . . . , 8 } N + (


slide-1
SLIDE 1

/ department of mathematics and computer science

Ordered sets

Lecture 13 (Chapter 20) October 19, 2013

2/43 / department of mathematics and computer science

Ordering (examples)

  • 1. The binary relation < orders the elements of {3, . . . , 4} ✓ Z:

4

  • 3
  • 2
  • 1

1 2 3

  • 2. The binary relation | orders the elements of {1, . . . , 8} ✓ N+

(x | y iff 9k[k 2 N+ : y = k · x]):

8 1 2 3 7 5 4 6

4/43 / department of mathematics and computer science

Ordering: transitivity

Both relations are transitive: 8x,y,z[x, y, z 2 A : x R y ^ y R z ) x R z] (A = {3, . . . , 4} or A = {1, . . . , 8}, R = < or R =|).

Examples

  • 1. < on {3, . . . , 4} is transitive

4

  • 3
  • 2
  • 1

1 2 3

  • 2. | on {1, . . . , 8} is transitive

8 1 2 3 7 5 4 6

6/43 / department of mathematics and computer science

Ordering: reflexive or irreflexive?

Examples

  • 1. The binary relation | on {1, . . . , 8} is reflexive:

8x[x 2 {1, . . . , 8} : x | x]

8 1 2 3 7 5 4 6

  • 2. The binary relation < on {3, . . . , 4} is irreflexive:

8x[x 2 {3, . . . , 4} : ¬(x < x)]

4

  • 3
  • 2
  • 1

1 2 3

We consider irreflexive and reflexive orderings.

slide-2
SLIDE 2

7/43 / department of mathematics and computer science

Irreflexive is stronger than Not Reflexive

irreflexive: 8x[x 2 A : ¬(x R x)] not reflexive: ¬8x[x 2 A : x R x] R not reflexive does not imply R irreflexive: Define R on Z for all x 2 Z by: x R y if, and only if, y = 3x . Then:

I R is not reflexive, for we have ¬(1 R 1), but I R is not irreflexive either, for we have 0 R 0.

R irreflexive does imply R not reflexive.

9/43 / department of mathematics and computer science

Ordering: (strict) antisymmetry

x y

8x,y[x, y 2 A : x R y ^ y R x ) NO] .

Example 1

The binary relation < on {3, . . . , 4}

4

  • 3
  • 2
  • 1

1 2 3

is strictly antisymmetric: 8x,y[x, y 2 A : x R y ^ y R x ) False | {z } ¬(x R y ^ y R x) ]

10/43 / department of mathematics and computer science

Ordering: (strict) antisymmetry

x y

8x,y[x, y 2 A : x R y ^ y R x ) NO] .

Example 2

The binary relation | on {1, . . . , 8}

8 1 2 3 7 5 4 6

is antisymmetric: 8x,y[x, y 2 A : x R y ^ y R x ) x = y]

11/43 / department of mathematics and computer science

Reflexive orderings, Irreflexive orderings

  • I. Reflexive ordering hA, Ri:

I.1 reflexive: 8x[x 2 A : x R x] I.2 antisymmetric: 8x,y[x, y 2 A : x R y ^ y R x ) x = y] I.3 transitive: 8x,y,z[x, y, z 2 A : x R y ^ y R z ) x R z]

  • II. Irreflexive ordering hA, Ri:

II.1 irreflexive: 8x[x 2 A : ¬(x R x)] II.2 strictly antisymmetric: 8x,y[x, y 2 A : ¬(x R y ^ y R x)] II.3 transitive: 8x,y,z[x, y, z 2 A : x R y ^ y R z ) x R z]

NB: II.2 follows from II.1+II.3 (see Ex. 20.2); we may therefore omit requirement II.2 from the definition. Whenever you need to prove that a relation is an irreflexive ordering, you only need to prove that it is irreflexive and transitive; you may

  • mit the proof of strict antisymmetry.
slide-3
SLIDE 3

12/43 / department of mathematics and computer science

Examples

I hN, i, hZ, i and hR, i are reflexive orderings I hN, <i, hZ, <i and hR, <i are irreflexive orderings I hN+, |i is a reflexive ordering

[For proof of reflexivity: see the book; we prove antisymmetry; do transitivity yourself.]

I hP(A), ✓i is a reflexive ordering

[Proof on next slide.]

13/43 / department of mathematics and computer science

hP(A), ✓i is a reflexive ordering

Proof:

We need to prove that ✓ on P(A) is (1) reflexive, (2) antisymmetric and (3) transitive:

  • 1. For arbitrary X 2 P(A), X ✓ X follows directly from the

definition of ✓. Hence, ✓ on P(A) is reflexive.

  • 2. Let X, Y 2 P(A) and suppose that X ✓ Y and Y ✓ X; then

X = Y follows directly from the definition of = on sets. Hence, ✓ on P(A) is antisymmetric.

  • 3. Let X, Y, Z 2 P(A) and suppose that X ✓ Y and Y ✓ Z.

By the Property of ✓, it holds for every element x 2 X that x 2 Y , so, again by the Property of ✓, we get x 2 Z. It follows that X ✓ Z. Hence, ✓ on P(A) is transitive.

14/43 / department of mathematics and computer science

Comparable

Let hA, Ri be a reflexive or irreflexive ordering, and let x, y 2 A. Then there are three possibilities: x R y? yes/no y R x? yes/no x = y? yes/no x and y are comparable if we get at least one time ‘yes’. x and y are incomparable if we get three times ‘no’.

15/43 / department of mathematics and computer science

Comparable (example 1)

I hN+, |i

x y comparable? 3 15 X 15 3 X 3 3 X 3 7 ⇥ 7 3 ⇥ 9 > > > > > > = > > > > > > ; sometimes ‘yes’, sometimes ‘no’

slide-4
SLIDE 4

16/43 / department of mathematics and computer science

Comparable (example 2)

I hZ, i

x y comparable? 3 15 X 15 3 X 3 3 X 3 7 X 7 3 X 9 > > > > > > = > > > > > > ; always ‘yes’!

17/43 / department of mathematics and computer science

Linear orderings (definition)

A (reflexive or irreflexive) ordering hA, Ri is linear if every two elements are comparable, i.e., 8x,y[x, y 2 A : x R y _ y R x _ x = y | {z } may be omitted if R is reflexive ]

Examples

I hZ, i is a linear reflexive ordering and hZ, <i is a linear

irreflexive ordering

I hN+, |i is not linear

NB: If hA, Ri is a linear ordering, then the elements of A can be arranged on a straight line such that x 2 A is left of y 2 A iff xRy. [Example: recall the arrangement of hZ, <i on slide 2.]

18/43 / department of mathematics and computer science

Direct successors/predecessors

  • 1. Let hA, Ri be an irreflexive ordering

y 2 A is a direct successor of x 2 A if x R y ^ ¬9z[z 2 A : x R z ^ z R y]

  • 2. Let hA, Ri be a reflexive ordering

y 2 A is a direct successor of x 2 A if x R y ^ x 6= y ^ ¬9z[z 2 A ^ z 6= x ^ z 6= y : x R z ^ z R y]

z x y

19/43 / department of mathematics and computer science

Direct successors

Examples

I In hN, <i:

  • every n 2 N has a direct successor n + 1, and
  • every n 2 N\{0} has a direct predecessor n 1.

I In hR, <i there are no direct successors. I In hN+, |i, every n 2 N has infinitely many direct

successors. direct successors of 3: 6, 9, 15, . . . examples of numbers that are not direct successors of 3:

  • 3 (because direct successor should be distinct),
  • 12 (because 3 | 6 | 12),
  • 18 (because 3 | 6 | 18 and also 3 | 9 | 18),
  • 4 (because 3 - 4).

NB: In hN+, |i, the number n is a direct successor

  • f m if n = p · m with p prime.
slide-5
SLIDE 5

20/43 / department of mathematics and computer science

Hasse diagrams

Orderings with direct predecessors/successors we can arrange as Hasse diagrams. A Hasse diagram has a connection between x and a y above it if, and

  • nly if, y is a direct successor of x.

I h{2, 4, 6, 8, 10, 12, 14, 16, 18}, |i

16 2 4 10 14 6 12 18 8

I h{2, 3, 4, 5, 6}, |i

6 2 3 5 4

I hP({0, 1}), ✓i

{0, 1} ; {0} {1}

23/43 / department of mathematics and computer science

Maximum/minimum

Let hA, Ri be an ordering, and let A0 ✓ A. m 2 A0 is the maximum of A0 if ⇢ 8x[x 2 A0 ^ x 6= m : x R m] for an irreflexive ordering 8x[x 2 A0 : x R m] for a reflexive ordering . m 2 A0 is the minimum of A0: analogous

Examples:

I Consider h{2, 3, 4, 5, 6}, |i

maximum {2, 3, 6}: 6 minimum {2, 3, 6}: no minimum maximum {2, 3, 5, 6}: no maximum minimum {2, 3, 5, 6}: no minimum

6 2 3 5 4

24/43 / department of mathematics and computer science

Maximum/minimum

Let hA, Ri be an ordering, and let A0 ✓ A. m 2 A0 is the maximum of A0 if ⇢ 8x[x 2 A0 ^ x 6= m : x R m] for an irreflexive ordering 8x[x 2 A0 : x R m] for a reflexive ordering . m 2 A0 is the minimum of A0: analogous

Examples:

I Consider hP({0, 1}), ✓i

maximum P({0, 1}): {0, 1} minimum P({0, 1}): ;

{0, 1} ; {0} {1}

25/43 / department of mathematics and computer science

Maximum/minimum

Let hA, Ri be an ordering, and let A0 ✓ A. m 2 A0 is the maximum of A0 if ⇢ 8x[x 2 A0 ^ x 6= m : x R m] for an irreflexive ordering 8x[x 2 A0 : x R m] for a reflexive ordering . m 2 A0 is the minimum of A0: analogous

Examples:

I Consider hZ, i

maximum N: no maximum minimum N: maximum Z: no maximum minimum Z: no minimum

slide-6
SLIDE 6

26/43 / department of mathematics and computer science

Exercise (maximum)

Determine whether the following sets have a maximum/minimum in the given ordering, and if so, then give the maximum/minimum.

I hR, i

{0, . . . , 10}: maximum 10, minimum 0 {x 2 N | x is even}: no maximum, minimum 0 h0, 1i: no maximum, no minimum

I hP(N), ✓i

P({0, 1}): maximum {0, 1}, minimum ; {{x 2 N | x is even}}: {x 2 N | x is even} maximum and minimum!

I hN+, |i

{2, 3, 4, 5, 6}: no maximum, no minimum {2, 3, 4, 6, 8, 24}: maximum 24, no minimum

29/43 / department of mathematics and computer science

Maximal/minimal elements

Let hA, Ri be an ordering, and let A0 ✓ A. m 2 A0 is a maximal element of A0 if ⇢ 8x[x 2 A0 : ¬(m R x)] for an irreflexive ordering 8x[x 2 A0 : m R x ) m = x] for a reflexive ordering . m 2 A0 is a minimal element of A0: analogous

Examples:

I Consider h{2, 3, 4, 5, 6}, |i

  • max. elements {2, 3, 5, 6}:

5, 6

  • min. elements {2, 3, 5, 6}:

2, 3, 5

6 2 3 5 4

30/43 / department of mathematics and computer science

Maximal/minimal elements

Let hA, Ri be an ordering, and let A0 ✓ A. m 2 A0 is a maximal element of A0 if ⇢ 8x[x 2 A0 : ¬(m R x)] for an irreflexive ordering 8x[x 2 A0 : m R x ) m = x] for a reflexive ordering . m 2 A0 is a minimal element of A0: analogous

Examples:

I Consider hZ, <i

  • max. elements of N:

no maximal elements

  • min. elements of N:
  • max. elements of Z:

no maximal elements

  • min. elements of Z:

no minimal elements

31/43 / department of mathematics and computer science

Maximum and maximal element

Theorem:

The maximum, whenever it exists, is a maximal element.

Proof:

We prove the theorem for a reflexive ordering hA, Ri with A0 ✓ A. Suppose: m is the maximum of A0; we need to prove that m is then also a maximal element of A0. To this end, consider an arbitrary element x 2 A0 and suppose that m R x. Since m is the maximum of A0, it holds that x R m. Since R is a reflexive ordering, and hence it is antisymmetric, from x R m and m R x it follows that x = m. Thereby it is now proved that, for all x 2 A0, if m R x, then x = m, so m is a maximal element of A0.

slide-7
SLIDE 7

32/43 / department of mathematics and computer science

Lexicografic ordering (irreflexive)

Let hA1, R1i and hA2, R2i be irreflexive orderings. We define Rlex on A1 ⇥ A2 by: (x, y) Rlex (x0, y0) if x R1 x0 _ (x = x0 ^ y R2 y0) .

Examples

Take hN, <i and hN, <i for hA1, R1i and hA2, R2i, and <lex on N ⇥ N for Rlex.

I (5, 8) <lex (7, 2), because 5 < 7 I (5, 8) <lex (5, 11), because 5 = 5 and 8 < 11 I (5, 8) <lex (4, 11) does not hold I (5, 8) <lex (5, 2) does not hold I (5, 8) <lex (5, 8) does not hold

. . . . . . . . .

(0, 0) (0, 1) (0, 2) (1, 0) (1, 1) (1, 2) (2, 0) (2, 1)