On the commutative equivalence of bounded context-free and regular - - PowerPoint PPT Presentation

on the commutative equivalence of bounded context free
SMART_READER_LITE
LIVE PREVIEW

On the commutative equivalence of bounded context-free and regular - - PowerPoint PPT Presentation

On the commutative equivalence of bounded context-free and regular languages F. DAlessandro 1 B. Intrigila 2 1 Dipartimento di Matematica G. Castelnuovo Universit` a di Roma La Sapienza 2 Dipartimento di Matematica Universit` a


slide-1
SLIDE 1

On the commutative equivalence of bounded context-free and regular languages

  • F. D’Alessandro1
  • B. Intrigila2

1Dipartimento di Matematica “G. Castelnuovo”

Universit` a di Roma “La Sapienza”

2Dipartimento di Matematica

Universit` a di Roma “Tor Vergata”

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 1/30

slide-2
SLIDE 2

Main result

Every bounded context-free language L1 is commutatively equivalent to a regular language L2

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 2/30

slide-3
SLIDE 3

Main result

Every bounded context-free language L1 is commutatively equivalent to a regular language L2 There exists a bijection f : L1 − → L2 such that, for every u ∈ L1, u and f(u) have the same Parikh vector

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 2/30

slide-4
SLIDE 4

Overview of the presentation

◮ Bounded and sparse context-free languages ◮ The problem ◮ Outline of the solution

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 3/30

slide-5
SLIDE 5

Bounded languages

Definition Let L ⊆ A∗. L is called n-bounded if there exist n words u1, u2, . . . , un such that L ⊆ u∗

1u∗ 2 · · · u∗ n.

L is called bounded if it is n-bounded for some n

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 4/30

slide-6
SLIDE 6

Sparse languages

L ⊆ A∗ The counting function of L is the map cL : N − → N such that cL(n) = Card(L ∩ An)

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 5/30

slide-7
SLIDE 7

Sparse and bounded languages

Definition L is sparse or poly-slender if cL(n) is upper bounded by a polynomial

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 6/30

slide-8
SLIDE 8

Sparse and bounded languages

Definition L is sparse or poly-slender if cL(n) is upper bounded by a polynomial Theorem (Latteux and Thierrin 1984; Ibarra and Ravikumar, 1986; Raz 1997; Ilie, Rozenberg and Salomaa 2000) A context-free language is sparse if and only if it is bounded

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 6/30

slide-9
SLIDE 9

Sparse and bounded languages

Theorem (D’Alessandro, Intrigila, and Varricchio, 2006) Let L be a bounded context-free language over the alphabet A Then there exists a regular language L′ over an alphabet B such that, for all n ≥ 0, cL(n) = cL′(n)

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 7/30

slide-10
SLIDE 10

The problem

◮ Commutative Equivalence of languages ◮ Our problem ◮ Some classical theorems on bounded context-free languages

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 8/30

slide-11
SLIDE 11

The Parikh morphism

◮ A = {a1, . . . , at} ◮ ψ : A∗ −

→ Nt

◮ ∀u ∈ A∗,

ψ(u) = (|u|a1, |u|a2, . . . , |u|at)

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 9/30

slide-12
SLIDE 12

Commutative Equivalence

Let L1, L2 ⊆ A∗ L1 is commutatively equivalent to L2 if there exists a bijection f : L1 − → L2 such that, for every u ∈ L1, ψ(u) = ψ(f(u))

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 10/30

slide-13
SLIDE 13

Main result

Theorem (D.I. 2011) Let L1 ⊆ u∗

1 · · · u∗ k be bounded context-free language.

Then L1 is commutatively equivalent to a regular language L2

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 11/30

slide-14
SLIDE 14

Main result

Theorem (D.I. 2011) Let L1 ⊆ u∗

1 · · · u∗ k be bounded context-free language.

Then L1 is commutatively equivalent to a regular language L2

Obstruction:

◮ inherently ambiguity of bounded context-free languages ◮ ambiguity of the product u∗ 1 · · · u∗ k in the free monoid A∗

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 11/30

slide-15
SLIDE 15

Some classical theorems on bounded context-free languages

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 12/30

slide-16
SLIDE 16

Parikh Theorem

◮ Definition

Given languages L1, L2 ⊆ A∗, L1 is letter-equivalent (or Parikh equivalent) to L2 if ψ(L1) = ψ(L2).

◮ Theorem (Parikh, 1966)

