Conjunctive grammars generate non-regular unary languages Artur Je - - PowerPoint PPT Presentation

conjunctive grammars generate non regular unary languages
SMART_READER_LITE
LIVE PREVIEW

Conjunctive grammars generate non-regular unary languages Artur Je - - PowerPoint PPT Presentation

Conjunctive grammars generate non-regular unary languages Artur Je z August 21, 2007 Artur Je z Conjunctive grammars generate non-regular unary languages August 21, 2007 1 / 21 History Conjunctive grammars introduced in 2001 by A.


slide-1
SLIDE 1

Conjunctive grammars generate non-regular unary languages

Artur Je˙ z August 21, 2007

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 1 / 21

slide-2
SLIDE 2

History

Conjunctive grammars introduced in 2001 by A. Okhotin.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

slide-3
SLIDE 3

History

Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

slide-4
SLIDE 4

History

Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form A → α1&α2& . . . &αk, forαi ∈ (Σ ∪ N)∗ .

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

slide-5
SLIDE 5

History

Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form A → α1&α2& . . . &αk, forαi ∈ (Σ ∪ N)∗ . Intuition of the semantics:

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

slide-6
SLIDE 6

History

Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form A → α1&α2& . . . &αk, forαi ∈ (Σ ∪ N)∗ . Intuition of the semantics:

◮ w is derived such production iff it is derived by each αi Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

slide-7
SLIDE 7

History

Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form A → α1&α2& . . . &αk, forαi ∈ (Σ ∪ N)∗ . Intuition of the semantics:

◮ w is derived such production iff it is derived by each αi ◮ w is derived from αi = N1 · N2 · . . . · Nk iff w = w1w2 . . . wk and wj is

derived from Nj for each j

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

slide-8
SLIDE 8

Example

Example

Σ = {a, b, c} , N = {S, B, C, E, A} S → (AE)&(BC) A → aA|ǫ B → aBb|ǫ C → cC|ǫ E → bEc|ǫ

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 3 / 21

slide-9
SLIDE 9

Example

Example

Σ = {a, b, c} , N = {S, B, C, E, A} S → (AE)&(BC) A → aA|ǫ B → aBb|ǫ C → cC|ǫ E → bEc|ǫ {anbncn : n ∈ N} a∗ {anbn : n ∈ N} c∗ {bncn : n ∈ N}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 3 / 21

slide-10
SLIDE 10

Motivation

natural extension of CFG

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

slide-11
SLIDE 11

Motivation

natural extension of CFG very close connection to language equations

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

slide-12
SLIDE 12

Motivation

natural extension of CFG very close connection to language equations from possible extensions of CFG this keeps the meaning of language equations

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

slide-13
SLIDE 13

Motivation

natural extension of CFG very close connection to language equations from possible extensions of CFG this keeps the meaning of language equations good parsing properties

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

slide-14
SLIDE 14

Formal syntax

Definition

A conjunctive grammar is a Σ, N, S, P where

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

slide-15
SLIDE 15

Formal syntax

Definition

A conjunctive grammar is a Σ, N, S, P where Σ is a finite alphabet

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

slide-16
SLIDE 16

Formal syntax

Definition

A conjunctive grammar is a Σ, N, S, P where Σ is a finite alphabet N—set of non-terminal symbols

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

slide-17
SLIDE 17

Formal syntax

Definition

A conjunctive grammar is a Σ, N, S, P where Σ is a finite alphabet N—set of non-terminal symbols S—starting symbol

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

slide-18
SLIDE 18

Formal syntax

Definition

A conjunctive grammar is a Σ, N, S, P where Σ is a finite alphabet N—set of non-terminal symbols S—starting symbol P—set of productions of a form A → α1&α2& . . . &αk, αi ∈ (Σ ∪ N)∗

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

slide-19
SLIDE 19

Rewriting

Semantics

By term rewriting.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

slide-20
SLIDE 20

Rewriting

Semantics

By term rewriting. Generalizes the Chomsky rewriting.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

slide-21
SLIDE 21

Rewriting

Semantics

By term rewriting. Generalizes the Chomsky rewriting. Drawbacks

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

slide-22
SLIDE 22

Rewriting

Semantics

By term rewriting. Generalizes the Chomsky rewriting. Drawbacks There are more generalizations.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

slide-23
SLIDE 23

Rewriting

Semantics

By term rewriting. Generalizes the Chomsky rewriting. Drawbacks There are more generalizations. Slightly problematic to handle.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

slide-24
SLIDE 24

Language equations

Semantics

With each nonterminal A we associate a language LA.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

