Skip to main content
QUICK REVIEW

[Paper Review] Regular Language Distance and Entropy

Austin J. Parker, Kelly B. Yancey|arXiv (Cornell University)|Feb 19, 2016
Computability, Logic, AI AlgorithmsComputer Science13 references4 citations
TL;DR

This paper proposes a novel, well-defined distance metric for regular languages by introducing a Cesáro-based Jaccard distance and a new limit-based entropy formulation that always exists. It proves equivalence between this entropy formulation and both Shannon’s and topological entropy, and introduces an entropy sum distance metric that is granular and behaves as a pseudo-metric, resolving issues with traditional Jaccard distance in infinite regular languages.

ABSTRACT

This paper addresses the problem of determining the distance between two regular languages. It will show how to expand Jaccard distance, which works on finite sets, to potentially-infinite regular languages. The entropy of a regular language plays a large role in the extension. Much of the paper is spent investigating the entropy of a regular language. This includes addressing issues that have required previous authors to rely on the upper limit of Shannon's traditional formulation of entropy, because its limit does not always exist. The paper also includes proposing a new limit based formulation for the entropy of a regular language and proves that formulation to both exist and be equivalent to Shannon's original formulation (when it exists). Additionally, the proposed formulation is shown to equal an analogous but formally quite different notion of topological entropy from Symbolic Dynamics -- consequently also showing Shannon's original formulation to be equivalent to topological entropy. Surprisingly, the natural Jaccard-like entropy distance is trivial in most cases. Instead, the {\it entropy sum} distance metric is suggested, and shown to be granular in certain situations.

Motivation & Objective

  • To resolve the fundamental flaw in classical Jaccard distance for regular languages, where the limit may not exist due to oscillations in string counts at specific lengths.
  • To develop a well-defined, computable entropy formulation for regular languages that always exists, overcoming the non-convergence of Shannon’s original limit.
  • To establish a new distance metric—entropy sum distance—that is both mathematically sound and granular under certain conditions.
  • To unify concepts from information theory (Shannon entropy) and symbolic dynamics (topological entropy) by proving their equivalence in the context of regular languages.
  • To provide a robust framework for measuring similarity between regular languages in applications such as bioinformatics, network defense, and pattern matching.

Proposed method

  • Introduce a Cesáro average to smooth oscillations in the Jaccard distance over increasing string lengths, ensuring convergence.
  • Define a new entropy formulation as the limit: $ \lim_{n\to\infty} \frac{\log|W_{\leq n}(L)|}{n} $, where $ W_{\leq n}(L) $ is the set of all strings in $ L $ of length at most $ n $.
  • Prove that this new entropy formulation always exists and equals Shannon’s original entropy when the limit exists, and is equivalent to topological entropy from symbolic dynamics.
  • Define the entropy sum distance $ H_S(L_1, L_2) = h(L_1 \cap \overline{L_2}) + h(\overline{L_1} \cap L_2) $, where $ h $ is the new entropy formulation.
  • Use deterministic finite automata (DFAs) to compute the entropy and distance metrics algorithmically.
  • Apply the theory to show that the entropy sum distance is a pseudo-metric and granular when both symmetric differences have positive entropy.

Experimental results

Research questions

  • RQ1Can a Jaccard-like distance be extended to infinite regular languages in a way that always exists and is computable?
  • RQ2Does a limit-based entropy formulation for regular languages exist that avoids the non-convergence issues of Shannon’s original formulation?
  • RQ3Is the proposed entropy formulation equivalent to topological entropy from symbolic dynamics?
  • RQ4Can an entropy-based distance metric be constructed that is both mathematically sound and granular in practical cases?
  • RQ5Why does the natural Jaccard-based entropy distance fail to be granular in most cases, and what alternative metric resolves this?

Key findings

  • The proposed entropy formulation $ \lim_{n\to\infty} \frac{\log|W_{\leq n}(L)|}{n} $ always exists and is finite for any regular language, resolving a key limitation of prior approaches.
  • This new entropy formulation is proven to be equivalent to Shannon’s original entropy when the limit exists, and to topological entropy from symbolic dynamics.
  • The natural Jaccard-like entropy distance is shown to be trivial (0 or 1) in most cases, rendering it impractical for distinguishing languages.
  • The entropy sum distance $ H_S(L_1, L_2) $ is proven to be a pseudo-metric and granular when both $ h(L_1 \cap \overline{L_2}) > 0 $ and $ h(\overline{L_1} \cap L_2) > 0 $, indicating meaningful separation.
  • The Cesáro Jaccard distance is proven to be well-defined and computable from DFAs, providing a stable alternative to the classical limit-based Jaccard distance.
  • The paper establishes that the upper limit formulation of entropy used in prior works is correct, and provides a theoretical foundation for its use.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.