A level Computing - Graphs and Trees

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Post order

One of the three types of depth first tree traversal in which you first visit the left and right child nodes and then the parent node. One handy trick when figuring out the method of traversal, the root node will always be the last data point in the sequence.

Internal nodes

These are nodes that are on the inside of the tree. For this reason all parent nodes are this type of node but not all children are.

Leaf nodes

These are nodes that have no child nodes and therefore are on the outside of the tree, this is why they are also known as external nodes.

Vertices / Vertex

These are points of data in a graph.

Graphs

These are set of vertices connected to each other with edges. The edges can be weighted with a value, this value could mean anything from travel times between towns to the time it'll take to contact a server.

Child node

This is a node that has stemmed from another node, child nodes are capable of being parent nodes at the same time.

Parent node

This is a node that other nodes have stemmed from and are related to the parent.

Dijkstra

This is a process that is used to determine the shortest route through a weighted graph from a source vertex. This is one that is fairly hard to explain how it specifically works and it's easy to get wrong. This is a useful animation to help understand how it traversal works: Also be careful not to just end up doing a breadth search, it's an easy trap to fall into.

A complete binary tree

This is a tree in which all nodes (bar possibly the bottom row) have 2 children and the nodes are as far left as possible.

In order

One of the three types of depth first tree traversal in which you first visit the left child node and then the parent and right child. One handy trick when figuring out the method of traversal, the root node will be somewhere roughly near the centre of the sequence.

Pre order

One of the three types of depth first tree traversal in which you first visit the parent node and then the left and right children. One handy trick when figuring out the method of traversal, the root node will always be the first data point in the sequence.

Edges

These are the connections between separate vertices in a graph or a tree.

Binary trees

This is a data structure consisting of child nodes extending from a single root node. Each node contains a left/right reference and a data entry. The maximum amount of nodes to a parent is 2.

A full binary tree

This is a tree in which all nodes have exactly 0 or 2 children.

Depth first graph traversal

This is a type of graph traversal in which you start with a given vertex and then you visit a connecting vertex (if multiple vertices conect then pick one arbitrarily). Once you reach a vertex that has no unvisited vertices connected to it then retrace your steps until you find a vertex with unvisited edges and repeat the above steps.

Breadth first graph traversal

This is a type of graph traversal in which you start with a given vertex and then you visit all vertices that are within immediate contact with that starting vertex. once all adjacent vertices are visited pick one of the explored vertices and repeat the process over again.

Depth first tree traversal

This is a type of tree traversal in which you start with the root node and then you visit a connecting node and all of it's children. Once you reach a vertex that has no unvisited nodes connected to it then retrace your steps until you find a node with unvisited edges and repeat the above steps.

Breadth first tree traversal

This is a type of tree traversal in which you start with the root node and then you visit all nodes that are on a single level. once the level is completely explored you move onto the next level of nodes.

Graph traversal

This is exactly what it sounds like, this is the method you use to traverse a graph to find a given vertex or just visit all vertices.

Tree traversal

This is exactly what it sounds like, this is the method you use to traverse a tree to find a given node or just visit all nodes.

Node depth

This is the number of edges from the root to the node in question.

Root node

This is the top most node from which all other nodes ultimately relate back to.


संबंधित स्टडी सेट्स

MLI: Ch. 12 Ethical Issues Related to Life

View Set

Custom HCC 3 Intracranial Regulation SPRING 2022

View Set

Operating Leverage, Break-Even and Scenario Analyses (1/25/24)

View Set

Chapt 4 part 2 programs and processing

View Set

Intro to Financial Accounting Midterm 2

View Set

Med-surg Success Cardiac Disorders

View Set