Vocab Flashcards

1
Q

Graph

A

A group of vertices connected by arcs

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

Subgraph

A

A graph where all vertices and edges belong to another graph

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

Degree

A

Number of edges incident to a vertex

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

Valency

A

Number of edges incident to a vertex

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

Path

A

A route along edges where no vertex is visited more than once

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

Walk

A

A route along a graph through edges from one vertex to the next

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

Trail

A

A route along edges where no edge is visited more than once

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

Cycle

A

A route along edges where the end vertex is the same as the start vertex AND no vertex is visited more than once

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

Hamiltonian cycle

A

A route along edges that includes EVERY vertex only once, and returns to its start vertex

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

Eulerian cycle

A

A route along edges where no edge is visited more than once, and starts and finishes at the same vertex, AND ALL EDGES ARE INCLUDED

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

Connected graph

A

A graph where there is a path between any two vertices

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

Loop

A

An edge that starts and finishes at the same vertex

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

Simple graph

A

One where there are no loops AND not more than one edge connecting any pair of vertices

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

Digraph

A

Edges have directions associated with them

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

Explain why total valency must be even

A

Each edge adds 2 to the total valency, so the total valency will always be a multiple of 2

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

Euler’s Handshaking lemma

A

Sum of degrees = 2 x number of edges

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

Eulerian graph order of vertices

A

Every vertex has even degree

18
Q

semi eulerian graph

A

Exactly two vertices have an odd degree

19
Q

Order of an algorithm

A

Measure of an algorithm’s efficiency as a function of the size of the problem

20
Q

Efficiency of an algorithm

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.

21
Q

Weighted graph

A

Graph where numbers are associated with each edge

22
Q

Tree

A

Connected graph with no cycles

23
Q

Spanning tree

A

Subgraph which includes all vertices of G and is a connected graph with no cycles

24
Q

Planar graph

A

A graph that can be drawn on a single plane so that no edges cross each other

25
2 Isomorphic graphs
Same number of vertices and degrees of corresponding vertices are the same
26
Walk
a finite sequence of edges such that the end vertex of one edge is the start vertex of the nex
27
Tour
A finite sequence of edges that visits every vertex and returns to its start vertex
28
Travelling salesman problem
‘find a route of minimum length which visits every vertex in an undirected network’.
29
Classical vs practical travelling salesman
Classic - vertex visited once only Practical - a vertex may be revisited
30
Explain why calculation of time of algorithm is only an approximation
Order of f(n) doesn’t mean order is necessarily proportional to f(n), may be a dominant term so there are other terms affecting time
31
Order of Dijkstra
Cubic
32
Order of bubble sort
Quadratic
33
Order of first fit decreasing
Quadratic
34
Order of quick sort (wosrt case)
Quadratic
35
Prim’s order (worst case)
Cubic
36
Minimum number of bubble sort passes and wen
1 - if items already in order
37
Maximum number of passess needed for bubble sort and when
n if the smallest is at the end of the list
38
In a list of n items, how many pairs need to be compared in bubble sort?
n - 1
39
,Maximum number of comparisons for quick sort
= (n -1) + (n - 2) +…+ 2 + 1 = (n(n-1))/2
40
Factor of time increase algorithm increase from n to m times
f(m)/f(n)
41
Number of comparisons for bubble sort in: a) First pass b) Second pass c) Sixth pass d) Final comparison in worst case
a) n - 1 b) n - 2 c) n - 6 d) 1