ADJACENCY AND INCIDENCE
ADJACENCY AND INCIDENCE
Adjacency
Definitions: Let v and w be vertices of a graph. If v and w are joined by an edge e, then v and w are said to be adjacent.Let G be a loopless graph with vertex set V(G) = v1,…,vn and edge set E(G)= e1,…,em . The adjacency matrix of G,written A(G), is the n-by-n matrix in which entry ai,j is the number of edges in G whith endpoints vi,vj .An adjacency matrix is determined by a vertex ordering. Every adjacency matrix is symmetric( ai,j=aj,i for all i,j). An adjacency matrix of a simple graph G has entries 0 or 1, with 0s on the diagonal. The degree of v is the sum of the entries in the row for v in A(G).
Example:
1
34
2 col 1 col 2 col 3 col 4
row 1 0 1 0 1
row 2 1 0 1 2
row 3 0 1 0 1
row 4 1 2 1 0
On the left -hand side we have a graph with four vertices,and on the right- hand side we have a 4*4 matrix. Graph has no loops, diagonal is 0, also that the matrix is symmetrical about this main diagonal.
Incidence
if vertex v is an endpoint of edge e, then v and e are incident. The incidence matrix I(G) is the n-by-m matrix in which entry mi,j is 1 if vi is an endpoint of ej and otherwise is 0. The degree of vertex v(in a loopless graph) is the number of incident edges.definition: let G be a graph without loops, with n vertices labeled 1,2,3,….,n and m edges labeled 1,2,3,…,m. The incidence matrix I(G) is the n*m matrix in which the entry in row i and column j is 1 if vertex i is incident with edge j,and 0 otherwise.
112111111111
1
112111111111
112111111111
112111111111
4
2
3
4 25
6
1
3
col 1 col 2 col 3 col 4 col 5 col 6
row 1 1 0 0 1 0 0
row 2 1 1 0 0 1 1
row 3 0 1 1 0 0 0
row 4 0 0 1 1 1 1
vertex
edges
Isomorphic Graphs
Definition:Two graphs G and H are isomorhic if H can be obtained from G by relabeling the vertices- that is, if there is a one-to-one correspondence between the vertices of G and those of H, such that the number of edges joining any pair of vertices in G is equal to the number of edges joining the corresponding pair of vertices in H.
Finding isomorphisms
•G and H must have the same degree•The vertex number of G is the same as in H• The edge number of G is the same as in H•We can also say the adjacency relation of matrix is the same. Note that in checking whether or not two matrices are the same, we can exchange rows and columns.
Example: Are the following two graphs isomorphic?
u1u2
u3 u4
v1
v3
v2
v4
Yes. in each of the graphs have the same number of wertex(4) and, edges(4). Degree of vertex 2.
u1 u2 u3 u4
u1 0 1 1 0
u2 1 0 0 1
u3 1 0 0 1
u4 0 1 1 0
v1 v2 v3 v4
v1 0 0 1 1
v2 0 0 1 1
v3 1 1 0 0
v4 1 1 0 0
Exchange u2 and u4 ( row and columns)
Subgraph
Definition: A subgraph of a graph G is a graph H such that V(H) V(G) and ⊆E(H) E(G) and the assigment of endpoints to edges in H is the same as in G. We ⊆then write H G and say that “ G contains H”. ⊆
Edge and Vertex Deletion
Given a graph G, there are two natural ways of deriving smaller graphs from G. İf e is an edge of G, we may obtain a graph on m-1 edges by deleting e from G but leaving the vertices and the remaining edges intact. The resulting graph is denoted by G\e. Similarly, if v is a vertex of G, we may obtain a graph on n-1 vetices by deleting form G the vertex v together with all the edges incident with v. The resulting graph is denoted by G - v. Exp: Edge-deleted and vertex-deleted subgraphs of the Peterson graph
e
v
G G\e G - v
The graphs G\e and G – v defined above are examples of subgraphs of G. We call G\e an edge-deleted subgraph , and G – v a vertex-deleted subgraph. Note that the null graph is a subgraph of every graph.
Paths, Cycles, and Trails
Definition: A walk of length k in a graph G is a succession of k edges of G of the form uv,vw,wx,….,yzWe denote this walk by uvwx..yz,and refer to it as a walk between u and z.
u v
w
x
y
z
We do not require all the edges or vertices in a walk to be different. For example, in the following graph
u
v w
x
yz
uvwxywvzzy is a walk of length 9 between u and y,which includes the edge vw twice,and the vertices v,w,y and z twice.Definition: If all the edges(but not necessarily all the vertices) of a walk are different,then the walk is called a trail. If, in addition, all the vertices are different,then the trail is called a path.İn the above diagram, the walk vzzywxy is a trail which is not a path(since the vertices y and z both occur twice),whereas the walk vwxyz has no repeated vertices,and is therefore a path.
Definition:A closed walk in a graph G is a succession of edges of G of the form uv,vw,vx,…,yz,zuIf all these edges are different, then the walk is called a closed trail. If, in addition, the vertices u,v,w,x,..,y,z are all different,then the trail is called a cycle. In the above graph, the closed walk uvwyvzu is a closed trail which is not a cycle(since the vertex v occurs twice),whereas the closed trail zz, vwxyv, and vwxyzv are all cycles.Definition: a graph G is connected if there is a path in G between any given pair of vertices, and disconnected otherwise. Every disconnected graph can be split up into a number of connected subgraphs,called components.
connected disconnected
Complete Graphs
A complete graph is a graph in which every two distinct verticesare joined by exactly one edge. The complete graph with n vertices is denotedby Kn . The graph Kn is regular of degree n-1,and therefore has ½ n(n-1) edges.
K1 K2 K3
K4 K5
or
Null Graphs
A null graph is a graph containing no edges. The null graph with n vertices is denoted by Nn .Note that Nn is regular of degree 0.
N1 N2 N3 N4
Cycle Graphs
A cycle graph is a graph consisting of single cycle. The cycle graph with n vertices is is denoted by Cn .
C1 C2 C3
C4 C5
Path GrapsA path graph is a graph consisting of a single path. The path graph with n vertices is denoted by Pn .
P1 P2 P3P4
Note that Pn has n-1 edges, and can be obtained from the cycle graph Cn by removing any edge.
Wheel Graphs We obtain the wheel Wn when we add an additinal vertex to the cycle Cn , for n>=3,and connect this new vertex to each of the n vertices in Cn ,by new edges.
W3W4 W5
Bipartite GraphsA Bipartite Graph is a graph whose vertex-set can be split into sets A and B in such a way that each edge of the graph joins a vertex in A to a vertex in B. We can distinguish the vertices in A from those in B by drawing the former in black and the latter in white,so that each edge is incident with a black vertex and a white vertex .
White vertices
Black vertices
B
A
Complete Bipartite GraphsA Complete Bipartite Graph is a bipartite graphs in which each black vertex is joined to each white vertex by exactly one edge. The complete bipartite graph with r black vertices and s white vertices is denoted by Kr,s . A complete bipartite graph of the form K1,5 is called a star graph. Kr,s has r+s vertices(r vertices of degree s,and s vertices of degree r) and rs edges. Note also that Kr,s = Ks,r ; it is usual,but not necessary,to put the smaller of r and s first.
K1,5 K2,2 K2,4
K2,4K3,3
Cube graphs
The n-cube, denoted by Qn , is the graph that has vertices representing the 2n bit sitrings of length n. Two vertices are adjacent if and only if the bit strings that they represent differ in exactly one bit.
0 1
10 11
00 01 000 001
011
100
110111
010
101
Q1 Q2
Q3
SOME APPLICATIONS OF SPECIAL TYPES OF GRAPHS
Local Area Networks:Some of local area networks are based on a star topology, where all devices are connected to a central control device. A local area network can be represented using a complete bipartite graf K1,n . Messages are sent from device to device through the central control device.
Bipartite graph K1,8 . Star topology
Other local area networks are based on a ring topology, where each device is connected to exactly two others. local area networks with a ring topology are modeled using n-cycles, Cn . Messages are sent from device to device around the cycle until the intended recipient of a message is reached.
Cycle graph Cn . ring topology
Some local area networks use a hybrid of these two topologies. Messages may be sent around the ring, or through a central device. This redundancy makes the network more reliable. Local area networks with this redundancy redundancy can be modeled using wheels Wn .
Wheel graph Wn . Hybrid topology
CHEMISTRY
A chemical molecule consist of a number of atoms linked by chemical bonds. For example, a molecule of water ( H2O) consist of an axygen atom bonded to two hydrogen atoms,and may be represented by the diagram H O HMore complicated examples are given by the molecules methane (CH4), ethanol (C2 H5OH) and ethene (C2 H4), that may be represented by diagrams H H H
H C H H C C O H
H H H methane ethanolThe molecule ethanol (C2 H5OH) can be represented by the following graph:
In such a graph, the degree of each vertex is simply the valency of the corresponding atom- the carbon vertices have degree 4, the oxygen vertex has degree 2, and the hydrogen vertices have degree 1. diagrams of the above type were first used in 1864 to represent the arrangement of atoms in a molecule. ( isomerism-molecules with the same chemical formula but different chemical properties) for example, the molecules n-butan and 2-methyl propane both have the chemical formula (C4 H10); note the different ways in which the atoms are arranged inside the molecule:
H H H H
H C C C C H
H H H H
n-butan (C4 H10) graph n-butan(C4 H10)
H
H C H H H
H C C C H
H H H
2-methyl propane (C4 H10) Graph 2-methyl propane (C4 H10)