Tree Applications Flashcards
What is tree sort?
- Build a binary search tree from the elements to be sorted
- Utilised in order traversal
- To output the elements in increasing order
How do you construct the inital tree in tree sort?
Follows two simple rules when constructing
- Left child < parent
- Right Child > parent
How do you search in the tree sort process?
If you want to find a certain value then follow the same rules
- Left child < parent
- Right Child > parent
What is the importance of trees in AST?
- AST - abstract syntax tree
- Result of one of the phases of a compiler
- Which has a impact on the final output
- Binary search trees allow for easy insertion and deletion
How do you tree sort using pairs?
What are spanning trees?
- Spanning tree of graph G
- Is a subgraph of G that contains:
- Every vertex of G
- And is a tree
What are minimum spanning trees?
- Minimum panning tree of a connected weighted graph
- Spanning tree that has the least possible total edge weight
- Compared to all other spanning trees for that graph
- Cant be more than one MST per graph
What is the Prim Algorithm?
Computes MSTs from a connected weighted graph€
What is the use of trees in communication?
- LAN mapping of devices - so cross device communication can occur cheaply
What is the use of trees in strategy?
Decision trees - to help break down decisions into more advanced computational problems like data analysis
What is the use of trees in explores
File System - directories and sub folders
What is the use of trees in science?
Phylogenic trees - represent relationship between different organisms closer the organisms are the closer they are related genetically