Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cardinality and Algebraic Structures Dr Tijl De Bie Dept. Eng. Maths.

Similar presentations

Presentation on theme: "Cardinality and Algebraic Structures Dr Tijl De Bie Dept. Eng. Maths."— Presentation transcript:

1 Cardinality and Algebraic Structures Dr Tijl De Bie Dept. Eng. Maths.

2 Contents Part I (weeks 1-7) 1 Introduction 2 Combinatorics, permutations and combinations. 3 Algebraic Structures and matrices: Homomorphism, isomorphism, group, semigroup, monoid, rings, fields 4 Lattices and Boolean algebras If time remains: some illustrations of the use of group theory in cryptography Part II (weeks 8-12) Vector spaces

3 Introduction Computer programs frequently handle real world data. This data might be financial e.g. processing the accounts of a company. It may be engineering data e.g. from sensors or actuators in a robotic system. It may be scientific data e.g. weather data or geological data concerning rock strata. In all these cases data typically consists of a set of discrete elements. Furthermore there may exist orderings or relationships among elements or objects. It may be meaningful to combine objects in some way using operators. We hope to clarify our concepts of orderings and relationships among elements or objects We look at the idea of formal structures such as groups, rings and and formal systems such as lattices and Boolean algebras

4 Number Systems The set of natural numbers is the infinite set of the positive integers. It is denoted N and can have different representations: {1,2,3,4, } {1,10,11,100,101,.....} are alternative representations of the same set expressed in different bases. N m is the set of the first m positive numbers i.e. {1,2,3,4,......,m}. N 0 is the set of natural numbers including 0 i.e. {0,1,2,3,5,....} Q denotes the set of rational numbers i.e. signed integers and fractions {0,1,-1,2,-2,3,-3,....,1/2,-1/2,3/2,-3/2,5/2, -5/2,....,1/3,-1/3,2/3,-2/3, } R is the set of real numbers i.e. the coordinates of all the points on a line. Z is the set of all integers, both positive and negative {0,1,-1,2,-2,3,-3,......}

5 2 Combinatorics: Permutations A permutation of the elements of a set A is a bijection from A onto itself. If A is finite we can calculate the number of different permutations. Suppose A={a 1,...,a n } a1a1 n choices n-1 choices 1 choice a2a2 anan total number of ways of filling the n boxes n x (n-1)x(n-2)x(n-3) x1=n! nPn=n! eg a possible permutation of {1,2,3,4,5,6} is

6 Composition of Permutations If :A A and :A A are permutations of A then the composition or product. of and satisfies for all x in A. x)= ( x)) Notice that since both and are bijections from A into A so is. In other words. is a permutation of A. Example: Let A={1,2,3,4,5,6} then two possible permutations are For. we have that

7 Cyclic Permutations A cyclic permutation on a set A of n elements has the form where : For shorthand we often write Example or (6 1 4) is a cyclic permutation Two cyclic permutations andare said to be disjoint if e.g. (4 5 2) and (3 1 6) are disjoint is said to be a k cycle

8 Notice that Other examples are or Can you spot a product of disjoint cyclic permutations equivalent to the following permutation ?

9 Theorem: Every permutation of a finite set A can be expressed as a combination of disjoint cycles. Structure underlying permutations Note that the following hold: (1) The product of two permutations is a uniquely determined permutation of the same set. (2) The composition of permutations is associative. (3) The permutation is called the identity permutation and has the property that (4) For every permutation there is an inverse such that

10 Combinations When we think about combinations we do not allow repeats and unlike permutations we do not consider order. Combinations look at the number of different ways of picking a subset of k elements from a set of n elements. Think of the number of ways of picking a list of k distinct elements of n nn-1n-k-2n-k-1 no. of choices places = n(n-1)(n-2) (n-k-1) = n!/(n-k)! For each possible list there are k! permutations so since we are not interested in order we should divide the above by k!. C(n,k) = C n k = n!/(n-k)!k!

