Introduction to Tries
drmcawesome.com
Introduction to Tries
1–10 of 15 posts
Re: Introduction to Tries
#2The article skims over the tricky part - the dependency on the size of the alphabet. Which you can no longer treat as insignificant in the days of unicode.
Re: Introduction to Tries
#3or this one which is slightly harder: http://linux.thai.net/~thep/datrie/datrie.html
Re: Introduction to Tries
#4"First, lookup time is O(1) in the size of the trie." The article skims over the tricky part - the dependency on the size of the alphabet. Which you can no longer treat as insignificant in the days of unicode.
Does anyone know, is there a Unicode encoding that enables you to map arbitrary ranges (so I can, for example, use the greek alphabet only at 1 byte per character or less)? I suppose UTF-8 is already hard enough to decode.
Re: Introduction to Tries
#5"First, lookup time is O(1) in the size of the trie." The article skims over the tricky part - the dependency on the size of the alphabet. Which you can no longer treat as insignificant in the days of unicode.
Good luck building a Unicode trie -- the branching factor would be too high, never mind lookup time. Instead, you'd make the trie of an encoding, probably UTF-8 (off the top of my head) that would enable you to keep the branching factor at 256, which is already rather large but doable (You can switch to Judy arrays if the wasted space bothers you.) Does anyone know, is there a Unicode encoding that enables you to map…
Re: Introduction to Tries
#6"First, lookup time is O(1) in the size of the trie." The article skims over the tricky part - the dependency on the size of the alphabet. Which you can no longer treat as insignificant in the days of unicode.
Good luck building a Unicode trie -- the branching factor would be too high, never mind lookup time. Instead, you'd make the trie of an encoding, probably UTF-8 (off the top of my head) that would enable you to keep the branching factor at 256, which is already rather large but doable (You can switch to Judy arrays if the wasted space bothers you.) Does anyone know, is there a Unicode encoding that enables you to map…
There are some new implications you need to account for if you do this, as you no longer have one node per letter, but a path per letter. E.g. subtrees will no longer correctly represent substrings, making autocompletion slightly trickier.
Re: Introduction to Tries
#7Re: Introduction to Tries
#8Re: Introduction to Tries
#9Re: Introduction to Tries
#10How is "trie" pronounced? Like "try"?
Following the etymology, the inventor, Edward Fredkin, pronounces it /ˈtriː/ "tree".However, it is pronounced /ˈtraɪ/ "try" by other authors.