Computing‎ > ‎A2 COMP‎ > ‎COMP3‎ > ‎Programming Concepts‎ > ‎

Graphs And Trees

Graph

A diagram consisting of circles, called vertices or nodes, joined by lines, called edges or arcs; each edge joins exactly two vertices.

Neighbors

Two vertices that are connected by an edge.

Degree

Of a vertex, is the number of neighbours for that vertex.

Labelled Graph

A graph where the edges are labelled or given a value called a weight.

Digraph

A directed graph i.e. one where vertices are connected by directed edges.

Mazes


Trees

A tree is a connected undirected graph with no cycles.

Tree Traversals

Binary Search Tree


Rooted tree

A rooted tree is a tree in which one vertex has been designed as the root and every edge is directed away from the root.

Graph Traversals


Comments