11 Example: Choosing 2 elements from {a,b,c,d} {a,b},{a,c},{a,d}, {b,c},{b d},{c,d} C(4,2)= 4!/(2! 2!) =6 Combinations with Repetitions We could also consider combinations with repetitions. With repetitions the number of distinct combinations of k elements chosen from n is: C(n+k-1,k)= (n+k-1)!/k!(n-1)! Number of different throws of 2 identical dice (1 1)(2 2)(3 3)(4 4)(5 5)(6 6) (1 2)(1 3)(1 4)(1 5)(1 6) (2 3)(2 4)(2 5)(2 6) (3 4)(3 5)(3 6)(4 5)(4 6)(5 6) C(7,2)=21

12 Algebraic Structures When we consider the behaviour of permutations under the composition operation we noticed certain underlying structures. Permutations are closed under this operation, they exhibit associativity, an identity element exists and an inverse exists for each permutation These properties define a general type of algebraic structure called a group. In this section we shall look at groups in more detail as well as other similar algebraic structures such as semigroups and monoids. Later we will progress to consider more complex algebraic structures such as rings, integral domains and fields. We will see that many real life situations are examples of these algebraic structures

13 Groups A grouporis a set G with binary operationwhich satisfies the following properties a closed operation i.e. ifand then 2.this is the associative law 3. G has an element e, called the identity, such that 4.there corresponds an element such that Example: The set of all permutations of a set A onto itself is group (called the symmetric group S n for n elements).

14 Group of Symmetries of a Triangle Consider the triangle X YZ O l n m We can perform the following transformations on the triangle 1=identity mapping from the plane to itself p=rotation anticlockwise about O through 120 degrees q=rotation clockwise about O through 120 degrees a=reflection in l b=reflection in m c=reflection in n

15 Letdenote transformation y followed by transformation x for x and y in {1,p,q,a,b,c} So for example l m Yn O X Z l mn O l mn O X YZ XZ Y a p Notice the table is not symmetric

16 Other examples of a group The set of all permutations onto itself is a group (called the symmetric group S n ) The sets of all invertible nxn matrices forms a group under ordinary matrix multiplication (called GL(n), the general linear group) The quaternion group: Let G={I,-I,J,-J,K,-K,L,-L} where I= [ ], J= [ ], K= [ ], L= [ ] j 0 0 -j j j 0

17 Order of a group A finite group is a group where G is finite The order of a finite group is |G| For example if G is the set of permutations of a set A with n elements then the order of G is n!

18 Abelian Groups Ifis a group andis also commutative thenis referred to as an Abelian group (the name is taken from the 19th century mathematician N.H. Abel) is commutativemeans that Examples:andare abelian groups. Why isnot a group at all?

19 Modular arithmetic Recall a=b mod p iff p|a-b Notice a=b mod p iff a=kp+b for some integer k a=b mod p implies p|a-b implies a-b=kp implies a=kp+b a=kp+b implies a-b=kp implies p|a-b implies a=b mod p

20 Modular addition Modular addition mod 6:

21 Modular multiplication Modular multiplication mod 7: x

22 Modular multiplication Modular multiplication mod 6: x

23 Modular multiplication Not a group! (Why not?) Which subset of {1,2,3,4,5} does form a group? x

24 Modular multiplication Theorem: If n>=2 and n|p then n has no inverse under multiplication mod p Prove it! The subset of {1,…,p-1} relatively prime to p is a group under multiplication mod p denoted Z p * We will clarify this on the next slides…

25 Modular arithmetic Recall Euclids algorithm to find the gcd of x and y: x=k 1 y+r 1 y=k 2 r 1 +r 2 r 1 =k 3 r 2 +r 3 … r n-2 =k n-1 r n-1 +r n r n-1 =k n r n From this… Theorem: There exist integer a and b such ax+by=gcd(x,y) The old remainder is divided by the new one repeatedly until the remainder is 0 The gcd is the last non zero remainder

26 Modular arithmetic An element n has an inverse n -1 under multiplication mod p for which n. n -1 =1 mod p if and only if (iff) n is relatively prime to p. Prove this! Clearly then if p is prime then every element will have an inverse.

