• No results found

So What is a Graph?

In document A First Step to Olimpics_olim (Page 50-56)

Graph Theory

3.3. So What is a Graph?

A graph is just a thing with dots and lines. But let's be a bit more formal about this. Let G be a graph.

Then G consists of a set of vertices VG and a set of edges EG, which join vertices of VG. Unlike Euler, we will insist that any two vertices in a graph have at most one edge between them.

Exercises

9. Draw up the table shown below.

Complete the table.

Figure 3.5.

So how many graphs are there with one vertex? The only difficulty here is in deciding whether a single vertex can have an edge drawn from itself to itself as in Figure 3.4.

Such an edge is called a loop. In the graphs we are talking about at the moment we will not allow loops. You should therefore have found that there is only one graph with one vertex. He's a very lonely fellow.

So how did you go with two vertices? How many graphs have two vertices? Well there must be at least one — take two lonely fellows and put them together. Are there any more? If you look at Figure 3.5 you will see two candidates. But are they the same? One has a plain, straight old edge. The other has a fairly fancy, up market, curly edge. Now if we are going to take looks into account in this game we're going to find ourselves with an infinite collection of graphs on two vertices — there'll be one for every fancy edge you can dream up.

Let us then decide that the graphs of Figure 3.5 are the same. They consist of two vertices and one edge between the vertices. Such a pair of graphs that are essentially the same, we shall call isomorphic (of the same form).

Now there is no reason why there should not be two or more edges joining a pair of vertices.

When that happens we say that there is a multiple edge between the vertices. We have seen multiple edges already. Euler used them. However we will not let our graphs have multiple edges. Having saidthat, occasionally it is useful to include multiple edges and loops too. The only place this is done in this chapter is in Exercise 72, p. 92. There are therefore only 2 possible graphs, in our sense, with 2 vertices.

Have a go at the three vertex graphs. How many non-isomorphic (different) graphs are there on three vertices?

Clearly there is one graph consisting of three lonely vertices. The next decision to be made is, are the graphs of Figure 3.6 isomorphic or not? When you've made up your mind there, move on to the

graphs with 2 edges and then 3 edges.

After all that hard work you should have just 4 graphs. All the graphs of Figure 3.6 are isomorphic. By suitable movements in the plane, you can put the vertices of (a) on top of those of (b).

In so doing, the one edge of (a) can be made to sit on the single edge of (b). And, of course, you can do the same for (c).

By now some of you will have seen a pattern. The number of graphs is 1 (for 1 vertex), 2 (for 2) and 4 (for 3). It's obvious that we'll get 8 (for 4). Or is it?

Now it may have occurred to some of the more precocious amongst you that Figure 3.7 actually contains 11 non-isomorphic graphs. This is indeed so. So unfortunately the pattern has broken down.

Figure 3.6.

Figure 3.7.

Figure 3.8.

But I can see that many of you have found more than 11 non-isomorphic graphs. I'm sorry to say you only think you have. If you check things out carefully you will find some of your extra graphs are isomorphic to some of those in Figure 3.7. For instance the graphs of Figure 3.8 are isomorphic.

And the number of different graphs on n vertices is not 2n-1. The actual count of the number of graphs on n vertices is, in fact, quite difficult. It relies on an advanced method of counting called Pólya enumeration. We won't bother with it here.

Exercises

10. How many graphs are there on 5 vertices?

11. How many of the graphs on 4 or fewer vertices have Euler tours?

Let's have a look at another idea now. The degree of a vertex v, written as deg v, is simply the number of edges the vertex is incident with; the number of lines going into the dot, if you like. The degrees of the vertices of the graph of Figure 3.9 are shown in circles.

This definition opens up a number of possibilities. Explore the ideas of the following exercises.

Exercises

12. For each graph you have drawn on up to 5 vertices add the degrees of all the vertices. What do you notice about the number you get for each graph? In what way is it associated with the graph?

Can you formulate a general result?

Figure 3.9

13. (a) Are there any graphs with 5 vertices which have vertices of degrees 1, 2, 3, 4 and 5?