slide-25
SLIDE 25

Language equations

Semantics

With each nonterminal A we associate a language LA. The rule A → B&CD|a is replaced by LA = (LB ∩ LA · LD) ∪ {a}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

slide-26
SLIDE 26

Language equations

Semantics

With each nonterminal A we associate a language LA. The rule A → B&CD|a is replaced by LA = (LB ∩ LA · LD) ∪ {a} The language corresponding to the component LS in the least solution

  • f the system is a language of the grammar.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

slide-27
SLIDE 27

Language equations

Semantics

With each nonterminal A we associate a language LA. The rule A → B&CD|a is replaced by LA = (LB ∩ LA · LD) ∪ {a} The language corresponding to the component LS in the least solution

  • f the system is a language of the grammar.

Remark

In the CFG case the only allowed operations are ∪ and ·.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

slide-28
SLIDE 28

Example revisited

Example

Σ = {a, b, c} , N = {S, B, C, E, A} S → (AE)&(BC) A → aA|ǫ B → aBb|ǫ C → cC|ǫ E → bEc|ǫ

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 8 / 21

slide-29
SLIDE 29

Example revisited

Example

Σ = {a, b, c} , N = {S, B, C, E, A} S → (AE)&(BC) A → aA|ǫ B → aBb|ǫ C → cC|ǫ E → bEc|ǫ LS = (LA · LE) ∩ (LB · LC) LA = {a} · LA ∪ {ǫ} LB = {a} · LB · {b} ∪ {ǫ} LC = {c} · LC ∪ {ǫ} LE = {b} · LE · {c} ∪ {ǫ}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 8 / 21

slide-30
SLIDE 30

Example revisited

Example

Σ = {a, b, c} , N = {S, B, C, E, A} S → (AE)&(BC) A → aA|ǫ B → aBb|ǫ C → cC|ǫ E → bEc|ǫ LS = (LA · LE) ∩ (LB · LC) LA = {a} · LA ∪ {ǫ} LB = {a} · LB · {b} ∪ {ǫ} LC = {c} · LC ∪ {ǫ} LE = {b} · LE · {c} ∪ {ǫ} {anbncn : n ∈ N} a∗ {anbn : n ∈ N} c∗ {bncn : n ∈ N}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 8 / 21

slide-31
SLIDE 31

Basic results

Positive results Resolved language equations with ∪, ∩ and ·

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

slide-32
SLIDE 32

Basic results

Positive results Resolved language equations with ∪, ∩ and · Chomsky’s normal form

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

slide-33
SLIDE 33

Basic results

Positive results Resolved language equations with ∪, ∩ and · Chomsky’s normal form Efficient parsing by CYK

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

slide-34
SLIDE 34

Basic results

Positive results Resolved language equations with ∪, ∩ and · Chomsky’s normal form Efficient parsing by CYK High expressive power

Example

{wcw : w ∈ {a, b}∗}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

slide-35
SLIDE 35

Basic results

Positive results Resolved language equations with ∪, ∩ and · Chomsky’s normal form Efficient parsing by CYK High expressive power

Example

{wcw : w ∈ {a, b}∗} Negative results

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

slide-36
SLIDE 36

Basic results

Positive results Resolved language equations with ∪, ∩ and · Chomsky’s normal form Efficient parsing by CYK High expressive power

Example

{wcw : w ∈ {a, b}∗} Negative results Mainly open questions

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

slide-37
SLIDE 37

Problem

Problem

Do all conjunctive grammars over unary alphabet generate only regular languages?

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 10 / 21

slide-38
SLIDE 38

Problem

Problem

Do all conjunctive grammars over unary alphabet generate only regular languages? (This is true for CFG.)

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 10 / 21

slide-39
SLIDE 39

Problem

Problem

Do all conjunctive grammars over unary alphabet generate only regular languages? (This is true for CFG.)

Conjecture

Yes

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 10 / 21

slide-40
SLIDE 40

Problem

Problem

Do all conjunctive grammars over unary alphabet generate only regular languages? (This is true for CFG.)

Conjecture

Yes

Intuition

This should be true since regular sets are closed under concatenation

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 10 / 21

slide-41
SLIDE 41

Problem

Problem

Do all conjunctive grammars over unary alphabet generate only regular languages? (This is true for CFG.)

Conjecture

Yes

Intuition

This should be true since regular sets are closed under concatenation intersection

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 10 / 21

slide-42
SLIDE 42

Problem

Problem

Do all conjunctive grammars over unary alphabet generate only regular languages? (This is true for CFG.)

Conjecture

Yes

Intuition