27 Groups in logic Consider exclusive or defined by A B (¬A B) (A ¬B) {t,f} is an abelian group under exclusive or. What is the identity? What is the inverse of t (and f)?

28 To show that an algebraic system is a group we must show that it satisfies all the axioms of a group. Question: Letbe a Boolean algebra so that A is a set of propositional elements,is like or,is like and andis like not. Show thatis an abelian group where Answer: (1) Associative since prove this ? (2) Has an identity element 0 (false) since (3) Each element is its own inverse (4) The operation commutes prove this ?

29 Iterated operations a=a 1 aa=a 1 aaa=a 2 aa…a=a k (Why is this unambiguously defined?)

30 Cyclic groups A group G is cyclic if there exists a G such that for any b G there is an integer k0 such that a k =b. I.e. Every element of G is some power of a. Element a is called the generator of G denoted G= Example: = since –1 2 =1, -1 3 =-1

31 Order of a cyclic permutation group (1 2 … p) Show that the order is equal to p [Show by making a drawing…]

32 Weaker structures An Abelian group is a strengthening of the notion of group (i.e. requires more axioms to be satisfied) We might also look at those algebraic structures corresponding to a weakening of the group axioms Semigroup monoid group Abelian Group

33 Semigroup is a semigroup if the following conditions are satisfied: a closed operation i.e. ifand then associative Example: The set of positive even integers {2,4,6,.....} under the operation of ordinary addition since The sum of two even numbers is an even number + is associative The reals or integers are not semigroups under - why?

34 Monoid is a monoid if the following conditions are satisfied: a closed operation i.e. ifand then associative 3. There is an identity element Examples: Let A be a finite set of heights. Let bea binary operation such that is equal tothe taller of a and b. Then is a monoid where the identity is the shortest person in A is a monoid:is associative, true is the identity, but false has no inverse is a monoid:is associative false is the identity, but true has no inverse

35 Properties of Algebraic Structures properties Theorem: (unique identity) Suppose that is a monoid then the identity element is unique Proof: Suppose there exist two identity elements e and f. [We shall prove that e=f] Theorem: (unique inverse) Suppose that is a monoid and the element x in A has an inverse. Then this inverse is unique. Proof: ??

36 Properties of Groups Theorem (The cancellation laws): Letbe a group then (i) (ii) Proof: (i) Suppose thatthenby axiom 3 a has an identityand we have that (ii) is proved similarly Theorem (The division laws): Letbe a group then (i) (ii) Proof ??

37 Theorem (double inverse) :If x is an element of the group then Proof: Theorem (reversal rule) If x and y are elements of the group then Proof ??

38 For an arbitrary element of a group we can define functionsand such that Theorem:and are permutations of G Proof: Consider [prove 1-1] suppose for x,y in G [Prove onto] For any y in G Corollary: In every row or column of the multiplication table of G each element of G appears exactly once.

39 Subgroups is a subgroup of the groupif andis also a group Examples:is a subgroup of Test for a subgroup Let H be a subset of G. Thenis a subgroup ofiff the following conditions all hold: (1) (2) H is closed under multiplication (3) For every group,andare subgroups is called the trivial subgroup of a proper subgroup ofis a subgroup different from G A non-trivial proper subgroup is a subgroup equal neither to or to

40 Cosets Consider a set A with a subset H. Let. Then the left coset of H with respect to a is the set of elements: This is denoted by Similarly the right coset of H with respect to a is and is denoted by Example: Let A be the set of rotations and. Letthen which is the right coset with respect to {0º,120º,240º}

41 Normal Subgroups Letbe a subgroup of. Then is a normal subgroup if, for any, the left cosetis equal to the right coset is a normal subgroup where e.g. Theorem: In an Abelian group, every subgroup is a normal subgroup

42 Coset cardinality Theorem: For any H subset of G and any a in G |aH|=|H| Proof: By definition of Coset |aH||H| Now suppose |aH|<|H| then there must exist b and c distinct elements of H such that ab=ac. But by the cancellation law this implies that b=c which is a contradiction. Hence |aH|=|H|

