Presentation is loading. Please wait.

Presentation is loading. Please wait.

01/12 Examples M=({p,q,r,s},{a,b},,p,{q,r}) a b p q r p q q q s

Similar presentations


Presentation on theme: "01/12 Examples M=({p,q,r,s},{a,b},,p,{q,r}) a b p q r p q q q s"— Presentation transcript:

1 01/12 Examples M=({p,q,r,s},{a,b},,p,{q,r}) a b p q r p q q q s
r s r r s s s s • *(p,ab)=(*(p,a),b) =((*(p,),a),b)=((p,a),b) =(q,b)=sF. Thus abL(M). • (p,ab) (q,b) (s,). • *(p,aa)=qF. Thus aaL(M). • (p,aaa) (q,aa) (q,a) (q,). • L(M)=a+b+ ={an |n1}{bn |n1}. a a b b a b a,b •  L 

2 FAs with Partial s.t.f. a b p q r p q q q r r r Is this an FA?  No!
But …  This is an FA with partial state transition function, where : QQ’Q is a partial function. THEOREM L(FA)=L(FA with part. s.t.f.). a a b b

3 Partial Functions and Total Functions
If f: XY is a function (mapping) or total function, then f(x) is defined for any x in X. If f: XY is a partial function (mapping), then f(x) may be undefined for some x in X. Ex. Define f: NN by f(x)=y s.t. x=y2. Then f(1)=1, f(4)=2, f(9)=3, …. But f(2), f(3), f(5), … are not defined.

4 (Reflexive and) Transitive Closure of a Binary Relation
R,SAA: binary relations on A The composite of R and S: SR = {(a,c) | (a,b) in R, (b,c) in S, for some c in A}. n-th power of R R0 = {(a,a) | a in A}, Rn+1 = RnR if n>0. The transitive closure of R: R+ = R1R2R3… The reflexive transitive closure of R: R* = R0R1R2… •  L 

5 Reflexive and Transitive Closures (2)
A recursive definition of R*: (a,a)R* for any aA. (a,b)R* & (b,c)R(a,c)R* A recursive definition of R+: (a,b)R(a,b)R+ (a,b)R+ & (b,c)R(a,c)R+ THEOREM (i) (a,b)R+ (a,b1)R, (b1,b2)R, …, (bk-1,bk)R, (bk,b)R for some b1,…,bk. (ii) (a,b)R* Either a=b or (a,b)R+.

6 Examples of R* and R+ R={(a,b), (a,c), (b,c), (c,a)}
R0={(a,a),(b,b),(c,c)} R1=R, R2={(a,c),(a,a),(b,a),(c,b)} R3={(a,a),(a,b),(a,c),(b,b), (b,c),(c,c)}=R0R1 R*=R+={a,b,c}{a,b,c} Consider the digraph represenation of binary relations. For integers n and m, define nRmm=n+1. Then nRkmm=n+k, nR+mn<m, and nR*mnm.


Download ppt "01/12 Examples M=({p,q,r,s},{a,b},,p,{q,r}) a b p q r p q q q s"

Similar presentations


Ads by Google