Implementing collection of sets with trie: a stepping stone for performances ?
Résumé
Main operations of the Set Collection Abstract Data Type are insertion, research and deletion. A well known option to implement these operations is to use hashtable. Although hashtable does not admit good time complexities in the worst case, the practical time complexities are efficient. Another option is to use the data structure known as the trie. The trie is useful for two main reasons. Firstly, with such a data structure, mentionned operations admit very good theoretical time complexities. Secondly a trie can be seen as a compact representation of a collection of sets since some parts of them are merged together. Aim of this article is to evaluate performances of the trie data structure. The Java language proposes an abstract class corresponding to the Set Collection A.D.T. operations. We propose in this article three different implementations of this abstract class. All of them are variations of the way to manage the sons of nodes. Theoretical complexities are then evaluated. After that, comparison with performances of hashtable are made in different contexts depending of the collection density, the set size and the ground set size. Finally we analyze our results and conclude in which cases the trie structure outperforms others structures.
Origine | Fichiers produits par l'(les) auteur(s) |
---|
Loading...