Abstract
In this paper, we investigate the complexity of deciding closeness, segment equivalence and sparseness for context-free and regular languages. It will be shown that the closeness problem for context-free grammars (CFGs) is undecidable while it is PSPACE-complete for nondeterministic finite automata (NFAs) and NL-complete for deterministic finite automata (DFAs). The segment equivalence problems for CFGs and NFAs are co-NP-complete. It is NL-complete for DFAs. If encoded in binary, the segment equivalence problems for CFGs and NFAs are co-NE-complete and PSPACE-complete, respectively. The sparseness problems for NFAs and DFAs are NL-complete. We also show that the equivalence problems for CFGs and NFAs generating commutative languages are II 2 P -complete and co-NP-complete, respectively. For trim DFAs generating commutative languages the equivalence problem is in L.
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.