Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Real world examples of tree structures

I'm looking for some examples of tree structures that are used in commercial/free software projects, modern or old. I can see examples on wikipedia, but I am looking for more concrete examples and how they're used. For example primary keys in databases are (from what I've read) stored in BST structure or a variation of the BST (feel free to correct me on this)

My question isn't limited Binary Search Trees (BSTs), it can include any variation such as red-black, AVL and so on.

like image 807
Arec Barrwin Avatar asked Feb 23 '09 13:02

Arec Barrwin


People also ask

What is an example of tree structure?

Another example of a tree structure that you probably use every day is a file system. In a file system, directories, or folders, are structured as a tree.

What is the real life application of tree data structures?

Other Applications :Binary Search Tree is a tree that allows fast search, insert, delete on a sorted data. It also allows finding closest item. Heap is a tree data structure which is implemented using arrays and used to implement priority queues. B-Tree and B+ Tree : They are used to implement indexing in databases.

Where are tree data structures used?

Trees are commonly used to represent or manipulate hierarchical data in applications such as: File systems for: Directory structure used to organize subdirectories and files (symbolic links create non-tree graphs, as do multiple hard links to the same file or directory)

What are the types of tree explain with proper examples?

Binary Search tree can be applied for searching an element in a set of elements. Heap trees are used for heap sort. Modern routers use a type of tree called Tries for storing routing information. The B-Trees and the T-Trees are mostly used by popular databases to store their data.


1 Answers

Is it okay if the examples are a tad bit generic i.e. relate to graphs and not necessarily to trees? If it is, read on.

  • Needless to say most XML/Markup parsers use trees. See Apache Xerces for example. Or, the Xalan XSLT parser. Thanks mathewsdave26 for reminding me!

  • PDF is a tree based format. It has a root node followed by a catalog node(these are often the same) followed by a pages node which has several child page nodes. Producers/consumers often use a balanced tree implementation to store a document in memory.

  • Computer chess games build a huge tree (training) which they prune at runtime using heuristics to reach an optimal move.

  • Flare is a visualization library written in AS. You may want to check out how the data objects are mapped. In particular the flare.analytics package heavily uses a graph structure, spanning trees etc.

  • Social networking is the current buzzword in CS research. It goes without saying that connections/relations are very naturally modeled using graphs. Often, trees are used to represent/identify more interesting phenomena. How do you answer questions like "Does Harry and Sally have any common friend(s)?"

  • Some very successful physics/games engines build trees to accurately simulate human movement. A tree in this case will typically correspond to a set of actions; The context will determine which path is taken to render a particular response.

  • Decision Tree based Learning actually forms a formidable area of data mining research. Numerous famous methods exist like bagging, boosting, and modifications thereof which work on trees. Such work is often used to generate a predictive model.

  • A common problem in bioinformatics is to search huge databases to find matches for a given query string. Tries are a common occurrence there.

  • Quite a few successful (stock) traders use decision trees in their day to day trading -- to choose a trade, to exit one. Often times these are not codified in a computer program, but written down somewhere on the back of their notebook.

Dupe. See this and this.

like image 182
dirkgently Avatar answered Sep 27 '22 22:09

dirkgently