1/39
Weakly-unambiguous Parikh automata and their link with holonomic - - PowerPoint PPT Presentation
Weakly-unambiguous Parikh automata and their link with holonomic - - PowerPoint PPT Presentation
Weakly-unambiguous Parikh automata and their link with holonomic series Alin Bostan, Arnaud Carayol, Florent Koechlin, Cyril Nicaud LIGM UMR 8049 CNRS May 2020, 12th 1/39 Link between languages and combinatorics x | w | = n x n L
2/39
Link between languages and combinatorics
L(x) =
- w∈L
x|w| =
- n∈N
ℓnxn ℓn : number of words of length n Formal languages Generating series L − → L(x)
2/39
Link between languages and combinatorics
L(x) =
- w∈L
x|w| =
- n∈N
ℓnxn ℓn : number of words of length n Formal languages Generating series L − → L(x) Regular − → rational L(x) = P(x)/Q(x) 1 a b a b
- q0(x) = xq0(x) + xq1(x)
q1(x) = 1 + xq1(x) + xq0(x) L(x) =
x 1−2x
2/39
Link between languages and combinatorics
L(x1, . . . , xr) =
- w∈L
x
|w|a1 1
. . . x|w|ar
r
Σ = {a1, . . . , ar} Formal languages Generating series L − → L(x) Regular − → rational L(x) = P(x)/Q(x) 1 a b a b
- q0(xa, xb) = xaq0(xa, xb) + xbq1(xa, xb)
q1(xa, xb) = 1 + xbq1(xa, xb) + xaq0(xa, xb) L(xa, xb) =
xb 1−(xa+xb)
2/39
Link between languages and combinatorics
L(x) =
- w∈L
x|w| =
- n∈N
ℓnxn ℓn : number of words of length n Formal languages Generating series L − → L(x) Regular − → rational L(x) = P(x)/Q(x) Unambiguous context-free − → algebraic P(x, L(x)) = 0
- S → aSB | ε
B → cB | bS
- S(x) = xS(x)B(x) + 1
B(x) = xB(x) + xS(x) x2S(x)2 − (1 − x)S(x) + 1 − x = 0
2/39
Link between languages and combinatorics
L(x1, . . . , xr) =
- w∈L
x
|w|a1 1
. . . x|w|ar
r
Σ = {a1, . . . , ar} Formal languages Generating series L − → L(x) Regular − → rational L(x) = P(x)/Q(x) Unambiguous context-free − → algebraic P(x, L(x)) = 0
- S → aSB | ε
B → cB | bS
- S(
x) = xaS( x)B( x) + 1 B( x) = xcB( x) + xbS( x) xaxbS(xa, xb, xc)2 − (1 − xc)S(xa, xb, xc) + 1 − xc = 0
2/39
Link between languages and combinatorics
L(x1, . . . , xr) =
- w∈L
x
|w|a1 1
. . . x|w|ar
r
Σ = {a1, . . . , ar} Formal languages Generating series L − → L(x) Regular − → rational L(x) = P(x)/Q(x) ambiguous context-free − → ?
- S → aSB | ε
B → cB | bS
- S(
x) = xaS( x)B( x) + 1 B( x) = xcB( x) + xbS( x) xaxbS(xa, xb, xc)2 − (1 − xc)S(xa, xb, xc) + 1 − xc = 0
2/39
Link between languages and combinatorics
L(x) =
- w∈L
x|w| =
- n∈N
ℓnxn ℓn : number of words of length n Formal languages Generating series L − → L(x) Regular − → rational L(x) = P(x)/Q(x) Unambiguous context-free − → algebraic P(x, L(x)) = 0 1 − 2x + 225x2 (1 − 25x)(625x2 + 14x + 1) = 1+9x+49x2+. . . [Bousquet-Mélou 08] G(x) = 1+2x+11x2+. . . [Bostan & Kauers 10, Drmota & Banderier 13]
3/39
Analytic criteria for inherent ambiguity
Theorem (Chomsky and Schützenberger 63) The generating series of an unambiguous context-free language is algebraic. Contraposition If the generating series of a context-free language is not algebraic, then it is inherently ambiguous.
4/39
Detailed Example
Example (Flajolet 87) D = {an1b an2b . . . ankb : k ∈ N∗, n1 = 1 and ∃j < k, nj+1 = 2nj} is inherently ambiguous. aab / ∈ D abaabaaab ∈ D abaabaaaab / ∈ D ab a2b a4b . . . a2k−1b / ∈ D
5/39
Detailed Example
Example (Flajolet 87) D = {an1b an2b . . . ankb : k ∈ N∗, n1 = 1 and ∃j < k, nj+1 = 2nj} is inherently ambiguous. By contradiction, suppose D is unambiguous. Then D(x) is algebraic Aim: build from D(x) a series that is not algebraic and use closure properties
5/39
Detailed Example
Example (Flajolet 87) D = {an1b an2b . . . ankb : k ∈ N∗, n1 = 1 and ∃j < k, nj+1 = 2nj} is inherently ambiguous. By contradiction, suppose D is unambiguous. Then D(x) is algebraic Aim: build from D(x) a series that is not algebraic and use closure properties B = ab(ab∗)∗ \ D = {ab a2b a4b . . . a2k−1b : k ∈ N∗} B(x) =
x2 1−
x 1−x − D(x) = algebraic
So B(x) =
k≥1 x2k−1+k, which is lacunary
So B(x) is not algebraic. Contradiction
6/39
Remarks on this method
Analytic criteria for solving some instances of an undecidable problem It can avoid technical proofs on automata based on pumping techniques. L = {anbmcp : n = m or m = p} is inherently ambiguous as a CF language yet L(x) =
2 (1−x2)(1−x) − 1 1−x3 is rational
Specific about inherent ambiguity questions. → language of primitive words LP aabb ∈ LP, abab / ∈ LP CFL: open not unambiguous CFL: [Peterson 96]
7/39
Hierarchy of languages and series
Language Generating series L − → L(x) Regular − → rational Q(x)L(x) = P(x)
- Unambiguous context-free
− → algebraic P(x, L(x)) = 0
- ?
− → holonomic P(x, ∂x) · L(x) = 0
8/39
Holonomic series in one variable (Stanley 80)
A series f (x) =
n anxn is holonomic (or D-finite) if it satisfies a
differential equation of the form: Pk(x)f (k)(x) + . . . + P0(x)f (x) = 0 with Pi(x) ∈ Q[x] Equivalently an satisfies a linear recurrence of the form pr(n)an+r + . . . + p0(n)an = 0 with pi(n) ∈ Q[n] Closed by sum, product, composition with algebraic series, Hadamard product...
9/39
Example of holonomic series
rational series F = P/Q : (PQ)F ′ + (PQ′ − P′Q)F = 0 → Linear recurrence with constant coefficients algebraic series (the proof is however not straightforward) F(x) = √1 − x := 4−n
1−2n
2n
n
- xn satisfies F 2 − 1 − x = 0
2(1 − x)F ′ − F = 0 2(n + 1)un+1 − (2n + 1)un = 0 F(x) = ex := xn/n! is holonomic but is not algebraic F ′ − F = 0 (n + 1)un+1 − un = 0
10/39
Holonomic series in several variables (Lipshitz 89)
A series f (x1, . . . , xn) is holonomic (or D-finite) if it satisfies a system of partial derivative equations of the form: A1,r1( x) ∂r1
x1f (
x) + . . . + A1,1( x) ∂x1f ( x) + A1,0( x) f ( x) = 0 . . . An,rn( x) ∂rn
xnf (
x) + . . . + An,1( x) ∂xnf ( x) + An,0( x) f ( x) = 0 with Ai,j( x) ∈ Q[ x], and x = (x1, . . . , xn). We only use closure properties rather than the definition
11/39
Holonomic series in several variables
Theorem (Lipshitz 1988, 1989) Holonomic series are closed under :
1 arithmetic operations +, ×, − 2 specialization to 1, when it is well-defined: if f (x1, . . . , xn) is
holonomic, then f (x, 1, . . . , 1) is holonomic too
3 Hadamard’s product ⊙
f (x1, . . . , xn) =
- i∈Nn
a(i1, . . . , in)xi1
1 . . . xin n
g(x1, . . . , xn) =
- i∈Nn
b(i1, . . . , in)xi1
1 . . . xin n
f ⊙ g(x1, . . . , xn) =
- i∈Nn
a(i1, . . . , in)b(i1, . . . , in)xi1
1 . . . xin n
12/39
Crucial particular case: support series
Let S ⊆ Nn. The support series of S is g(x1, . . . , xn) =
- (i1,...,in)∈S
xi1
1 . . . xin n
Let f (x1, . . . , xn) =
- (i1,...,in)∈Nn
a(i1, . . . , in)xi1
1 . . . xin n . Then:
(f ⊙ g)(x1, . . . , xn) =
- (i1,...,in)∈S
a(i1, . . . , in)xi1
1 . . . xin n
13/39
Example of Hadamard’s product
Example Ω3 = {w ∈ (a + b + c)∗ : |w|a = |w|b or |w|b = |w|c}. abbca ∈ Ω3, abbcca / ∈ Ω3. Ω3 is context-free, inherently ambiguous as a CFL. Ω3(xa, xb, xc) =
1 1−(xa+xb+xc)
- (a+b+c)∗
⊙ (
1 (1−xa)(1−xb)(1−xc) − 1 1−xaxbxc )
- |w|a=|w|b or |w|b=|w|c
= 1 1 − (xa + xb + xc) − 1 1 − (xa + xb + xc) ⊙ 1 1 − xaxbxc
14/39
Example of Hadamard’s product
Example Ω3 = {w ∈ (a + b + c)∗ : |w|a = |w|b or |w|b = |w|c}.
1 1−(xa+xb+xc) ⊙ 1 1−xaxbxc = [y−1
a y−1 b y−1 c
] 1 yaybyc 1 1−( xa
ya + xb yb + xc yc )
1 1−yaybyc
Mgfun [Chyzak] and gfun [Salvy and Zimmermann] give: p3( x)∂3
xaΩ3(
x) + p2( x)∂2
xaΩ3(
x) + p1( x)∂xaΩ3( x) + p0( x)Ω3( x) = 0 with pi∞ ≤ 7344 and deg(pi) ≤ 9.
14/39
Example of Hadamard’s product
Example Ω3 = {w ∈ (a + b + c)∗ : |w|a = |w|b or |w|b = |w|c}.
1 1−(xa+xb+xc) ⊙ 1 1−xaxbxc = [y−1
a y−1 b y−1 c
] 1 yaybyc 1 1−( xa
ya + xb yb + xc yc )
1 1−yaybyc
Mgfun [Chyzak] and gfun [Salvy and Zimmermann] give: p3( x)∂3
xaΩ3(
x) + p2( x)∂2
xaΩ3(
x) + p1( x)∂xaΩ3( x) + p0( x)Ω3( x) = 0 with pi∞ ≤ 7344 and deg(pi) ≤ 9. Remark (Flajolet 87) Ω3(xa, xb, xc) is holonomic but not algebraic.
15/39
Previous attempts at a link with formal languages
[Lipshitz 88] added linear constraints to the support of a
holonomic series using a Hadamard product with a support series
[Massazza 93] formalized the idea with (semi)linear constraints
(Linear Constrained Languages)
[Castiglione and Massazza 2017] RCM (Regular languages with
semilinear Constraints and a (injective) Morphism) ex: anbmanbm → not fully satisfactory from an automaton point of view. Conjectured a link with deterministic Reversal Bounded Counter Machines.
16/39
Hierarchy of languages and series
Language Generating series L − → L(x) Regular − → rational Q(x)L(x) = P(x)
- Unambiguous context-free
− → algebraic P(z, L(x)) = 0
- Weakly-unambiguous
Pushdown PA − → holonomic P(x, ∂x) · L(x) = 0
16/39
Hierarchy of languages and series
Language Generating series L − → L(x) Regular − → rational Q(x)L(x) = P(x)
- Unambiguous context-free
− → algebraic P(z, L(x)) = 0
- Weakly-unambiguous
Pushdown PA − → holonomic P(x, ∂x) · L(x) = 0 For the presentation we work with PA and not Pushdown PA.
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 1
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 2
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
1
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
2
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
3
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
3 1
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
3 2
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
3 3
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- w = aaabbbccc −
→ 3
3 3
- ∈ C
w ∈ L(A)
17/39
Parikh automata [Klaedtke and Rueß 03]
1 2 3 C = {(n, n, n) : n ∈ N∗} a, 1
- a,
1
- b,
1
- b,
1
- c,
1
- c,
1
- ℓ = {(anbmcp,
n
m p
- ) : n, m, p ∈ N∗}
L(A) = {anbncn : n ∈ N∗}
18/39
Semilinear sets of Nd (Parikh 1966)
Intuitively: boolean combinaison of linear (affine) inequalities defining subsets of Nd x1 − x2 = 0 ∧ x2 − x3 = 0 → C = {(n, n, n) : n ∈ N} More generally, subsets defined by the Presburger arithmetic
[Ginsburg and Spanier 66]
Φ(x1, x2) := ∃x, x1 − 3x = 0 ∧ 1 + 2x1 − x2 = 0 → {(3n, 6n + 1) : n ∈ N}
19/39
Semilinear sets of Nd (Parikh 66)
1 2 3 4 5 1 2 3 4 5 c p2 p1
b b b b b b b b b b b b b b b b b b b b b b
Semilinear = Finite union of linear sets c + P∗ where P = {p1, . . . , pr} and P∗ = {λ1p1 + . . . + λrpr : λi ∈ N}
20/39
Semilinear sets of Nd (Parikh 66)
Theorem (Eilenberg and Schützenberger 69, Ito 69) If C is semilinear, then C(x1, . . . , xd) =
- v∈C xv1
1 . . . xvd d , its
support series, is rational. If C =
m
- i=1
- ci + P∗
i is an unambiguous description of C:
C(x1, . . . , xd) =
m
- i=1
- xci
- p∈Pi(1 −
xp) Remark In the sequel we will deal with holonomic series of the form f ⊙ C, where C is the support series of a semilinear set.
21/39
Weakly-unambiguous Parikh automaton
Weakly-unambiguous: at most one accepting run for every word. 1 C = {(n, n) : n ∈ N} a,
- {a, b},
1
- {a, b},
1
- L(A) = {w1aw2 : |w1| = |w2|, w1, w2 ∈ Σ∗} with Σ = {a, b}.
= [Cadilhac, Finkel and McKenzie 13] Unambiguous constraint automata
22/39
Weakly-unambiguous Parikh automata
PA coincide with the class of Reversal Bounded Counter Machines [Klaedtke and Rueß 03] Deterministic versions do not coincide. Weakly-unambiguous PA coincide with the class of unambiguous RBCM... ...and the class of RCM languages! Weakly-unambiguous PA are closed under intersection, and left quotient with words. Closure under union? Complement? Still open.
22/39
Weakly-unambiguous Parikh automata
PA coincide with the class of Reversal Bounded Counter Machines [Klaedtke and Rueß 03] Deterministic versions do not coincide. Weakly-unambiguous PA coincide with the class of unambiguous RBCM... ...and the class of RCM languages! Weakly-unambiguous PA are closed under intersection, and left quotient with words. Closure under union? Complement? Still open. Languages recognized by weakly-unambiguous PA have holonomic generating series
23/39
Weighted generating series of a PA
Definition (Generating series of the runs of a PA) q(x, y1, . . . , yd) =
- n,i1,...,id
qn,i1,...,id xnyi1
1 . . . yid d
where qn,i1,...,id denotes the number of runs from q to a final state, labelled by (w, v) with |w| = n and v = (i1, . . . , id). The generating series of these runs are classically rational.
24/39
Example
1 2 3 a, 1
3 1
- a,
3
- b,
1
- b,
1
- c,
2
- c,
2
1
-
q0(x, y1, y2, y3) = xy1y3
2 y3q1(x, y1, y2, y3)
q1(x, y1, y2, y3) = xy3
1 q1(x, y1, y2, y3) + xy2q2(x, y1, y2, y3)
q2(x, y1, y2, y3) = xy2q2(x, y1, y2, y3) + xy2
3 q3(x, y1, y2, y3)
q3(x, y1, y2, y3) = xy2
1 y3q3(x, y1, y2, y3) + 1
25/39
Weakly-unambiguous PA have holonomic series
Proposition The generating series of a language recognized by a weakly-unambiguous Parikh Automaton is holonomic. qI(x, y1, . . . , yd) counts every run of the automaton from qI to a final state. It is rational C(y1, . . . , yd) =
- (i1,...,id)∈C
yi1
1 . . . yid d support series of the
semilinear set C, which is rational A(x, y1, . . . , yd) := qI(x, y1, . . . , yd) ⊙
1 1−x C(y1, . . . , yd)
counts the accepting runs of the automaton, sorted by length and vector value. It is holonomic
25/39
Weakly-unambiguous PA have holonomic series
Proposition The generating series of a language recognized by a weakly-unambiguous Parikh Automaton is holonomic. qI(x, y1, . . . , yd) counts every run of the automaton from qI to a final state. It is rational C(y1, . . . , yd) =
- (i1,...,id)∈C
yi1
1 . . . yid d support series of the
semilinear set C, which is rational A(x, y1, . . . , yd) := qI(x, y1, . . . , yd) ⊙
1 1−x C(y1, . . . , yd)
counts the accepting runs of the automaton, sorted by length and vector value. It is holonomic A(x, 1, . . . , 1) counts the accepting runs of the automaton, sorted by length. It is holonomic By weak-unambiguity, L(x) = A(x, 1, . . . , 1).
26/39
Inherent weak-ambiguity
Proposition The generating series of a language recognized by a weakly-unambiguous Parikh Automaton is holonomic. Contraposition If the generating series of a language recognized by a PA is not holonomic, then it is inherently weakly-ambiguous as a PA language.
27/39
Example
Example D = {an1b an2b . . . ankb : k ∈ N∗, n1 = 1 and ∃j < k, nj+1 = 2nj} is inherently weakly-ambiguous as a PA language. 1 2 3 4 5 6 C = {(n, m) : m = 2n} a,
- b,
- b,
1
- {a, b},
- b,
- a,
1
- b,
- a,
1
- b,
- b,
- a,
- a,
- b,
- Ambiguous automaton: ababab has two accepting runs.
From D(x) we built a lacunary series. Lacunary series are not holonomic.
28/39
Criteria for non holonomy
Theorem (Stanley 1980) Let f (x) = anxn : If f has an infinite number of singularities, f is not holonomic. If an does not satisfy a linear recurrence with polynomial coefficients, then f is not holonomic. Example (B(x) =
k≥1 x2k−1+k)
2k+1 − 1 + k + 1 − (2k − 1 + k) → ∞ incompatible with any pr(n)an+r + . . . + p0(n)an = 0 with pi(n) ∈ Q[n]
29/39
Limits of the method
Inherent weak-ambiguity is undecidable, by Greibach’s theorem, using undecidability of universality of PA [Klaedtke and Rueß 03] The series criterium may fail. There exist inherently weakly-ambiguous PA languages having holonomic series.
30/39
Inherently weakly-ambiguous language with algebraic series
Proposition Leven = {an1bam1b . . . ankbamkb : k ∈ N∗, ∃i ∈ [1, k], ni = mi} is inherently weakly-ambiguous as a PA. aaabaab aabaab abaab ∈ Leven It is deterministic context-free ⇒ algebraic generating series The proof uses Ramsey’s theorem, and is very specific to this
- language. It shows inherent ambiguity for a wider family of
automata.
31/39
An algorithmic consequence of holonomy
Holonomy of the generating series has algorithmic consequences → It has already been used for standard unambiguous finite automata!
1 Present the case of the inclusion problem for unambiguous
finite automata
2 Show how the same general ideas apply to
weakly-unambiguous PA.
32/39
Inclusion separation problem
1 a, b b Proposition (Stearns and Hunt 85) Given two unambiguous finite automata A and B such that L(B) L(A) Then there is a small witness word w ∈ L(A)\L(B) such that |w| < |QA| + |QB|
33/39
Sketch of the proof
LA(x) =
n anxn generating series of L(A)
LB(x) =
n bnxn generating series of L(B).
G(x) = LB(x) − LA(x) rational, degrees at most r ≤ |QA| + |QB| Then gn = bn − an satisfies: ∀n ≥ r, crgn = cr−1gn−1 + . . . + c0gn−r
33/39
Sketch of the proof
LA(x) =
n anxn generating series of L(A)
LB(x) =
n bnxn generating series of L(B).
G(x) = LB(x) − LA(x) rational, degrees at most r ≤ |QA| + |QB| Then gn = bn − an satisfies: ∀n ≥ r, crgn = cr−1gn−1 + . . . + c0gn−r So if an = bn for every n < r, then an = bn for all n. As L(A) L(B), there exists N < r such that aN < bN. →There is a small witness word of length < |QA| + |QB| in L(B)\L(A).
34/39
Inclusion problem
Input: two weakly-unambiguous Parikh automata A, B Question: L(A) ⊆ L(B)? decidable for deterministic PA decidable for RCM [Castiglione and Massazza 17] (hence for weakly-unambiguous PA) without complexity bound undecidable for non-deterministic PA →Our contribution is to give explicit bounds in the weakly-unambiguous case
35/39
Inclusion separation for weakly-unambiguous automata?
Essentially same ideas as regular case, however: LA(x) = A(x, 1, . . . , 1) where: A(x, y1, . . . , yd) := qI(x, y1, . . . , yd) ⊙ C(x, y1, . . . , yd) → Same problem with LB(x) Then gn = vn − un satisfies a linear recurrence of the form ∀n ≥ r, cr(n)gn = cr−1(n)gn−1 + . . . + c0(n)gn−r G(x) = x1000 → (1000 − n)gn = 0 → we need to go beyond r and the roots of cr that are in N
36/39
Inclusion separation for weakly-unambiguous automata?
We want bounds on the polynomials and order of the recurrence of G(x), depending on the size of the automata A and B At each step (Hadamard product, y = 1, sum...), bound the size of the representation of the resulting holonomic series (holonomic series are represented by their system of differential equations) by a careful analysis of every operation: Proposition If L(A) ⊆ L(B), there exists a word w ∈ L(B)\L(A) such that |w| ≤ 22O(d2 log(dM)) where d = dA + dB, M = |A| |B| A∞ B∞.
37/39
Consequence: inclusion problem
Input: two weakly-unambiguous Parikh automata A, B Question: L(A) ⊆ L(B)? Proposition We can decide in time ≤ 22O(d2 log(dM)) whether L(A) ⊆ L(B), where d = dA + dB, M = |A| |B| A∞ B∞. → dynamic programming approach to avoid an other exponential when enumerating every word of length less than the witness!
38/39
Conclusion
Language Generating series L − → L(x) Regular − → rational Q(x)L(x) = P(x)
- Unambiguous context-free
− → algebraic P(x, L(x)) = 0
- Weakly-unambiguous
Pushdown PA − → holonomic P(x, ∂x) · L(x) = 0
38/39
Conclusion
Language Generating series L − → L(x) Regular − → rational Q(x)L(x) = P(x)
- Unambiguous context-free
− → algebraic P(x, L(x)) = 0
- Weakly-unambiguous
Pushdown PA − → holonomic P(x, ∂x) · L(x) = 0 Remaining problems: closure under union, universality with a stack, implementation of algorithms...
39/39
Perspectives
Extension: larger classes with holonomic series? Proposition (Bell and Chen 17) Any holonomic series with coefficients in {0, 1} is the support series
- f a semilinear set.
We are close to the limits of this approach → need for new ideas to find other links between holonomic series and formal languages.
39/39
Perspectives
Extension: larger classes with holonomic series? Proposition (Bell and Chen 17) Any holonomic series with coefficients in {0, 1} is the support series
- f a semilinear set.
We are close to the limits of this approach → need for new ideas to find other links between holonomic series and formal languages. Thank you!
40/39
References I
Jason P. Bell and Shaoshi Chen, Power series with coefficients from a finite set, J. Comb. Theory, Ser. A 151 (2017), 241 – 253. Alin Bostan and Manuel Kauers, The complete generating function for Gessel walks is algebraic, Proc. Amer. Math. Soc. 138 (2010), no. 9, 3063–3078, With an Appendix by Mark van Hoeij. Mireille Bousquet-Mélou, Rational and algebraic series in combinatorial enumeration, International Congress of Mathematicians (ICM 2006), vol. 3, Eur. Math. Soc., Zürich, 2006, pp. 789–826. Michaël Cadilhac, Alain Finkel, and Pierre McKenzie, Affine Parikh automata, RAIRO - Theor. Inf. and Applic. 46 (2012),
- no. 4, 511–545.
41/39
References II
, Unambiguous constrained automata, Int. J. Found.
- Comput. Sci. 24 (2013), no. 7, 1099–1116.
Giusi Castiglione and Paolo Massazza, On a class of languages with holonomic generating functions, Theor. Comput. Sci. 658 (2017), 74–84. Louis Comtet, Calcul pratique des coefficients de Taylor d’une fonction algébrique, Enseignement Math. (2) 10 (1964), 267–270. Noam Chomsky and Marcel-Paul Schützenberger, The algebraic theory of context-free languages, Studies in Logic and the Foundations of Mathematics, vol. 35, Elsevier, 1963. Samuel Eilenberg and Marcel-Paul Schützenberger, Rational sets in commutative monoids, J. Algebra 13 (1969), no. 2, 173 – 191.
42/39
References III
Philippe Flajolet, Stefan Gerhold, and Bruno Salvy, On the non-holonomic character of logarithms, powers, and the nth prime function, Electr. J. Comb. 11 (2005), no. 2. Philippe Flajolet, Analytic models and ambiguity of context-free languages, Theor. Comput. Sci. 49 (1987), no. 2, 283 – 309. Philippe Flajolet and Robert Sedgewick, Analytic combinatorics, first ed., Cambridge University Press, 2009. Sheila Greibach, A note on undecidable properties of formal languages, Mathematical Systems Theory 2 (1968), no. 1, 1–6. Seymour Ginsburg and Edwin Spanier, Semigroups, presburger formulas, and languages, Pac. J. Math. 16 (1966), no. 2, 285–296. Seymour Ginsburg and Joseph Ullian, Ambiguity in context free languages, J. ACM 13 (1966), no. 1, 62–89.
43/39
References IV
Oscar H. Ibarra, Reversal-bounded multicounter machines and their decision problems, J. ACM 25 (1978), no. 1, 116–133. Ryuichi Ito, Every semilinear set is a finite union of disjoint linear sets, J. Comput. Syst. Sci. 3 (1969), no. 2, 221–231. Manuel Kauers, Bounds for D-finite closure properties, Proceedings of the 39th International Symposium on Symbolic and Algebraic Computation, (ISSAC 2014), ACM, New York, 2014, pp. 288–295. Felix Klaedtke and Harald Rueß, Parikh automata and Monadic Second-Order logics with linear cardinality constraints, Tech. Report 177, Freiburg University, 2002.
44/39
References V
, Monadic second-order logics with cardinalities, Automata, Languages and Programming, 30th International Colloquium, ICALP 2003, Lecture Notes in Computer Science,
- vol. 2719, Springer, 2003, pp. 681–696.
Leonard Lipshitz, The diagonal of a D-finite power series is D-finite, J. Algebra 113 (1988), no. 2, 373 – 378. , D-finite power series, J. Algebra 122 (1989), no. 2, 353 – 373. Paolo Massazza, Holonomic functions and their relation to linearly constrained languages, ITA 27 (1993), no. 2, 149–161. , On the conjecture Ldfcm RCM, Implementation and Application of Automata - 22nd International Conference, CIAA 2017, Lecture Notes in Computer Science, vol. 10329, Springer, 2017, pp. 175–187.
45/39
References VI
, On the generating functions of languages accepted by deterministic one-reversal counter machines, Proceedings of the 19th Italian Conference on Theoretical Computer Science, (ICTCS 2018), CEUR Workshop Proceedings, vol. 2243, CEUR-WS.org, 2018, pp. 191–202.
- F. P. Ramsey, On a Problem of Formal Logic, Proc. London
- Math. Soc. (2) 30 (1929), no. 4, 264–286.
Richard Edwin Stearns and Harry B. Hunt III, On the equivalence and containment problems for unambiguous regular expressions, regular grammars and finite automata, SIAM J.
- Comput. 14 (1985), no. 3, 598–611.
Richard P. Stanley, Differentiably finite power series, Eur. J.
- Comb. 1 (1980), no. 2, 175 –188.
46/39
Conclusion
Language Generating series L − → L(x) Regular − → rational Q(x)L(x) = P(x)
- Unambiguous context-free
− → algebraic P(x, L(x)) = 0
- Weakly-unambiguous
Pushdown PA − → holonomic P(x, ∂x) · L(x) = 0
47/39
Remark
Example D = {an1b an2b . . . ankb : k ∈ N∗, n1 = 1 and ∃j < k, nj+1 = 2nj} is inherently ambiguous as a PA language. Consequence Weakly-unambiguous PA are not closed under left quotient with regular languages. D2 = {cjan1b an2b . . . ankb : k ∈ N∗, j < k, n1 = 1 ∧ nj+1 = 2nj} (c∗)−1D2 ∩ (a + b)∗ = D
48/39
Incomparable
{anbmcp : n = m or m = p} is inherently ambiguous as a CF language deterministic as a PA language Leven = {an1b . . . an2kb : k ∈ N∗, ∃i ∈ [1, k], n2i−1 = n2i} is deterministic as a CF language inherently ambiguous as a PA language
49/39
Undecidability of inherent weak-ambiguity
General method [Greibach 68], by reducing the universality problem L1 = Σ∗
1?
L = L1#Σ∗ ∪ Σ∗
1#D . Then:
L1 = Σ∗
1 ⇔ L is weakly-unambiguous
⇒ If L1 = Σ∗
1, L = Σ∗ 1#Σ∗ is regular.
⇐ By contraposition, let y ∈ L1. As (y#)−1L = D is not weakly-unambiguous, neither is L.
50/39
Inclusion separation for weakly-unambiguous automata?
A given under the form (Σ, Q, qI, F, C, ∆). C given under a unambiguous form ∪p
i=1ci + P∗ i
50/39
Inclusion separation for weakly-unambiguous automata?
A given under the form (Σ, Q, qI, F, C, ∆). C given under a unambiguous form ∪p
i=1ci + P∗ i
A∞ maximum coordinate of the vectors in the description
- f ∆ and C