Weights of formal languages based on geometric series with an application to automatic grading
Florian Bruse,Maurice Herwig,Martin Lange
DOI: https://doi.org/10.1016/j.tcs.2023.114295
IF: 1.002
2024-02-01
Theoretical Computer Science
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.
computer science, theory & methods