Decision Flashcards

1
Q

Algorithm

A

A finite sequence of step-by-step instructions carried out to solve a problem

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

Bubble Sort

A

Compare Adjacent items in the list:
· If in order, then leave them
· If out of order, then swap terms.
Compare all pairs in the list
Sort is complete when a full pass with no swaps is complete.

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

Quick Sort

A

Select midpoint as pivot, write all terms smaller than pivot on the left and all the terms bigger than the pivot on the right hand side.
Repeat this for the sublists produced.
Sort complete when all terms have been a pivot.

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

What are the 3 bin packing algorithms?

A

First-fit - considering items in the order they are given in.
First-Fit decreasing - order items in decreasing order and apply first fit algorithm.
Full-Bin - by inspection select items that will combine to fill bins, then apply first fit to remaining terms.

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

Order of an algorithm

A

A measure of the run time of the algorithm.
Increasing the size from m to n, increases the algorithm by a factor of f(m)/f(n)

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

Increasing the size of a problem by k

A

· An algorithm of linear order will take k times longer.
· An algorithm of quadratic order will take k² times longer.
· An algorithm of cubic order will take k³ times longer.

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

A graph

A

A graph consists of nodes which are connected by edges.

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

A Weighted Graph

A

Edges have a number associated with them, denoted there size.

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

A subgraph

A

A subgraph is a section of an original graph, showing only select nodes and edges.

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

Degree, Valency, or Order of a node

A

The number of edges going into a node.

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

Odd and Even Nodes

A

Denoted is the order of a node is odd or even.

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

Walk
Path
Trail
Cycle

A

A walk is a route through a graph from one node to the next.
A path is a walk in which no node is visited more than once.
A trail is a walk in which no edge is visited more than once.
A cycle is a walk where the start and end node are the same and no other node is visited more than once.

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

Hamiltonian Cycle

A

A cycle that includes every vertex.

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

Connected Graph

A

A graph where every vertex is connected. There is a path to any vertex from any vertex.

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

A Loop

A

An edge which starts and finished at the same vertex.

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

Simple graph

A

No Loops and there is a single edge from every vertex to every vertex.

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

Directed Graph

A

Edges have a direction and can only be commuted in that direction.

18
Q

Euler’s Handshaking Lemma

A

In any undirected graph, the sum of the degrees of the vertices is equal to 2 x the number of edges. Number of odd nodes must be even.

19
Q

A tree

A

A connected graph with no cycles

20
Q

A Spanning Tree

A

A subgraph which includes all the vertices of the original graph and is also a tree.

21
Q

A Complete Graph

A

A graph in which every vertex is directly connected by a single edge to each other vertex.

22
Q

An Isomorphic Graph

A

Graphs which show the same information but may be drawn differently

23
Q

Adjacency Matrix

A

A matrix describing the number of arcs joining the corresponding vertices.

24
Q

Distance Matrix

A

A matrix describing the weight of arcs connecting vertices.

25
Q

Minimum Spanning Tree

A

A spanning tree such that the total length of its arcs are as small as possible.

26
Q

Kruskal’s Algorithm

A

1) sort edges into ascending order of weight
2) select the edge of least weight
3) select from edges not previously selected, the edge of least weight that does not form a cycle
4) repeat step 3 until selected edges form a spanning tree

27
Q

Prim’s Algorithm

A

1) choose starting vertex
2) choose vertex nearest to starting vertex, add that vertex and add its associated edge to the tree
3) connect to the tree of connected vertices that vertex that is nearest to any vertex in the connected set, but to a vertex not already in the tree
4) repeat step 3 till all vertices are connected to the tree

28
Q

Prim’s Algorithm with a distance matrix

A

1) start with the matrix representing the network and choose a starting vertex. Delete the row corresponding to to that vertex
2) label with ‘1’ the column corresponding to the start vertex, ring the smallest undeleted entry in that column
3) delete the row corresponding to the entry you just ringed
4) label with the next number the column corresponding to the vertex you just ringed
5) ring the lowest undeleted entry in all labelled columns
6) repeat steps 3, 4 and 5 till all rows are deleted. The ringed entries represent the edges in the minimum connector

29
Q

Dijkstra’s Algorithm

A

1) give start vertex label 0
2) give each vertex connected to start vertex a working value
3) find smallest working value and give it its permanent label
4) update working values at any unlabelled vertex that can be reached from V
5) repeat steps 3 and 4 till destination vertex given permanent label

30
Q

Eulerian Graph

A

Contains a trail that includes every edge but starts and finishes at the same vertex. Graph must be connected and have all even vertices.

31
Q

Semi-Eulerian Graph

A

Contains a trail that includes every edge but starts and finishes at different vertices. Graph must be connected and have exactly 2 odd vertices.

32
Q

Route Inspection Algorithm

A

1) list all odd vertices
2) form all possible pairings of odd vertices
3) for each pairing find the edges that are best to repeat and find the sum of the lengths of these edges
4) choose the pairing with the smallest sum, construct a route that repeats these edges

33
Q

Vertex Method to find the Optimal Point

A

Find the Feasible Region
Find the co-ordinates of the vertices of the feasible region
Trial each vertex to see which gives the optimal solution

34
Q

Precedence Table

A

A table that shows which activities must be completed before others are started.

35
Q

Dummy Activity

A

No time or cost. Shows the dependancy between activities.

36
Q

Early Event Time

A

The earliest time an activity can start allowing all preceding activities to occur, These can be found on the forward pass.

37
Q

Late Event Time

A

The latest time that an event can be left without exceeding the time needed for the project. These can be found on the backwards pass.

38
Q

Critical Activity and Path

A

Critical activities are any activities with equal Early and Late Event Times. Critical activities form the critical path.

39
Q

Float

A

Total Float = Latest finish time - Duration - Earliest start time

40
Q

Gantt Charts

A

A visual showing the critical path, and the earliest start and latest finish time of each activity.