On the density of regular and context-free languages

  • Authors:
  • Michael Hartwig

  • Affiliations:
  • Faculty of Information Technology, Multimedia University, Cyberjaya, Malaysia

  • Venue:
  • COCOON'10 Proceedings of the 16th annual international conference on Computing and combinatorics
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

The density of a language is defined as the function dL(n) = |L ∩ Σ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 dL = Σj=1k ujdL(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.