(b) Are there any graphs with 6 vertices which have vertices of degree 0, 1, 2, 3, 4 and 5?

(c) Are there graphs, all of whose vertices have different degrees?

14. We say that a graph is regular if every vertex has the same degree. It is regular of degree r if every vertex has degree r.

(a) Find all the regular graphs on up to 5 vertices.

(b) How many regular graphs of degree 0 are there on n vertices?

(c) How many regular graphs of degree 1 are there on n vertices?

(d) How many regular graphs of degree 2 are there on n vertices?

(e) Do there exist graphs which are regular of degree 3 on n vertices for all values of n?

(f) Do there exist graphs which are regular of degree 4 on n vertices for all values of n?

(g) Show that there are graphs which are regular of degree r for all positive integers r.

If we go back to the ideas of Exercise 12 we find the following result.

Theorem 2.

But first we had better explain the notation. “deg v” is easy, we know that is short for the degree of the vertex v. And |EG| just means the size of the set EG, that is the number of edges of G. So what is

?

In Section 2.5 we introduced the sigma or summation notation. Here we're using Σ to sum again.

This time, however, we're summing over a set, rather than over consecutive numbers.

Recall from Chapter 2 that Σ4i=1 i = 1 + 2 + 3 + 4. Suppose now we put A = {1, 2, 3, 4}. Then Σi∈A i is equivalent to Σ4i=1 i. In the former case we sum over all members of A. That's obviously the same as summing from 1 to 4. So if VG = {v1, v2,…, vn}, Σv∈VG deg v means deg v1 + deg v2 +…+

deg vn.

Now let's go back to where we were. I wanted to prove a theorem.

Theorem 2. In any graph G, Σv∈VG deg v = 2|EG|.

Proof. deg v counts the number of edges incident with the vertex v. As we go round all the vertices of VG adding up the degrees, we count all the edges of G. However we count them each twice, for if e = uv ∈ EG then we count e once in deg u and once in deg v. Hence

This simple result has a surprising number of uses. For a start we have this corollary. (A corollary to a theorem is a result which follows as a direct result of the theorem.)

Corollary. In any graph G, there are an even number of vertices of odd degree.

Proof. Let's divide VG into two sets — the vertices of odd degree, X, and the vertices of even degree Y. Then

Since 2|EG| and Σv∈Y deg v are both even, then so is Σv∈X deg v. In this last sum, however, each term deg v, is odd. The only way the sum of odd numbers can be even, is if there are an even number of them.

Hence the corollary follows.

Exercises

15. (a) Show that in a cubic graph (a graph which is regular of degree 3), the number of vertices is even and the number of edges is divisible by 3.

(b) Generalise this result to all graphs which are regular of odd degree, r.

(c) If G is a regular graph of degree r and |EG| is even, what can be said about r or G or both?

16. (a) The graph G above is cubic and |A| = |B| Is |A| even, odd or can it be either? (The blob for A and B represents an arbitrary collection of vertices and edges.)

(b) The graph H is regular of degree 4. Describe H completely. (If you are finding this difficult, first find the smallest graph which looks like H.)

17. (a) What is the smallest graph (i.e., has the fewest vertices) which is regular of degree 2?

(b) What is the smallest cubic graph?

(c) What is the smallest graph which is regular of degree 4?

(d) What is the smallest graph which is regular of degree 6?

18. The smallest graph which is regular of degree n – 1 has n vertices. In this graph every vertex is joined to every other vertex. This graph is known as the complete graph on n vertices and is denoted by Kn. Find |EKn|.

Now find |EKn| using another approach in which your answer is expressed as a Binomial Coefficient (see Chapter 2).

19. A bipartite graph G = (X, Y) is one in which VG = X U Y, where X and Y are disjoint (have no elements in common), and every edge of G has one end in X and the other in Y.

(a) Find all the bipartite graphs on 4 and fewer vertices.

(b) Find all the regular bipartite graphs on 6 and fewer vertices.

