Ternary directed acyclic word graphs

  • Authors:
  • Satoru Miyamoto;Shunsuke Inenaga;Masayuki Takeda;Ayumi Shinohara

  • Affiliations:
  • Department of Informatics, Kyushu University 33, Fukuoka 812-8581, Japan;Department of Computer Science, P.O. Box 68 (Gustaf Hällströmin Katu 2b), FIN-00014 University of Helsinki, Finland;Department of Informatics, Kyushu University 33, Fukuoka 812-8581, Japan and SORST, Japan Science and Technology Agency (JST), Japan;Department of Informatics, Kyushu University 33, Fukuoka 812-8581, Japan and PRESTO, Japan Science and Technology Agency (JST), Japan

  • Venue:
  • Theoretical Computer Science - Implementation and application of automata
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given a set S of strings, a DFA accepting S offers a very time-efficient solution to the pattern matching problem over S. The key is how to implement such a DFA in the trade-off between time and space, and especially the choice of how to implement the transitions of each state is critical. Bentley and Sedgewick proposed an effective tree structure called ternary trees. The idea of ternary trees is to 'implant' the process of binary search for transitions into the structure of the trees themselves. This way the process of binary search becomes visible, and the implementation of the trees becomes quite easy. The directed acyelic word graph (DAWG) of a string w is the smallest DFA that accepts all suffixes of w, and requires only linear space. We apply the scheme of ternary trees to DAWGs, introducing a new data structure named ternary DAWGs (TDAWGs). Furthermore, the scheme of AVL trees is applied to the TDAWGs, yielding a more time-efficient structure AVL TDAWGs. We also perform some experiments that show the efficiency of TDAWGs and AVL TDAWGs, compared to DAWGs in which transitions are implemented by linked lists.