26. A graph G consists of a set of vertices and a set of edges.
G = {V,E}
in this example,
V = {A,B,C,D,E,F},
Any graph can be drawn on paper in many ways – the important thing is
which vertices are connected (adjacent) to each other.
E = {AB, BC, BD, CD, DF, DE,EF}.
27. G = City
V = Note (Object)
In this example,
E = Edges(line)
33. Why study graph theory?
• Useful set of techniques for solving real-world problems –
particularly for different kinds of optimization.
• Graph theory is useful for analyzing “things that are
connected to other things”, which applies almost everywhere.
• Some difficult problems become easy when represented using
a graph.
• There are lots of unsolved questions in graph theory: solve
one and become rich and famous1
34. Why Study Graphs?
• Lots of problems formulated and solved in terms
of graphs
• – Shortest path problems
• – Network flow problems
• Matching problems
• Graph coloring problem
• Traveling Salesman Problem (TSP): still unsolved!
• and many more...
42. Programming exercises (Matplotlib)
• We’ll be using the Python language to work on applications
of
• graph theory.
• Windows installation files for Python and other required
libraries
• are on muele. Install Python, then the Network and
Matplotlib
• libraries.
• On Linux, installation is even easier as Python should
already
• be installed. To set up the extra libraries on Ubuntu:
• sudo apt-get install python-networkx python-matplotlib