Tree Applications Flashcards

1
Q

What is tree sort?

A
  • Build a binary search tree from the elements to be sorted
  • Utilised in order traversal
  • To output the elements in increasing order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

How do you construct the inital tree in tree sort?

A

Follows two simple rules when constructing

  1. Left child < parent
  2. Right Child > parent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you search in the tree sort process?

A

If you want to find a certain value then follow the same rules

  1. Left child < parent
  2. Right Child > parent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the importance of trees in AST?

A
  • 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you tree sort using pairs?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are spanning trees?

A
  • Spanning tree of graph G
  • Is a subgraph of G that contains:
    • Every vertex of G
    • And is a tree
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are minimum spanning trees?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Prim Algorithm?

A

Computes MSTs from a connected weighted graph

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the use of trees in communication?

A
  • LAN mapping of devices - so cross device communication can occur cheaply
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the use of trees in strategy?

A

Decision trees - to help break down decisions into more advanced computational problems like data analysis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the use of trees in explores

A

File System - directories and sub folders

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the use of trees in science?

A

Phylogenic trees - represent relationship between different organisms closer the organisms are the closer they are related genetically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly