Effciently Computing the Density of Regular Languages

A regular language L is called dense if the fraction f m of words of length m over some fixed signature that are contained in L tends to one if m tends to infinity. We present an algorithm that computes the number of accumulation points of (f m ) in polynomial time, if the regular language L is given by a finite deterministic automaton, and can then also efficiently check whether L is dense. Deciding whether the least accumulation point of (f m ) is greater than a given rational number, however, is coNP-complete. If the regular language is given by a non-deterministic automaton, checking whether L is dense becomes PSPACE-hard. We will formulate these problems as convergence problems of partially observable Markov chains, and reduce them to combinatorial problems for periodic sequences of rational numbers.

[1]  Peter Lancaster,et al.  The theory of matrices , 1969 .

[2]  Kurt Mehlhorn,et al.  LEDA: a platform for combinatorial and geometric computing , 1997, CACM.

[3]  Jeffrey D. Smith,et al.  Design and Analysis of Algorithms , 2009, Lecture Notes in Computer Science.

[4]  F. R. Gantmakher The Theory of Matrices , 1984 .

[5]  Dexter Kozen,et al.  The Design and Analysis of Algorithms , 1991, Texts and Monographs in Computer Science.

[6]  Albert R. Meyer,et al.  Word problems requiring exponential time(Preliminary Report) , 1973, STOC.

[7]  I. G. MacKenzie,et al.  Stochastic Processes with Applications , 1992 .

[8]  Luca de Alfaro,et al.  How to Specify and Verify the Long-Run Average Behavior of Probabilistic Systems , 1998, LICS.

[9]  Michael Clausen,et al.  Algebraic complexity theory , 1997, Grundlehren der mathematischen Wissenschaften.

[10]  Arto Salomaa,et al.  Automata-Theoretic Aspects of Formal Power Series , 1978, Texts and Monographs in Computer Science.

[11]  Jean Berstel Sur la densité asymptotique de langages formels , 1972, ICALP.

[12]  Volker Strassen,et al.  Algebraic Complexity Theory , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[13]  Etienne Grandjean,et al.  Complexity of the First-Order Theory of Almost All Finite Structures , 1983, Inf. Control..

[14]  Kurt Mehlhorn,et al.  A platform for combinatorial and geometric computing , 1995 .