Lesson 15: Relations and algebras Compiled by: Ondřej Kohut (within the Theory of formal systems course)

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

First-order Set Theory Chapter 15 Language, Proof and Logic.
The Engineering Design of Systems: Models and Methods
Algebraic Structures DEFINITIONS: PROPERTIES OF BINARY OPERATIONS Let S be a set and let  denote a binary operation on S. (Here  does not necessarily.
Chapter 7 Relations : the second time around
Relations binary relations xRy on sets x  X y  Y R  X  Y Example: “less than” relation from A={0,1,2} to B={1,2,3} use traditional notation 0 < 1,
Theory and Applications
Preliminaries/ Chapter 1: Introduction. Definitions: from Abstract to Linear Algebra.
Lattice and Boolean Algebra
Partially Ordered Sets (POSets)
Relations Chapter 9.
Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
CSE 460: Switching Theory David M. Zar
Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.
Math 3121 Abstract Algebra I Section 0: Sets. The axiomatic approach to Mathematics The notion of definition - from the text: "It is impossible to define.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
2.6 Equivalence Relation §1.Equivalence relation §Definition 2.18: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric,
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Discrete Mathematics Relation.
Relations and their Properties
Sets, Relations, and Lattices
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Mathematical Preliminaries
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
Basic Structures: Sets, Functions, Sequences, and Sums.
DISCRETE COMPUTATIONAL STRUCTURES
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
Chapter 6 Abstract algebra
2007 D iscrete The foundations C ounting theory N umber theory G raphs & trees structure s
Relations, operations, structures. Motivation To evidence memners of some set of objects including its attributes (see relational databases) For evidence.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Math 3121 Abstract Algebra I Lecture 14 Sections
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Chap. 7 Relations: The Second Time Around
CSCI 115 Course Review.
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Week 8 - Monday.  What did we talk about last time?  Properties of functions  One-to-one  Onto  Inverses  Cardinality.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Prepared By Meri Dedania (AITS) Discrete Mathematics by Meri Dedania Assistant Professor MCA department Atmiya Institute of Technology & Science Yogidham.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
CSE 2813 Discrete Structures
Unit-III Algebraic Structures
Partial Orderings CSE 2813 Discrete Structures.
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
Equivalence Relations
Relations Chapter 9.
Partial Orderings.
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Relations: Operations & Properties
CS201: Data Structures and Discrete Mathematics I
Lesson 15: Relations and algebras
Sungho Kang Yonsei University
Introduction to Relations and Functions
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Foundations of Discrete Mathematics
Presentation transcript:

Lesson 15: Relations and algebras Compiled by: Ondřej Kohut (within the Theory of formal systems course)

Relace a algebry2 Contents  Theory of sets (revision)  Relations and mappings (revision) –Relations –Binary relations on a set –Mappings –Partitions, equivalences –Orderings  Algebras –Algebras with one operation –Algebras with two operations –Lattices

Relace a algebry3 Naive theory of sets  Language: Special symbols: –Binary predicates:  (is an element of),  (is a proper subset of),  (is a subset of) –Binary function symbols:  (intersection),  (union)  Cantor – the naive set theory (without axiomatization)  There are many formal axiomatizations, but none of them is complete.  Examples: von Neumann-Bernays-Gödel, Zermelo-Fränkel + axiom of choice

Relace a algebry4 Zermelo-Fränkel set-theory Axiom of extensionalityAxiom of extensionality: Two sets are the same if and only if they have the same elements. Axiom of empty setAxiom of empty set: There is a set with no elements. Axiom of pairingAxiom of pairing: If x, y are sets, then so is {x,y}, a set containing x and y as its only elements. Axiom of unionAxiom of union: Every set has a union. That is, for any set x there is a set y whose elements are precisely the elements of the elements of x.union Axiom of infinityAxiom of infinity: There exists a set x such that {} is in x and whenever y is in x, so is the union y U {y}. Axiom of separationAxiom of separation (or subset axiom): Given any set and any proposition P(x), there is a subset of the original set containing precisely those elements x for which P(x) holds.propositionsubset Axiom of replacementAxiom of replacement: Given any set and any mapping, formally defined as a proposition P(x,y) where P(x,y) and P(x,z) implies y = z, there is a set containing precisely the images of the original set's elements.mapping Axiom of power setAxiom of power set: Every set has a power set. That is, for any set x there exists a set y, such that the elements of y are precisely the subsets of x.power set Axiom of regularityAxiom of regularity (or axiom of foundation): Every non-empty set x contains some element y such that x and y are disjoint sets.disjoint sets Axiom of choiceAxiom of choice: (Zermelo's version) Given a set x of mutually disjoint nonempty sets, there is a set y (a choice set for x) containing exactly one element from each member of x.

