Upload
rashmi-shankar
View
88
Download
2
Embed Size (px)
Citation preview
Fundamental Circuits And Fundamental Cut-SetsYashaswini Hegde
Abstract—The objective of this paper is to discuss therelationship between fundamental circuits and fundamen-tal cut-sets such as
• with respect to a spanning tree a chord that de-termines a fundamental circuit τ occurs in everyfundamental cut set associated with the branches inτ and not in any other.
• every circuit has even number of egdes in commonwith any cut-set
• fundamental cut-set matrix and transpose of funda-mental circuit matrix are orthogonal.
I. INTRODUCTION
• Fundamental Circuits:- A spanning tree ofa graph is a sub graph, which is a tree andconnects all the vertices together. Suppose ifan edge is added between any two vertices ofa tree a circuit is created, because there alreadyexists one path between any two vertices of atree.Suppose if a spanning tree T is consideredin connected graph G, adding any one chord(anedge which is absent in T but present in G)to T,will create exactly one circuit. Such a circuit,formed by adding a chord to a spanning tree, iscalled fundamental circuit. A graph will havefundamental circuits as many as its chords withrespect to its spanning tree, under considera-tion.Along with this,
– Circuit is a fundamental circuit only withrespect to a given spanning tree
– A given circuit may be fundamental withrespect to one given tree, but not withrespect to a different spanning tree of thesame graph.
– Tough the number of the fundamentalcircuits in a graph is fixed,the circuitsthat become fundamental, change with thespanning trees.
Here is a graph and its spanning tree -• Fundamental Cut-set A cut-set is a set
of edges whose removal would disconnect a
Department of Computer Science, University of Mysore,Mysore – 570006, Karnataka, India
Figure 1. A Graph,G
Figure 2. A Spanning Tree Of The Graph,T
graph. And the concept of the cut-set is closelyrelated to circuit. If the vertices of a nondirected graph G=(X,A) are partitioned intotwo sets X1 ad X2 where X1 belongs to Xand X2 is the complement of X1 in X.Thenthe set of links of G whose terminal verticeslie one in X1 and other in X2 is called cut-setof G.To understand the relation between the cut-set and fundamental circuit it is required tounderstand the relation between a spanningtree and the cut-set. Since a spanning Treeis minimal set of edges that connects all thevertices and the cut-set is minimal set of edgesthat disconnects some vertices from the other,both should have at least an edge in common.The fundamental cut-sets with respect to aspanning tree T is defined as the n-1 cut-setseach one of which contains one and only edge
which is in the spanning tree T. And thus if Tis a spanning tree of a non-directed graph G,the fundamental cut-set determined by an edgeei of T is composed of ei and those edges ofG not in T, which when added to T lead tofundamental circuits containing ei.
• Fundamental cut-set and Fundamentalcircuit Matrices The fundamental circuit isof the formBf=[I‖B]where I is the unit matrix. SimilarlyFundamental cut-set matrix is defined asCf=[C‖I]
The transpose of fundamental circuit matrixBT
f and Cf the fundamental cut-set matrix Care orthogonal. ie BT
f .Cf = 0.This information tells that- Each circuit cut bya cut- set has an even edges in common withthe cut-set. BT
f + Cf = 0.
II. PROBLEM STATEMENT- RELATIONBETWEEN FUNDAMENTAL CUT-SET AND
FUNDAMENTAL CIRCUITS
Prove the relation between Fundamental Circuitand all fundamental cut-sets. Such as
• The fundamental cut-sets with respect to aspanning tree T is defined as the n-1 cut-setseach one of which contains one and only edgewhich is in the spanning tree T.
• Each circuit cut by a cut- set has an even edgesin common with the cut-set.
• The transpose of fundamental circuit matrixBT
f and Cf the fundamental cut-set matrix Care orthogonal. ie BT
f .Cf = 0.
A. Data Structures Used
• Double dimensional array to hold the funda-mental cut-set.
• Double dimensional array to hold intermediatetransposed matrix
• Double dimensional array to hold the result ofthe multiplication.
B. Development Of Algorithm
The development of the algorithm contains 6stages.
• Generation of a graph, which can be generatedrandomly.
• Creation of a spanning tree for the given graph.This is generated using DFS technique and inthe resulting adjacency matrix only branchesthat in the array resulting from the algorithmis retained as 1 rest is set to 0
• Generating the the fundamental circuit matrix.This is generated as a matrix of chord X branchwith respect to the spanning tree. Introducing achord a cycle is detected as the correspondingrow is updated.
• Generating the fundamental cut-set matrix.• Checking for the defined relation.• Checking both matrices are orthogonal.Generating the fundamental cut-set matrix and
checking for the relation(even number of edges)and also checking both matrices are orthogonal areexplained below.
The following figures shows all fundamental cir-cuits and respective fundamental cut-sets.
Figure 3. Fundamental Circuit, with edge e3
Figure 4. Fundamental Circuit, with edge e4
The fundamental circuit matrix is -
Figure 5. Fundamental Circuit, with edge e7
Figure 6. Fundamental Circuit, with edge e9
Bf =
c e3 e4 e7 e9 e1 e2 e5 e6 e8c1 1 0 0 0 1 1 0 0 0c2 0 1 0 0 1 1 1 0 0c3 0 0 1 0 0 0 1 1 0c4 0 0 0 1 0 0 1 1 1
Figure 7. Fund cut-set,with edge e1,e3,e4
The fundamental cut-set matrix with respect tothe same spanning tree.
Cf =
k e3 e4 e7 e9 e1 e2 e5 e6 e8k1 1 1 0 0 1 0 0 0 0k2 1 1 0 0 0 1 0 0 0k3 0 1 1 1 0 0 1 0 0k4 0 0 1 1 0 0 0 1 0k5 0 0 0 1 0 0 0 0 1
Figure 8. Fund cut-set,with edge e2,e3,e4
Figure 9. Fund cut-set,with edge e4,e5,e7,e9
let us consider cut-set, e4,e5,e7,e9 due to theremoval of a edge e5 in a spanning tree. Fromthe fundamental circuit matrix get the rows whichcontain e5=1. Such rows are-
• e1,e2,e4,e5 -considering only ones in row c2 01 0 0 1 1 1 0 0
• e5,e6,e7 - in row c3, 0 0 1 0 0 0 1 1 0• e5,e6,e8,e9- in row c4 0 0 0 1 0 0 1 1 1
To prove the relation-1, it can be checked thate5=1 in all the three above mentioned fundamentalcircuits. and to prove the relation 2- for a rowin cut set with branch e5=1 all the fundamentalcircuits with e5=1 ie e5 on are checked by doingringsum
⊕operation and see any two bits are
reset. If so, that means there are two branches arecommon.
0 1 1 1 0 0 1 0 0⊕
0 1 0 0 1 1 1 0 00 1 1 1 0 0 1 0 0
⊕0 0 1 0 0 0 1 1 0
0 1 1 1 0 0 1 0 0⊕
0 0 0 1 0 0 1 1 1
It can be observed exactly two fields have beenreset after the ringsum
⊕operation.
From the above described fundamental circuit itcan be observed that its of the form
Figure 10. Fund cut-set,with edge e6,e7,e9
Figure 11. Fund cut-set, with edge e8,e9
Bf=[I‖B]
where I is the unit matrix.
Similarly from the Fundamental cut-set matrix,it can be observed that,it is of form
Cf=[C‖I]
and that could be generated as an orthogonalmatrix to the fundamental circuit matrix.
M = [BT‖I]
Cf =
k e3 e4 e7 e9 e1 e2 e5 e6 e8k1 1 1 0 0 1 0 0 0 0k2 1 1 0 0 0 1 0 0 0k3 0 1 1 1 0 0 1 0 0k4 0 0 1 1 0 0 0 1 0k5 0 0 0 1 0 0 0 0 1
If a fundamental circuit has rows of number ofchords the fundamental cut-set will have number ofbranches as number of rows.
Algorithm 1 create sptree(int vertex,int numVer-tices)
1: setting the visiting vertex as 1 to avoid cycles2: g visited[vertex]=13: for (i = 0; i <= numV ertices; i + +) do4: if (g adj list[vertex][i] == 1) then5: g dst lbl[i].dist = g adj list[vertex][i]6: g dst lbl[i].nei node = vertex7: iff neighbour exists and not yet visited8: if (!g visited[i]) then9: go visit next
10: create sptree(i,numVertices)11: end if12: end if13: end for
Algorithm 2 create fundckt(int vertex,int ptr,intvstart)
1: g visited[vertex]=12: for (i = 0; i <= numV ertices; i + +) do3: if (g adj list[vertex][i] == 1) then4: if (!g visited[i]) then5: path[vertex][i]=i6: ptr++7: create fundckt(i,ptr,vstart)8: end if9: else if (vstart==i) then
10: brek11: end if12: end for
C. Apriory Analysis
The algorithm contain the following modules
• Generation of spanning treeThis takes the time complexity of O(n2),wheren is the number of vertices.
• Creation Of Fundamental CircuitsThis also takes of O(n) since it is checking thespanning tree with a cycle.
• Creation of Fundamental Cut-set. This involvesmajorly two loops with number of branch andnumber of edges.Hence the total time complex-ity is O(rank X edges)
• Checking, if the fundamental circuit and funda-mental cut-set is having even number of edges.This takes the time complexity f O(n) since itis just checking which bits are reset after ring-
Algorithm 3 create fundcutset by fundckt(int**BF,int brch,int edg)
This loop is to initialize the matrixfor (i=1;i<=brach;i++) do
3: for (j=1;j<=edg;j++) dog csmatrix[i][j]=0
end for6: end for
this loop is to hold the transposed ’B’ part ofBF matrix.for (i=1;i<=(edg-brach);i++) do
9: k = 1for (j=(edg-brch+1);j<=edg;j++) do
g csmatrix[k][l] = g Bf[i][j]12: k = k + 1
end forl = l + 1
15: end forthis loop is to fill the identity part of the CFmatrix.i = 1
18: for (j=(edg-brch+1);j<=edg;j++) dog csmatrix[i][j] = 1i = i + 1
21: end for
Algorithm 4 check evennum common edjes(int*cktrow,int *cutsetrow,int br)
ctr=0for (i=1;i <= br;i++) do
g reseven[i]=cktrow[i]cutsetrow[i]4: if (cutsetrow[i]==1) && g reseven[i]==0)
thenctr++
end ifend for
8: if (ctr mod 2) thenrelation proved
end if
sum operation.• generating the transpose of the Fundamental
Circuit matrix.The time complexity is O(nullity X edges)
• Checking, if the transpose of fundamentalcircuit matrix and fundamental cut-set matrixare orthogonal.This takes the time complexity of
Algorithm 5 check orthogonal(int **BFT,int**CF,int m1,int n1,int m2,int n2)
if (n1==m2) thenfor (i=1;i <= m1;i++) do
for (j=1;j <= n2;j++) dog resmatrix[i][j]=0
5: for (k=1;k <= n1;k++) dog resmatrix[i][j]=g resmatrix[i][j]+BFT[i][k] *CF[k][j]if (g resmatrix[i][j] mod 2) then
error,breakend if
10: end forend for
end forend ifreturn
O(edgesXrankXnullity) since the usualmatrix multiplication involves three loops.
D. Experimental Analysis
The experiment is done by generating Funda-mental Circuit matrix and then deducing the Fun-damental Cut-set matrix out of it. Then a specificrow from the Fundamental Cut-set matrix withrespect to a branch is chosen and from the Fun-damental Circuit matrix those in which the samebranch is set to 1 is passed on to the routine(check evennum common edjes) one by one fortesting. The counter will be 0 under mod 2 if evennumber of branches are present. To check, if bothtranspose of Fundamental Circuit matrix and Funda-mental cut-set matrix are orthogonal, the transposeof Fundamental Circuit matrix is generated and itis multiplied with the Fundamental cut-set matrixand each element is checked if 0 under mod 2. Ifso they are orthogonal.
The out put of the program
The Fundamental Circuit matrix1 0 0 1 1 0 10 1 0 0 1 0 10 0 1 0 0 1 1
The Fundamental Cut-set Matrix1 0 0 1 0 0 0
1 1 0 0 1 0 00 0 1 0 0 1 01 1 1 0 0 0 1
The reduced matrix1 0 0 1 0 0 01 1 0 0 1 0 00 0 1 0 0 1 0
The resulting matrix multiplication under mod 2which is reduced1 0 0 1 0 0 01 1 0 0 1 0 00 0 1 0 0 1 01 0 0 1 0 0 00 1 0 1 1 0 00 0 1 0 0 1 00 1 1 1 1 1 0
The corrected matrix for mod 2. 1 0 0 1 0 0 01 1 0 0 1 0 00 0 1 0 0 1 01 0 0 1 0 0 00 1 0 1 1 0 00 0 1 0 0 1 00 1 1 1 1 1 01 1 1 0 1 1 0
The ringsum of 1100100 from the cutset matrixand 0100101 ctr=2.
III. CONCLUSION
The test for finding the relation betweenfundamental circuit and fundamental cut-set mainlyinvolves
• finding the ringsum of few rows of each withthe time complexity of O(edges) and an addi-tional array to hold the result
• finding the multiplication of transpose of Bf
and Cf is 0 under mod 2 takes the timecomplexity of O(edges X rank X nullity) butfew more two dimensional arrays to hold theresulting matrix and reduced matrices.
REFERENCES
[1] N.Christofides Graph Theory An Algorithmic Approach. Aca-demic Press Inc(London)ltd,1975
[2] N.Deo. Graph Theory. PHI,1974