Weights of formal languages based on geometric series with an application to automatic grading

Published: 01 Jan 2024, Last Modified: 26 May 2025Theor. Comput. Sci. 2024EveryoneRevisionsBibTeXCC BY-SA 4.0
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