Relace a algebry5 Naive theory of sets  Ø – an empty set  Cardinality of a set A: |A| Relations between sets (axioms):  Equality  Inclusion

Relace a algebry6 Naive theory of sets – set theoretical operations  Intersection  Union  Difference  Symetrical difference  Complement with respect to universe U

Relace a algebry7 Naive theory of sets – set theoretical operations  Potential set  Cartesian product  Cartesian power A 1 =A, A 0 ={ Ø } n

Relace a algebry8 Relations  n-ary relation between the sets A 1, A 2,..., A n  Examples : –D = a set of possible days –M = a set of VŠB rooms –Z = a set of VŠB employees A ternary relation meeting (when, where, who):

Relace a algebry9 Binary relations  Inverse relation to r:  Composition of relations

Relace a algebry10 Binary relations A binary relation r on a set A is called:  Reflexive:  x  A: (x,x)  r  Irreflexive:  x  A: (x,x)  r  Symmetric:  x,y  A: (x,y)  r  (y,x)  r  Antisymmetric:  x,y  A: (x,y)  r and (y,x)  r  x=y  Asymmetric:  x,y  A: (x,y)  r  (y,x)  r  Transitive:  x,y,z  A: (x,y)  r and (y,z)  r  (x,z)  r  Cyclic:  x,y,z  A: (x,y)  r and (y,z)  r  (z,x)  r  Linear:  x,y  A: x=y or (x,y)  r or (y,x)  r

Relace a algebry11 Binary relations The important types of binary relations:  Tolerance – reflexive, symmetric  Quasi-ordering – reflexive, transitive  Equivalence – reflexive, symmetric, transitive  Partial ordering – reflexive, antisymmetric, transitive

Relace a algebry12 Binary relations Examples:  Tolerance: – „to be akin to“ on a set of people, – „to have a different age no more than one year“ on the set of people,...  Quasi-ordering: –„if it holds |X|  |Y|, then sets X and Y are in relation“ on a set of sets, – divisibility relation on a set of integers, –„not to be older“ on the set of people,...  Equivalence: – „to be the same age“ on the set of people, – equivalence on a set of natural numbers,...  Ordering: –inclusion relation, –divisibility relation on the set of natural numbers,...

Relace a algebry13 Mappings (functions)  f  A  B is called a mapping from a set A into a set B (partial mapping), iff: (  x  A,  y 1,y 2  B) ( (x,y 1 )  f and (x,y 2 )  f  y 1 = y 2 )  f is called a mapping of a set A into a set B (total mapping, written as: f: A  B), iff: –f is mapping from A to B –(  x  A)(  y  A) ( (x,y)  f)  If f is a mapping and (x,y)  f, then we write: f(x)=y

Relace a algebry14 Mapping (functions)  Examples: u = {(x,y)  Z  Z; x=y 2 },v = {(x,y)  N  N; x=y 2 }, w = {(x,y)  Z  Z; y=x 2 }  r, u – are not mappings  s, v – are partial mappings from A to B, (not total mappings)  t, w – are total mappings r  A  Br  A  Bs  A  Bs  A  Bt  A  Bt  A  B

