HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

What are applications of alphabetic trees?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
whatareapplicationstreesalphabetic

Problem

Earlier this week a paper was released describing an algorithm for building optimal alphabetic ternary trees. The alphabetic property as described on Wikipedia as


Alphabetic trees are Huffman trees with the additional constraint on
order, or, equivalently, search trees with the modification that all
elements are stored in the leaves. Faster algorithms exist for optimal
alphabetic binary trees (OABTs).

From this, I understand that an alphabetic binary tree will produce shorter paths from root to element for elements that have been inserted into the tree more times than elements that haven't, and the alphabetic property would be described the same way for a ternary tree.

I haven't been able to find a lot of discussion about applications for the alphabetic property outside of Huffman coding but it is not a requirement to implement the algorithm. Are there any applications where the alphabetic property would be a requirement, and if not, are there any benefits to guaranteeing the alphabetic property that justifies increased implementation complexity?

Solution

You use alphabetic trees when you need nodes to keep their input order in the resulting code. Huffman trees are used for coding purposes, and alphabetic trees for storing data and for allowing quick search and edit.

One example application is storing textual data in alphabetic order. The complete works of Shakespeare were stored in an OAT (optimal alphabetic tree), which was constructed using the Hu-Tucker algorithm. See here for another $O(n \log n)$ algorithm for constructing OATs.

Context

StackExchange Computer Science Q#21680, answer score: 3

Revisions (0)

No revisions yet.