Abstract
We present a polynomial time algorithm for testing if two morphisms are equal on every word of a context-free language. The input to the algorithm are a context-free grammar with constant size productions and two morphisms. The best previously known algorithm had exponential time complexity. Our algorithm can be also used to test in polynomial tiime whether or not n first elements of two sequences of words defined by recurrence formulae are the same. In particular, if the well known 2n conjecture for D0L sequences holds, the algorithm can test in polynomial time equivalence of two D0L sequences.Additionally, we extend the result from [5] by proving the existence of polynomial size test sets for context-free languages not only in free monoids but in free groups as well. The main points of our proof are the same as in [6, 5]. The main change is a new short proof of the main lemma. The previous proof took 10 pages. It was complicated since it considered many cases and used advanced properties of periodicity of words. Our proof takes only 2 pages. The simplification is a consequence of embedding a free monoid into a free group.KeywordsPolynomial TimePolynomial Time AlgorithmFree MonoidTerminal SymbolNonterminal SymbolThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.