Comparison of Two Algorithms for Detecting Useless Transitions in Pushdown Automata
چکیده
Context-free languages can be expressed by means of pushdown automata. Pushdown automata may contain transitions that are never used in any accepting run. Such transitions do not affect the languages the automata define, but they increase their memory requirements as well as their running time and thus it is desirable to remove them. The aim of this paper is to examine the performance of two different algorithms for detecting useless transitions in pushdown automata. We propose an optimization of the second algorithm with regard to performance and allowed input. Both versions of the second algorithm were implemented and their efficiency was compared to that of an existing implementation of the first algorithm. Performance testing shows that the first algorithm is more efficient than the second one and its optimized version.