D1 glossary Flashcards
Efficiency
The efficiency of an algorithm is a measure of the ‘run-time’ of the algorithm and in most cases is proportional to the number of operations that must be carried out.
Size (of a problem)
The size of a problem is a measure of its complexity and so in the case of algorithms on graphs it is likely to be the number of vertices on the graph.
Order (of an algorithm)
The order of an algorithm is a measure of its efficiency as a function of the size of the problem.
Middle position
In a list containing N items the ‘middle’ item has position (1/2)(N+1) if N is odd and (1/2)(N+2) if N is even.
What is a graph?
A graph G consists of points (vertices or nodes) which are connected by lines (edges or arcs).
Subgraph
A subgraph of G is a graph, each of whose vertices belongs to G and each of whose edges belongs to G.
Network
If a graph has a number associated with each edge (usually called its weight) then the graph is called a weighted graph or network.
Degree
The degree or valency of a vertex is the number of edges incident to it. A vertex is odd (even) if it has odd (even) degree.
Path
A path is a finite sequence of edges, such that the end vertex of one edge in the sequence is the start vertex of the next, and in which no vertex appears more then once.
Cycle
A cycle (circuit) is a closed path, i.e. the end vertex of the last edge is the start vertex of the first edge.
Connected
Two vertices are connected if there is a path between them. A graph is connected if all its vertices are connected.
Digraph
If the edges of a graph have a direction associated with them they are known as directed edges and the graph is known as a digraph.
Tree
A tree is a connected graph with no cycles.
Spanning Tree
A spanning tree of a graph G is a subgraph which includes all the vertices of G and is also a tree.
Eulerian Graph
An Eulerian graph is a graph with every vertex of even degree.