CHAPTER IV: GRAPH THEORY Sectio : Itroductio to Graphs Sice this class is called Number-Theoretic ad Discrete Structures, it would be a crime to oly focus o umber theory regardless how woderful those topics are. I this sectio, we will itroduce a popular object of study i discrete mathematics that have a iterestig applicatio to umber theory. I am a umber theorist after all. Defiitio 4.. A graph G is a pair of sets i which every elemet of the secod set is a uordered pair of elemets from the first. The elemets of the first set are called the vertices of the graph ad the elemets of the secod set are called the edges. The vertex set will be deoted by V ( G ) ad the edge set by E( G ). Usually, the vertex set is ot allowed to be empty or ifiite (although ifiite graphs do exist) however the edge set is ca be empty. Example 4..2 The pair of sets V ( G ) = {,2,3, 4} ad E( G ) = {{, 2},{,3},{2, 4},{3, 4}} forms a graph G. For simplicity, we will deote the edge set as E( G ) = {2,3,24,34}. Graphs are most ofte studied by drawig them graphically. The vertices are represeted by dots ad the edges are lie segmets (or arcs) coectig the correct vertices. For example, the graph of Example 4..2 would look like: 2 Example 4..3 Let graph G have V ( G ) = {, 2,3, 4} ad E( G ) = {4,3, 23,34}. 2 Example 4..4 Let graph G have V ( G ) = {, 2, 3, 4,5, 6} ad E( G ) = {2,5, 25,34,36, 46}. 4 2 5 3 6 Notice that sice the edges are deoted by uordered pairs, there are two ways to deote each edge. The edge coectig vertices ad 4 i the above graph could be 4 or 4. I will usually default to writig the lower umber first.
Example 4..5 What are the vertex ad edge sets for the graph represeted below? V ( G ) = {,2,3, 4,5} ad E( G ) = {2,3,4,5, 23, 45}. Exercise 4..6 What are the vertex ad edge sets for the graph represeted below? 4 2 5 3 6 Defiitio 4..7 A graph is coected if there is a path of edges betwee every pair of vertices. Otherwise it is called discoected. The graphs depicted i Examples 4..3 ad 4..6 are coected. Example 4..4 is discoected. There is o path from vertex to vertex 3 (for example). Exercise 4..8 How may distict paths ca you fid betwee vertices ad 2? Each path must start at ad ed at 2. It ca repeat vertices, but ot edges. As alluded to above, there are some special cases to cosider. Example 4..9 Let V ( G ) = {,2,3, 4} ad E( G ) =. Graphs of this type are called totally discoected graphs. 2
Example 4..0 Let V ( G ) = {, 2,3} ad E( G ) = {,2,3, 23}. The edge is called a loop. Example 4.. Let V ( G ) = {, 2,3, 4, 5} ad E( G ) = {3,3,4, 23, 45, 45}. Here we see multiple edges. Defiitio 4..2 A simple graph is a graph with o loops or multiple edges. If two vertices are coected by a edge, they are said to be adjacet to oe aother or eighbors. The degree of a vertex (i a simple graph) is its umber of eighbors. For the vertex v, its degree is deoted by d( v ). [Note: Geeralizig the otio of degree to graphs with loops ad multiple edges ca be doe, but we will geerally restrict ourselves to simple graphs.] A complete graph is oe i which every pair of distict vertices are coected by a edge. The complete graph with vertices is deoted by K. Example 4..3 Cosider the simple graph from Example 4..3. Fid the degree of each vertex. d () = 2, d (2) =, d (3) = 3, d (4) = 2 Example 4..4 K 3 ad K 4 2 It might be time for a little history. It is ofte difficult to pipoit the birth of a field of mathematics. With graph theory, that s ot the case. The birth of graph theory is geerally cosidered to be aroud 736, whe Leohard Euler solved a logstadig problem called the Köigsberg Bridge Problem. Köigsberg was a tow i Prussia located o the Pregel river. The city occupied two islads i the river plus areas o both baks. These regios were coected by seve bridges (see picture).
The residets wodered whether they could leave their home, take a log walk through tow i which they visited every bridge exactly oce, ad the retur to their home. If we represet this tow by a graph (the vertices are the 4 regios of tow ad the edges are the 7 bridges), we get somethig like the followig graph: Euler was able to show that o such path existed. Paths of that kid are ow called Euleria circuits ad graph that have them are called Euleria graphs. Defiitio 4..5 A graph is Euleria is there exists a path begiig ad edig at the same vertex which uses every edge oce ad oly oce. Example 4..6 Cosider the graph from Example 4..8: Startig with vertex, we ca fid a Euleria circuit as follows:,3,2,,5,4. Notice this path begis ad eds at the same vertex ad uses every edge exactly oce.
Example 4..7 The graph from Example 4.. however, has o Euleria circuit. I ay Euleria circuit, there must be at least two edges at every vertex; oe to eter ad oe to leave. But the degree of vertex 2 is. Exercise 4..8 Fid a Euleria circuit i the give graph or explai how you kow there is t oe. You may write your circuit like I did i Example 4..6. Theorem 4..9 A coected graph with at least oe vertex is Euleria if ad oly if every vertex has eve degree. Example 4..20 Note that there are may ways to represet a graph. What the graph looks like is ot importat, just the relatioships betwee vertices it represets. Cosider V ( G ) = {,2,3, 4,5} ad E( G ) = {2,3,4, 24, 45,35}. Each of the visual represetatios below is accurate.
Defiitio 4..2 A vertex decompositio of a graph G is a uordered pair of subsets { U, U 2} of the vertex set of G with () U U2 = V ( G), ad (2) U U2 =. Sice the pair of subsets form a partitio of V ( G ), we actually oly eed to explicitly defie oe of the subsets ad the other would be everythig else. A vertex is special with respect to the vertex decompositio { U, V ( G) U} if it is adjacet to a odd umber of vertices i the subset to which it does ot belog. We deote the set of special vertices by P( G, U ). Example 4..22 Cosider the graph G : 2 5 If we let U = {, 2}, the we have V ( G) U = {3, 4,5}. We ca see that the vertex is adjacet to oly oe vertex i V ( G) U ad the vertex 3 is adjacet to oly oe vertex i U. All other vertices are adjacet to a eve umber of vertices i the subset to which they do ot belog. Therefore, for this vertex decompositio, P( G, U ) = {,3}. If we had chose a differet vertex decompositio, say U = {,3}, we would possibly get a differet set of special vertices (i this case P( G, U ) = ). Theorem 4..23 (a) For ay graph G, P( G, U ) = P( G, V ( G) U ). (b) P( G, ) =. (c) If G is a totally discoected graph, the P( G, U ) = for ay U V ( G). (d) If G= K (with eve), the for ay subset U V ( G) with a odd umber of vertices, P( K, U ) = V ( K ). (e) If G= K (with odd), the for ay oempty proper subset U V ( G) (i.e. U ad U V ( K ) ), P( K, U ). to U Several parts of this theorem are quite trivial (how ca ay vertex be special with respect =?), but you re asked to prove them i the last exercise. Exercise 4..24 Prove Theorem 4..23.