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 acyclic 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). We perform some experiments that show the efficiency of TDAWGs, compared to DAWGs in which transitions are implemented by tables and linked lists.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
G. M. Andelson-Velskii and E. M. Landis. An algorithm for the organisation of information. Soviet. Math., 3:1259–1262, 1962.
J. Bentley and B. Sedgewick. Ternary search trees. Dr. Dobb’s Journal, 1998. http://www.ddj.com/.
J. Bentley and R. Sedgewick. Fast algorithms for sorting and searching strings. In Proc. 8th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’97), pages 360–369. ACM/SIAM, 1997.
A. Blumer, J. Blumer, D. Haussler, A. Ehrenfeucht, M. T. Chen, and J. Seiferas. The smallest automaton recognizing the subwords of a text. Theoretical Computer Science, 40:31–55, 1985.
A. Blumer, J. Blumer, D. Haussler, R. McConnell, and A. Ehrenfeucht. Complete inverted files for efficient text retrieval and analysis. J. ACM, 34(3):578–595, 1987.
M. Crochemore. Transducers and repetitions. Theoretical Computer Science, 45:63–86, 1986.
M. Crochemore and W. Rytter. Text Algorithms. Oxford University Press, New York, 1994.
M. Crochemore and W. Rytter. Jewels of Stringology. World Scientific, 2002.
M. Crochemore and R. Vérin. On compact directed acyclic word graphs. In Structures in Logic and Computer Science, volume 1261 of LNCS, pages 192–211. Springer-Verlag, 1997.
D. Gusfield. Algorithms on Strings, Trees, and Sequences. Cambridge University Press, New York, 1997.
S. Inenaga, H. Hoshino, A. Shinohara, M. Takeda, S. Arikawa, G. Mauri, and G. Pavesi. On-line construction of compact directed acyclic word graphs. In A. Amir and G. M. Landau, editors, Proc. 12th Annual Symposium on Combinatorial Pattern Matching (CPM’01), volume 2089 of LNCS, pages 169–180. Springer-Verlag, 2001.
E. M. McCreight. A space-economical suffix tree construction algorithm. J. ACM, 23(2):262–272, 1976.
D. Revuz. Minimization of acyclic deterministic automata in linear time. Theoretical Computer Science, 92(1):181–189, 1992.
E. Ukkonen. On-line construction of suffix trees. Algorithmica, 14(3):249–260, 1995.
E. Ukkonen and D. Wood. Approximate string matching with suffix automata. Algorithmica, 10(5):353–364, 1993.
P. Weiner. Linear pattern matching algorithms. In Proc. 14th Annual Symposium on Switching and Automata Theory, pages 1–11, 1973.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Miyamoto, S., Inenaga, S., Takeda, M., Shinohara, A. (2003). Ternary Directed Acyclic Word Graphs. In: Ibarra, O.H., Dang, Z. (eds) Implementation and Application of Automata. CIAA 2003. Lecture Notes in Computer Science, vol 2759. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45089-0_12
Download citation
DOI: https://doi.org/10.1007/3-540-45089-0_12
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40561-0
Online ISBN: 978-3-540-45089-4
eBook Packages: Springer Book Archive