Efficiently 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.
KeywordsMarkov Chain Rational Number Accumulation Point Regular Language Convergence Problem
Unable to display preview. Download preview PDF.
- 2.Berstel, J.: Sur la densité asymptotique de langages formels. In: ICALP, pp. 345–358 (1972)Google Scholar
- 3.Bhattacharya, R.N., Waymire, E.C.: Stochastic processes with applications, New York. Wiley Series in Probability and Mathematical Statistics (1990)Google Scholar
- 4.Bodirsky, M., Gärtner, T., von Oertzen, T., Schwinghammer, J.: Efficiently computing the density of regular languages, Full version, available under http://www.informatik.hu-berlin.de/~bodirsky/publications
- 6.de Alfaro, L.: How to specify and verify the long-run average behavior of probabilistic systems. In: Proc. 13th IEEE Symp. on Logic in Computer Science. IEEE Computer Society Press, Los Alamitos (1998)Google Scholar
- 7.Gantmacher, F.R.: The Theory of Matrices. Chelsea Pub. Co., New York (1977)Google Scholar
- 8.Garey, M., Johnson, D.: A Guide to NP-completeness. CSLI Press, Stanford (1978)Google Scholar
- 12.Stockmeyer, L.J., Meyer, A.: Word problems requiring exponential time. In: Proc. 5th Ann. ACM Sypm. on Theory of Computing. Association of Computing Machinery, vol. 1–9 (1972)Google Scholar