Partially - Commutative Context - Free Languages Wojciech Czerwi ski - - PowerPoint PPT Presentation
Partially - Commutative Context - Free Languages Wojciech Czerwi ski - - PowerPoint PPT Presentation
Partially - Commutative Context - Free Languages Wojciech Czerwi ski S awomir Lasota G MES 2010 Outline Outline Context Free Languages + di ff erent notions of commutativity ( PCCFL ) Outline Context Free Languages + di ff erent
Outline
Outline
- Context Free Languages + different notions of
commutativity (PCCFL)
Outline
- Context Free Languages + different notions of
commutativity (PCCFL)
- Examples
Outline
- Context Free Languages + different notions of
commutativity (PCCFL)
- Examples
- Our results (expressivity, pumping lemmas)
Outline
- Context Free Languages + different notions of
commutativity (PCCFL)
- Examples
- Our results (expressivity, pumping lemmas)
- Further research
X XBC Greibach normal form a
Context-Free Languages
Left derivation
X XBC Greibach normal form a
Context-Free Languages
Left derivation
X XBC a
Context-Free Languages
X XBC a B C b c X BC a ε ε
Context-Free Languages
X XBC a B C b c X BC a ε ε L(X) = ⋃n≥1 an (bc)n
Context-Free Languages
X XBC a B C b c X BC a ε ε
Context-Free Languages
X XBC a B C b c X BC a ε ε
Context-Free Languages Commutative
X XBC a B C b c L(X) = #a = #b = #c a „preceds” b and c X BC a ε ε
Context-Free Languages Commutative
Mixing sequentiality with commutativity
Mixing sequentiality with commutativity
Three different notions
Mixing sequentiality with commutativity
- X (Y
;Z) || W L(X) = a((L(Y)‧L(Z) || L(W)) PA languages (CFL with interleaving) aThree different notions
Mixing sequentiality with commutativity
- X (Y
;Z) || W L(X) = a((L(Y)‧L(Z) || L(W)) PA languages (CFL with interleaving)
- X YZ + relation on nonterminals
Partially Commutative CFL (PCCFL) a a
Three different notions
Mixing sequentiality with commutativity
- X (Y
;Z) || W L(X) = a((L(Y)‧L(Z) || L(W)) PA languages (CFL with interleaving)
- X YZ + relation on nonterminals
Partially Commutative CFL (PCCFL)
- X YZ + plus relation on terminals
Mazurkiewicz traces a a a
Three different notions
PA languages
PA languages
S P;C a
PA languages
S P;C a S s ε
PA languages
S P;C a P S || D b S s ε
PA languages
S P;C a P S || D b C c ε S s ε
PA languages
S P;C a P S || D b C c ε D d ε S s ε
PA languages
S P;C a P S || D b C c ε D d ε S s ε S
PA languages
S P;C a P S || D b C c ε D d ε S s ε S; a P C
PA languages
S P;C a P S || D b C c ε D d ε S s ε S b|| S D ; a P C
PA languages
S P;C a P S || D b C c ε D d ε S s ε S b|| S D ; a P C ε s
PA languages
S P;C a P S || D b C c ε D d ε S s ε S b|| S D ; a P C d ε ε s
PA languages
S P;C a P S || D b C c ε D d ε S s ε S b|| S D ; a P C c ε d ε ε s
PA languages
S P;C a P S || D b C c ε D d ε S s ε absdc, abdsc ∊ L(S) S b|| S D ; a P C c ε d ε ε s
PCCFL
PCCFL
- V - nonterminal symbols (V = {X,B,C})
PCCFL
- V - nonterminal symbols (V = {X,B,C})
- set of transitions (X XBC, ...)
a
PCCFL
- V - nonterminal symbols (V = {X,B,C})
- set of transitions (X XBC, ...)
- symmetric independence relation I⊆ V×V
(I = {(B,C),(C,B)}) a
PCCFL
- V - nonterminal symbols (V = {X,B,C})
- set of transitions (X XBC, ...)
- symmetric independence relation I⊆ V×V
(I = {(B,C),(C,B)})
- context-free grammar ⇒ I = ∅
a
PCCFL
- V - nonterminal symbols (V = {X,B,C})
- set of transitions (X XBC, ...)
- symmetric independence relation I⊆ V×V
(I = {(B,C),(C,B)})
- context-free grammar ⇒ I = ∅
- commutative context-free grammar ⇒ I = V×V
a
PCCFL example
PCCFL example
P WBCT a
PCCFL example
P WBCT a W WBC a
PCCFL example
P WBCT a W WBC a W U s
PCCFL example
P WBCT a W WBC a W U s B b ε
PCCFL example
P WBCT a W WBC a W U s B b ε C c ε
PCCFL example
P WBCT a W WBC a W U s B b ε C c ε T t ε
PCCFL example
P WBCT a W WBC a W U s B b ε C c ε T t ε U u ε
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε P
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε P W(BC)3T a3
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε P W(BC)3T a3 s U(BC)3T
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε P W(BC)3T a3 s U(BC)3T ~I B3TUC3
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε P W(BC)3T a3 TUC3 b3 s U(BC)3T ~I B3TUC3
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε P W(BC)3T a3 TUC3 b3 C3 tu s U(BC)3T ~I B3TUC3
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε P W(BC)3T a3 TUC3 b3 C3 tu c3 ε s U(BC)3T ~I B3TUC3
PCCFL example
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} a3sb3tuc3∊L(P) B b ε C c ε T t ε U u ε P W(BC)3T a3 TUC3 b3 C3 tu c3 ε s U(BC)3T ~I B3TUC3
transitive PCCFL
transitive PCCFL
- dependence relation D = V×V∖I
transitive PCCFL
- dependence relation D = V×V∖I
- transitive dependence relation D
transitive PCCFL
- dependence relation D = V×V∖I
- transitive dependence relation D
- equivalence class of D - thread
Example of transitive PCCFL
S ε s
Example of transitive PCCFL
S ε s S SA a
Example of transitive PCCFL
S ε s S SA a S SB b
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’}
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA A ’BA
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA A ’BA~ BAA’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA A ’BA c B’AA ’ ~ BAA’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA A ’BA c B’AA ’ b AA ’ ~ BAA’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA A ’BA c B’AA ’ b AA ’ c A ’A ’ ~ BAA’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA A ’BA c B’AA ’ b AA ’ c A ’A ’ a A ’ ~ BAA’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} S SA a b SBA a SABA s ABA c A ’BA A ’BA c B’AA ’ b AA ’ c A ’A ’ a A ’ a ε ~ BAA’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} L = L(S) without letters c S SA a b SBA a SABA s ABA c A ’BA A ’BA c B’AA ’ b AA ’ c A ’A ’ a A ’ a ε ~ BAA’
Example of transitive PCCFL
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} L = L(S) without letters c L = {wsv: w,v∊{a,b}*, #w(a)=#v(a), #w(b)=#v(b)} S SA a b SBA a SABA s ABA c A ’BA A ’BA c B’AA ’ b AA ’ c A ’A ’ a A ’ a ε ~ BAA’
Our results
PA tPCCFL PCCFL
Our results
- pumping lemma for transitive PCCFL
PA tPCCFL PCCFL
Our results
- pumping lemma for transitive PCCFL
- transitive PCCFL is a strict subclass of PCCFL
PA tPCCFL PCCFL L1
Our results
- pumping lemma for transitive PCCFL
- transitive PCCFL is a strict subclass of PCCFL
- transitive PCCFL and PA languages are
incomparable PA tPCCFL PCCFL L1 L2 L3
Pumping lemma for transitive PCCFL
Pumping lemma for transitive PCCFL
For any transitive PCCFL language L there is some n≥0 such that any w in L of length at least n may be split into words w=xyz, so that there exists words t and u such that tu≠ε and for each m≥0, xtmyumz ∊L
Pumping lemma for transitive PCCFL
For any transitive PCCFL language L there is some n≥0 such that any w in L of length at least n may be split into words w=xyz, so that there exists words t and u such that tu≠ε and for each m≥0, xtmyumz ∊L Properties
Pumping lemma for transitive PCCFL
For any transitive PCCFL language L there is some n≥0 such that any w in L of length at least n may be split into words w=xyz, so that there exists words t and u such that tu≠ε and for each m≥0, xtmyumz ∊L
- there are two places for new words
Properties
Pumping lemma for transitive PCCFL
For any transitive PCCFL language L there is some n≥0 such that any w in L of length at least n may be split into words w=xyz, so that there exists words t and u such that tu≠ε and for each m≥0, xtmyumz ∊L
- there are two places for new words
- t and u are arbitrary words
Properties
Pumping lemma for transitive PCCFL
For any transitive PCCFL language L there is some n≥0 such that any w in L of length at least n may be split into words w=xyz, so that there exists words t and u such that tu≠ε and for each m≥0, xtmyumz ∊L
- there are two places for new words
- t and u are arbitrary words
- the same lemma holds for PA languages
Properties
Pumping lemmas
Regular Languages Context-Free Languages Commutative Context-Free Languages transitive Partiay-Commutative Context-Free Languages and PA Languages
Pumping lemmas
Regular Languages Context-Free Languages Commutative Context-Free Languages transitive Partiay-Commutative Context-Free Languages and PA Languages
words from word w arbitrary words
Pumping lemmas
Regular Languages Context-Free Languages Commutative Context-Free Languages transitive Partiay-Commutative Context-Free Languages and PA Languages
two places
- ne place
words from word w arbitrary words
Example languages
PA tPCCFL PCCFL
Example languages
PA tPCCFL PCCFL L1
Example languages
PA tPCCFL PCCFL L1 L2
Example languages
PA tPCCFL PCCFL L1 L2 L3
L1 (tPCCFL ⊊ PCCFL)
L1 PA tPCCFL PCCFL
L1 (tPCCFL ⊊ PCCFL)
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε L1 PA tPCCFL PCCFL
L1 (tPCCFL ⊊ PCCFL)
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε L1 PA tPCCFL PCCFL =L(P)
L1 (tPCCFL ⊊ PCCFL)
P WBCT a W WBC a W U s I = {(B,C),(T,C),(B,U),(T,U),...} B b ε C c ε T t ε U u ε L1 Pumping lemma for tPCCFL (also for PA) PA tPCCFL PCCFL =L(P)
L2 (tPCCFL ⊈ PA)
L2 PA tPCCFL PCCFL
L2 (tPCCFL ⊈ PA)
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε L2 Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} PA tPCCFL PCCFL
L2 (tPCCFL ⊈ PA)
S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε L2 Equivalence classes of D - threads = {S, A, B}, {A ’}, {B’} PA tPCCFL PCCFL =L(S)
L3 (PA ⊈ tPCCFL)
L3 PA tPCCFL PCCFL
L3 (PA ⊈ tPCCFL)
S P;C a P S || D b A a ε B b ε C c ε D d ε S s ε L3 PA tPCCFL PCCFL
L3 (PA ⊈ tPCCFL)
S P;C a P S || D b A a ε B b ε C c ε D d ε S s ε L3 PA tPCCFL PCCFL =L(S)
Further research
Further research
- PA ⊈ PCCFL (not only tPCCFL)? Maybe L3
Further research
- PA ⊈ PCCFL (not only tPCCFL)? Maybe L3
- corresponding automata model (stateless
automata with multiply stacks)
Further research
- PA ⊈ PCCFL (not only tPCCFL)? Maybe L3
- corresponding automata model (stateless
automata with multiply stacks)
- applications in modeling (multiply threads