43 Coset partitioning Theorem: Let a,b G and let H be a subgroup of G then either: aH=bH or: aH bH= Proof: Suppose aH bH then there exist s and t in H such that as=bt. In this case a= bts -1 and for an arbitrary x in H ax= bts -1 x Now by the inverse axiom and closure, ts -1 x H and hence bts -1 x bH, therefore ax bH so that aH bH Similarly we can show that bH aH Hence if the two cosets are not disjoint then bH=aH

44 LeGranges theorem Theorem: Let H be a subgroup of finite group G, then the cardinality of H evenly divides the cardinality of G (i.e |H| | |G|) Proof Let |G|. Now for each element a i of G we can generate a coset a i H. Now notice that a i a i H because since H is a subgroup, e H and a i e= a i Suppose there are m distinct cosets of H then picking one representative a i from each this means that: G= a 1 H a 2 H a 3 H … a m H

45 LeGranges theorem Now by the previous theorem it follows that since these m cosets are distinct then they must be disjoint. Hence, |G|=|a 1 H|+ |a 2 H| + |a 3 H| … + |a m H| Also by the cardinality theorem for cosets they all have the same cardinality, namely |H|. Hence, |G|=m.|H| as required

46 Order of an element Let i be the smallest integer such that a i =e where a is an element of group G and e is the identity element. If i exists we call it the order of a. Otherwise we say that a has infinite order.

47 Subgroup generated by an element Theorem: For any element a of G with finite order the set: H={a j : for some integer j} is a subgroup of G. Notice: if i is the order of element a then a i =e a i+1 =ea=a 1 a i+2 = a a =a 2 a i+n =a n

48 Example Let σ=( ), a permutation of 4 elements Then {σ, σ 2, σ 3, σ 4 } is a subgroup of the group of permutations of {1,2,3,4} The order of σ is 4 [Work it out!]

49 Order of elements in finite groups If the group G is finite then all elements of G have finite order: For any a G, since G is finite there must exist i

50 Corollary of LeGrange Theorem: The order of every element of a finite group G, divides the order of G Proof... Every element of G has finite order n and hence generates a subgroup of order n. Hence by LeGranges theorem n divides |G|

51 Isomorphism Two groups are isomorphic if there is a bijection of one onto the other which preserves the group operations i.e. ifandare groups then a bijection is an isomorphism provided Example: Consider the group of matrices of the form where under matrix multiplication. This is isomorphic to the group The mapping is An isomorphism from a group onto itself is called an automorphism.

52 Homomorphisms The idea of isomorphic algebraic structures can be readily generalised by dropping the requirement that the functional mapping be a bijection. Letandbe two algebraic systems then a homomorphism fromto is a functional mapping such that Example: consider the two structures then f such that is a homomorphism between and

53 Algebraic Structures with two Operations So far we have studied algebraic systems with one binary operation. We now consider systems with two binary operations. In such a system a natural way in which two operations can be related is through the property of distributivity; Letbe an algebraic system with two binary operations and. Then the operation is said to distribute over the operationif and Example:distributes over + distributes over

54 Ring An algebraic systemis called a ring if the following conditions are satisfied: (1)is an Abelian group (2)is a semigroup (3) The operationis distributive over the operation Example:is a ring since is an Abelian group is a semigroup distributes over +

55 Examples of rings is a ring because: is an Abelian group. is a semigroup. × distributes over + The set { [ ],a,b є R } is a ring under matrix addition and multiplication {0,1, …,n-1} is a ring under addition and multiplication mod n 0 a 0 b

56 Rings of polynomials Let the set R[x] be the set of all polynomial of the form: a n x n +…+ a 2 x 2 + a 1 x 1 +a 0 for some n, where a n,…,a 0 єR Then R[x] is a ring under addition and multiplication of polynomials In fact for any ring R you can construct a ring of polynomials R[x] over R

57 Special types of ring A commutative ring is a ring in whichis commutative A ring with unity contains an element 1 such that Example: the ring of 2x2 matrices under matrix addition and multiplication is a ring with unity. The element 1=I= (0 is the identity of )