Given a context-free language L1, there exists a regular language L2 which is letter-equivalent to L1

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 13/30

slide-17
SLIDE 17

Parikh Theorem

◮ L1 = (ab)∗ ∪ (ba)∗ ,

L2 = (ab)∗

◮ ψ(L1) = ψ(L2) = {(n, n) : n ∈ N} ◮ L1 cannot be commutatively equivalent to L2

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 14/30

slide-18
SLIDE 18

Ginsburg Theorems

Given words u1, . . . , uk ∈ A+, we define the function: φ : Nk − → u∗

1u∗ 2 · · · u∗ k,

such that, for every (n1, . . . , nk) ∈ Nk, φ(n1, . . . , nk) = un1

1 un2 2 · · · unk k

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 15/30

slide-19
SLIDE 19

Ginsburg Theorems

φ : Nk − → u∗

1u∗ 2 · · · u∗ k,

φ(n1, . . . , nk) = un1

1 un2 2 · · · unk k

Theorem (Ginsburg 1966) L ⊆ u∗

1u∗ 2 · · · u∗ k

L is context-free iff φ−1(L) is a finite union of linear sets, each having a stratified sets of periods

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 16/30

slide-20
SLIDE 20

Ginsburg Theorems

Theorem (Ginsburg, 1966) L ⊆ u∗

1u∗ 2 · · · u∗ k

context-free L is unambiguous iff φ−1(L) is a finite union of disjoint linear sets, each with stratified and linearly independent periods L = {aibjck | i, j, k ∈ N, i = j or j = k} is ambiguous

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 17/30

slide-21
SLIDE 21

Outline of the solution

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 18/30

slide-22
SLIDE 22

Inherent ambiguity of L

  • 1. Faithful representation of L by a semilinear set
  • 2. “Geometrical decomposition of semi-linear sets”

[ D’Alessandro, Intrigila, and Varricchio, 2010, Quasi-polynomials, linear Diophantine equations and semi-linear sets, to appear in Theoret. Comput. Sci.]

Ambiguity of u∗

1 · · · u∗ n

  • 3. Arguments of Combinatorics of variable-length codes
  • 4. Arguments of elementary number theory
  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 19/30

slide-23
SLIDE 23

Faithful representation by semilinear set

Theorem ( Eilenberg Cross-section, 1974) Let α : A∗ → B∗ be a morphism and let L be a rational language

  • f A∗. There exists a rational subset L′ of L such that α maps

bijectively L′ of α(L) Theorem (Eilenberg and Sch¨ utzenberger, 1969) Every semi-linear set is represented as a finite and disjoint union of unambiguous linear sets

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 20/30

slide-24
SLIDE 24

Faithful representation by semilinear set

Theorem ( Eilenberg Cross-section, 1974) Let α : A∗ → B∗ be a morphism and let L be a rational language

  • f A∗. There exists a rational subset L′ of L such that α maps

bijectively L′ of α(L) Theorem (Eilenberg and Sch¨ utzenberger, 1969) Every semi-linear set is represented as a finite and disjoint union of unambiguous linear sets Every semi-linear set is semi-simple set

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 20/30

slide-25
SLIDE 25

Faithful representation by semilinear set

φ : Nk − → u∗

1u∗ 2 · · · u∗ k,

φ(n1, . . . , nk) = un1

1 un2 2 · · · unk k

Theorem If L is bounded context-free, then there exists a semi-simple set B

  • f Nk such that

φ(B) = L and φ is injective on B

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 21/30

slide-26
SLIDE 26

The basic case

φ : Nk − → u∗

1u∗ 2 · · · u∗ k,

φ(B) = L B = {b0 + b1n1 + · · · + bmnm : ni ∈ N} b0, b1, . . . , bm ∈ Nk

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 22/30

slide-27
SLIDE 27

The basic case

φ(B) = L B = {b0 + b1n1 + · · · + bmnm : ni ∈ N}

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 23/30

slide-28
SLIDE 28

The basic case

φ(B) = L B = {b0 + b1n1 + · · · + bmnm : ni ∈ N} u = φ(b0 + n1b1 + · · · + nmbm)

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 23/30

slide-29
SLIDE 29

The basic case

φ(B) = L B = {b0 + b1n1 + · · · + bmnm : ni ∈ N} u = φ(b0 + n1b1 + · · · + nmbm) Because of some elementary properties of φ and ψ, one has:

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 23/30

