Upload
others
View
37
Download
0
Embed Size (px)
Citation preview
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
UCT Algorithm Circle: An Introduction toGraph Theory
Peter Faul
16 August 2012
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Outline
1 A quick puzzle
2 Terminology
3 Revisiting Konigsberg
4 Onto some specifics
5 Applications in computer science
6 Simple searches
7 Conclusion
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
The bridges of Konigsberg
Can you follow a path, walking over each bridge exactlyonce?
Peter Faul Graph Theory
Konigsberg Diagram [1]
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Outline
1 A quick puzzle
2 Terminology
3 Revisiting Konigsberg
4 Onto some specifics
5 Applications in computer science
6 Simple searches
7 Conclusion
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Some terminology
Node: The fundamental unit out of which graphs areformed.Edge: Connects two nodes.Graph: Collection of Nodes and Edges.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Some terminology
Node: The fundamental unit out of which graphs areformed.Edge: Connects two nodes.Graph: Collection of Nodes and Edges.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Some terminology
Node: The fundamental unit out of which graphs areformed.Edge: Connects two nodes.Graph: Collection of Nodes and Edges.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Example of a graph
Peter Faul Graph Theory
Graph Diagram[2]
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
More Terminology
Walk: An alternating sequence of nodes and edges, with abeginning and end node. Each node is connected to thenode that came before it, and the node that comes after it.Trail: A walk where all edges are distinct.Path: A trail where all nodes (except maybe the first andlast) are distinct.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
More Terminology
Walk: An alternating sequence of nodes and edges, with abeginning and end node. Each node is connected to thenode that came before it, and the node that comes after it.Trail: A walk where all edges are distinct.Path: A trail where all nodes (except maybe the first andlast) are distinct.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
More Terminology
Walk: An alternating sequence of nodes and edges, with abeginning and end node. Each node is connected to thenode that came before it, and the node that comes after it.Trail: A walk where all edges are distinct.Path: A trail where all nodes (except maybe the first andlast) are distinct.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Example of a path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Example of a path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Example of a path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Example of a path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Example of a path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Example of a path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Even more terminology
Eulerian Path: A trail where each edge is visited once.Hamiltonian path: A path where each node is visited once.Degree of node: The number of edges attached to thenode.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Even more terminology
Eulerian Path: A trail where each edge is visited once.Hamiltonian path: A path where each node is visited once.Degree of node: The number of edges attached to thenode.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Even more terminology
Eulerian Path: A trail where each edge is visited once.Hamiltonian path: A path where each node is visited once.Degree of node: The number of edges attached to thenode.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Outline
1 A quick puzzle
2 Terminology
3 Revisiting Konigsberg
4 Onto some specifics
5 Applications in computer science
6 Simple searches
7 Conclusion
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Konigsberg
How can we simplify this problem?
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Turn it into a graph
Konigsberg bridges in the form of a graph.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
What now?
So how has this helped?We can restate the problem now; perhaps it will be easierto prove in this form.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
What now?
So how has this helped?We can restate the problem now; perhaps it will be easierto prove in this form.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Restating the problem
Does the following graph have an Eulerian path?
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Euler’s proposition
Any graph with more than two nodes of odd degree doesnot have an Eulerian path.The bridges of Konigsberg graph, has 4 nodes of odddegree.Hence it has no Eulerian path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Euler’s proposition
Any graph with more than two nodes of odd degree doesnot have an Eulerian path.The bridges of Konigsberg graph, has 4 nodes of odddegree.Hence it has no Eulerian path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Euler’s proposition
Any graph with more than two nodes of odd degree doesnot have an Eulerian path.The bridges of Konigsberg graph, has 4 nodes of odddegree.Hence it has no Eulerian path
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Outline
1 A quick puzzle
2 Terminology
3 Revisiting Konigsberg
4 Onto some specifics
5 Applications in computer science
6 Simple searches
7 Conclusion
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Classification of graphs
Graphs may have the following attributes:Connected: From any one node, there is a walk to anyother node.Cyclic: A graph that contains some number of nodesconnected in a closed chain.Directed: A graph in which the edges have a directionassociated with them.Tree: An undirected graph where any two nodes areconnected by one unique path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Classification of graphs
Graphs may have the following attributes:Connected: From any one node, there is a walk to anyother node.Cyclic: A graph that contains some number of nodesconnected in a closed chain.Directed: A graph in which the edges have a directionassociated with them.Tree: An undirected graph where any two nodes areconnected by one unique path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Classification of graphs
Graphs may have the following attributes:Connected: From any one node, there is a walk to anyother node.Cyclic: A graph that contains some number of nodesconnected in a closed chain.Directed: A graph in which the edges have a directionassociated with them.Tree: An undirected graph where any two nodes areconnected by one unique path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Classification of graphs
Graphs may have the following attributes:Connected: From any one node, there is a walk to anyother node.Cyclic: A graph that contains some number of nodesconnected in a closed chain.Directed: A graph in which the edges have a directionassociated with them.Tree: An undirected graph where any two nodes areconnected by one unique path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Classification of graphs
Graphs may have the following attributes:Connected: From any one node, there is a walk to anyother node.Cyclic: A graph that contains some number of nodesconnected in a closed chain.Directed: A graph in which the edges have a directionassociated with them.Tree: An undirected graph where any two nodes areconnected by one unique path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Disconnected Graph
A graph that is not connected:
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Cyclic Graph
A cyclic graph, note the part in red:
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Directed Graph
Up until now we have been considering undirected graphswhere you are traverse edges in both directions. Edgesmay also be directed, in which case edges may only betraversed along the direction in which they point
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Tree Graph
An example of a tree:
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Outline
1 A quick puzzle
2 Terminology
3 Revisiting Konigsberg
4 Onto some specifics
5 Applications in computer science
6 Simple searches
7 Conclusion
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Justification
So why is this being taught in a computer science lecture?Many problems in computer science can be modelled interms of graphs
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Justification
So why is this being taught in a computer science lecture?Many problems in computer science can be modelled interms of graphs
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Examples:
Path finding in video games.The link structure of a website.Notorious travelling salesman problem.Many more...
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Examples:
Path finding in video games.The link structure of a website.Notorious travelling salesman problem.Many more...
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Examples:
Path finding in video games.The link structure of a website.Notorious travelling salesman problem.Many more...
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Examples:
Path finding in video games.The link structure of a website.Notorious travelling salesman problem.Many more...
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Representing a graph
How do we represent a graph on a computer?Adjacency ListAdjacency Matrix
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Representing a graph
How do we represent a graph on a computer?Adjacency ListAdjacency Matrix
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Representing a graph
How do we represent a graph on a computer?Adjacency ListAdjacency Matrix
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency List
A representation of a graph of n nodes, using an array of nlinked lists.List A contains node b if node a is connected to node b.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency List
A representation of a graph of n nodes, using an array of nlinked lists.List A contains node b if node a is connected to node b.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency List
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency List
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency Matrix
A matrix representation of the graph (Use nested arrays).The entry aij in the matrix A is equal to the number ofedges from node i to node j
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency Matrix
A matrix representation of the graph (Use nested arrays).The entry aij in the matrix A is equal to the number ofedges from node i to node j
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency Matrix
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Adjacency Matrix
0 1 0 0 1 01 0 1 0 1 00 1 0 1 0 00 0 1 0 1 11 1 0 1 0 00 0 0 1 0 0
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
An interesting property
Let A be the adjacency matrix for some graph G.Then the entry kij in An represents the number of differentwalks from node i to node j.Remember how matrix multiplication is defined to makesense of this.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
An interesting property
Let A be the adjacency matrix for some graph G.Then the entry kij in An represents the number of differentwalks from node i to node j.Remember how matrix multiplication is defined to makesense of this.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
An interesting property
Let A be the adjacency matrix for some graph G.Then the entry kij in An represents the number of differentwalks from node i to node j.Remember how matrix multiplication is defined to makesense of this.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
A comparison
So which representation is best?That depends.Adjacency Matrices take up O(n2) space, however thereare constant time lookups, insertions and deletions.Adjacency Lists take up O(n+e) space, however they haveslower lookup times etc.So really your choice should depend on your requirementsand on the graph.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
A comparison
So which representation is best?That depends.Adjacency Matrices take up O(n2) space, however thereare constant time lookups, insertions and deletions.Adjacency Lists take up O(n+e) space, however they haveslower lookup times etc.So really your choice should depend on your requirementsand on the graph.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
A comparison
So which representation is best?That depends.Adjacency Matrices take up O(n2) space, however thereare constant time lookups, insertions and deletions.Adjacency Lists take up O(n+e) space, however they haveslower lookup times etc.So really your choice should depend on your requirementsand on the graph.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
A comparison
So which representation is best?That depends.Adjacency Matrices take up O(n2) space, however thereare constant time lookups, insertions and deletions.Adjacency Lists take up O(n+e) space, however they haveslower lookup times etc.So really your choice should depend on your requirementsand on the graph.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
A comparison
So which representation is best?That depends.Adjacency Matrices take up O(n2) space, however thereare constant time lookups, insertions and deletions.Adjacency Lists take up O(n+e) space, however they haveslower lookup times etc.So really your choice should depend on your requirementsand on the graph.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Outline
1 A quick puzzle
2 Terminology
3 Revisiting Konigsberg
4 Onto some specifics
5 Applications in computer science
6 Simple searches
7 Conclusion
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Searching Algorithms
Often we might want to see if one node is attached toanother nodeOr find the shortest path from one node to anotherWe use searching algorithms to accomplish this.We will look at two simple searching algorithms.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Searching Algorithms
Often we might want to see if one node is attached toanother nodeOr find the shortest path from one node to anotherWe use searching algorithms to accomplish this.We will look at two simple searching algorithms.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Searching Algorithms
Often we might want to see if one node is attached toanother nodeOr find the shortest path from one node to anotherWe use searching algorithms to accomplish this.We will look at two simple searching algorithms.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Searching Algorithms
Often we might want to see if one node is attached toanother nodeOr find the shortest path from one node to anotherWe use searching algorithms to accomplish this.We will look at two simple searching algorithms.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Breadth First Search
Systematically searches through all nodesDoes so by inspecting node then adding all nodes linked,to a queue.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Breadth First Search
Systematically searches through all nodesDoes so by inspecting node then adding all nodes linked,to a queue.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Breadth First Properties
Breadth First search guarantees the shortest path.However it uses more memory than a depth first search onaverage.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Breadth First Properties
Breadth First search guarantees the shortest path.However it uses more memory than a depth first search onaverage.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Depth First Search
Also searches through all nodesDoes so by inspecting node then adding all nodes linked,to a stack.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Depth First Search
Also searches through all nodesDoes so by inspecting node then adding all nodes linked,to a stack.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Depth First properties
For tree traversal, depth first uses less memory generallyas it need only store the nodes on the current path.While you shouldn’t count on it, you may hit the targethaving only explored a fraction of the tree.This however is not necessarily the best solution.There is also the potential for the search to get stuckexploring an infinite path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Depth First properties
For tree traversal, depth first uses less memory generallyas it need only store the nodes on the current path.While you shouldn’t count on it, you may hit the targethaving only explored a fraction of the tree.This however is not necessarily the best solution.There is also the potential for the search to get stuckexploring an infinite path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Depth First properties
For tree traversal, depth first uses less memory generallyas it need only store the nodes on the current path.While you shouldn’t count on it, you may hit the targethaving only explored a fraction of the tree.This however is not necessarily the best solution.There is also the potential for the search to get stuckexploring an infinite path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Depth First properties
For tree traversal, depth first uses less memory generallyas it need only store the nodes on the current path.While you shouldn’t count on it, you may hit the targethaving only explored a fraction of the tree.This however is not necessarily the best solution.There is also the potential for the search to get stuckexploring an infinite path.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Summary
So your choice of algorithm largely depends on your graphAnd on your own requirements.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Summary
So your choice of algorithm largely depends on your graphAnd on your own requirements.
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Outline
1 A quick puzzle
2 Terminology
3 Revisiting Konigsberg
4 Onto some specifics
5 Applications in computer science
6 Simple searches
7 Conclusion
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Conclusion
So there you have it, an introduction to graphs.Very important in many disciplinesAny Questions?
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Conclusion
So there you have it, an introduction to graphs.Very important in many disciplinesAny Questions?
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Conclusion
So there you have it, an introduction to graphs.Very important in many disciplinesAny Questions?
Peter Faul Graph Theory
A quick puzzle Terminology Revisiting Konigsberg Onto some specifics Applications in computer science Simple searches Conclusion
Licensing
These lecture slides were created by Peter Faul for UCTAlgorithm Circle and are licensed under the Creative CommonsAttribution-ShareAlike 3.0 Unported License.
I made use of the following third-party content also licensed underCC-BY-SA 3.0:
1 Konigsberg Diagram: http://en.wikipedia.org/wiki/File:Red-black_tree_example.svg.
2 Tree Diagram:http://en.wikipedia.org/wiki/File:Tree_graph.svg
3 Graph Diagram:http://en.wikipedia.org/wiki/File:6n-graf.svg
Peter Faul Graph Theory