58 Division rings A division ring is a (not necessarily commutative) ring with unity, in which every element a not equal to 0 has an inverse a -1 such that aa -1 = a -1 a=1 The ring of complex matrices of the form: [ ] a b -b a

59 Integral Domains and Fields is an integral domain if it is a commutative ring with unity that also satisfies the following property; is also an integral domain is a field if: (1)is an Abelian group (2)is an Abelian group (3) The operationis distributive over the operation Example:The set of real numbers with respect to + and is a field. is not a field. Why?

60 Galois fields For a prime number p the set {0,1,…,p-1} is a field under modular addition and multiplication mod p A field (like this one) with finite number of elements is called a Galois field.

61 A Field is an Integral Domain Letbe a field then certainly is a commutative ring with unity. Hence, it only remains to prove that Now supposethen if x=0 the above holds. Consider the case then where Sinceis an Abelian group then it must contain an inverse to x,, for which the following holds Now Therefore y=0 as required

62 Properties of a ring Theorem: ifis a ring. Then Proof: as for previous argument Let -x denote the inverse of x under Theorem: ifis a ring then the following hold (i) (ii) Proof: (i)

63 (ii) for both (i) and (ii) the symmetric cases are proved similarly

64 Property of an integral domain Theorem: suppose that elements a,b and c of an integral domain satisfy and then b=c. Proof:

65 Subrings and subfield Subring If (A,,) is a ring then (H,,) is a subring if H A and (H,,) is a ring Subfield If (A,,) is a field then (H,,) is a subfield if H A and (H,,) is a field Examples: Z is a subring of R, R is a subfield of C

66 Ring morphisms A morphism between rings (A,,) and (B,*, ) is a function f:AB such that: x,y A f(x y)=f(x)*f(y) and f (xy)=f(x)f(y) From these we have that f(0)=0 where 0 is the zero of (B,*, ) Also f(-x)=-f(x)

67 Special morphisms 1.An injective ring morphism is called a monomorphism 2. A surjective ring morphism is called an epimorphism 3. A bijective ring morphism is called a isomorphism

68 Examples of morphisms f(a) = a mod n, is an epimorphism (surjective ring morphism) between Z and {0,1,…,n-1} For the ring of polynomials R(x), f(p)=p(j) is an epimorphism into C, where p(j) is obtained by substituting j for x in the polynomial p

69 Galois theorem For every prime power p k (k=1,2,…) there is a unique (upto isomorphism) finite field containing p k elements denoted by GF(p k ) All finite fields have cardinality p k

70 Galois theorem: examples GF(2) + | 0 1 · | | | | | 0 1 GF(3) + | · | | | | | | | 0 2 1

71 Partial Orderings We have introduced formal structure governing the properties of various sets of elements under one or two binary operations. These elements can also be ordered and restricted by binary relations. In this section we revise our understanding of binary relations in a set and also introduce a graphical notation for binary relations. A relation R on a set A is a partial order if it satisfies; (1) R is reflexive (2) R is antisymmetric (3) R is transitive Example: Set of reals R with the relation The pair (A,R) is called a partially ordered set or poset

72 Example: The relationcan be defined on a Boolean algebra by; (1) Thus from the idempotent law we find thatand hence the relation is reflexive. (2) If From the commutative law and hence the relation is antisymmetric (3) Ifthen

73 We can think of a relation as being represented by the set of pairs of elements which satisfy the relation. In this case a partial ordering on A corresponds to a subset B of AxA satisfying Other examples of partial orderings: Divisibility on N: We say that a divides b iff there is some x in Z such that ax=b. If this divisibility exists we write a|b. Divisibility is a partial order on N. Inclusion on a set of sets X

74 Graphical Representations We can represent partial orderings graphically by means of a directed graph where the nodes are elements of A and the directed edges give the partial order relations. e.g. the graph a bc d Denotes the partial ordering on{a,b,c,d} where

75 Graphical Representations of the Axioms Reflexive: a Antisymmetric: the following does not occur a b Transitive: a c b

76 Example: Divisibility relation on{2, 3, 4, 6, 8, 9, 18} 2|4 4|8 2|8 2|6 3|6 3|9 9|18 6|18 3|18 2|

