Preview

iugug

Good Essays
Open Document
Open Document
1515 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
iugug
Decision 1 (AQA)

1. Introductory Ideas

Algorithm = set of instructions = flowchart = program

Should apply to general case and be as concise as possible.

• Graph • Vertex/node (point) • Edge/arc (line)

• Multiple arc • Loop

Connected graph Graph where can travel from any point to any other point somehow
Simple graph No multiple arcs or loops
Complete graph Simple graph where every node connected to every other node by exactly one arc
Network Weighted graph
Degree/order of node Number of arcs joined to node

• Complete simple graph with n nodes has arcs.

Graphs as matrices: adjacency matrix vs. distance/weighted matrix.

2. Minimum Spanning Trees

Walk Any journey around a graph/network
Trail / route A walk which uses each arc only once (can use nodes multiple times, doesn’t have to use all arcs)
Closed trail A trail which begins and ends at same point
Path A walk which uses each node only once (exception of first node, doesn’t have to use all nodes)
Cycle Closed path
Tree Graph with no cycles
Connector / spanning tree Tree connecting all nodes

• A spanning tree with n nodes will have arcs.

Kruskal’s Algorithm (to find minimum spanning tree):
1. Choose arc of minimum weight.
2. Choose next arc of minimum weight from any (provided does not form cycle).
3. Repeat step 2 until all nodes connected.

Primm’s Algorithm (to find minimum spanning tree):
1. Choose any node.
2. Choose arc of minimum weight joined to connected nodes.
3. Repeat step 2 until all nodes connected.

Primm’s Algorithm with Matrices (to find minimum spanning tree):
1. Choose any node
2. Cross out row for chosen node. Circle and number column header of chosen node.
3. Circle minimum from available weights node column. Note the row header (node) for this chosen weight.
4. Repeat 2 and 3 until all nodes chosen.

3. Shortest Path

Dijkstra’s Algorithm (to find minimum path between two given nodes):
1. Give start node permanent value of

You May Also Find These Documents Helpful

Related Topics