• Nem Talált Eredményt

Graphs and their plane figures

In document GRAPH THEORY (Pldal 5-8)

E(V) ={{u,v} |u,vV, u6=v}. the2-setsofV, i.e., subsets of two distinct elements.

DEFINITION. A pairG= (V,E)withEE(V)is called agraph(onV). The elements ofVare theverticesofG, and those ofEtheedgesofG. The vertex set of a graphG is denoted byVGand its edge set byEG. ThereforeG= (VG,EG).

In literature, graphs are also calledsimple graphs; vertices are callednodesorpoints;

edges are calledlinesorlinks. The list of alternatives is long (but still finite).

A pair{u,v}is usually written simply asuv. Notice that thenuv=vu. In order to simplify notations, we also writevGandeGinstead ofvVGandeEG. DEFINITION. For a graphG, we denote

νG =|VG| and εG=|EG|.

The numberνGof the vertices is called theorderofG, andεGis thesizeofG. For an edgee = uvG, the verticesu andv are itsends. Verticesuandvareadjacentor neighbours, ifuvG. Two edgese1 = uvande2 = uwhaving a common end, are adjacentwith each other.

A graph G can be represented as a plane figure by drawing a line (or a curve) between the points u and v (representing vertices) if e = uv is an edge of G.

The figure on the right is a geometric representation of the graph G with VG = {v1,v2,v3,v4,v5,v6} and EG= {v1v2,v1v3,v2v3,v2v4,v5v6}.

v1

v2

v3

v4 v5 v6

Often we shall omit the identities (namesv) of the vertices in our figures, in which case the vertices are drawn as anonymous circles.

Graphs can be generalized by allowingloopsvvandparallel(ormultiple)edges between vertices to obtain amultigraphG = (V,E,ψ), whereE = {e1,e2, . . . ,em}is a set (of symbols), andψ: EE(V)∪ {vv | vV}is a function that attaches an unordered pair of vertices to eacheE:ψ(e) =uv.

Note that we can haveψ(e1) = ψ(e2). This is drawn in the figure ofGby placing two (parallel) edges that con-nect the common ends. On the right there is (a draw-ing of) a multigraph G with vertices V = {a,b,c} and edges ψ(e1) = aa, ψ(e2) = ab, ψ(e3) = bc, and ψ(e4) =bc.

a b

c

1.1 Graphs and their plane figures 5 Later we concentrate on (simple) graphs.

DEFINITION. We also study directed graphs or digraphs D = (V,E), where the edges have a direction, that is, the edges are ordered:EV×V. In this case,uv6=vu.

The directed graphs have representations, where the edges are drawn as arrows.

A digraph can contain edgesuvandvuofopposite directions.

Graphs and digraphs can also be coloured, labelled, and weighted:

DEFINITION. A functionα: VGKis avertex colouringofGby a setKof colours.

A functionα: EGKis anedge colouringofG. Usually,K= [1,k]for somek≥1.

IfKR(oftenKN), thenαis aweight functionor adistance function.

Isomorphism of graphs

DEFINITION. Two graphsGandHareisomorphic, denoted byG∼=H, if there exists a bijectionα: VGVHsuch that

uvEG ⇐⇒ α(u)α(v)∈ EH

for allu,vG.

HenceG andH are isomorphic if the vertices of H are renamings of those ofG.

Two isomorphic graphs enjoy the same graph theoretical properties, andthey are often identified. In particular, all isomorphic graphs have the same plane figures (excepting the identities of the vertices). This shows in the figures, where we tend to replace the vertices by small circles, and talk of ‘the graph’ although there are, in fact, infinitely many such graphs.

Example 1.1.The following graphs are isomorphic. Indeed, the required iso-morphism is given byv1 7→ 1,v2 7→ 3,

v37→ 4,v4 7→2,v5 7→5. v1

v2 v3

v4

v5 1

3

4 2

5

Isomorphism Problem. Does there exist an efficient algorithm to check whether any two given graphs are isomorphic or not?

The following table lists the number 2(n2)of all graphs on a given set ofnvertices, and the number of all nonisomorphic graphs on n vertices. It tells that at least for computational purposes an efficient algorithm for checking whether two graphs are isomorphic or not would be greatly appreciated.

n 1 2 3 4 5 6 7 8 9

graphs 1 2 8 64 1024 32 768 2 097 152 268 435 456 236>6·1010

nonisomorphic 1 2 4 11 34 156 1044 12 346 274 668

Other representations

Plane figures catch graphs for our eyes, but if a problem on graphs is to be pro-grammed, then these figures are, to say the least, unsuitable. Integer matrices are ideal for computers, since every respectable programming language has array structures for these, and computers are good in crunching numbers.

LetVG ={v1, . . . ,vn}be ordered. Theadjacency ma-trix of Gis then×n-matrix M with entries Mij = 1 orMij =0 according to whethervivjGorvivj ∈/G.

For instance, the graph in Example 1.1 has an adja-cency matrix on the right. Notice that the adjaadja-cency matrix is always symmetric (with respect to its diag-onal consisting of zeros).

A graph has usually many different adjacency matrices, one for each ordering of its setVGof vertices. The following result is obvious from the definitions.

Theorem 1.1.Two graphs G and H are isomorphic if and only if they have a common adja-cency matrix. Moreover, two isomorphic graphs have exactly the same set of adjaadja-cency matri-ces.

Graphs can also be represented by sets. For this, let X = {X1,X2, . . . ,Xn}be a family of subsets of a setX, and define theintersection graphGX as the graph with verticesX1, . . . ,Xn, and edgesXiXjfor alliandj(i6= j) withXiXj 6= .

Theorem 1.2.Every graph is an intersection graph of some family of subsets.

Proof. LetGbe a graph, and define, for allvG, a set Xv ={{v,u} |vuG}.

ThenXuXv 6=if and only ifuvG. ⊓⊔

Lets(G)be the smallest size of a base setX such thatGcan be represented as an intersection graph of a family of subsets ofX, that is,

s(G) =min{|X| | G∼=GX for someX ⊆2X}.

How small cans(G)be compared to the orderνG(or the sizeεG) of the graph? It was shown by KOU, STOCKMEYER ANDWONG(1976) that it is algorithmically difficult to determine the numbers(G)– the problem is NP-complete.

Example 1.2.As yet another example, let ANbe a finite set of natural numbers, and letGA = (A,E)be the graph withrsEif and only ifrands(forr 6=s) have a common divisor>1. As an exercise, we state:All graphs can be represented in the form GAfor some set A of natural numbers.

In document GRAPH THEORY (Pldal 5-8)