introduction to · introduction to lattice theory with computer science applications vijay k. garg...

27

Upload: others

Post on 22-Apr-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

INTRODUCTION TOLATTICE THEORY WITHCOMPUTER SCIENCEAPPLICATIONS

INTRODUCTION TOLATTICE THEORY WITHCOMPUTER SCIENCEAPPLICATIONS

VIJAY K. GARGDepartment of Electrical and Computer EngineeringThe University of Texas at Austin

Copyright © 2015 by John Wiley & Sons, Inc. All rights reserved

Published by John Wiley & Sons, Inc., Hoboken, New JerseyPublished simultaneously in Canada

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form orby any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except aspermitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the priorwritten permission of the Publisher, or authorization through payment of the appropriate per-copy fee tothe Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax(978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission shouldbe addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts inpreparing this book, they make no representations or warranties with respect to the accuracy orcompleteness of the contents of this book and specifically disclaim any implied warranties ofmerchantability or fitness for a particular purpose. No warranty may be created or extended by salesrepresentatives or written sales materials. The advice and strategies contained herein may not be suitablefor your situation. You should consult with a professional where appropriate. Neither the publisher norauthor shall be liable for any loss of profit or any other commercial damages, including but not limited tospecial, incidental, consequential, or other damages.

For general information on our other products and services or for technical support, please contact ourCustomer Care Department within the United States at (800) 762-2974, outside the United States at(317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print maynot be available in electronic formats. For more information about Wiley products, visit our web site atwww.wiley.com.

Library of Congress Cataloging-in-Publication Data:

Garg, Vijay K. (Vijay Kumar), 1963-Introduction to lattice theory with computer science applications / Vijay K. Garg.

pages cmIncludes bibliographical references and index.ISBN 978-1-118-91437-3 (cloth)1. Computer science–Mathematics. 2. Engineering mathematics. 3. Lattice theory. I. Title.QA76.9.L38G37 2015004.01′51–dc23

2015003602Printed in the United States of America

10 9 8 7 6 5 4 3 2 1

1 2015

To my family

CONTENTS

List of Figures xiii

Nomenclature xix

Preface xxi

1 Introduction 1

1.1 Introduction, 11.2 Relations, 21.3 Partial Orders, 31.4 Join and Meet Operations, 51.5 Operations on Posets, 71.6 Ideals and Filters, 81.7 Special Elements in Posets, 91.8 Irreducible Elements, 101.9 Dissector Elements, 111.10 Applications: Distributed Computations, 111.11 Applications: Combinatorics, 121.12 Notation and Proof Format, 131.13 Problems, 151.14 Bibliographic Remarks, 15

viii CONTENTS

2 Representing Posets 17

2.1 Introduction, 172.2 Labeling Elements of The Poset, 172.3 Adjacency List Representation, 182.4 Vector Clock Representation, 202.5 Matrix Representation, 222.6 Dimension-Based Representation, 222.7 Algorithms to Compute Irreducibles, 232.8 Infinite Posets, 242.9 Problems, 262.10 Bibliographic Remarks, 27

3 Dilworth’s Theorem 29

3.1 Introduction, 293.2 Dilworth’s Theorem, 293.3 Appreciation of Dilworth’s Theorem, 303.4 Dual of Dilworth’s Theorem, 323.5 Generalizations of Dilworth’s Theorem, 323.6 Algorithmic Perspective of Dilworth’s Theorem, 323.7 Application: Hall’s Marriage Theorem, 333.8 Application: Bipartite Matching, 343.9 Online Decomposition of Posets, 353.10 A Lower Bound on Online Chain Partition, 373.11 Problems, 383.12 Bibliographic Remarks, 39

4 Merging Algorithms 41

4.1 Introduction, 414.2 Algorithm to Merge Chains in Vector Clock Representation, 414.3 An Upper Bound for Detecting an Antichain of Size K, 474.4 A Lower Bound for Detecting an Antichain of Size K, 484.5 An Incremental Algorithm for Optimal Chain Decomposition, 504.6 Problems, 504.7 Bibliographic Remarks, 51

5 Lattices 53

5.1 Introduction, 535.2 Sublattices, 545.3 Lattices as Algebraic Structures, 555.4 Bounding The Size of The Cover Relation of a Lattice, 565.5 Join-Irreducible Elements Revisited, 57

CONTENTS ix

5.6 Problems, 595.7 Bibliographic Remarks, 60

6 Lattice Completion 61

6.1 Introduction, 616.2 Complete Lattices, 616.3 Closure Operators, 626.4 Topped ∩-Structures, 636.5 Dedekind–Macneille Completion, 646.6 Structure of Dedekind—Macneille Completion of a Poset, 676.7 An Incremental Algorithm for Lattice Completion, 696.8 Breadth First Search Enumeration of Normal Cuts, 716.9 Depth First Search Enumeration of Normal Cuts, 736.10 Application: Finding the Meet and Join of Events, 756.11 Application: Detecting Global Predicates in Distributed Systems, 766.12 Application: Data Mining, 776.13 Problems, 786.14 Bibliographic Remarks, 78

7 Morphisms 79

7.1 Introduction, 797.2 Lattice Homomorphism, 797.3 Lattice Isomorphism, 807.4 Lattice Congruences, 827.5 Quotient Lattice, 837.6 Lattice Homomorphism and Congruence, 837.7 Properties of Lattice Congruence Blocks, 847.8 Application: Model Checking on Reduced Lattices, 857.9 Problems, 897.10 Bibliographic Remarks, 90

8 Modular Lattices 91

8.1 Introduction, 918.2 Modular Lattice, 918.3 Characterization of Modular Lattices, 928.4 Problems, 988.5 Bibliographic Remarks, 98

9 Distributive Lattices 99

9.1 Introduction, 999.2 Forbidden Sublattices, 99

x CONTENTS

9.3 Join-Prime Elements, 1009.4 Birkhoff’s Representation Theorem, 1019.5 Finitary Distributive Lattices, 1049.6 Problems, 1049.7 Bibliographic Remarks, 105

10 Slicing 107

10.1 Introduction, 10710.2 Representing Finite Distributive Lattices, 10710.3 Predicates on Ideals, 11010.4 Application: Slicing Distributed Computations, 11610.5 Problems, 11710.6 Bibliographic Remarks, 118

11 Applications of Slicing to Combinatorics 119

11.1 Introduction, 11911.2 Counting Ideals, 12011.3 Boolean Algebra and Set Families, 12111.4 Set Families of Size k, 12211.5 Integer Partitions, 12311.6 Permutations, 12711.7 Problems, 12911.8 Bibliographic Remarks, 129

12 Interval Orders 131

12.1 Introduction, 13112.2 Weak Order, 13112.3 Semiorder, 13312.4 Interval Order, 13412.5 Problems, 13612.6 Bibliographic Remarks, 137

13 Tractable Posets 139

13.1 Introduction, 13913.2 Series–Parallel Posets, 13913.3 Two-Dimensional Posets, 14213.4 Counting Ideals of a Two-Dimensional Poset, 14513.5 Problems, 14713.6 Bibliographic Remarks, 147

CONTENTS xi

14 Enumeration Algorithms 149

14.1 Introduction, 14914.2 BFS Traversal, 15014.3 DFS Traversal, 15414.4 LEX Traversal, 15414.5 Uniflow Partition of Posets, 16014.6 Enumerating Tuples of Product Spaces, 16314.7 Enumerating All Subsets, 16314.8 Enumerating All Subsets of Size k, 16514.9 Enumerating Young’s Lattice, 16614.10 Enumerating Permutations, 16714.11 Lexical Enumeration of All Order Ideals of a Given Rank, 16814.12 Problems, 17214.13 Bibliographic Remarks, 173

15 Lattice of Maximal Antichains 175

15.1 Introduction, 17515.2 Maximal Antichain Lattice, 17715.3 An Incremental Algorithm Based on Union Closure, 17915.4 An Incremental Algorithm Based on BFS, 18115.5 Traversal of the Lattice of Maximal Antichains, 18215.6 Application: Detecting Antichain-Consistent Predicates, 18415.7 Construction and Enumeration of Width Antichain Lattice, 18515.8 Lexical Enumeration of Closed Sets, 18715.9 Construction of Lattices Based on Union Closure, 19015.10 Problems, 19015.11 Bibliographic Remarks, 191

16 Dimension Theory 193

16.1 Introduction, 19316.2 Chain Realizers, 19416.3 Standard Examples of Dimension Theory, 19516.4 Relationship Between the Dimension and the Width of a Poset, 19616.5 Removal Theorems for Dimension, 19716.6 Critical Pairs in the Poset, 19816.7 String Realizers, 19916.8 Rectangle Realizers, 20916.9 Order Decomposition Method and Its Applications, 21016.10 Problems, 21216.11 Bibliographic Remarks, 213

xii CONTENTS

17 Fixed Point Theory 215

17.1 Complete Partial Orders, 21517.2 Knaster–Tarski Theorem, 21617.3 Application: Defining Recursion Using Fixed Points, 21817.4 Problems, 22617.5 Bibliographic Remarks, 227

Bibliography 229

Index 235

LIST OF FIGURES

Figure 1.1 The graph of a relation 2

Figure 1.2 Hasse diagram 4

Figure 1.3 Only the first two posets are lattices 5

Figure 1.4 (a) Pentagon(N5) and (b) diamond(M3) 7

Figure 1.5 Cross product of posets 8

Figure 1.6 A computation in the happened-before model 12

Figure 1.7 Ferrer’s diagram for (4, 3, 2) shown to contain (2, 2, 2) 13

Figure 1.8 Young’s lattice for (3, 3, 3) 14

Figure 2.1 Adjacency list representation of a poset 19

Figure 2.2 Vector clock labeling of a poset for a distributed computation 21

Figure 2.3 Vector clock algorithm 22

Figure 2.4 (a) An antichain of size 5 and (b) its two linear extensions 23

Figure 2.5 (a,b) Trivial examples of p-diagrams 25

Figure 2.6 (a) A p-diagram and (b) its corresponding infinite poset 25

Figure 3.1 Decomposition of P into t chains 30

Figure 3.2 Hall’s Marriage Theorem 34

xiv LIST OF FIGURES

Figure 3.3 A poset of width 2 forcing an algorithm to use three chains fordecomposition 36

Figure 3.4 Chain partitioning algorithm 36

Figure 4.1 Function that determines if an antichain of size K exists 42

Figure 4.2 An example of a failed naive strategy. (a) The initialconfiguration. (b) The point at which the strategy fails: there isnowhere to insert (2, 0, 0). (c) This example can be mergedinto two chains 43

Figure 4.3 Generalized merge procedure for deposets 45

Figure 4.4 Function FindQ that finds the output queue to insert anelement 46

Figure 4.5 Using a queue insert graph to find the output queue 46

Figure 4.6 Algorithm for the adversary 49

Figure 5.1 Examples: lattices and sublattices 55

Figure 5.2 Table notation for the algebra (X, ⊔, ⊓) 56

Figure 5.3 Join-irreducible elements: J(L) = {a, b, c, d} 58

Figure 6.1 (a) A poset. (b) Its completion (the unshaded vertex is the addedelement) 64

Figure 6.2 A poset that is not a complete lattice 65

Figure 6.3 The DM completion of the poset from Figure 6.2 66

Figure 6.4 Two posets and their DM completions 66

Figure 6.5 The complete lattice via order ideals that embeds the poset fromFigure 6.4(b) 67

Figure 6.6 Incremental algorithm IDML for DM construction 70

Figure 6.7 Algorithm BFS-DML for BFS enumeration of DM-Lattice 72

Figure 6.8 Algorithm DFS-DML for DFS enumeration of DM-lattice 74

Figure 6.9 (a) The original poset. (b) Equivalent representation using vectorclocks. (c) Its Lattice of normal cuts 75

Figure 7.1 Monotone f 81

Figure 7.2 Fundamental Homomorphism Theorem 84

Figure 7.3 (a,b) Quadrilateral-closed structures 84

LIST OF FIGURES xv

Figure 7.4 Simple reduction of state graph does not preserve path basedformulas 86

Figure 7.5 (a,b) Proof of Lemma 7.13 88

Figure 7.6 Proof of Lemma 7.14 89

Figure 8.1 Proof of Theorem 8.5 93

Figure 8.2 Theorem 8.9 96

Figure 8.3 (a) A ranked poset, (b) A poset that is not ranked, (c) A rankedand graded poset, and (d) A ranked and graded lattice 97

Figure 9.1 Diamond M3—a nondistributive lattice 100

Figure 9.2 A lattice L, its set of join-irreducibles J(L), and their idealsLI(J(L)) 103

Figure 9.3 A lattice with the “N-poset” as the set of join-irreducibles 103

Figure 9.4 (a) Poset of Join- (“j”) and meet- (“m”) irreducible elements areisomorphic; (b) Irreducibles in a nondistributive lattice 104

Figure 10.1 (a) P: A partial order. (b) The lattice of ideals. (c) The directedgraph P′ 108

Figure 10.2 (a) A directed graph and (b) the lattice of its nontrivial ideals 109

Figure 10.3 (a) The poset or directed graph for generating subsets of Xof size k. (b) The ideal denoting the subset {1, 3, 4} 109

Figure 10.4 Graphs and slices for generating subsets of X when |X| = 4 110

Figure 10.5 An efficient algorithm to detect a linear predicate 113

Figure 10.6 An efficient algorithm to compute the slice for a predicate B 116

Figure 10.7 An efficient algorithm to compute the slice for a linearpredicate B 117

Figure 11.1 Graphs and slices for generating subsets of X when |X| = 4 122

Figure 11.2 Slice for the predicate “does not contain consecutive numbers” 123

Figure 11.3 Ferrer’s diagram for the integer partition (4, 2, 1) for 7 124

Figure 11.4 An Application of Ferrer’s diagram 124

Figure 11.5 Young’s lattice for (3, 3, 3) 125

Figure 11.6 The poset corresponding to Ferrer’s diagram of (3, 3, 3) 125

Figure 11.7 Slice for 𝛿2 = 2 126

xvi LIST OF FIGURES

Figure 11.8 Slice for “distinct parts.” 127

Figure 11.9 Poset T(5). 128

Figure 11.10 Slice for subsets of permutations 129

Figure 12.1 A poset that is a ranking 132

Figure 12.2 Examples of weak orders (or rankings.) 132

Figure 12.3 A poset and its normal ranking extension 133

Figure 12.4 Mapping elements of poset to interval order 136

Figure 13.1 Example series and parallel compositions. (a–c) Posets.(d) Result of P2 + P3. (e) Result of P1 ∗ (P2 + P3) 140

Figure 13.2 (a) An SP tree for the poset in Figure 13.1(e). (b) Theconjugate SP tree. (c) The conjugate poset 141

Figure 13.3 (a) A two-dimensional poset. (b) Its comparability graph G.(c) GC. (d) A valid conjugate for the original poset 142

Figure 13.4 The poset S3 142

Figure 13.5 (a) is a non-separating linear extension of the partial order (b),when at least one of the dotted edges holds 143

Figure 13.6 A two-dimensional Poset P = (X,≤P) 144

Figure 13.7 Conjugate Q = L1 ∩ L2−1 of the poset P 144

Figure 13.8 The order imposed by ≤P ∪ ≤Q 145

Figure 13.9 A partial order P that has a nonseparating linear extension 146

Figure 14.1 (a) A computation. (b) Its lattice of consistent global states. (c)Traversals of the lattice 150

Figure 14.2 BFS enumeration of CGS 152

Figure 14.3 A vector clock based BFS enumeration of CGS 153

Figure 14.4 A vector clock based DFS enumeration of CGS 155

Figure 14.5 An algorithm for lexical traversal of all ideals of a poset with anychain partition 158

Figure 14.6 L(3, 3) with example of an ideal 159

Figure 14.7 (a) Poset L(n,m) with uniflow partition. (b) L(3, 3) with anexample of an ideal mapped to the subset {1, 3, 4} 161

LIST OF FIGURES xvii

Figure 14.8 (a) Poset D(n,m) with uniflow partition (b) D(3, 3) with exampleof an ideal 161

Figure 14.9 (a) Chain partition of a Poset that is not uniflow. (b) Uniflowchain partition of the same poset 162

Figure 14.10 An algorithm for traversal of product space in lex order 164

Figure 14.11 Posets for generating subsets of X 165

Figure 14.12 (a) Poset C(5) with a uniflow partition (b) Poset T(5)with a uniflow partition 166

Figure 14.13 An algorithm for traversal of all subsets of [n] of size m in lexorder 166

Figure 14.14 (a) A Ferrer’s diagram. (b) A poset for generating Young’slattice 167

Figure 14.15 An algorithm for traversal of all integer partitions in Y𝜆 in lexorder 167

Figure 14.16 An algorithm for traversal of a level set in lexical order 169

Figure 14.17 (a) Poset NL(n,m) with a negative uniflow partition. (b) NL(3, 3)with example of an ideal 169

Figure 14.18 An algorithm to find the lexically smallest ideal at level rgreater than G 170

Figure 14.19 An Algorithm to find the next bigger ideal in a level set 171

Figure 15.1 (a) The original poset. (b) Its lattice of ideals (consistent cuts).(c) Its lattice of maximal antichains 160

Figure 15.2 (a) The original poset. (b) Its lattice of maximal ideals.(c) Its lattice of maximal antichains. (d) Its lattice of strictideals 162

Figure 15.3 The algorithm ILMA for construction of lattice of maximalantichains 164

Figure 15.4 The algorithm OLMA for construction of lattice of strictideals 166

Figure 15.5 Algorithm DFS-MA for DFS enumeration of lattice of maximalantichains 168

Figure 15.6 An algorithm for traversal of closed sets in lex order 172

Figure 16.1 An example of a realizer 178

Figure 16.2 Standard example S5 179

xviii LIST OF FIGURES

Figure 16.3 Example of a critical pair: (a1, b1) 183

Figure 16.4 A poset with a chain realizer and a string realizer 185

Figure 16.5 Encoding an infinite poset with strings 185

Figure 16.6 An example of converting a string realizer to a chain realizer 188

Figure 16.7 A bipartite poset 190

Figure 16.8 String realizer for the bipartite poset in Figure 16.7 190

Figure 16.9 Encoding for the bipartite poset in Figure 16.7 192

Figure 16.10 Another Encoding for the bipartite poset in Figure 16.7 192

Figure 16.11 An example of a poset with rectangular dimension two 194

Figure 16.12 An example of decomposing a poset into series-parallel posets 196

NOMENCLATURE

⊥ Bottom element of the latticeJ(P) Set of join-irreducible elements of a poset PLI Lattice of idealsLDM Lattice of normal cutsLMA Lattice of maximal antichainsLWA Lattice of width antichainsM(P) Set of meet-irreducible elements of a poset P⊓ Meet⊔ Join⊤ Top element of the latticen A poset consisting of a single chain of length na ∼P b a is comparable to b in PAl Set of lower bounds of AAu Set of upper bounds of AD(x) Set of elements less than xD[x] Set of elements less than or equal to xDM(P) Dedekind–MacNeille Completion of PPd Dual poset of PU(x) Set of elements greater than xU[x] Set of elements greater than or equal to x

PREFACE

As many books exist on lattice theory, I must justify writing another book on thesubject. This book is written from the perspective of a computer scientist ratherthan a mathematician. In many instances, a mathematician may be satisfied with anonconstructive existential proof, but a computer scientist is interested not only inconstruction but also in the computational complexity of the construction. I haveattempted to give “algorithmic” proofs of theorems whenever possible.

This book is also written for the sake of students rather than a practicing math-ematician. In many instances, a student needs to learn the heuristics that guide theproof, besides the proof itself. It is not sufficient just to learn an important theorem.One must also learn ways to extend and analyze a theorem. I have also made an effortto include exercises with each chapter. A mathematical subject can only be learnedby solving problems related to that subject.

I would like to thank the students at the University of Texas at Austin, who tookmy course on lattice theory. I also thank my co-authors for various papers related tolattice theory and applications in distributed computing: Anurag Agarwal, ArindamChakraborty, Yen-Jung Chang, Craig Chase, Himanshu Chauhan, Selma Ikiz, Rat-nesh Kumar, Neeraj Mittal, Sujatha Kashyap, Vinit Ogale, Alper Sen, AlexanderTomlinson, and Brian Waldecker. I owe special thanks to Bharath Balasubraman-ina, Vinit Ogale, Omer Shakil, Alper Sen, and Roopsha Samanta who reviewed partsof the book.

I thank the Department of Electrical and Computer Engineering at The Universityof Texas at Austin, where I was given the opportunity to develop and teach a courseon lattice theory.

I have also been supported in part by many grants from the National Science Foun-dation. This book would not have been possible without that support.

xxii PREFACE

Finally, I thank my parents, wife, and children. Without their love and support,this book would not have been even conceived.

The list of known errors and the supplementary material for the book will be main-tained on my homepage:

http://www.ece.utexas.edu/~garg

Vijay K. GargAustin, Texas.

1INTRODUCTION

1.1 INTRODUCTION

Partial order and lattice theory play an important role in many disciplines of computerscience and engineering. For example, they have applications in distributed comput-ing (vector clocks and global predicate detection), concurrency theory (pomsets andoccurrence nets), programming language semantics (fixed-point semantics), and datamining (concept analysis). They are also useful in other disciplines of mathematicssuch as combinatorics, number theory, and group theory.

This book differs from earlier books written on the subject in two aspects. First,this book takes a computational perspective—the emphasis is on algorithms and theircomplexity. While mathematicians generally identify necessary and sufficient condi-tions to characterize a property, this book focuses on efficient algorithms to test theproperty. As a result of this bias, much of the book concerns itself only with finitesets. Second, existing books do not dwell on applications of lattice theory. This booktreats applications at par with the theory. In particular, I have given applications oflattice theory to distributed computing and combinatorics.

This chapter covers the basic definitions of partial orders.

Introduction to Lattice Theory with Computer Science Applications, First Edition. Vijay K. Garg.© 2015 John Wiley & Sons, Inc. Published 2015 by John Wiley & Sons, Inc.

2 INTRODUCTION

1.2 RELATIONS

A partial order is simply a relation with certain properties. A relation R over any setX is a subset of X × X. For example, let

X = {a, b, c}.

Then, one possible relation is

R = {(a, c), (a, a), (b, c), (c, a)}.

It is sometimes useful to visualize a relation as a graph on the vertex set X suchthat there is a directed edge from x to y iff (x, y) ∈ R. The graph corresponding to therelation R in the previous example is shown in Figure 1.1.

A relation is reflexive if for each x ∈ X, (x, x) ∈ R, i.e., each element of X is relatedto itself. In terms of a graph, this means that there is a self-loop on each node. IfX is the set of natural numbers, , then “x divides y” is a reflexive relation. R isirreflexive if for each x ∈ X, (x, x) ∉ R. In terms of a graph, this means that there areno self-loops. An example on the set of natural numbers, , is the relation “x lessthan y.” Note that a relation may be neither reflexive nor irreflexive.

A relation R is symmetric if for all x, y ∈ X, (x, y) ∈ R implies (y, x) ∈ R. Anexample of a symmetric relation on is

R = {(x, y) | x mod 5 = y mod 5}. (1.1)

A symmetric relation can be represented using an undirected graph. R is antisym-metric if for all x, y ∈ X, (x, y) ∈ R and (y, x) ∈ R implies x = y. For example, therelation less than or equal to defined on is anti-symmetric. A relation R is asym-metric if for all x, y ∈ X, (x, y) ∈ R implies (y, x) ∉ R. The relation less than on isasymmetric. Note that an asymmetric relation is always irreflexive.

A relation R is transitive if for all x, y, z ∈ X, (x, y) ∈ R and (y, z) ∈ R implies(x, z) ∈ R. The relations less than and equal to on are transitive.

c

ba

Figure 1.1 The graph of a relation.

PARTIAL ORDERS 3

A relation R is an equivalence relation if it is reflexive, symmetric, and transitive.When R is an equivalence relation, we use x ≡R y (or simply x ≡ y when R is clearfrom the context) to denote that (x, y) ∈ R. Furthermore, for each x ∈ X, we use [x]R,called the equivalence class of x, to denote the set of all y ∈ X such that y ≡R x. Itcan be seen that the set of all such equivalence classes forms a partition of X. Therelation on defined in (1.1) is an example of an equivalence relation. It partitionsthe set of natural numbers into five equivalence classes.

Given any relation R on a set X, we define its irreflexive transitive closure,denoted by R+, as follows. For all x, y ∈ X ∶ (x, y) ∈ R+ iff there exists a sequencex0, x1, ..., xj, j ≥ 1 with x0 = x and xj = y such that

∀i ∶ 0 ≤ i < j ∶ (xi, xi+1) ∈ R.

Thus (x, y) ∈ R+, iff there is a nonempty path from x to y in the graph of the relation R.We define the reflexive transitive closure, denoted by R∗, as

R∗ = R+ ∪ {(x, x) | x ∈ X}.

Thus (x, y) ∈ R∗ iff y is reachable from x by taking a path with zero or more edges inthe graph of the relation R.

1.3 PARTIAL ORDERS

A relation R is a reflexive partial order (or, a nonstrict partial order) if it is reflex-ive, antisymmetric, and transitive. The divides relation on the set of natural numbersis a reflexive partial order. A relation R is an irreflexive partial order, or a strictpartial order if it is irreflexive and transitive. The less than relation on the set ofnatural numbers is an irreflexive partial order. When R is a reflexive partial order, weuse x ≤R y (or simply x ≤ y when R is clear from the context) to denote that (x, y) ∈ R.A reflexive partially ordered set, poset for short, is denoted by (X,≤). When R is anirreflexive partial order, we use x <R y (or simply x < y when R is clear from the con-text) to denote that (x, y) ∈ R. The set X together with the partial order is denoted by(X, <). We use P = (X, <) to denote a irreflexive poset defined on X.

The two versions of partial orders—reflexive and irreflexive—are essentially thesame. Given an irreflexive partial order, we can define x ≤ y as x < y or x = y, whichgives us a reflexive partial order. Similarly, given a reflexive partial order (X,≤), wecan define an irreflexive partial order (X, <) by defining x < y as x ≤ y and x ≠ y.

A relation is a total order if R is a partial order and for all distinct x, y ∈ X, either(x, y) ∈ R or (y, x) ∈ R. The natural order on the set of integers is a total order, but thedivides relation is only a partial order.

Finite posets are often depicted graphically using Hasse diagrams. To defineHasse diagrams, we first define a relation covers as follows. For any two elementsx, y ∈ X, y covers x if x < y and ∀z ∈ X ∶ x ≤ z < y implies z = x. In other words, ify covers x then there should not be any element z with x < z < y. We use x <c y to