Relace a algebry15 Mapping (functions) Mapping f: A  B is called  Injection (one to one mapping A into B), iff:  x 1,x 2  A,  y  B: (x 1,y)  f and (x 2,y)  f  x 1 = x 2  Surjection (mapping A onto B), iff:  y  B  x  A: (x,y)  f  Bijection (one to one mapping A onto B) (mutually single-valued), iff it is an injection and surjection.

Relace a algebry16 Mapping (functions)  Examples: j: Z  Z, j(n)=n 2,k: Z  N, k(n)=|n|, l: N  N, l(n)=n+1,m: R  R, j(x)=x 3  f, j – is neither an injection nor a surjection  h, k – are surjections, but not injections  g, l – are injections, but not surjections  I,m – is an injection and a surjection  bijections f : A  Bg : A  Bh : A  Bi : A  B

Relace a algebry17 Partitions and equivalences  Partition on a set A is such a system that: X = { X i ; i  I } –X i  A pro  i  I –X i  X j = Ø pro  i,j  I, i  j –U X = A X i – classes of the partition  Refininment of a partition X = { X i ; i  I } is a system that: Y = { Y j ; j  J }, iff: –  j  J,  i  I so that Y j  X i

Relace a algebry18 Partitions and equivalences  Let r be an equivalence relation on a set A, X is a partition on A, then it holds:  X r = {[x] r ; x  A} – the partition on A (the partition induced by equivalence r, the factor set of the set A according to the equivalence r)  r X = {(x,y); x and y belongs to the same class of the partition X} – equivalence on A (induced by partition X) Examples:  r  Z  Z;r = {(x,y); 3 divides x-y }  X={X 1, X 2, X 3 }  X 1 ={…-6, -3, 0, 3, 6, …}  X 2 ={…-5, -2, 1, 4, 7, …}  X 3 ={…-4, -1, 2, 5, 8, …}

Relace a algebry19 Orderings  If r is an order relation on A, then a couple (A,r) is called an ordered set  Written as: (A,  ) –Examples: (N,  ), (2 M,  )  Cover relation Let (A,  ) be an ordered set, (a,b)  A a –< b („b covers a“), iff: a < b and  c  A: a  c a c  b –Examples: (N,  ), –< ={(n,n+1); n  N}

Relace a algebry20 Orderings  Hasse diagram – graphical picturing –Example: (A,  ), A={a,b,c,d,e} r = {(a,b), (a,c), (a,d), (b,d)}  id A id A ={(a,a): a  A}

Relace a algebry21 Orderings An element a of an ordered set (A,  ) is called:  The least: for  x  A: a  x  The greatest: for  x  A: x  a  Minimal: for  x  A: (x  a  x = a)  Maximal: for  x  A: (a  x  x = a)  Examples: –The least: does not exist –The greatest: does not exist –Minimal: a, e –Maximal: d, c, e

Relace a algebry22 Orderings  A mapping of the ordered sets (A,  ), (B,  ) is called isomorphic, iff the bijection f: A  B exists such that:  x,y  A: x  y, iff f(x)  f(y)  A mapping of the ordered sets (A,  ), (B,  ) is called isotone f: A  B, when it holds:  x,y  A: x  y  f(x)  f(y)  Examples:  f: N  Z, f(x)=kx, k  Z, k  0 is isotone  g: N  Z, g(x)=kx, k  Z, k  0 is not isotone

Relace a algebry23 Orderings  Let (A,  ) be an ordered set, M  A, then  L A (M)={x  A;  m  M: x  m } –A set of lower bounds  U A (M)={x  A;  m  M: m  x } –A set of upper bounds  Inf A (M) – The greatest element of the set L A (M) –Infimum of the set M  Sup A (M) – The least element of the set U A (M) –Supremum of the set M