(c) If G is a regular bipartite graph of degree r > 1, what can be said about |X| and |Y|?

(d) What is the smallest regular bipartite graph of degree 2?

(e) What is the smallest regular bipartite graph of degree 3?

(f) What does the smallest regular bipartite graph of degree r look like?

20. A bipartite graph G = (X, Y) is called a complete bipartite graph if every vertex of X is joined to every vertex of Y. If |X| = m and |Y| = n, we denote G by Km, n.

(a) Show that in Km, n, every vertex of Y is joined to every vertex of X.

(b) Use the notation Km, n to describe the graphs of Exercise 19(d), (e), (f).

(c) Find |EKm, n|.

(d) Find {deg v : v ∈ VKm, n}.

(e) For what values of m, n and t are Km, n and Kt isomorphic?

3.4. Ramseya

Remember the problem in Chapter 2 that went, “Show that at a party of 6 people, there are 3 who are mutual acquaintances or that there are 3 who have never met each other”? That problem is exactly the same as Exercise 21(a).

Exercises

21. (a) Colour all the edges of K6 either red or blue. Show that there must be a red triangle or a blue triangle.

(b) Show that the edges of K5 can be coloured red or blue so that there is no monochromatic triangle.

(c) Colour the edges of K17 either red or white or blue. Show that there must be a monochromatic triangle.

(d) Is (c) possible if we replace K17 by K16

22. Colour the edges of Km, n either red or blue. For what values of m and n do there exist monochromatic triangles?

23. We can think of K2,2 as being a “square”.

(a) Arbitrarily colour the edges of K3,3 red or blue. Must K3,3 contain a monochromatic square?

(b) Arbitrarily colour the edges of Kn, n red or blue. Find the smallest value of n for which Kn, n contains a monochromatic square.

Does this bring back fond memories of Chapter 2? One way of expressing what Ramsey did is the following.

Theorem 3 (Ramsey). Arbitrarily colour the edges of Kn with any one of r different colours. Let m be some fixed integer. Then for n sufficiently large, Kn contains a monochromatic Km.

In the case r = 2 and m = 3 we know by the 6 people party problem that “n sufficiently large” Ramsey Theory is a very difficult area of graph theory to work in because it is very difficult to find precise values of n for even small values of r and m.

Paul Erdös (who I have talked about before) and George Szekeres have proved the following result. The upper bound here though seems to be gross. For most known values of “n sufficiently large” the Erdös–Szekeres bound is a long way away from the actual value.

Theorem 4 (Erdös-Szekeres). Arbitrarily colour the edges of Kn, red or blue. If Kn contains a monochromatic Km then n ≤ 2m-2Cm-1.

To finish this section have a go at the following problems. They do not necessarily have anything to do with Ramsey Theory.

Exercises

24. At a party people shake hands as they are introduced. Not everybody necessarily shakes hands with everyone else, of course.

(a) Show that there have to be two people who shake hands the same number of times.

(b) Show that the number of people who have shaken hands an odd number of times is even.

25. “There should be three roads on this map”, the traveller complained. “I know there's one road from Ashville to Blogsville, another from Blogsville to Crudville and another from Crudville to Ashville.”

“Well they're not all marked in”, his wife replied.

Draw a sketch of each of the possible maps that could have been printed of the three towns. How many such maps are there?

If Dampville is a fourth town and there is still at most one road between each pair of towns, what is the maximum number of possible roads and how many possible maps could the inefficient publishers make (assuming they were still in business)?

Suppose now there are n towns and at most one road between any pair of them. What is the maximum number of possible roads? How many possible maps could the printers make? How many possible maps are there with r roads printed in?

26. My wife and I recently attended a party at which there were four other married couples. Various handshakes took place. No one shook hands with himself (or herself) or with his (or her) spouse and no one shook hands with the same person more than once.

After all the handshakes were over I asked each person, including my wife, how many hands he (or she) had shaken. To my surprise each gave a different answer. How many hands did my wife shake?

In document A First Step to Olimpics_olim (Page 50-56)