Partially - Commutative Context - Free Languages Wojciech Czerwi ski - - PowerPoint PPT Presentation

partially commutative context free languages
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Partially-Commutative Context-Free Languages

Wojciech Czerwiński Sławomir Lasota

G∀MES 2010

slide-2
SLIDE 2

Outline

slide-3
SLIDE 3

Outline

  • Context Free Languages + different notions of

commutativity (PCCFL)

slide-4
SLIDE 4

Outline

  • Context Free Languages + different notions of

commutativity (PCCFL)

  • Examples
slide-5
SLIDE 5

Outline

  • Context Free Languages + different notions of

commutativity (PCCFL)

  • Examples
  • Our results (expressivity, pumping lemmas)
slide-6
SLIDE 6

Outline

  • Context Free Languages + different notions of

commutativity (PCCFL)

  • Examples
  • Our results (expressivity, pumping lemmas)
  • Further research
slide-7
SLIDE 7

X XBC Greibach normal form a

Context-Free Languages

Left derivation

slide-8
SLIDE 8

X XBC Greibach normal form a

Context-Free Languages

Left derivation

slide-9
SLIDE 9

X XBC a

Context-Free Languages

slide-10
SLIDE 10

X XBC a B C b c X BC a ε ε

Context-Free Languages

slide-11
SLIDE 11

X XBC a B C b c X BC a ε ε L(X) = ⋃n≥1 an (bc)n

Context-Free Languages

slide-12
SLIDE 12

X XBC a B C b c X BC a ε ε

Context-Free Languages

slide-13
SLIDE 13

X XBC a B C b c X BC a ε ε

Context-Free Languages Commutative

slide-14
SLIDE 14

X XBC a B C b c L(X) = #a = #b = #c a „preceds” b and c X BC a ε ε

Context-Free Languages Commutative

slide-15
SLIDE 15

Mixing sequentiality with commutativity

slide-16
SLIDE 16

Mixing sequentiality with commutativity

Three different notions

slide-17
SLIDE 17

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

slide-18
SLIDE 18

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

slide-19
SLIDE 19

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

slide-20
SLIDE 20

PA languages

slide-21
SLIDE 21

PA languages

S P;C a

slide-22
SLIDE 22

PA languages

S P;C a S s ε

slide-23
SLIDE 23

PA languages

S P;C a P S || D b S s ε

slide-24
SLIDE 24

PA languages

S P;C a P S || D b C c ε S s ε

slide-25
SLIDE 25

PA languages

S P;C a P S || D b C c ε D d ε S s ε

slide-26
SLIDE 26

PA languages

S P;C a P S || D b C c ε D d ε S s ε S

slide-27
SLIDE 27

PA languages

S P;C a P S || D b C c ε D d ε S s ε S; a P C

slide-28
SLIDE 28

PA languages

S P;C a P S || D b C c ε D d ε S s ε S b|| S D ; a P C

slide-29
SLIDE 29

PA languages

S P;C a P S || D b C c ε D d ε S s ε S b|| S D ; a P C ε s

slide-30
SLIDE 30

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

slide-31
SLIDE 31

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

slide-32
SLIDE 32

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

slide-33
SLIDE 33

PCCFL

slide-34
SLIDE 34

PCCFL

  • V - nonterminal symbols (V = {X,B,C})
slide-35
SLIDE 35

PCCFL

  • V - nonterminal symbols (V = {X,B,C})
  • set of transitions (X XBC, ...)

a

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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

slide-38
SLIDE 38

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

slide-39
SLIDE 39

PCCFL example

slide-40
SLIDE 40

PCCFL example

P WBCT a

slide-41
SLIDE 41

PCCFL example

P WBCT a W WBC a

slide-42
SLIDE 42

PCCFL example

P WBCT a W WBC a W U s

slide-43
SLIDE 43

PCCFL example

P WBCT a W WBC a W U s B b ε

slide-44
SLIDE 44

PCCFL example

P WBCT a W WBC a W U s B b ε C c ε

slide-45
SLIDE 45

PCCFL example

P WBCT a W WBC a W U s B b ε C c ε T t ε

slide-46
SLIDE 46

PCCFL example

P WBCT a W WBC a W U s B b ε C c ε T t ε U u ε

slide-47
SLIDE 47

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 ε

slide-48
SLIDE 48

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

slide-49
SLIDE 49

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

slide-50
SLIDE 50

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

slide-51
SLIDE 51

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

slide-52
SLIDE 52

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