slide-30
SLIDE 30

The basic case

φ(B) = L B = {b0 + b1n1 + · · · + bmnm : ni ∈ N} u = φ(b0 + n1b1 + · · · + nmbm) Because of some elementary properties of φ and ψ, one has: ψ(u) = ψ(φ(b0)) + n1ψ(φ(b1)) + · · · + nmψ(φ(bm))

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 23/30

slide-31
SLIDE 31

The basic case

The latter formula suggests that a natural candidate for the commutative equivalence of L is: L′ = φ(b0)φ(b1)∗ · · · φ(bm)∗

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 24/30

slide-32
SLIDE 32

The basic case

Indeed, taking L′ = φ(b0)φ(b1)∗ · · · φ(bm)∗

  • ne defines the function

f : L − → L′ as: f(u) = f(φ(b0 + n1b1+· · · + nmbm)) =

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 25/30

slide-33
SLIDE 33

The basic case

Indeed, taking L′ = φ(b0)φ(b1)∗ · · · φ(bm)∗

  • ne defines the function

f : L − → L′ as: f(u) = f(φ(b0 + n1b1+· · · + nmbm)) = φ(b0)φ(b1)n1 · · · φ(bm)nm

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 25/30

slide-34
SLIDE 34

The basic case

f(u) = φ(b0)φ(b1)n1 · · · φ(bm)nm

◮ f is a surjective map from L to L′ ◮ ∀ u ∈ L, ψ(u) = ψ(f(u))

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 26/30

slide-35
SLIDE 35

The basic case

f(u) = φ(b0)φ(b1)n1 · · · φ(bm)nm

◮ f is a surjective map from L to L′ ◮ ∀ u ∈ L, ψ(u) = ψ(f(u))

Obstruction: f is not necessarily injective! The product L′ = φ(b0)φ(b1)∗ · · · φ(bm)∗ is not necessarily unambiguous

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 26/30

slide-36
SLIDE 36

The basic case

Solution: Construction of a regular language which is “algebraically similar” to L′ w0w∗

1 · · · w∗ m

but unambiguous as a product of languages of A∗

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 27/30

slide-37
SLIDE 37

The basic case

Solution: Construction of a regular language which is “algebraically similar” to L′ w0w∗

1 · · · w∗ m

but unambiguous as a product of languages of A∗

◮ Combinatorics of variable-length codes ◮ “Geometrical decomposition of semi-linear sets”

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 27/30

slide-38
SLIDE 38

Lemma Let z1, . . . , zk, be a list of (possibly equal) non-empty words over the alphabet A and let ψ : A∗ − → Nt be the Parikh map. Let v1, . . . , vℓ be the Parikh vectors of words zi, i = 1, . . . , k, and let S = {(α1, v1), . . . , (αℓ, vℓ)}, be the corresponding multiset of the vectors (k = α1 + · · · + αℓ). Suppose that:

for every j = 1, . . . , k, zj contains, at least, two different letters of A in its factorization;

for every j = 1, . . . , ℓ, |vj| = β;

for every j = 1, . . . , ℓ, every vector vj has the form vj = Nj ¯ vj for some Nj ∈ N and some ¯ vj ∈ Nt. If, for every j = 1, . . . , ℓ, Nj ≥ k(γ + 1)(n + 1), then there exists a (variable length) uniform code W of k (distinct) words over the alphabet A such that ∀ i = 1, . . . , ℓ, Card({w ∈ W | ψ(w) = vi}) = αi, (1) that is, for every i = 1, . . . , ℓ, the number of words of W whose Parikh vector is vi is αi. Moreover every w ∈ W is not a factor of a word in u∗

1 · · · u∗ n.

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 28/30

slide-39
SLIDE 39

given a distribution of Parikh vectors of k words, all of them of the same length and with at least two different symbols in their factorization, under the assumption that all the components of every vector are sufficiently large, then:

  • ne can construct a uniform length code with the same distribution
  • f Parikh vectors
  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 29/30

slide-40
SLIDE 40

Consider the following context-free language L ⊆ a∗b∗a∗ given as L = L1 ∪ L2 ∪ L3 with:

  • 1. L1 = an1ban1an2a
  • 2. L2 = am1a2m2abam1am2
  • 3. L3 = a2p1ap2a2bap1

with n1, n2, m1, m2, p1, p2 ranging over N.

  • F. D’Alessandro, B. Intrigila

Prague, September 12-16, 2011 30/30