Anda di halaman 1dari 15

Graph Theory

A graph G=(V,E) consists of a set of objects V={v1,v2,} called vertices, and another set E={e1,e2,}, whose elements are called edges, such that each edge ek is identified with an unordered pair (vi,vj) of vertices. The vertices vi,vj associated with edge ek are called the end vertices of ek.
v1

e3

v2 v5 e2

e1

e5

e4

e7 v3 e6 v4

Fig. 1-1 Graph with five vertices and seven edges An edge having the same vertex as both its end vertices is called self-loop. More than one edge associated with a given pair of vertices are referred to as parallel edges.

Continue
A graph that has neither self-loops nor parallel edges is called simple graph. It is immaterial whether the lines are drawn straight or curved, long or short: what is important is the incidence between the edges and vertices.
v1
v1

v2

v4

v2

v4

v3

v3

Fig. 1-2 Same graph drawn differently

Basic Terms
Finite and infinite graph: A graph with a finite number of vertices as well as a finite number of edges is called a finite graph; otherwise, it is an infinite graph. Incidence: When a vertex vi is an end vertex of some edge ej, vi and ej are said to be incident with each other.
v1

e3

v2 v5 e2

e1

e4

e7 v3 e6 v4

Adjacent edges and vertices: Two nonparallel edges are said to be adjacent if they are incident on a common vertex. Similarly, two vertices are said to be adjacent if they are the end vertices of the same edge. Degree: The number of edges incident on a vertex vi, with self-loops counted twice, is called degree of vertex vi.

Continue
Isolated vertex: A vertex having no incident edge is called isolated vertex. Pendent vertex: A vertex of degree one is called pendent vertex. Series: Two adjacent edges are said to be in series if their common vertex is of degree two.
v2 v5 v1 v4

v6

v3

Fig. 1-3 Graph containing isolated vertices, series edges, and a pendant vertex

Applications
Konigsberg Bridge Problem: To start at any of the four land areas of the city A, B, C, or D, walk over each of the seven bridges exactly once, and return to the starting point.

A C D

Continue
Utilities Problem: There are three houses H1, H2, and H3, each to be connected to each of the three utilities water(W), gas(G), and electricity(E). Is it possible to make such connections without any crossover?
H1 H2 H3

Continue
Seating Problem: Nine members of a club meet each day for lunch at a round table. They decide to sit such that every member has different neighbors at each lunch. How many days can this arrangement last?
9 1 2

3 6 5

Path and Circuits


Isomorphism : Two graphs G and G are said to be isomorphic if there is a one-to-one correspondence between their vertices and between their edges such that the incidence relationship is preserved.
a 5 b 6 c (a) 4 2 1 3 d e1 e v5 e3 e4 e5 (b)

v4
e2

v3
e6

v1

v2

Two isomorphic graphs must have Same number of vertices. Same number of edges. Equal number of vertices with a given degree.

Subgraph
A graph g is said to be a subgraph of a graph G if all the vertices and all the edges of g are in G, and each edge of g has the same end vertices in g as in G. Every graph is its own subgraph. A subgraph of a subgraph of G is a subgraph of G. A single vertex in a graph G is a subgraph of G. A single edge in a G is also a subgraph of G.

Edge-Disjoint Subgraph: Two or more subgraphs of a graph G are said to be edge disjoint if they do not have any edge in common. Vertex-Disjoint Subgraph: The subgraphs that do not have vertices in common.

Walk
Walk is a finite alternating sequence of vertices and edges, beginning and ending with a vertex, where an edge can appear only once and each edge is incident with the vertices preceding and following it. Terminal vertices: Vertices with which a walk begin and ends. Closed walk and open walk: The walk begin and end with same vertex is called closed walk, otherwise it is called open walk. Path: An open walk in which no vertex appear more than once is called a path. Circuit: A closed walk in which no vertex (except the initial and the final vertex) appears more than once is called circuit.

Components
Connected and disconnected graph: A graph G is said to be connected if there is at least one path between every pair of vertices in G, otherwise the graph is called disconnected. Component: A disconnected graph G consists of two or more connected subgraphs. Each of these connected subgraph is called a component of graph G.

Q. Prove that if a graph (connected or disconnected) has exactly two vertices of odd degree, there must be a path joining these two vertices.

Euler Graphs
If some closed walk in a graph G contains all the edges of the graph, then the walk is called an Euler line and the graph G is an Euler graph.

Theorem: A given connected graph G is an Euler graph if and only if all vertices of G are of even degree.

Unicursal graph : if some open walk in a graph G contains all the edges of the graph, then the walk is called unicursal line and the graph is an unicursal graph.
Theorem: A connected graph G is an Euler graph if and only if it can be decomposed into circuits.

Hamiltonian paths and circuits


Hamiltonian Circuit A circuit in a connected graph G is said to be Hamiltonian circuit if it include every vertex of G. Hamiltonian circuit in a graph of n vertices consist of exactly n edges. Every connected graph does not have Hamiltonian circuit.

Hamiltonian path If we remove any one edge from a Hamiltonian circuit, we are left with a path. This path is called Hamiltonian path. Every graph that has a Hamiltonian circuit also has a Hamiltonian path, but reverse is not always true. The length of a Hamiltonian path in a connected graph of n vertices is n-1.
What general class of a graphs is guaranteed to have a Hamiltonian circuits? Complete graph of three or more vertices always have Hamiltonian circuits.

Complete graph
A simple graph in which there exists an edge between every pair of vertices is called a complete graph, or universal graph. The degree of every vertex in a complete graph of n vertices is n-1. The total number of edges of G is n(n-1)/2. Sitting problem: Since every member is allowed to sit next to any other member, the graph G is a complete graph of nine vertices. Every seating arrangement around the table is clearly a Hamiltonian circuit. Now to solve this sitting arrangement problem we need to identify the number of edgedisjoint Hamiltonian circuits is possible to generate from the graph G.

Traveling Salesman Problem(TSP)


A salesman is required to visit a number of cities during a trip. Given the distances between the cities, in what order should he travel so as to visit every city precisely once and return home, with the minimum mileage traveled?

Anda mungkin juga menyukai