D1 Flashcards

1
Q

Simple graph

A

No loops or multiple arcs

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

Connected graph

A

All pairs of nodes are connected

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

Complete graph

A

All nodes connected by one arc to every other node (Kn = complete with n nodes)

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

Planar graph

A

Can be drawn in a plane, so that arcs only meet at nodes and don’t cross

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

Isomorphic graphs

A

Same nodes and arcs but different shapes

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

Trail

A

End node of an arc is the start node of the next

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

Path

A

No node used more than once

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

Cycle

A

Closed trail where only the first and last nodes are the same

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

Tree

A

Simple graph without cycles

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

Spanning tree equation for arcs

A

n nodes

= n-1 arcs

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

Euclerian

A

Closed trail
Every arc once
Every node has even order

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

Semi-Eulerian

A

Not closed
Every arc once
Only 2 nodes have odd order

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

Hamiltonian cycle

A

Passes every node of the graph once and returns to its starting node

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

Kruskal’s Algorithm

A
  • Sort arcs into ascending order of weight
  • Select least weight arc
  • Select next lowest that doesn’t form cycle with anything
  • Repeat until you have a spanning tree
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Prim’s Algorithm

A
  • Choose starting node
  • Attach to arc of least weight
  • Look at other nodes that aren’t in the tree and connect with minimum arc length to a node that’s in the tree
  • Repeat until all nodes in the tree
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Dijkstras Algorithm

A

Temporarily label each node with distances from starting node and choose lowest value
- start node labelled zero

17
Q

Chinese postman Algorithm

-assuming it’s not eulerian

A

1-find all odd nodes
2-for each pair of odd nodes, find the connecting path of minimum weight
3-Consider all ways of pairing odd nodes and select one with minimum total weight
4-duplicate paths selected in step 3
5-find closed trail containing every arc for the new network

18
Q

Chinese postman pairings

A

2 odd nodes = 1 pairing
4 odd nodes = 3 pairings
6 odd nodes = 15 pairings

19
Q

Nearest neighbour

A
  • choose starting
  • pick min weight arc attached to it
  • repeat until all nodes chosen
  • add arc that joins last chosen node to first
20
Q

Lower bound Algorithm

A

Choose a node and find total of two smallest weights incident

Ignore the node and selected arcs and find total weight of minimum connector for this network

Sum of both = estimate

21
Q

Upper bound

A

Nearest neighbor

22
Q

First fit

A

Each object put in first available place

23
Q

First fit decreasing

A

Arrange in decreasing size and then use first fit

24
Q

Shuttle sort

A

Look at 1/2
Look at 2/3
Look at 3/4…….
Swap when necessary

If you’re swapping 5/6 and it’s smaller than all the others, keep moving it down the line to correct place