On the Complexity of the Universality and Inclusion Problems for Unambiguous Context-Free Grammars
LL. Fribourg and M. Heizmann (Eds.): VPT/HCVS 2020EPTCS 320, 2020, pp. 29–43, doi:10.4204/EPTCS.320.2 c (cid:13)
L. ClementeThis work is licensed under theCreative Commons Attribution License.
On the Complexity of the Universality and InclusionProblems for Unambiguous Context-Free Grammars
Lorenzo Clemente
Department of Mathematics, Informatics, and Mechanics (MIMUW)University of Warsaw (Warsaw, Poland) ∗ [email protected] We study the computational complexity of universality and inclusion problems for unambiguousfinite automata and context-free grammars. We observe that several such problems can be reducedto the universality problem for unambiguous context-free grammars. The latter problem has longbeen known to be decidable and we propose a
PSPACE algorithm that works by reduction to thezeroness problem of recurrence equations with convolution. We are not aware of any non-trivialcomplexity lower bounds. However, we show that computing the coin-flip measure of an unambiguouscontext-free language, a quantitative generalisation of universality, is hard for the long-standing openproblem
SQRTSUM . The purpose of this note is to attract attention to a long-standing open problem in formal language theory.The problem in question is the exact complexity of deciding universality of unambiguous context-freegrammars (
UUCFG ). A context-free grammar is unambiguous if every accepted word admits a uniqueparse tree, and the universality problems asks, for a given grammar G over a finite set of terminals Σ (alphabet), whether G accepts every word L ( G ) = Σ ∗ . While the universality problem for context-free grammars is undecidable [20], the same problem for unambiguous grammars is long-known to bedecidable (a corollary of [2, Theorem 5.5]), e.g., by reducing to the first-order theory of the reals with onequantifier alternation [2, eq. (3), page 149]. Since the latter fragment is decidable in EXPTIME [18], thisyields an
EXPTIME upper bound for
UUCFG . No non-trivial lower bound for
UUCFG seems to be knownin the literature.The typical way to solve a containment problem of the form L ⊆ M is to complement M and solve L ∩ ( Σ ∗ \ M ) = /0. For instance, when L is regular and M is deterministic context-free (DCFG), this givesa PTIME procedure since DCFG languages are efficiently closed under complement and intersection withregular languages, and their emptiness problem is in
PTIME . However, UCFG languages are not closedunder complement (the complement is not even context-free in general [19]), so the language-theoreticapproach is not available. As Salomaa and Soittola remark in their book from 1978, “no proof is knownfor Theorem 5.5 which uses only standard formal language theory”. To this day, we are not aware of aproof of decidability for
UUCFG using different techniques . The UUCFG problem is not isolated in thisrespect. ∗ This work has been partially supported by the Polish NCN grant 2017/26/D/ST6/00201. A full technical report is available[9]. In a later book, Kuich and Salomaa reprove decidability [24, Corollary 16.25] by using variable elimination, which isarguably closer to algebraic geometry than formal languages. Complexity of the Universality Problem for Unambiguous Context-Free Grammars ⊆ DFA UFA NFA DCFG UCFG CFGDFA
PTIME PTIME PSPACE -c. [27]
PTIME = UUCFG (Th. 8) undec.UFA
PTIME PTIME [33]
PSPACE -c. [27]
PTIME = UUCFG (Th. 8) undec.NFA
PTIME PTIME (Th. 7)
PSPACE -c. [27]
PTIME = UUCFG (Th. 8) undec.DCFG
PTIME ≤ UUCFG (Th. 9)
EXPTIME -c. [21] undec. undec. undec.UCFG
PTIME ≤ UUCFG (Th. 9)
EXPTIME -c. [21] undec. undec. undec.CFG
PTIME ≤ UUCFG (Th. 9)
EXPTIME -c. [21] undec. undec. undec.“ ≤ UUCFG ”: the problem reduces in
PTIME to UUCFG .“ = UUCFG ”: the problem is
PTIME inter-reducible with
UUCFG .Figure 1: Inclusion problems for various classes of regular and context-free languages.
State of the art.
Let A , B be two classes of language acceptors. Examples include deterministic(DFA), unambiguous (UFA), and nondeterministic finite automata (NFA), and similarly for context-freegrammars we have the classes DCFG, UCFG, and CFG. The “ A ⊆ B ” inclusion problem asks, given alanguage acceptor A from A and B from B , whether the languages they recognise satisfy L ( A ) ⊆ L ( B ) .A summary of decidability and complexity result for inclusion problems involving finite automata andgrammars is presented in Fig. 1. Many entries in the table are well-known. The problem NFA ⊆ NFA isa classic
PSPACE -complete problem [27]. The problem UFA ⊆ UFA was shown in
PTIME by Stearnsand Hunt in their seminal paper [33] . The fact that CFG ⊆ NFA is
EXPTIME -complete is somewhatless known [21, Theorem 2.1]. The inclusion problems A ⊆ UFA when B is DCFG, UCFG, or CFG donot appear to have been studied before. The A ⊆ B problem is undecidable as soon as both A , B arecontext-free grammars, since DCFG ⊆ DCFG is well-known to be undecidable [20, Theorem 10.7, Point2]. We have already observed that NFA ⊆ DCFG is in
PTIME . The equivalence problem NFA = UCFGis shown to be decidable in [2, Theorem 5.5], although no complexity bound is given. The more generalinclusion NFA ⊆ UCFG does not seem to have been studied before.
Contributions.
We establish several connections between inclusion problems A ⊆ B when B is UFAor UCFG with the UUCFG problem. Our contributions are as follows.1. We observe that in many cases the inclusion problem L ⊆ M reduces in polynomial time to the sub-case where L is deterministic (Section 3.1.1). One application is lower bounds: Once we know thatCFG ⊆ NFA is
EXPTIME -hard [21, Theorem 2.1], we can immediately deduce that the same lowerbound carries over to DCFG ⊆ NFA [21, Theorem 3.1].2. We observe that in many cases the inclusion problem L ⊆ M with L deterministic reduces in polynomialtime to the universality problem (Section 3.1.2). One application is upper bounds (combined with theprevious point): For instance, from the fact that UFA = Σ ∗ is in PTIME we can deduce that the moregeneral problem NFA ⊆ UFA is also in
PTIME (Theorem 7), which seems to be a new observation.3. We apply the last two points to show that the following inclusion problems A ⊆ B reduce to UUCFG : A ∈ { DCFG , UCFG , CFG } and B = UFA (Theorem 9); A ∈ { DFA , UFA , NFA } and B = UCFG(Theorem 8). Since
UUCFG is a special instance of the latter set of problems, they are
PTIME inter-reducible with
UUCFG . An incomparable NC upper bound for this problem is also known [26, Fact 4.5] (c.f. [35, Theorem 2]). . Clemente UUCFG is in
PSPACE (Theorem 10), which improves the
EXPTIME upper bound thatcan be extracted from [2]. A
PSPACE upper bound for the same problem has also been shown byS. Purgał in his master thesis [29, Section 3.7].5. We complement the upper bound in the previous point by showing that computing the so-called coin-flipmeasure of a UCFG (a quantitative problem generalising universality; c.f. Section 4) is
SQRTSUM -hard (Theorem 11). The latter is a well-known problem in the theory of numerical computation, whichis not known to be in NP or NP -hard [1, 15].The generic and simple polynomial time reductions of points 1. and 2. above do not seem to be knownin the literature. Beyond the seminal work on UFA [33], they also apply to very recent contributions onexpressive models such as unambiguous register automata (c.f. [28] for equality atoms) and unambiguousfinite and pushdown Parikh automata [5]. In each of the cases above, one can reduce from inclusionto universality. A non-example where the reduction cannot be applied is unambiguous Petri-nets withcoverability semantics [10].The PSPACE upper bound on
UUCFG is obtained by reduction to a more general counting probleminteresting on its own. We introduce a natural class of number sequences f : N → N which we call convolution recursive (conv-rec). Examples include the Fibonacci F ( n + ) = F ( n ) + F ( n − ) andCatalan numbers C ( n + ) = ( C ∗ C )( n ) , where “ ∗ ” denotes the convolution product. We show that thefunction counting the number of words in L ( G ) of a given length is conv-rec if G is UCFG. (Thisresult is analogous to the well-known fact that UCFG have algebraic generating functions [8].) The zeroness problem asks whether such a sequence is identically zero. Our last contribution is a complexityupper-bound for the zeroness problem of conv-rec sequences.6. We show that the zeroness problem of conv-rec sequences is in PSPACE (Theorem 4). We express thisproblem with a formula in the existential fragment for first-order logic over the reals, which can bedecided in
PSPACE [7].
Convolution recursive sequences.
Let N , Z , Q , and R be the sets of natural, resp., integer, rational,and real numbers. Let Q [ x , . . . , x k ] denote the ring of polynomials with coefficients from Q and variables x , . . . , x k . For two sequences indexed by natural numbers f , g : N → R , their sum f + g is the sequence ( f + g )( n ) = f ( n ) + g ( n ) , and their convolution is the sequence ( f ∗ g )( n ) = ∑ nk = f ( k ) · g ( n − k ) . Theconvolution operation is associative f ∗ ( g ∗ h ) = ( f ∗ g ) ∗ h , commutative f ∗ g = g ∗ f , has as (left andright) identity the sequence 1 , , , . . . , and distributes over the sum operation ( f + g ) ∗ h = f ∗ g + g ∗ h .Thus, sequences with the operations “ + ” and “ ∗ ” form a semiring. Let σ : ( N → R ) → ( N → R ) be the (forward) shift operator on sequences, which is defined as ( σ f )( n ) = f ( n + ) . The zeroness problem fora sequence f : N → R amounts to decide whether f ( n ) = n ∈ N .A convolution polynomial p ( x , . . . , x k ) is a polynomial where the multiplication operation is in-terpreted as convolution and a constant k ∈ Q is interpreted as the sequence k , , , . . . . For example,4 ∗ ( x ∗ x ) + ∗ ( x ∗ x ) is a convolution polynomial of two variables x , x . Let Q ∗ [ x , . . . , x k ] denote thering of convolution polynomials with variables x , . . . , x k . A sequence f : N → R is convolution recursive ( conv-rec ) if there are k auxiliary sequences f , . . . , f k : N → R with f = f and k convolution polynomials2 Complexity of the Universality Problem for Unambiguous Context-Free Grammars p , . . . , p k ∈ Q ∗ [ x , . . . , x k ] s.t., σ f = p ( f , . . . , f k ) , ... σ f k = p k ( f , . . . , f k ) . (1)The combined degree of the representation above is the sum of the degrees of p , . . . , p k . For example, theCatalan numbers C : N → N are conv-rec (of combined degree two) since ( σ C )( n ) = ( C ∗ C )( n ) . Lemma 1.
Let f : N → R be a conv-rec sequence of combined degree ≤ d. Then lim n → ∞ f ( n + ) f ( n ) = O ( d ) .Proof. The maximal relative growth f ( n + ) f ( n ) of a conv-rec sequence is achieved when f satisfies a re-currence of the form σ f = f ∗ · · · ∗ f ( d times) for some degree d ∈ N . If f ( ) =
1, then the resultingsequence is known as the Fuss-Catalan numbers [17] and it equals f ( n ) = (cid:0) d · n + n (cid:1) d · n + . It can be checkedby using Stirling’s approximation n ! ∼ √ π n (cid:0) ne (cid:1) n that lim n → ∞ f ( n + ) f ( n ) = d d ( d − ) d − = d · ( + d − ) d − . Thelatter quantity is upper bounded by d · e for every d ≥ Generatingfunctionology.
The formal power series (a.k.a. ordinary generating function ) associatedwith a number sequence a : N → R is the infinite polynomial g a ( x ) = ∑ ∞ n = a ( n ) · x n . Let [ x n ] g a denote thecoefficient a ( n ) of x n in g a . Let f , f , f : N → R be sequences. It is well known that g k ( x ) = k for k ∈ R , g f + f = g f + g f , g f ∗ f = g f · g f , and g f ( x ) = f ( ) + x · g σ f ( x ) . Consequently, if f is conv-recursivewith auxiliary sequences f , . . . , f k , then their generating functions g f , . . . , g f k satisfy the following systemof polynomial equations g f ( x ) = f ( ) + x · ˆ p ( g f ( x ) , . . . , g f k ( x )) , ... g f k ( x ) = f k ( ) + x · ˆ p k ( g f ( x ) , . . . , g f k ( x )) . (2)where ˆ p i is the polynomial obtained from the convolution polynomial p i by replacing the convolutionoperation “ ∗ ” on sequences by the product operation “ · ” on real numbers. Thus, the generating function g f of a conv-rec sequence f is algebraic . Lemma 2.
The system of equations (2) has a unique formal power series solution.Proof.
By construction, g f = ( g f , . . . , g f k ) is a formal power series solution of (2). We now argue thatthere is no other solution. Assume that g = ( g , . . . , g k ) is a solution of (2). We prove that, for every n ∈ N , [ x n ] g = ([ x n ] g , . . . , [ x n ] g ) equals [ x n ] g f = ([ x n ] g f , . . . , [ x n ] g f k ) . The base case follows immediatelyfrom (2), since [ x ] g i = f i ( ) by definition. For the inductive step n >
0, notice that 1) from (2) we have [ x n ] g i = [ x n ]( x · ˆ p i ( g )) = [ x n − ] ˆ p i ( g ) , and 2) the latter quantity is a (polynomial) function of the coefficients [ x i ] g for 0 ≤ i ≤ n −
1. By inductive assumption, [ x i ] g = [ x i ] g f for every 0 ≤ i ≤ n −
1, and thus by thetwo observations above [ x n ] g = [ x n ] g f . Lemma 3.
Let d be the combined degree of f = ( f , . . . , f k ) . The system (2) has a unique solutiong f ( x ∗ ) = ( g f ( x ∗ ) , . . . , g f k ( x ∗ )) ∈ R k for every ≤ x ∗ < d .Proof. Let g f = ( g f , . . . , g f k ) be the tuple of formal power series of the sequences f , . . . , f k . By Lemma 1,lim n → ∞ f i ( n + ) f i ( n ) = O ( d ) . Thus, g f ( x ∗ ) = ( g f ( x ∗ ) , . . . , g f k ( x ∗ )) ∈ R k converges for every 0 ≤ x ∗ < d . ByLemma 2, g f is the unique formal power series solution of (2). . Clemente Theorem 4.
The zeroness problem for conv-rec sequences is in
PSPACE .Proof.
Let f be a conv-rec sequence of combined degree d with auxiliary sequences f , . . . , f k satisfying(1). Consider the associated generating functions g = ( g f , . . . , g f k ) . Clearly, f ( n ) = n ∈ N if,and only if, g f ( x ) = x sufficiently small. By Lemma 3, g ( x ∗ ) is the unique solution of (2) forevery 0 ≤ x ∗ < d . It thus suffices to say that, for every 0 ≤ x ∗ < d , all solutions g ( x ∗ ) of the system (2)satisfy g f ( x ∗ ) =
0. This can be expressed by the following universal first-order sentence over the reals(where ¯ y = ( y , . . . , y k ) ) ∀ (cid:18) ≤ x < d (cid:19) . ∀ ¯ y . ¯ y = f ( ) + x · ˆ p ( ¯ y ) → y = . The sentence above can be decided in
PSPACE by appealing to the existential theory of the reals [7,Theorem 3.3].
Let Σ be a finite alphabet. We denote by Σ ∗ the set of all finite words over Σ , including the empty word ε . A language is a subset L ⊆ Σ ∗ . The concatenation of two languages L , M ⊆ Σ ∗ is unambiguous if w ∈ L · M implies that w factors uniquely as w = u · v with u ∈ L and M ∈ v . A context-free grammar (CFG) is a tuple G = ( Σ , N , S , ← ) where Σ is a finite alphabet of terminal symbols , N is a finite set of nonterminal symbols , of which S ∈ N is the starting nonterminal symbol , and ← ⊆ N × ( N ∪ Σ ) ∗ is a setof productions. A CFG is in short Greibach normal form if productions are of the form either X ← ε . or X ← aY Z . An X -derivation tree is a tree satisfying the following conditions: 1) the root node ε is labelledby the nonterminal X ∈ X , 2) every internal node is labelled by a nonterminal from N , 3) whenever a node u has children u · , . . . , u · k there exists a rule Y ← w · · · w k with w i ∈ N ∪ Σ s.t. Y is the label of u and w i is the label of u · i , and 4) leaves are labelled with terminal symbols from Σ . The language recognised by a nonterminal X is the set L ( X ) of words w = a · · · a n ∈ Σ s.t. there exists an X -derivation tree withleaves labelled by (left-to-right) a , . . . , a n ; the language recognised by G is the language recognised bythe starting nonterminal L ( G ) = L ( S ) . A CFG G is unambiguous (UCFG) if for every accepted word w ∈ L ( G ) there exists exactly one derivation tree witnessing its acceptance. The universality problem( UUCFG ) asks, given a UCFG G , whether L ( G ) = Σ ∗ . In this section present
PTIME reductions from inclusion problems for NFA and UCFG to
UUCFG . Thisserves us as a motivation to study the complexity of
UUCFG in Section 3.2. We proceed in two steps. Inthe first step, we present a general l.h.s. determinisation procedure for inclusion problems (Section 3.1.1)which is widely applicable to essentially any machine-based model of computation. In the second step,assuming a deterministic l.h.s., we show a reduction from inclusion to universality (Section 3.1.2). Weapply these two reductions in Section 3.1.3.
It is an empirical observation that in many inclusion problems of the form L ⊆ M the major source ofdifficulty is with M and not with L . For example, for finite automata the inclusion problem is PSPACE -complete when M is presented by a NFA and in NLOGSPACE when it is presented by a DFA. In either4
Complexity of the Universality Problem for Unambiguous Context-Free Grammars case, it is folklore that whether L is presented as a NFA or DFA does not matter. A more dramaticexample is given when L is regular and M context-free, since the inclusion above is undecidable when M is presented by a CFG and in PTIME when it is presented by a DCFG.In this section we give a formal explanation of this phenomenon by providing a generic reduction ofan inclusion problem as above to one where the l.h.s. L is a deterministic language. The reduction willbe applicable under mild assumptions which are satisfied by most machine-based models of languageacceptors such as finite automata, B¨uchi automata, context-free grammars/pushdown automata, Petri-nets,register automata, timed automata, etc. For the language class of the r.h.s. M it suffices to have closureunder inverse homomorphic images, and for the l.h.s. L it suffices that we can rename the input symbolsread by transitions in a suitable machine model . Moreover, we argue that such transformation preserveswhether M is recognised by a deterministic or an unambiguous machine.Let Σ be a finite alphabet . Assume that L = L ( A ) ⊆ Σ ∗ is recognised by a nondeterministic machine A with transitions of the form δ = p a , op −−→ q ∈ ∆ A , where op is an optional operation that manipulatesa local data structure (a stack, queue, a tape of a Turing machine, etc...). The construction below doesnot depend on what op does. We assume w.l.o.g. that A is total , i.e., for every control location p andinput symbol a ∈ Σ there exists a transition of the form p a , −→ ∈ ∆ A . Consider a new alphabet Σ (cid:48) = ∆ A ,together with the projection homomorphism h : Σ (cid:48) → Σ that maps a transition δ = p a , op −−→ q ∈ ∆ A to itslabel h ( δ ) = a ∈ Σ . We modify A into a new machine A (cid:48) by replacing each transition δ above with p δ , op −−→ q ∈ ∆ A (cid:48) . Intuitively, A (cid:48) behaves like A except that it needs to declare which transition δ it is actuallytaking in order to read a = h ( δ ) . By construction, A (cid:48) is deterministic (in fact, every transition has a uniquelabel across the entire machine) and L ( A ) = h ( L ( A (cid:48) )) is the homomorphic image of L ( A (cid:48) ) .We need to adapt the machine B recognising M = L ( B ) in order to preserve inclusion. For everytransition r a , op −−→ s ∈ ∆ B and for every δ = p b , op (cid:48) −−−→ q ∈ ∆ A with b = a , we have in B (cid:48) a transition r δ , op −−→ s ∈ ∆ B (cid:48) . Intuitively, B (cid:48) behaves like B except that it reads additional information on the transition taken by A (cid:48) . This information is not actually used by B (cid:48) during its execution but it is merely added in order to liftthe alphabet from Σ to Σ (cid:48) . We have L ( B (cid:48) ) = h − ( L ( B )) is the inverse homomorphic image of L ( B ) . Thefollowing lemma states the correctness of the reduction. Lemma 5.
We have the following equivalence: L ( A ) ⊆ L ( B ) if, and only if, L ( A (cid:48) ) ⊆ L ( B (cid:48) ) . Proof.
By generic properties of images and inverse images we have the following two inclusions: L ( A (cid:48) ) ⊆ h − ( h ( L ( A (cid:48) ))) and h ( h − ( L ( B ))) ⊆ L ( B ) . (3)For the “only if” direction, if L ( A ) ⊆ L ( B ) holds, then h − ( L ( A )) ⊆ h − ( L ( B )) , which, by the definitionof A (cid:48) and B (cid:48) , is the same as h − ( h ( L ( A ))) ⊆ L ( B (cid:48) ) . By (3), L ( A (cid:48) ) ⊆ h − ( h ( A (cid:48) )) ⊆ L ( B (cid:48) ) , as required. Forthe “if” direction, if L ( A (cid:48) ) ⊆ L ( B (cid:48) ) holds, then also h ( L ( A (cid:48) )) ⊆ h ( L ( B (cid:48) )) holds. Similarly as above, wehave L ( A ) = h ( L ( A (cid:48) )) ⊆ h ( L ( B (cid:48) )) = h ( h − ( L ( B ))) ⊆ L ( B ) , as required.The following lemma states that the reduction above preserves whether B is deterministic or unam-biguous. We mean here the following generic semantic notion of unambiguity: B is unambiguous if forevery w ∈ Σ ∗ , there exists at most one accepting run of B over w . (This notion specialises to the classicalnotion of unambiguity of finite automata, pushdown automata, Parikh automata, etc.) The reduction applies also to undecidable instances of the language inclusion problem such as CFG ⊆ DCFG, however inthis case it is of no use since DCFG ⊆ DCFG is known to be undecidable [20, Theorem 10.7, Point 2]. The construction below can easily be adapted to infinite alphabets of the form Σ × A , where Σ is finite and A is an infiniteset of data values [4]. Languages of infinite words can be handled similarly. . Clemente Lemma 6.
If B is deterministic, then so is B (cid:48) . If B is unambiguous, then so is B (cid:48) .Proof.
A transition p δ , op −−→ q ∈ ∆ B (cid:48) in B (cid:48) is obtained taking several distinct copies of a transition p a , op −−→ q ∈ ∆ B in B w.r.t. every possible transition δ ∈ ∆ A over the same input symbol h ( δ ) = a . Byway of contradiction, assume that B is deterministic and that B (cid:48) is not deterministic. There are two distincttransitions p δ , op −−−→ q , p δ , op −−−→ q ∈ ∆ B (cid:48) in B (cid:48) from the same control location p and input δ ∈ Σ (cid:48) . If δ islabelled by h ( δ ) = a ∈ Σ , then by construction there are two distinct transitions p a , op −−−→ q , p a , op −−−→ q ∈ ∆ B in B over the same input symbol a . This contradicts the fact that B was assumed to be deterministic,and thus B (cid:48) must be deterministic as well. An analogous argument shows that also unambiguity ispreserved. Let L and M be two classes of languages and let L ∈ L and M ∈ M . A naive approach to decide theinclusion problem (and the most common) is to use the following equivalence: L ⊆ M if, and only if, L ∩ ( Σ ∗ \ M ) = /0 . (4)However, this requires complementation of M , which is either expensive (exponential complexity forNFA) or just impossible (context-free languages are not closed under complemenetation, even for theunambiguous subclass [19]). However, we observe the following related reduction which works muchbetter in our setting: L ⊆ M if, and only if, ( M ∩ L ) ∪ ( Σ ∗ \ L ) = Σ ∗ . (5)On the face of it, this looks more complicated than (4) because we now have to perform a complemen-tation (of L ), an intersection, a union, and finally we reduce to the universality problem instead of thenonemptiness, which is still difficult in general. However, in our setting there are gains. First of all, thanksto Section 3.1.1 we can assume that L is a deterministic language, and thus complementation is usuallyavailable (and cheap). Second, while universality is still a difficult problem, it can be easier than inclusion,e.g., DCFG inclusion is undecidable while DCFG universality is decidable (even in PTIME ).In order to apply (5) we require that L is a deterministic class efficiently closed under complement(i.e., a representation for the complement is constructible in PTIME ) and that the class M is closedunder disjoint unions and intersections with languages from L . Most deterministic languages classes,such as those recognised by deterministic finte automata, deterministic context-free grammars, determin-istic Parikh automata, deterministic register automata, etc., satisfy the first requirement . The secondrequirement is satisfied for classes of languages for which the underlying machine models admit a productconstruction . A notable exception is deterministic Petri-net languages under coverability semantics, since the complement of suchlanguages intuitively requires checking whether some counter is negative, which is impossible without zero tests. In fact, if botha language and its complement are deterministic Petri-net recognisable under coverability semantics, then they are both regular[11]. As an example not satisfying this requirement, one can take L = M to be the class of DCFL, since they are not closedunder intersection. In fact, while we show in this paper that UUCFG is decidable, the equivalence problem for UCFG is open. Complexity of the Universality Problem for Unambiguous Context-Free Grammars
In this section we apply the reductions of Section 3.1.1 and Section 3.1.2 in order to reduce certaininclusion problems to their respective universality variant.
Theorem 7. “NFA ⊆ UFA” is in
PTIME . While equivalence and inclusion of UFA is well-known to be in
PTIME [33, Corollary 4.7], the samecomplexity for the more general problem “NFA ⊆ UFA” does not seem to have been observed before.
Proof.
By Section 3.1.1, the problem reduces to “DFA ⊆ UFA”. By (5), L ⊆ M is equivalent to N : = M ∩ L ∪ ( Σ ∗ \ L ) = Σ ∗ . Notice that N is effectively UFA, since the DFA language L can be complementedin PTIME , the intersection M ∩ L is also UFA and computable in quadratic time, and the disjoint union of aUFA and a DFA is also a UFA computable in linear time. Since the universality problem for unambiguousautomata can be solved in PTIME , also “DFA ⊆ UFA”, and thus “NFA ⊆ UFA”, is in
PTIME as well.
Theorem 8. “NFA ⊆ UCFG” is
PTIME inter-reducible with
UUCFG .Proof.
By Section 3.1.1, the problem reduces to “DFA ⊆ UCFG”. Thanks to Section 3.1.2, the latterproblem reduces to
UUCFG since 1) DFA languages are efficiently closed under complement (in
PTIME ),2) UCFG languages are efficiently closed under intersection with DFA languages (in
PTIME ), and 3) thedisjoint union of a UCFG language and a DFA language is a UCFG language. Thus, “NFA ⊆ UCFG”reduces to
UUCFG , and since
UUCFG is a special case of the former problem, “NFA ⊆ UCFG” is
PTIME inter-reducible with
UUCFG . Theorem 9. “CFG ⊆ UFA” reduces to
UUCFG .Proof.
By Section 3.1.1, “CFG ⊆ UFA” reduces to “DCFG ⊆ UFA”, which in turn reduces to
UUCFG thanks to Section 3.1.2 because 1) DCFG languages are efficiently closed under complement, 2) theintersection of a UFA and a DCFG language is efficiently DCFG, and 3) the disjoint union of twoDCFG languages is efficiently UCFG. (The latter problem reduces to universality of two disjoint DCFGlanguages, which in principle may be easier than
UUCFG .) UUCFG in PSPACE
In this section we show that
UUCFG is in
PSPACE by reducing to the zeroness problem for conv-recsequences. This complexity upper bound appears also in [29], albeit with a more direct argument reducingto systems of monotone polynomial equations.Let Σ = { a , b } be a finite alphabet and let L ⊆ Σ ∗ be a language of finite words over Σ . The countingfunction of L is the sequence f L : N → N s.t. for every n ∈ N , f L ( n ) = | L ∩ Σ n | counts the number of wordsof length n in L . Given a unambiguous context-free grammar G = ( Σ , N , S , ← ) in short Greibach normalform, let f X : = f L ( X ) : N → N be the counting function of the language L ( X ) recognised by the nonterminal X ∈ N . It is well-known that the f X ’s satisfy the following system of equations with convolution: f X ( n + ) = ∑ X ← aY Z ( f Y ∗ f Z )( n ) . (6)The initial condition is f X ( ) = X ← ε and f X ( ) = f S , which is thecounting function of the language L ( G ) recognised by G , is conv-rec. Unambiguity is used cruciallyto show that any word w in L ( Y · Z ) factorises uniquely as w = u · v with u ∈ L ( Y ) and v ∈ L ( Z ) , whichallows us to obtain f L ( Y · Z ) = f L ( Y ) ∗ f L ( Z ) . . Clemente G is universal if, and only if, f S is identically equal to the sequence g ( n ) = n . The lattersequence is conv-rec since it satisfies g ( n + ) = ( g ∗ g )( n ) , with the initial condition g ( ) =
1. Thus G is universal if, and only if, f ( n ) = g ( n ) − f S ( n ) is identically zero. Since conv-rec sequences are closedunder subtraction, f ( n ) is also conv-rec. By Theorem 4, we can decide zeroness of f in PSPACE , andthus the same upper bound holds for
UUCFG . Theorem 10.
The universality problem for unambiguous context-free grammars
UUCFG is in
PSPACE . SQRTSUM -hardness of coin-flip measure
In this section we show that a quantitative generalisation of
UUCFG is hard for a well-known problemin numerical computing. Let Σ n = { a , . . . , a n } be a finite alphabet of n distinct letters. Consider thefollowing random process to generate a finite word in Σ ∗ . At step k we select one option a k ∈ Σ ε = Σ n ∪ { ε } uniformly at random. If a k = ε , then we terminate and we produce in output a · · · a k − . Otherwise, wecontinue to the next step k +
1. It is easy to see that the probability to generate a word depends only on itslength and equals µ coin ( w ) = (cid:16) | Σ | + (cid:17) | w | + . The coin-flip measure of a language of finite words L ⊆ Σ ∗ is µ coin ( L ) = ∑ w ∈ L µ coin ( w ) . Clearly, 0 ≤ µ coin ( L ) ≤ µ coin ( L ) = L = /0, and µ coin ( L ) = L = Σ ∗ .Since µ coin ( w ) depends just on | w | , we can write µ coin ( L ) = ∑ ∞ k = f L ( k ) · (cid:0) n + (cid:1) k + , where f L ( k ) = (cid:12)(cid:12) L ∩ Σ k (cid:12)(cid:12) is the counting function of L . In other words, one possible way of computing the coin-flipmeasure it by evaluating the generating function g f L ( x ) at x = n + (modulo a correction factor): µ coin ( L ) = n + · g f L (cid:0) n + (cid:1) . Consequently, the coin-flip measure of a regular language is rational, and that of anunambiguous context-free language is algebraic (following from the analogous, and more general, factsabout the respective generating functions [8]). Let L , M ⊆ Σ ∗ n be two languages with unambiguousconcatenation L · M . Then µ coin ( L · M ) = ( n + ) · µ coin ( L ) · µ ( M ) . (7)The coin-flip comparison problem asks, given a language L ⊆ Σ ∗ , a rational threshold 0 ≤ ε ≤ ∼ ∈ {≤ , <, >, ≥} , whether µ coin ( L ) ∼ ε holds. Theuniversality problem for L is the special case when ε =
1. We now relate the coin-flip comparison problemto an open problem in numerical computing. The
SQRTSUM problem asks, given d , . . . , d n ∈ N encodedin binary and a comparison operator ∼ ∈ {≤ , <, >, ≥} , whether : n ∑ i = (cid:112) d i ∼ d . (8)This problem can be shown to be in PSPACE by deciding the existential formula ∃ x , . . . , x n . x = d ∧ · · · ∧ x n = d n ∧ x + · · · + x n ∼ d over the reals [7]. It is a long-standing open problem in the theoryof numerical computation whether SQRTSUM is in NP , or whether it is NP -hard [1, 15]. Theorem 11.
The coin-flip measure comparison problem is
SQRTSUM -hard for UCFG.
In the rest of the section we prove the theorem above. Let d , . . . , d n ∈ N be the input to SQRT-SUM . We assume w.l.o.g. that n is an odd number ≥
3. We construct a rational constant ε ∈ Q and In fact, the problem reduces to the case when ∼ = ≥ is fixed. By doing binary search in the interval { , ,..., n · d } , withonly O ( log ( n · d )) queries to (8) we can find the unique ˆ d ∈ N s.t. ˆ d ≤ ∑ ni = √ d i ≤ ˆ d +
1. We can then solve ∑ ni = √ d i ≤ d by checking d ≤ ˆ d +
1, and similarly for the other comparison operators. Complexity of the Universality Problem for Unambiguous Context-Free Grammars a UCFG G = ( Σ n , N , X , ← ) over a n -ary alphabet Σ n = { a , . . . , a n } and nonterminals N containing { X , . . . , X n , C , . . . , C n , A } plus some auxiliary nonterminals (omitted for readability) s.t. µ coin ( L ( G )) ∼ ε if, and only if, (8) holds. The principal productions of the grammar are: X ← a · X | · · · | a n · X n , X ← C | A · X · a n · X , ... X n ← C n | A · X n · a n · X n . The remaining nonterminals C i ’s and A will generate certain regular languages to be determined below.Let d = max ni = d i . For every 1 ≤ i ≤ n , let x i = − √ d i d . It is easy to check that x i is the least non-negativesolution of x i = c i + a · x i where c i : = (cid:18) − d i d (cid:19) and a : = . (9)In the following, we write µ ( X ) for a non-terminal X ∈ N as a shorthand for µ coin ( L ( X )) . Since µ ( a ) = · · · = µ ( a n ) = ( n + ) , by (7) we have µ ( X ) = n + ( µ ( X ) + · · · + µ ( X n )) and µ ( X i ) = µ ( C i ) + ( n + ) · µ ( A ) · µ ( X i ) , i ∈ { , . . . , n } . (10)We aim at obtaining µ ( X i ) = x i . By comparing (10) with (9) we deduce that the nonterminals C i and A must generate languages of measure µ ( C i ) = c i , resp., µ ( A ) = an + = ( n + ) . Since the measures a , c i are rational, it suffices to find regular languages L ( A ) , L ( C i ) . The main difficulty is to define theselanguage as to ensure that G is unambiguous and of polynomial size. In order to achieve this we furtherrequire that 1) L ( A ) ⊆ Σ n − is a finite set of words of length 1 (single letters) not containing letter a n , and2) L ( C i ) ⊆ Σ ∗ n − is a set of words not containing letter a n .We first define L ( A ) . Let A ← a | · · · | a n + . In order to avoid letter a n , we require ( n + ) ≤ n −
1. The latter condition is satisfied since we assumed n ≥ L ( A ) ⊆ Σ n − is finite, contains only words of length 1, and has measure µ ( A ) = n + · ( n + ) = an + ,as required.The definition of L ( C i ) of measure µ ( C i ) = c i is more involved. In general, it is easy to construct aregular expression (or a finite automaton) recognising a language of measure equal to a given rationalnumber. However, we have two constraints to respect: 1) we can use only letters from Σ n − , and 2) theregular expression must have size polynomial in the bit encoding of c i . The first constraint entails anupper bound µ ( Σ ∗ n − ) = on the maximal measure that L ( C i ) can have. However, this is not a problemin our case since c i < by definition. The second constraint is handled by the following lemma. A fullproof is available in the technical report [9]. Lemma 12 (Representation lemma) . Let n + ∈ N with n ≥ be a base, let m ∈ N s.t. ≤ m ≤ n, andlet c ∈ R with ≤ c ≤ n − m + be a target rational measure written in reduced form as c = pq , with p , q ∈ N , p ≤ q. There exists an unambiguous regular expression e using only letters from Σ m ⊆ Σ n recognisinga language of measure µ ( L ( e )) = c. Moreover, if there exists (cid:96) ∈ N s.t. q | ( n + ) (cid:96) , then e can be taken ofsize polynomial in log q, n, and (cid:96) . . Clemente m : = n − c : = c i and obtain an unambiguous regular expression e recognising a language L ( e ) ⊆ Σ ∗ n − of measure c i . We now argue that e can be taken of polynomialsize. In order to achieve this, we assume w.l.o.g. that d = ( n + ) h for some h . (This can be ensured byadding a new integer d n + = ( n + ) h for some h large enough, and by replacing d with d + √ d n + = d + ( n + ) h .) Consequently, c i = d ( d − d i )( n + ) h = pq with p , q ∈ N relatively prime and q | ( n + ) h , andthus e has polynomial size by taking (cid:96) = h in the lemma. The set of polynomially many productionrules for nonterminal C i is derived immediately from the regular expression e by adding some auxiliarynonterminals. Moreover, since e is unambiguous, the same applies to the rules for C i . This completes thedescription of the grammar G . Lemma 13.
The grammar G is unambiguous.Proof.
Since L ( G ) = L ( X ) is the union of languages L ( a · X ) , . . . , L ( a n · X n ) , and the latter are disjoint,it suffices to show that the L ( X i ) ’s are recognised unambiguously. Let w ∈ L ( X i ) . If w does not containany a n , then necessarily w ∈ L ( C i ) . Otherwise, let w = ua n v where v does not contain any a n . Thus v ∈ L ( C i ) and u ∈ L ( A · X i ) . Since A produces only words of fixed length, u = xw (cid:48) unambiguously with x ∈ A and w (cid:48) ∈ L ( X i ) . This argument shows that for any w ∈ L ( X i ) if we let s be the number of a n in w ,then w ∈ L ( A s · C i · ( a n · C i ) s ) . Since A produces words of fixed length and C i does not produce any wordcontaining a n , the latter concatenation is unambiguous and thus w is produced unambiguously by X i .Let ε : = n + (cid:16) n − d d (cid:17) . The following lemma states the correctness of the reduction. Lemma 14.
We have µ ( L ( G )) ∼ ε if, and only if, (8) holds.Proof. Since x i = − √ d i d , we have µ ( X ) = µ ( a · X ) + · · · + µ ( a n · X n ) = ( n + )( µ ( a ) · µ ( X ) + · · · + µ ( a n ) · µ ( X n )) = n + ( µ ( X )+ · · · + µ ( X n )) = n + ( x + · · · + x n ) = n + (cid:16)(cid:16) − √ d d (cid:17) + · · · + (cid:16) − √ d n d (cid:17)(cid:17) = n + (cid:16) n − √ d + ··· + √ d n d (cid:17) , and thus ∑ ni = √ d i ∼ d if, and only if, µ ( L ( X )) ∼ ε , as required. We have shown novel
PSPACE upper bounds for several inclusion problems on UCFG and finite automata.We did not address language equivalence problems L = M , which in principle can be easier to decidethan the corresponding inclusions. For instance, while DCFG ⊆ DCFG is undecidable [20, Theorem 10.7,Point 2], DCFG = DCFG is decidable by the result of G. S´enizergues [30]. It is worth remarking thatdecidability of the equivalence problem UCFG = UCFG is not known. In fact, this is a special case ofthe multiplicity equivalence problem for CFG, which asks whether two CFGs have the same numberof derivations for every word they accept. Decidability of the latter problem is open as well [23] andinter-reducible with the language equivalence for probabilistic pushdown automata [16]. The restrictionof the UCFG = UCFG equivalence problem to words of a given length has been studied in [25].
Number sequences and the zeroness problem.
We obtained the
PSPACE upper bound for
UUCFG byreducing to the zeroness problem for conv-rec sequences. Conv-rec sequences generalise linear differencerecurrence with constant coefficients (a.k.a. constant-recursive or C-finite [22]; c.f. also [3] and citationstherein) by allowing the convolution product in the recurrence. They are a special case of more expressiveclasses such as P-recursive [22, Ch. 7] (a.k.a. holonomic ) and polynomial recursive sequences [6]. Thezeroness problem for P-recursive sequences is decidable [36] and the same holds for polynomial recursive0
Complexity of the Universality Problem for Unambiguous Context-Free Grammars sequences (as a corollary of the existence of cancelling polynomials [6, Theorem 11]). However, nocomplexity upper bounds are known for those more general classes.
Coin-flip measure.
As a complement to the
PSPACE upper bound for
UUCFG , we have shown thatthe coin-flip measure comparison problem µ coin ( L ( G )) ∼ ε of a UCFG G with ∼ ∈ {≤ , <, ≥ , > } and0 ≤ ε ≤ SQRTSUM -hard. The main difficulty is that the measure is generated according to a fixedstochastic process. If we relax this constraint and generate the measure according to an arbitrary finiteMarkov process, then one can obtain
SQRTSUM -hardness already for DCFG.It is known that the quantitative decision problem for µ G ( Σ ∗ ) where G is a stochastic context-freegrammar (SCFG) is SQRTSUM -hard [15]. Our setting is incomparable: On the one hand we fix aparticular measure, namely the coin-flip measure µ coin (which corresponds to a fixed SCFG with rules X ← ε | a · X | · · · | a n · X ). On the other hand, we are interested in the quantity µ coin ( L ( G )) where G isan arbitrary UCFG (and thus not necessarily universal).We leave it as an open problem to establish the exact complexity of the universality problem forUCFG and the coin-flip measure 1 problem. When the system of polynomial equations obtained fromthe grammar is probabilistic (PPS ) the measure 1 problem is in PTIME [15] (and even in stronglypolynomial time [13]). However, the equations obtained from UCFG are monotone (MPS) but not PPSin general. As an example, consider a singleton alphabet Σ = { a } and productions of the form X ← a and, for n ≥ X n + ← X n · X n . The corresponding MPS system is x = and x n + = · x n . The formersystem is not a PPS, since in the second equation the coefficients sum up to 2. It may be argued that bythe change of variable z n : = · x n we obtain the system z = and z n + = z n which is PPS. However, thistransformation reduces the value 1 problem on the original MPS to the value 1 / PTIME .One source of difficulty in the
UUCFG problem is that witnesses of non-universality can haveexponential length. Extending the previous example, consider the additional rules Y ← ε and Y n + ← Y n | X n · Y n . The nonterminal X n generates a single word L ( X n ) = (cid:8) a n (cid:9) of length 2 n . It can be verifiedby induction that Y n generates all words L ( Y n ) = (cid:8) a , a , . . . , a n − (cid:9) of length ≤ n −
1, and consequentlythe grammar is unambiguous. Thus L ( Y n ) is not universal, however the shortest witness has length 2 n . Interms of measures, µ coin ( L ( X n )) = n + and µ coin ( L ( Y n )) = − n + , and thus UCFG have measures thatcan be exponentially close to 0, resp., to 1. Since a word of length n over a unary alphabet has measure n + = − O ( n ) , if language L is not universal µ coin ( L ) <
1, then there is a non-universality witness oflength at most log ( − µ coin ( L )) . Thus upper bounds on 1 − µ coin ( L ) yield upper bounds on the shortestnon-universality witness. The “CFG ⊆ UFA” problem.
We have shown that CFG ⊆ UFA reduces to DCFG ⊆ UFA and, inturn, the latter reduces to
UUCFG and thus can be solved in
PSPACE . This needs not be optimal andthere are reasons to suspect that better algorithms may be obtained. If we interpret a DCFG G as astochastic context-free grammar (SCFG), then query L ( G ) ⊆ L ( A ) is equivalent to µ G ( L ( A )) = A is unambiguous, where µ G is the measure generated by G (a generalisation of the coin-flip measure).When A is DFA, µ G ( L ( A )) can be approximated in PTIME [14]. Generalising this result for A being UFAwould put DCFG ⊆ UFA in
PTIME . The regularity problem for UCFG.
There are other problems which are known to be undecidable forCFG but decidable for DCFG, such as the regularity problem [32, 34, 31]. An interesting open problem The sum of all coefficients is at most 1. . Clemente
Acknowledgements.
I warmly thank Alberto Pettorossi for his encouragement and guidance duringmy first steps in doing research. I also thank an anonymous reviewer for his helpful comments on apreliminary version of this draft.
References [1] Eric Allender, Peter B¨urgisser, Johan Kjeldgaard-Pedersen & Peter Bro Miltersen (2009):
On the Complexityof Numerical Analysis . SIAM J. Comput.
Automata-theoretic aspects of formal power series . Texts and Monographsin Computer Science, Springer, doi:10.1007/978-1-4612-6264-0.[3] Corentin Barloy, Nathana¨el Fijalkow, Nathan Lhote & Filip Mazowiecki (2020):
A Robust Class of Lin-ear Recurrence Sequences . In Maribel Fern´andez & Anca Muscholl, editors: , Leibniz International Proceedings in Informat-ics (LIPIcs)
Automata theory in nominal sets . LogicalMethods in Computer Science
Volume 10, Issue 3, doi:10.2168/LMCS-10(3:4)2014.[5] Alin Bostan, Arnaud Carayol, Florent Koechlin & Cyril Nicaud (2020):
Weakly-unambiguous Parikh automataand their link to holonomic series . In:
Accepted for publication in ICALP’20 .[6] Micha¨el Cadilhac, Filip Mazowiecki, Charles Paperman, Michał Pilipczuk & G´eraud S´enizergues (2020):
Onpolynomial recursive sequences . In:
Accepted for publication in ICALP’20 .[7] John Canny (1988):
Some Algebraic and Geometric Computations in PSPACE . In:
Proc. of STOC ’88 , ACM,New York, NY, USA, pp. 460–467, doi:10.1145/62212.62257.[8] N. Chomsky & M. P. Sch¨utzenberger (1963):
The Algebraic Theory of Context-Free Languages . In P. Braffort& D. Hirschberg, editors:
Computer Programming and Formal Systems , Studies in Logic and the Foundationsof Mathematics
35, Elsevier, pp. 118–161, doi:10.1016/S0049-237X(08)72023-8.[9] Lorenzo Clemente (2020):
On the complexity of the universality and inclusion problems for unambiguouscontext-free grammars (Invited Paper) . arXiv e-prints :arXiv:2006.05275. Available at https://arxiv.org/abs/2006.05275 .[10] Wojciech Czerwi´nski, Diego Figueira & Piotr Hofman (2020): Universality Problem for Unambiguous VASS .Available at https://hal.archives-ouvertes.fr/hal-02483495 . Working paper or preprint.[11] Wojciech Czerwinski, Slawomir Lasota, Roland Meyer, Sebastian Muskalla, K. Narayan Kumar &Prakash Saivasan (2018):
Regular Separability of Well-Structured Transition Systems . In Sven Schewe& Lijun Zhang, editors:
Proc. of CONCUR’18 , Leibniz International Proceedings in Informatics(LIPIcs)
Complexity Results and the Growths of Hairpin Completions ofRegular Languages . In:
Proc. of CIAA’10 , CIAA’10, Springer-Verlag, Berlin, Heidelberg, pp. 105–114,doi:10.1007/978-3-642-18098-9 12.[13] Javier Esparza, Andreas Gaiser & Stefan Kiefer (2010):
Computing Least Fixed Points of Probabilistic Systemsof Polynomials . In Jean-Yves Marion & Thomas Schwentick, editors:
STACS’10 , Leibniz InternationalProceedings in Informatics (LIPIcs)
5, Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany,pp. 359–370, doi:10.4230/LIPIcs.STACS.2010.2468. Complexity of the Universality Problem for Unambiguous Context-Free Grammars [14] Kousha Etessami, Alistair Stewart & Mihalis Yannakakis (2013):
Stochastic Context-free Grammars, RegularLanguages, and Newton’s Method . In:
In Proc. of ICALP’13 , ICALP’13, Springer-Verlag, Berlin, Heidelberg,pp. 199–211, doi:10.1007/978-3-642-39212-2 20.[15] Kousha Etessami & Mihalis Yannakakis (2009):
Recursive Markov Chains, Stochastic Grammars, andMonotone Systems of Nonlinear Equations . J. ACM
Language equivalence of probabilisticpushdown automata . Information and Computation
Concrete Mathematics , 2nd edition. AddisonWesley.[18] D. Yu Grigor’ev (1988):
Complexity of deciding Tarski algebra . Journal of Symbolic Computation
The Independence of Inherent Ambiguity From ComplementednessAmong Context-Free Languages . J. ACM
Introduction to Automata Theory, Languages, and Computation .Addison-Wesley.[21] Takumi Kasai & Shigeki Iwata (1992):
Some Problems in Formal Language Theory Known as Decidable areProved EXPTIME Complete . RIMS Kokyuroku
C-Finite Sequences , pp. 63–86. Springer Vienna, Vienna,doi:10.1007/978-3-7091-0445-3 4.[23] Werner Kuich (1994):
On the Multiplicity Equivalence Problem for Context-Free Grammars . In:
Proceedingsof the Colloquium in Honor of Arto Salomaa on Results and Trends in Theoretical Computer Science ,Springer-Verlag, Berlin, Heidelberg, pp. 232—250, doi:10.1007/3-540-58131-6 50.[24] Werner Kuich & Arto Salomaa (1986):
Semirings, Automata, Languages . EATCS Monographs on TheoreticalComputer Science 5, Springer, doi:10.1007/978-3-642-69959-7.[25] B. Litow (1996):
Bounded length UCFG equivalence . In Tetsuo Asano, Yoshihide Igarashi, Hiroshi Nagamochi,Satoru Miyano & Subhash Suri, editors:
Algorithms and Computation , Springer Berlin Heidelberg, Berlin,Heidelberg, pp. 239–246, doi:10.1007/BFb0009500.[26] P. Massazza & N. Sabadini (1989):
Some applications and techniques for generating functions . In Josep D´ıaz& Fernando Orejas, editors:
TAPSOFT ’89 , Springer Berlin Heidelberg, Berlin, Heidelberg, pp. 321–336,doi:10.1007/3-540-50939-9 141.[27] A. R. Meyer & L. J. Stockmeyer (1972):
The Equivalence Problem for Regular Expressions with SquaringRequires Exponential Space . In:
Proceedings of the 13th Annual Symposium on Switching and AutomataTheory , SWAT ’72, IEEE Computer Society, Washington, DC, USA, pp. 125–129, doi:10.1109/SWAT.1972.29.[28] Antoine Mottet & Karin Quaas (2019):
The Containment Problem for Unambiguous Register Automata .In Rolf Niedermeier & Christophe Paul, editors:
Proc. of STACS’19 , Leibniz International Proceedingsin Informatics (LIPIcs)
Learning regular languages offline from a positive sample . Master’s thesis, Universityof Warsaw.[30] G´eraud S´enizergues (1997):
The equivalence problem for deterministic pushdown automata is decidable . InPierpaolo Degano, Roberto Gorrieri & Alberto Marchetti-Spaccamela, editors:
Proc. of ICALP’97 , SpringerBerlin Heidelberg, Berlin, Heidelberg, pp. 671–681, doi:10.1007/3-540-63165-8 221.[31] Priti Shankar & B. S. Adiga (1991):
A Graph-based Regularity Test for Deterministic Context-free Languages . Theor. Comput. Sci.
A regularity test for pushdown machines . Information and Control . Clemente [33] Richard E. Stearns & Harry B. Hunt (1981): On the equivalence and containment problems for unambigu-ous regular expressions, grammars, and automata . In:
Proceedings of the 22nd Annual Symposium onFoundations of Computer Science , SFCS ’81, IEEE Computer Society, Washington, DC, USA, pp. 74–81,doi:10.1109/SFCS.1981.29.[34] Leslie G. Valiant (1975):
Regularity and Related Problems for Deterministic Pushdown Automata . J. ACM
On path equivalence of nondeterministic finite automata . Information ProcessingLetters