The Seven Bridges of Königsberg There was a well-known question in the medieval town of Königsberg: Is it possible to walk across every bridge without walking over one twice? Euler proved that it was impossible to cross all seven bridges exactly once (and much more!), and in doing this, he initiated a whole new field of mathematics. Today, this field of Graph Theory finds applications in chemistry, biology, computer science, psychology, sociology, and business management. Management Science We will focus on one application of graph theory, to a question in Management Science. Specifically, we are concerned with finding efficient routes for deliveries, patrols, etc. These problems are known as Euler circuit problems. What is a graph? A graph is a collection of points and lines connecting those points. The points in a graph are called vertices (singular form: vertex). The lines connecting the vertices are called edges. Note: edges do not have to be straight. In particular, this notion of graph is not related to the graph of a function that one encountered in algebra class. Example of a graph A B b F b b E b b C b D ◮ ◮ What are the vertices? A, B, C , D, E , and F What are the edges? AB, BB, BC , CD, CD, AD, DE , and BE Observations A B b F b b E b b C b D ◮ ◮ ◮ ◮ ◮ A loop — an edge from a vertex to itself — is allowed. Multiple edges joining a pair of vertices are also allowed. The vertex F is an isolated vertex. Crossing points of edges are not necessarily vertices. There is no direction given on the edges — they are bi-directional. Defining a graph A graph is given by the vertex set, which is a set containing the list of vertices, and the edge set, which is a set containing the list of edges. In the previous example: ◮ The vertex set is {A, B, C , D, E , F }. ◮ The edge set is {AB, BB, BC , CD, CD, DE , BE }. Note: Order does not matter {A, B, C , D, E , F } and {B, E , F , D, A, C } Pictures optional A graph, as defined above, is just the set of vertices and edges on those vertices. It is not given as a picture, so any picture that satisfies the criteria will work to depict the graph. More definitions ◮ ◮ ◮ ◮ Two vertices are adjacent if they are connected with an edge. Two edges are adjacent if they share a vertex. The degree of a vertex is the number of edges meeting at a vertex. (A loop counts twice for this.) We denote the degree of a vertex A as deg(A). A vertex is odd if its degree is odd, and it is even if its degree is even. Example of a graph A B b F b b E b b C b D ◮ ◮ ◮ Which vertices are adjacent to A? Which vertices are adjacent to B? Notice that B is adjacent to itself! Which edges are adjacent to ED? Example of a graph A B b F b b E b b b D ◮ ◮ ◮ ◮ What What What What is is is is the the the the degree degree degree degree of of of of A? C? B? F? C Example of a graph A B b F b b E b b b D ◮ ◮ List all of the even vertices List all of the odd vertices C A graph without a picture Suppose we have a graph with vertex set V = {A, B, C , D, E } and edge set E = {AD, AE , BC , BD, CC , DD, DE }. Without drawing a picture, let’s answer the following questions. ◮ What are the vertices adjacent to D? A, B, D, and E . ◮ What are the edges adjacent to BD? AD, BC , DD, and DE . ◮ What is the degree of D? 5. (Note that we can answer this just b y counting the number of times we had to write D when we wrote down the edge set.) Paths and Circuits Consider a sequence of adjacent edges with no edge traveled twice. ◮ If the sequence begins and ends at different vertices, then it is a path. ◮ If the sequence begins and ends at the same vertex, then it is a circuit. The length of a path or circuit is the number of edges in the sequence. Paths and Circuits Consider the following graph: C D b B b b b ◮ E b A ◮ b F What are the paths from C to F ? One example is C , A, B, F . Another is C , D, E , F . What are the circuits that start at C ? One example is C , B, A, C . Another is C , D, E , F , B, C . ◮ ◮ ◮ ◮ A graph is connected if there is a path from any vertex to any other vertex. A graph is disconnected if it is not connected. The components of a graph are the connected pieces of the graph. A connected graph has only one component; a disconnected graph will have two or more components. A bridge in a graph is an edge whose removal from the graph would make the graph disconnected. A b D C b b E b b b B ◮ ◮ ◮ b F H b G Is the graph connected or disconnected? How many components are there? For each component, identify which edges are bridges. For the component on the left, AB is a bridge. For the middle component, CD is the only bridge.