Abstract: We present a weight measure on formal languages based on the summands of a geometric series discounted by the fraction of words of certain length in the language, guaranteeing the weight to be a real value between 0 and 1 for any language. We show that this weight measure is computable for regular languages. As an application, we derive a distance metric between languages as the weight of their symmetric difference and show how it can be used in automatic grading of standard exercises in formal language theory classes.
Loading