Modelling with Algorithms Flashcards

1
Q

what is an optimal solution in the context of a bin packing problem?

A

a solution which uses the least number of bins

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

what are heuristic algorithms?

A

an algorithm that usually finds a good solution, but isn’t guaranteed to find the optimal solution

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

how many edges does a tree with n vertices have?

A

(n - 1) edges

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

define ‘tree’

A

a simply connected graph with the minimum possible number of arcs

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

what is a complete graph?

A

A simply connected graph with the maximum possible number of arcs

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

how many edges does a complete graph with n vertices have?

A

[n(n - 1) / 2 ] edges

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

what is a connected graph?

A

a graph in which every vertex is joined directly or indirectly to each of the other vertices

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

what is a simple graph?

A

a graph with no loops and no repeated edges

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

how do you find the order of a vertex of an undirected graph from an incidence matrix?

A

add together the value of the row (or column) which corresponds to that vertex

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

the incidence matrix of an undirected graph is ___________ about the leading diagonal

A

symmetrical

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

what complexity do Prims and Kruskal’s algorithms have?

A

O(n²)

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

if you get a non-integer solution to a graphical LP, how do you find an integer solution?

A

look at the 4 integer points around it, check if they’re in the feasible region and then sub them into the OBJECTIVE FUNCTION

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

What is a DEGENERATE problem in Linear Programming?

A

a problem with more than one way of finding the max value of the objective function

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

how do you formulate Dijkstra’s algorithm as an LP?

A

Minimise the objective function, which is the sum of all nodes that can be travelled - ignore nodes that go back into the source or go out of the sink

state that the variables are either 1 or 0

Look at individual nodes to work out the constraints

e.g AB + AC = 1 means that the shortest path will either take AC or AB, but not both or neither

you can only enter and leave a node once.

e.g AB + CB - BD - BC = 0

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