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
Q

2 Isomorphic graphs

A

Same number of vertices and degrees of corresponding vertices are the same

26
Q

Walk

A

a finite sequence of edges such that the end vertex of one edge is the start vertex of the nex

27
Q

Tour

A

A finite sequence of edges that visits every vertex and returns to its start vertex

28
Q

Travelling salesman problem

A

‘find a route of minimum length which visits every vertex in an undirected network’.

29
Q

Classical vs practical travelling salesman

A

Classic - vertex visited once only
Practical - a vertex may be revisited

30
Q

Explain why calculation of time of algorithm is only an approximation

A

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
Q

Order of Dijkstra

A

Cubic

32
Q

Order of bubble sort

A

Quadratic

33
Q

Order of first fit decreasing

A

Quadratic

34
Q

Order of quick sort (wosrt case)

A

Quadratic

35
Q

Prim’s order (worst case)

A

Cubic

36
Q

Minimum number of bubble sort passes and wen

A

1 - if items already in order

37
Q

Maximum number of passess needed for bubble sort and when

A

n if the smallest is at the end of the list

38
Q

In a list of n items, how many pairs need to be compared in bubble sort?

A

n - 1

39
Q

,Maximum number of comparisons for quick sort

A

= (n -1) + (n - 2) +…+ 2 + 1 = (n(n-1))/2

40
Q

Factor of time increase algorithm increase from n to m times

A

f(m)/f(n)

41
Q

Number of comparisons for bubble sort in:
a) First pass
b) Second pass
c) Sixth pass
d) Final comparison in worst case

A

a) n - 1
b) n - 2
c) n - 6
d) 1