slide-53
SLIDE 53

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

slide-54
SLIDE 54

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

slide-55
SLIDE 55

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

slide-56
SLIDE 56

transitive PCCFL

slide-57
SLIDE 57

transitive PCCFL

  • dependence relation D = V×V∖I
slide-58
SLIDE 58

transitive PCCFL

  • dependence relation D = V×V∖I
  • transitive dependence relation D
slide-59
SLIDE 59

transitive PCCFL

  • dependence relation D = V×V∖I
  • transitive dependence relation D
  • equivalence class of D - thread
slide-60
SLIDE 60

Example of transitive PCCFL

S ε s

slide-61
SLIDE 61

Example of transitive PCCFL

S ε s S SA a

slide-62
SLIDE 62

Example of transitive PCCFL

S ε s S SA a S SB b

slide-63
SLIDE 63

Example of transitive PCCFL

S ε s S SA a S SB b A c A ’

slide-64
SLIDE 64

Example of transitive PCCFL

S ε s S SA a S SB b A c A ’ B c B’

slide-65
SLIDE 65

Example of transitive PCCFL

S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε

slide-66
SLIDE 66

Example of transitive PCCFL

S ε s S SA a S SB b A c A ’ B c B’ A ’ a ε B’ b ε

slide-67
SLIDE 67

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’}

slide-68
SLIDE 68

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

slide-69
SLIDE 69

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

slide-70
SLIDE 70

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

slide-71
SLIDE 71

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

slide-72
SLIDE 72

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

slide-73
SLIDE 73

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

slide-74
SLIDE 74

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

slide-75
SLIDE 75

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’

slide-76
SLIDE 76

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’

slide-77
SLIDE 77

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’

slide-78
SLIDE 78

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’

slide-79
SLIDE 79

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’

slide-80
SLIDE 80

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’

slide-81
SLIDE 81

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’

slide-82
SLIDE 82

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’

slide-83
SLIDE 83

Our results

PA tPCCFL PCCFL

slide-84
SLIDE 84

Our results

  • pumping lemma for transitive PCCFL

PA tPCCFL PCCFL

slide-85
SLIDE 85

Our results

  • pumping lemma for transitive PCCFL
  • transitive PCCFL is a strict subclass of PCCFL

PA tPCCFL PCCFL L1

slide-86
SLIDE 86

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

slide-87
SLIDE 87

Pumping lemma for transitive PCCFL

slide-88
SLIDE 88

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

slide-89
SLIDE 89

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

slide-90
SLIDE 90

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

slide-91
SLIDE 91

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

slide-92
SLIDE 92

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

slide-93
SLIDE 93

Pumping lemmas

Regular Languages Context-Free Languages Commutative Context-Free Languages transitive Partiay-Commutative Context-Free Languages and PA Languages

slide-94
SLIDE 94

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

slide-95
SLIDE 95

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

slide-96
SLIDE 96

Example languages

PA tPCCFL PCCFL

slide-97
SLIDE 97

Example languages

PA tPCCFL PCCFL L1

slide-98
SLIDE 98

Example languages

PA tPCCFL PCCFL L1 L2

slide-99
SLIDE 99

Example languages

PA tPCCFL PCCFL L1 L2 L3

slide-100
SLIDE 100

L1 (tPCCFL ⊊ PCCFL)

L1 PA tPCCFL PCCFL

slide-101
SLIDE 101

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

slide-102
SLIDE 102

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)

slide-103
SLIDE 103

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)

slide-104
SLIDE 104

L2 (tPCCFL ⊈ PA)

L2 PA tPCCFL PCCFL

slide-105
SLIDE 105

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

slide-106
SLIDE 106

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)

slide-107
SLIDE 107

L3 (PA ⊈ tPCCFL)

L3 PA tPCCFL PCCFL

slide-108
SLIDE 108

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

slide-109
SLIDE 109

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)

slide-110
SLIDE 110

Further research

slide-111
SLIDE 111

Further research

  • PA ⊈ PCCFL (not only tPCCFL)? Maybe L3
slide-112
SLIDE 112

Further research

  • PA ⊈ PCCFL (not only tPCCFL)? Maybe L3
  • corresponding automata model (stateless

automata with multiply stacks)

slide-113
SLIDE 113

Further research

  • PA ⊈ PCCFL (not only tPCCFL)? Maybe L3
  • corresponding automata model (stateless

automata with multiply stacks)

  • applications in modeling (multiply threads

architecture)

slide-114
SLIDE 114

Thank you!