How to construct a DAWG from a trie?

余生长醉 提交于 2019-12-08 02:13:35

问题


i just construct a trie for a vocabulary, and then I found that there are many branches shared the same struct. i want to combine them together result to be a DAWG.

What algorithm would I use to convert a trie to a DAWG?


回答1:


The standard algorithm for converting a trie into a DAWG works by treating the trie as a deterministic finite automaton, then converting the trie into a minimum-state DFA.

There are many algorithms for performing this conversion. The algorithm I'm most familiar with is Hopcroft's algorithm, which works by finding pairs of distinguishable states and combining indistinguishable states together.

Hope this helps!



来源:https://stackoverflow.com/questions/15825543/how-to-construct-a-dawg-from-a-trie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!