This should be true since regular sets are closed under concatenation intersection union

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 10 / 21

slide-43
SLIDE 43

Result

Theorem (Disproving the conjecture)

Conjunctive grammars generate non-regular languages over unary alphabet.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 11 / 21

slide-44
SLIDE 44

Result

Theorem (Disproving the conjecture)

Conjunctive grammars generate non-regular languages over unary alphabet. {a4n : n ∈ N}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 11 / 21

slide-45
SLIDE 45

Result

Theorem (Disproving the conjecture)

Conjunctive grammars generate non-regular languages over unary alphabet. {a4n : n ∈ N}

Theorem (Extension)

For every regular language R ⊆{0, 1, . . . , k − 1}∗ language {an : ∃ w ∈ R w read as a number is n} is a unary conjunctive language.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 11 / 21

slide-46
SLIDE 46

Result

Theorem (Disproving the conjecture)

Conjunctive grammars generate non-regular languages over unary alphabet. {a4n : n ∈ N}

Theorem (Extension)

For every regular language R ⊆{0, 1, . . . , k − 1}∗ language {an : ∃ w ∈ R w read as a number is n} is a unary conjunctive language. Positional notation.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 11 / 21

slide-47
SLIDE 47

Language

Remark

We identify an with n and work with sets of integers.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 12 / 21

slide-48
SLIDE 48

Language

Remark

We identify an with n and work with sets of integers.

Solution

L1 = {1 · 4n : n ∈ N} , L2 = {2 · 4n : n ∈ N} , L3 = {3 · 4n : n ∈ N} , L12 = {6 · 4n : n ∈ N} .

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 12 / 21

slide-49
SLIDE 49

Language

Remark

We identify an with n and work with sets of integers.

Solution

L1 = {1 · 4n : n ∈ N} , L2 = {2 · 4n : n ∈ N} , L3 = {3 · 4n : n ∈ N} , L12 = {6 · 4n : n ∈ N} .

Equations

B1 = (B2B2 ∩ B1B3) ∪ {1} , B2 = (B12B2 ∩ B1B1) ∪ {2} , B3 = (B12B12 ∩ B1B2) ∪ {3} , B12 = (B3B3 ∩ B1B2) .

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 12 / 21

slide-50
SLIDE 50

Language

Remark

We identify an with n and work with sets of integers.

Solution

L1 = {1 · 4n : n ∈ N} , L2 = {2 · 4n : n ∈ N} , L3 = {3 · 4n : n ∈ N} , L12 = {6 · 4n : n ∈ N} .

Equations

B1 = (B2B2 ∩ B1B3) ∪ {1} , B2 = (B12B2 ∩ B1B1) ∪ {2} , B3 = (B12B12 ∩ B1B2) ∪ {3} , B12 = (B3B3 ∩ B1B2) . This effectively manipulates the positional notation.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 12 / 21

slide-51
SLIDE 51

What needs to be proved

By general knowledge there is a unique ǫ-free solution.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 13 / 21

slide-52
SLIDE 52

What needs to be proved

By general knowledge there is a unique ǫ-free solution. Vector of sets (. . . , Li, . . .) is ǫ-free.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 13 / 21

slide-53
SLIDE 53

What needs to be proved

By general knowledge there is a unique ǫ-free solution. Vector of sets (. . . , Li, . . .) is ǫ-free. We need to show that it is a solution.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 13 / 21

slide-54
SLIDE 54

What needs to be proved

By general knowledge there is a unique ǫ-free solution. Vector of sets (. . . , Li, . . .) is ǫ-free. We need to show that it is a solution.

Example

For example L1, the rule is B1 = (B2B2 ∩ B1B3) ∪ {1} So we want to prove that L1 = (L2L2 ∩ L1L3) ∪ {1}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 13 / 21

slide-55
SLIDE 55

Details–what is in B2B2

Proof.

What are the possible non-zero symbols in B2B2?

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 14 / 21

slide-56
SLIDE 56

Details–what is in B2B2

Proof.

What are the possible non-zero symbols in B2B2? 2 0 . . . 0 + 2 0 . . . 0 0 . . . 0 2 0 . . . 0 2 0 . . . 0

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 14 / 21

slide-57
SLIDE 57

Details–what is in B2B2

Proof.

What are the possible non-zero symbols in B2B2? 2 0 . . . 0 + 2 0 . . . 0 0 . . . 0 2 0 . . . 0 2 0 . . . 0 2 0 . . . 0 + 2 0 . . . 0 1 0 . . . 0

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 14 / 21

slide-58
SLIDE 58

Details–what is in B2B2

Proof.

What are the possible non-zero symbols in B2B2? 2 0 . . . 0 + 2 0 . . . 0 0 . . . 0 2 0 . . . 0 2 0 . . . 0 2 0 . . . 0 + 2 0 . . . 0 1 0 . . . 0 Either only 1 or {2, 2}.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 14 / 21

slide-59
SLIDE 59

Details–what is in B1B3

Proof.

What are the possible non-zero symbols in B1B3?

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 15 / 21

slide-60
SLIDE 60

Details–what is in B1B3

Proof.

What are the possible non-zero symbols in B1B3? 3 0 . . . 0 + 1 0 . . . 0 0 . . . 0 1 0 . . . 0 3 0 . . . 0

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 15 / 21

slide-61
SLIDE 61

Details–what is in B1B3

Proof.

What are the possible non-zero symbols in B1B3? 3 0 . . . 0 + 1 0 . . . 0 0 . . . 0 1 0 . . . 0 3 0 . . . 0 1 0 . . . 0 + 3 0 . . . 0 1 0 . . . 0

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 15 / 21

slide-62
SLIDE 62

Details–what is in B1B3

Proof.

What are the possible non-zero symbols in B1B3? 3 0 . . . 0 + 1 0 . . . 0 0 . . . 0 1 0 . . . 0 3 0 . . . 0 1 0 . . . 0 + 3 0 . . . 0 1 0 . . . 0 Either only 1 or {1, 3}.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 15 / 21

slide-63
SLIDE 63

Details–what is in B1B3

Proof.

What are the possible non-zero symbols in B1B3? 3 0 . . . 0 + 1 0 . . . 0 0 . . . 0 1 0 . . . 0 3 0 . . . 0 1 0 . . . 0 + 3 0 . . . 0 1 0 . . . 0 Either only 1 or {1, 3}. We compare this with 1 or {2, 2} from B2B2.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 15 / 21

slide-64
SLIDE 64

Details–what is in B1B3

Proof.

What are the possible non-zero symbols in B1B3? 3 0 . . . 0 + 1 0 . . . 0 0 . . . 0 1 0 . . . 0 3 0 . . . 0 1 0 . . . 0 + 3 0 . . . 0 1 0 . . . 0 Either only 1 or {1, 3}. We compare this with 1 or {2, 2} from B2B2. The only possibility is only 1.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 15 / 21

slide-65
SLIDE 65

First step: ij0∗

Theorem

For every k and 0 < i, j < k languages {an : ∃ w ∈ i0∗ w read as a number is n} {an : ∃ w ∈ ij0∗ w read as a number is n} are unary conjunctive languages.

Idea

Done in the same way.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 16 / 21

slide-66
SLIDE 66

First step: ij0∗

Theorem

For every k and 0 < i, j < k languages {an : ∃ w ∈ i0∗ w read as a number is n} {an : ∃ w ∈ ij0∗ w read as a number is n} are unary conjunctive languages.

Idea

Done in the same way. Nonterminal Bi,j for each language.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 16 / 21

slide-67
SLIDE 67

First step: ij0∗

Theorem

For every k and 0 < i, j < k languages {an : ∃ w ∈ i0∗ w read as a number is n} {an : ∃ w ∈ ij0∗ w read as a number is n} are unary conjunctive languages.

Idea

Done in the same way. Nonterminal Bi,j for each language. We focus on the leading symbols—the only non-zero symbols in ij0∗, that is i and j.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 16 / 21

slide-68
SLIDE 68

First step: ij0∗

Theorem

For every k and 0 < i, j < k languages {an : ∃ w ∈ i0∗ w read as a number is n} {an : ∃ w ∈ ij0∗ w read as a number is n} are unary conjunctive languages.

Idea

Done in the same way. Nonterminal Bi,j for each language. We focus on the leading symbols—the only non-zero symbols in ij0∗, that is i and j. Intersections of concatenations filter out wrong combination of leading symbols.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 16 / 21

slide-69
SLIDE 69

Second step: any regular language

Theorem

For every k and R ⊂ {0, . . . , k − 1}∗ {an : ∃ w ∈ R w read as a number is n} is a unary conjunctive language.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 17 / 21

slide-70
SLIDE 70

Second step: any regular language

Theorem

For every k and R ⊂ {0, . . . , k − 1}∗ {an : ∃ w ∈ R w read as a number is n} is a unary conjunctive language.

Idea

Let {0, . . . , , k − 1}, Q, q0, F, δ recognizes R.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 17 / 21

slide-71
SLIDE 71

Second step: any regular language

Theorem