Relace a algebry24 Lattices - lattice ordered sets  A set (A,  ) is called a lattice (lattice ordered set), iff:  x,y  A  s,i  A : s = sup({x,y}), i = inf({x,y})  Notation: –x  y = sup({x,y}) –x  y = inf({x,y})  If sup(M) a inf(M) exist for every M  A, then (A,  ) is called a complete lattice

Relace a algebry25 Algebras Algebra (abstract algebra) is couple: (A, F A ):  A  Ø – an underlying set of algebra  F A = {f i : A p(fi)  A; i  I} – a set of operations on A  p(f i ) – an arity of operation f i  Examples: –(N, + 2,  2 ) the set of natural numbers with the addition and multiplication operations –(2 M, ,  ) the set of all subsets of a set M with the intersection and union operations –(F, ,  ) The set (F) of the propositional logic formulas with the conjunction and disjunction operations

Relace a algebry26 Algebras with one binary operation Grupoid G=(G,  )   : G  G  G  If a set G is finite, then the grupoid G is called finite  Order of a grupoid = |G| Examples of grupoids:  G 1 =(R,+), G 2 =(R,  ), G 3 =(N,+)...

Relace a algebry27 Algebras with one binary operation  We can express the finite grupoid G=(G,  ) by Cayley table  Example:  G = {a,b,c}  For example: a  b = b, b  a = a, c  c = b...  abc aabc bacc caab

Relace a algebry28 Algebras with one binary operation Let G=(G,  ) is grupoid, G is called:  Commutative, if it holds: –(  a,b  G)(a  b = b  a)  Associative, if it holds: –(  a,b,c  G)((a  b)  c = a  (b  c))  With a neutral element, if it holds: –(  e  G  a  G)(a  e = a = e  a)  With an aggressive element, if it holds: –(  o  G  a  G)(a  o = o = o  a)  With inverse elements, if it holds: –(  a  G  b  G)(a  b = e = b  a)

Relace a algebry29 Algebras with one binary operation Examples:  (R,  ), (N,+) – commutative and associative  (R,  ), a  b = (a+b) / 2 – commutative, not associative  (R,  ), a  b = a b – neither commutative nor associative  (R,  ) – 1 = the neutral element, 0 = the aggressive element

Relace a algebry30 Algebras with one binary operation Let G=(G,  G ) be a grupoid. H  G is called closed (with respect to the operation  G ), if it holds:  (  a,b  H)(a  G b  H) A Grupoid H=(H,  H ) is a subgrupoid of a grupoid G=(G,  G ), if it holds:  Ø  H  G is closed   a,b  H: a  H b = a  G b  Examples:  (N,+ N ) is a subgrupoid of (Z,+ Z )  {0,1,2} is not the base set of a podgrupoid (Z,+ Z )

Relace a algebry31 Algebras with one binary operation  Let G 1 =(G 1,  1 ), G 2 =(G 2,  2 ) be a grupoids.  G 1  G 2 =(G 1  G 2,  ) – direct product G 1 and G 2, where:  (a 1, a 2 )  (b 1, b 2 ) = (a 1  1 b 1, a 2  2 b 2 ) Examples:  G 1 =(Z,+), G 2 =(Z,  ).  G 1  G 2 =(Z  Z,  ),  (a 1, a 2 )  (b 1, b 2 ) = (a 1 + b 1, a 2  b 2 )  (1,2)(3,4) = (1+3, 2  4) = (4,8) and so on.

Relace a algebry32 Algebras with one binary operation  Let G =(G,  G ), H =(H,  H ) be grupoids and h:G  H be a mapping.  h is called homomorphism of grupoid G into grupoid H, if it holds:   a,b  G: h(a  G b) = h(a)  H h(b) The types of homomorphism:  Monomorphism – h is injective  Epimorphism – h is surjective  Isomorphism – h is bijective  Endomorphism – H=G  Automorphism – is bijective and H=G Examples:  (R,+), h(x)= -x, h is automorfismus (R,+) into itself  h(x+y) = -(x+y) = (-x) + (-y) = h(x) + h(y)

