Flashcards
Graph and Tree Traversal

Cards in this deck (10)
- 1What is an algorithm in computing?A data type made up of nodes and edges.
- 2What is an adjacency matrix?A table where the rows are the start node and the columns are the end node.
For example, if there is a 1 in (1,2), this shows that you can traverse from node one to two, but if there is a 0 in (1,1), this shows you cannot travel from node 1 to node 1. - 3Example of adjacency matrix and graph:

- 4What is an adjacency list?A list with each item beginning with the start node, and containing all the end nodes that can be directly traversed to.
- 5Example of adjacency list:

- 6What is a tree?A tree is an abstract data structure that is very similar to a graph in that it has nodes and edges. It is called a tree because it is visualised as a hierarchical structure (like a family tree) with branches. It can have a root node, with all other nodes branching away from the tree.
- 7Tree Example

- 8Graph Example

- 9What is the difference between a graph and tree?A tree is undirected and contains no loops. It is made of parent nodes and child nodes. There can be a maximum of 2 child nodes to each parent node.
A graph is directed, and any node can connect to any node. - 10—
Information
- Description
- BTEC Computing Flashcards on Graph and Tree Traversal, created by Tristan Murphy on 20/02/2018.
- Created by
- Tristan Murphy
- Views
- 0
- Rating