77 Example: The collection of all subsets of {a,b,c} {a,b,c} {a,b}{a,c}{b,c} {a}{b}{c}

78 Hasse Diagrams Notice that some of the diagrams in the previous examples were messy and difficult to read having many links. We can simplify these diagrams by introducing certain conventions. The Hasse diagram of a partially order set is a drawing of the points in the set (as nodes) and some of the links of the graph of the order relation. The rules for drawing the Hasse diagram of a partial order are: (1) Omit all links that can be inferred from transitivity. (2) Omit all loops (3) Draw links without arrow heads (4) Understand that all arrows would point upwards

79 Here are Hasse diagrams for the two examples given previously: Divisibility:

80 {a,b}{a,c}{b,c} {a}{b}{c} Example: subsets {a,b,c}

81 Incomparable Elements Consider the Hasse diagram for divisibility on {2,3,....,10} Notice that 5 and 6 are not related in either direction Similarly for 2 and 3 If neither R(a,b) or R(b,a) then a and b are incomparable or not comparable

82 Linear or Total Order A linear or total order on a set A is a partial order on A in which every two elements are comparable

83 Maximal and Minimal Elements A maximal element of A is any element t of A such that A minimal element of A is any element b of A such that Example:For the subset ordering {a,b,c} is the maximal element and is the minimal element For divisibility on {2,.....,10} the maximal elements are 6, 7, 8, 9 and 10 and the minimal elements are 2, 3, 5 and 7 The element 4 is neither maximal nor minimal

84 Upper Bounds and Lower Bounds Let S be a subset of A then x in A is an upper bound of S if Similarly z in A is a lower bound of S if An element u is the least upper bound of S if u is an upper bound of S and for every x an upper bound of S R(u,x) An element l is the greatest lower bound of S if l is an upper bound of S and for every z a lower bound of S R(z,l) The least upper bound (lub) of S is sometimes referred to as the supremum of S (sup S) The greatest lower bound (glb) of F is sometimes referred to as the infimum of S (inf S)

85 Lattices A partially ordered set in which every pair of elements has a least upper bound and a greatest lower bound is called a lattice. ab c d e f This is not a lattice since {c,d} has no lub or glb. A lattice in which every subset has a lub and glb is called complete. Every finite lattice is complete. For a complete lattice the lub of the whole lattice is call top and the greatest lower bound bottom

86 Example: Consider elements of the form (a,b,c) where a,b and c can take the values 0 or 1. For two such elements f and g we say that if each coefficient of f is less than or equal to the corresponding coefficient of g e.g.but not (111) (011) (101) (110) (100) (010) (001) (000)

87 Meet and Join In a latticethe following equations define binary operations on A is called the meet operation andis called the join operation. They have the following properties Commutativity: Associativity: Sinceis an upper bound of a and b Similarly for the meet

88 If and then Theorem Proof Let 1 denote the lub of the whole lattice and 0 denote the glb of the whole lattice. Then

89 Example Let us order the following set of numbers with the operation is a factor of. A={3,9,12,15,36,45} The join operationis the least common multiple The meet operationis the greatest common divisor

90 Complemented Lattice For a complemented lattice we have that for there existssuch that: e.g. a bc 1 0

91 Distributive Lattice A lattice is distributive if: e.g. the following lattice is not distributive a bc d e Since

92 Boolean Algebra A Boolean Algebra consists of two binary operations and and the unary operation on a set B with distinct elements 0 and 1 such that the following hold. (1) The commutative laws: (2) The associative laws: (3) The Distributive laws: (4) The Identity Laws:

93 (5) The Complementation Laws: Ifis a complemented distributive lattice then is a Boolean algebra where correspond to the meet, join and complement operations on L respectively Theorem Proof ?

94 (6) The following Idempotent Laws can be derived: Proof (7) The following Identity Laws can also be derived Proof

Download ppt "Cardinality and Algebraic Structures Dr Tijl De Bie Dept. Eng. Maths."

Similar presentations

Ads by Google