Abstract
The density of a language is defined as the function \(d_L(n) = | L \cap \Sigma^n |\) and counts the number of words of a certain length accepted by L. The study of the density of regular and context-free languages has attracted some attention culminating in the fact that such languages are either sparse, when the density can be bounded by a polynomial, or dense otherwise. We show that for all nonambiguous context-free languages the number of accepted words of a given length n can also be computed recursively using a finite combination of the number of accepted words smaller than n, or \(d_L = \sum_{j=1}^k u_j d_L (n-j) \). This extends an old result by Chomsky and provides us with a more expressive description and new insights into possible applications of the density function for such languages as well as possible characterizations of the density of higher languages.
Keywords
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Szilard, A., Yu, S., Zhang, K., Shallit, J.: Characterizing Regular Languages with Polynomial Densities. In: Havel, I.M., Koubek, V. (eds.) MFCS 1992. LNCS, vol. 629, pp. 494–503. Springer, Heidelberg (1992)
Chomsky, N., Miller, G.A.: Finite-state lanuages. Information and Control 1, 91–112 (1958)
Rozenberg, G., Salomaa, A.: Handbook of Formal Languages. In: Regular Languages, ch. 2, Springer, Heidelberg (1997)
Cohen, D.I.A.: Introduction to Computer Theory. Wiley, Chichester (1996)
Flajolet, P.: Analytic Models and Ambiguity of Context-Free Languages. Theor. Comput. Sci. 49, 283–309 (1987)
Incitti, R.: The Growth Function of Context-Free Languages. Theor. Comput. Sci. 255(1-2), 601–605 (2001)
Eisman, G., Ravikumar, B.: Approximate Recognition of Non-regular Languages by Finite Automata. In: ACSC, pp. 219–228 (2005)
Demaine, E., López-Ortiz, A., Munro, J.: On Universally Easy Classes for NP-Complete Problems. Theor. Comput. Sci. 304(1-3), 471–476 (2003)
Habermehl, P.: A Note on SLRE (2000), http://citeseer.ist.psu.edu/375870.html
Hartwig, M.: Acceptance Probability of Lower Regular Languages and Problems using Little Resources. In: MMU International Symposium on Information and Communications Technologies (M2USIC 2006), Petaling Jaya, Malaysia, Nov 16 - 17 (2006)
Hartwig, M., Phon-Amnuaisuk, S.: Regular Languages up to Star Height 1 and the Difference Shrinking Acceptance Probability. In: Proceedings of TMFCS-08 (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hartwig, M. (2010). On the Density of Regular and Context-Free Languages. In: Thai, M.T., Sahni, S. (eds) Computing and Combinatorics. COCOON 2010. Lecture Notes in Computer Science, vol 6196. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14031-0_35
Download citation
DOI: https://doi.org/10.1007/978-3-642-14031-0_35
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14030-3
Online ISBN: 978-3-642-14031-0
eBook Packages: Computer ScienceComputer Science (R0)