Relace a algebry33 Algebras with one binary operation r is called a congruence on a grupoid G=(G,  G ), iff:  r is a binary relation: θ  G  G  r is an equivalence  (a 1, a 2 ), (b 1, b 2 )  r  (a 1  G b 1, a 2  G b 2 )  r A factor grupoid of grupoid G according to the congruence r: G/r=(G/r,  G/r ), [a] r  G/r [b] r = [a  G b] r Examples:  r  Z  Z;r = {(x,y); 3 divides x-y }  r is a congruence on (Z,+)  [0][0][1][1][2][2] [0][0][0][0][1][1][2][2] [1][1][1][1][2][2][0][0] [2][2][2][2][0][0][1][1]

Relace a algebry34 Algebras with one binary operation The types of grupoids:  Semigroup – an associative grupoid  Monoid – a semigroup with the neutral element  Group – a monoid with the inverse elements  Abelian group – a commutative group Examples:  (Z, –) – grupoid, not a semigroup  (N – {0}, +) – semigroup, not a monoid  (N,  ) – monoid, not a group  (Z, +) – Abelian group

Relace a algebry35 Algebras with two binary operation Algebra (A,+,·) is called a Ring, if it holds:  (A,+) is commutative group  (A,·) is monoid  For  a,b,c  A it holds: a·(b+c)=a·b+a·c, (b+c)·a=b·a + c·a  If |A|>1, then (A,+,·) is called a non-trivial ring.  Let 0  A is the neutral element of group (A,+). Then 0 is called the ring zero (A,+,·).  Let 1  A is the neutral element of monoid (A,·). Then 1 is called the ring unit (A,+,·).

Relace a algebry36 Algebras with two binary operation A ring (A,+,·) is called a field, if it holds:  (A - {0},·) is a commutative group Examples:  (Z,+,·) – a ring, not a field  (R,+,·), (C,+,·) – fields

Relace a algebry37 Lattice – algebraic structure  Lattice L = (L, ,  )   : L  L  L,  : L  L  L   x, y, z  L it holds: x  x = xx  x = x idempotention x  y = y  xx  y = y  x commutativity x  (y  z) = (x  y)  zx  (y  z) = (x  y)  z associativity x  (x  y) = xx  (x  y) = x absorption

Relace a algebry38 Lattice – algebraic structure Let (A, ,  ) be a lattice, (B,  ) be a lattice ordered set  Let us define a relation   on A : a   b, iff a  b = b  Let us define the relations   and   on B a   b = sup{a,b}, a   b = inf{a,b}, Then it holds:  (A,  ) is a lattice ordered set, where: sup{a,b}= a  b, inf{a,b}= a  b  (B,  ,   ) is a lattice  (A, ,  ) = (A,  ,   )

Relace a algebry39 Lattice – algebraic structure A lattice (L, ,  ) is called:  Modular, if it holds:  x, y, z  L : x  z  x  (y  z) = (x  y)  z  Distributive, if it holds:  x, y, z  L : x  (y  z) = (x  y)  (x  z) x  (y  z) = (x  y)  (x  z)  Complementary, if it holds: : There is the least element 0  L and the greatest element 1  L  x  L  x’  L : x  x’ = 0, x  x’ = 1 x’ is called a complement of an element x

Relace a algebry40 Lattice – algebraic structure  Each distributive lattice is modular Examples:  M5 (diamond) – a modular lattice which is not distributive  N5 (pentagon) – is not modular M5N5

Relace a algebry41 Lattice – algebraic structure Lattice (L, ,  ) is called Boolean lattice, when it is:  Complementary, distributive, with the least element 0  L and with the greatest element 1  L Boolean algebra:  (L, , , –, 0, 1), – : L  L is an operation of complement in L Example:  (2 A, ,  ), A = {1,2,3,4,5,6,7}