70 likes | 221 Views
Chapter 5. Kleene Algebra and Regular Expressions (Supplementary Lecture A). Kleene algebra (the algebra of regular sets). A Kleene algebra is a algebra K = (K, 0, 1,•, +, *) where + is ACII: (a + b) + c = a + (b + c) assoc. (A.1) a + b = b + c commutive (A.2)
E N D
Chapter 5 Kleene Algebra and Regular Expressions (Supplementary Lecture A)
Kleene algebra (the algebra of regular sets) • A Kleene algebra is a algebra K = (K, 0, 1,•, +, *) where • + is ACII: • (a + b) + c = a + (b + c) assoc. (A.1) • a + b = b + c commutive (A.2) • a + a = a idempotent (A.3) • a + 0 = a 0 is the identity for + (A.4) • • is A I An: • a(bc) = (ab) • is associative (A.5) • a1 = 1a = a 1 is the identity for • (A.6) • a0 = 0a = 0 0 is an annihilator (A.7) • • is distributive w.r.t. +: • a(b+c) = ab + ac left distributive (A.8) • (a+b)c = ac + bc right distributive (A.9) • The laws of *:
Kleene algebra (cont’d) • Axioms involving *: • 1 + aa* = a* (A.10) • 1 + a*a = a* (A.11) • b + ac c a*b c (A.12) • a + ca c ba* c (A.13) where refers to the order a b a + b = b in 2S* , is the set inclusion • Examples of Kleene algebras: • (2 S* , {}, S*, U, , *) • (2AxA, {}, {(x,x) | x in A}, U, , *) • (the set of nxn boolean matrices, zero matrix, Identity matrix, +, x, * )
Matrices • K: a Kleene algebra • M(n,K): the set of nxn matrices over K, is also a Kleene algebra. • Example: in M(2,K), the identities for + and • are • The operations +, • , and * are given by: (A.18) -->
Matrices (cont’d) • Find E* for a nxn matrix E over K: (by induction on n) • n=1 => M(n,K) = K, and E* = E*. • N > 1 => break E into E = • s.t. A D are squares, • say mxm and (n-m)x(n-m). • Since A and D are squares, by ind. Hyp., A* and D* are meaningful, it then make sense to define • E* = • Problem: how about E* if n = 3, 6,... ? --- (A.19)
Matrices (cont’d) • If E = ==> E* = ?