For every k and R ⊂ {0, . . . , k − 1}∗ {an : ∃ w ∈ R w read as a number is n} is a unary conjunctive language.

Idea

Let {0, . . . , , k − 1}, Q, q0, F, δ recognizes R. We introduce nonterminal Bi,j,q for language {ijw : δ(q0, w) = q}

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 17 / 21

slide-72
SLIDE 72

Second step: any regular language

Theorem

For every k and R ⊂ {0, . . . , k − 1}∗ {an : ∃ w ∈ R w read as a number is n} is a unary conjunctive language.

Idea

Let {0, . . . , , k − 1}, Q, q0, F, δ recognizes R. We introduce nonterminal Bi,j,q for language {ijw : δ(q0, w) = q} Information the indices carry: leading symbol i second leading symbol j q—the computation of M on the rest of the word

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 17 / 21

slide-73
SLIDE 73

Productions for Bi,j,q

Example

Bi,j,q →

  • &4

n=1Bi−1,j+nBk−n,x,q ′

  • where x, q ′ such that q ∈ δ(q ′, x)

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 18 / 21

slide-74
SLIDE 74

Productions for Bi,j,q

Example

Bi,j,q →

  • &4

n=1Bi−1,j+nBk−n,x,q ′

  • where x, q ′ such that q ∈ δ(q ′, x)

k − n x

state q ′

  • . . .

+ i − 1 j + n 00 . . . 0 i j x . . . . . .

state q

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 18 / 21

slide-75
SLIDE 75

The result

Definition

Conjunctive grammar is a CFG extended by intersection in the body of the rules.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 19 / 21

slide-76
SLIDE 76

The result

Definition

Conjunctive grammar is a CFG extended by intersection in the body of the rules.

Theorem

For every regular language R ⊆ {0, 1, . . . , k − 1} language {an : ∃w ∈ R wread as a number is n} is a unary conjunctive language.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 19 / 21

slide-77
SLIDE 77

The result

Definition

Conjunctive grammar is a CFG extended by intersection in the body of the rules.

Theorem

For every regular language R ⊆ {0, 1, . . . , k − 1} language {an : ∃w ∈ R wread as a number is n} is a unary conjunctive language. In particular it generates non-regular languages.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 19 / 21

slide-78
SLIDE 78

The result

Definition

Conjunctive grammar is a CFG extended by intersection in the body of the rules.

Theorem

For every regular language R ⊆ {0, 1, . . . , k − 1} language {an : ∃w ∈ R wread as a number is n} is a unary conjunctive language. In particular it generates non-regular languages. We effectively manipulate positional notation.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 19 / 21

slide-79
SLIDE 79

Related topics and following work

Unambiguity of the language. The construction for R = ij0∗ can be made unambiguous. What happens in general?

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 20 / 21

slide-80
SLIDE 80

Related topics and following work

Unambiguity of the language. The construction for R = ij0∗ can be made unambiguous. What happens in general? The result can be extended to a larger class of languages [A. Jez,

  • A. Okhotin, CSR 2007].

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 20 / 21

slide-81
SLIDE 81

Related topics and following work

Unambiguity of the language. The construction for R = ij0∗ can be made unambiguous. What happens in general? The result can be extended to a larger class of languages [A. Jez,

  • A. Okhotin, CSR 2007].

Instead of grammars we can focus on sets of integers. Equations

  • n sets of integers using ∩, ∪ and + defined as

A + B = {a + b : a ∈ A, b ∈ B} . [A. Jez, A. Okhotin, TALE 2007].

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 20 / 21

slide-82
SLIDE 82

Open questions General properties of conjunctive grammars

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 21 / 21

slide-83
SLIDE 83

Open questions General properties of conjunctive grammars

◮ closure under complementation Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 21 / 21

slide-84
SLIDE 84

Open questions General properties of conjunctive grammars

◮ closure under complementation ◮ better recognition (space/time) Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 21 / 21

slide-85
SLIDE 85

Open questions General properties of conjunctive grammars

◮ closure under complementation ◮ better recognition (space/time) ◮ inherent ambiguity Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 21 / 21

slide-86
SLIDE 86

Open questions General properties of conjunctive grammars

◮ closure under complementation ◮ better recognition (space/time) ◮ inherent ambiguity

Unambiguity of the constructed unary languages

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 21 / 21

slide-87
SLIDE 87

Open questions General properties of conjunctive grammars

◮ closure under complementation ◮ better recognition (space/time) ◮ inherent ambiguity

Unambiguity of the constructed unary languages Closure under complementation in the unary case.

Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 21 / 21