Kirchhoff's Circuit Law Applications to Graph Simplification in Search Problems
KKirchhoff ’s Circuit Law Applications to GraphSimplification in Search Problems
Jaeho Choi
School of Computer Science and EngineeringChung-Ang University
Seoul, Republic of [email protected]
Joongheon Kim
School of Electrical EngineeringKorea University
Seoul, Republic of [email protected]
Abstract —This paper proposes a new analysis of graph usingthe concept of electric potential, and also proposes a graphsimplification method based on this analysis. Suppose that eachnode in the weighted-graph has its respective potential value.Furthermore, suppose that the start and terminal nodes in graphshave maximum and zero potentials, respectively. When we letthe level of each node be defined as the minimum number ofedges/hops from the start node to the node, the proper potentialof each level can be estimated based on geometric proportionalityrelationship. Based on the estimated potential for each level, wecan re-design the graph for path-finding problems to be theelectrical circuits, thus Kirchhoff’s Circuit Law can be directedapplicable for simplifying the graph for path-finding problems.
I. I
NTRODUCTION
The graph as a research topic is still held important positionsin various fields, such as mathematics, theoretical computerscience [1]–[6], networks, machine learning, and quantumcomputing [7]–[9]. In particular, many researchers in variousfields are working for graph simplification because humanbeings are faced with complex graphs problems on manyissues. Recently, various research topics related to graphsimplification have been proposed in many areas. The sum-mary of related research areas about graph simplification isas follows, i.e., data mining [10], decentralized compositeoptimization [11], network model simplification [12]–[16],biological network analysis [17], scheduling [18], and cluster-ing coefficient [19]. As such, interest in graph simplificationdramatically increases. Therefore, this paper proposes a novelgraph simplification algorithm.The graph simplification algorithm, which is introduced inthis paper is based on graph analysis using electric potential.Our graph analysis method uses the concept of node level, thismeans the minimum number of edges from the start node tothe node. By using the concept of levels and potentials, wecreate various transformed graphs and present a methodologyfor analyzing them with a geometric approach. The ultimatepurpose of the methodology that we introduce is to estimatethe entire voltage of the graph. By estimating the entire voltageof the graph and mapping the edge cost of the graph to theresistance, we can estimate the values of each current flowingthrough each edge using Kirchhoff’s Circuit Law. Then, wecan remove the edges, which have no current flow. This is anoverview of the graph simplification algorithm. II. B
ACKGROUND
In this section, we briefly describe two background con-cepts, i.e., electric potential and Kirchhoff’s Circuit Law.
A. Electric Potential
The electric field E is a special vector function whose curlis always zero [20], [21] where the E can represent as thevector sum of each electric field produced by each charge as: E = E + E + · · · + E N , (1)where N can be a positive integer. Thus, the electric field E has following properties: ∇ × E = ∇ × ( E + E + · · · + E N )= ( ∇ × E ) + ( ∇ × E ) + · · · + ( ∇ × E N ) = 0 . (2)According to Stokes’ theorem [22], (cid:73) E · d l = 0 (3)is satisfied by (2). By (3), following scalar function is defined: V ( r ) ≡ − (cid:90) ro E · d l , (4)where o is a standard reference point, and r is a target point.The scalar function defined in (4) is called electric potential,and the differential form of (4) is as follows: E = − ∇ V. (5)In particular, in circuit theory, the difference of electricpotential with these characteristics is called voltage. B. Kirchhoff’s Circuit Law
Kirchhoff’s Circuit Law consists of Kirchhoff’s CurrentLaw (KCL) and Kirchhoff’s Voltage Law (KVL) [23]. • Kirchhoff’s Current Law : KCL, also called Kirchhoff’sfirst law, states that the sum of incoming currents at ajunction is equal to the sum of outgoing currents at thejunction. If we define the sign of incoming currents atthe junction as positive and the sign of outgoing currents a r X i v : . [ c s . D M ] S e p t the junction as negative, this law can be representedthat the sum of the currents at each junction is zero as: (cid:88) xn =1 I n = 0 , (6)where I n is each current n and x is the number ofincoming or outgoing currents. In other words, KCL isthe same as the law of conservation of charge. • Kirchhoff’s Voltage Law : KVL, also called Kirchhoff’ssecond law, states that the sum of voltages of the closed-circuit loop is zero. If we define the sign of voltagesimilar to KCL’s currents case, this law can be as: (cid:88) yn =1 V n = 0 , (7)where V n is each voltage n and y is the number ofvoltages measured in the closed-circuit loop. In otherwords, KVL is the same as the law of energy conservationin a complete closed-circuit.III. G RAPH A NALYSIS USING E LECTRIC P OTENTIAL
This section describes the graph analysis method, whichcombines the concept of each electric potential to each node,before describing the graph simplification algorithm.
A. Motivation
Suppose that there is a graph G ( v, e ) in two-dimensionalspace where v and e represent nodes and edges, respectively.We have to search for a logically dependable path from thestart to the terminal on G . We already know a variety of simplemethods for searching paths, e.g., greedy algorithms [24], [25].However, if the original graph G is too complex to find thelogically dependable path in a simple way, it is essential tosimplify the graph before searching for a logically dependablepath, e.g., the shortest path, the minimum cost path, and soforth. Obviously, prior to simplifying the graph, we need toanalyze the graph with various perspectives. As one of thenew perspectives, we introduce the method of graph analysisusing electric potential in the next section. B. Graph Analysis using Electric Potential
We can interpret the graph as an electric circuit by regardingthe electric resistances, junctions, and the voltage from thepower supply as edges, nodes, and electric potential differencebetween the start and the terminal. If there is a voltage ε applied to the graph, then the start has an electric potential ε and the terminal has an electric potential . Then, eventually,the rests of the nodes (i.e., non-start and non-terminal nodes)have electric potentials between ε and .Each junction in the electric circuit has its own electricpotential, and no current flows through the resistance betweenthe junctions with the same electric potential. In other words,if there are edges directly connected between nodes with thesame electric potential in the graph, no current will flowthrough the edges. Thus, we may remove those edges in thegraph. By removing the edges between equipotential nodes, Fig. 1. Sample graph G (7 , . The yellow node S represents the start nodeand the red node T represents the terminal node.Fig. 2. Level unit transformed graph from G (7 , in Fig. 1. the complex graph can be simplified, and the simplified graphhas an advantage in the path-finding problem.To find equipotential nodes, the estimation of the electricpotential of each node in the graph is required at first. Theelectric potential of each node can be estimated by findingeach current value at each edge, and this value can be obtainedfrom KCL and KVL. However, in order to use KCL and KVL,it is necessary to determine the voltage of the entire graph orthe value of the currents diverging from the start. For thesedecisions, we introduce some concepts and analysis methods. Level.
The minimum number of edges between the start nodeto the target node.In Fig. 1, the color represents the level of each node. Level , , , and correspond to yellow, green, blue, and red,respectively. At the graph in Fig. 1, if we group the nodesat the same level, the graph transforms to level unit graph inFig. 2. The number of edges in the transformed graph is equalto the number of edges in the original graph. The level unittransformed graph can be used in one process of the maximumvoltage estimation in the graph simplification. The -dimensional graph via mappingnodes’ electric potential value to the height value.Each node in a two-dimensional graph is simply representedby a circle or a point, but in a -D potential graph in Fig. 3,it can be represented by a node column. The representation ofthe node column’s height indicating the electric potential canshow visibly the presence of equipotential nodes. This graph ismeaningful in itself but can be interpreted by transforming itas shown in Fig. 4. This transformation, aligning all the node ig. 3. -D potential graph. The original graph in Fig. 1 can be transformedinto this graph form. The height of each node column corresponds to eachnode’s electric potential. Each level has a circular orbit, and each nodecolumn can be located only at the corresponding level orbit.Fig. 4. Straight-line alignment by the position moving of each node columnat each level orbit in Fig. 3. The three level node columns are overlappedand the two level node columns are overlapped. columns in a straight line, has several analytical advantages.In Fig. 4, we can connect the highest point in the start nodecolumn where the edges first extend, the lowest point in theterminal node column where the edges finally gather, and thefloor point of the start node column. These three points makea right triangle. Based on this right triangle, we can add somedefinitions to estimate the length of each side of the righttriangle. And this allows us to determine the voltage of theentire graph. Voltage Estimation.
The entire voltage of the N -level graphcan be estimated as a positive value less than the sum of theminimum costs between the level k − and level k , where N and k are positive integers, ≤ k ≤ N .Before the description, suppose that there is an N -levelgraph, where N is a positive integer. Transform this graphin the form shown in Fig. 4, and then connect the highestpoint in the start node column, the lowest point in the terminalnode column, and the floor point of the start node column tomake a right triangle. The right triangle can be created asshown in Fig. 5. The entire voltage of the graph is equal tothe electric potential of the level node, which is equal to thelength of SO . The straight line of each level represents eachplane perpendicular to the plane where (cid:52) SOT is located. ST represents the shortest straight distance passing through theideal nodes, that maybe existed or not. ST is shorter thanany path, including the orange, red and green lines shown in Fig. 5. Geometric analysis of the N -level graph from Fig. 4. The light bluepoints S , T , and O represent the highest point in the start node column, thelowest point in the terminal node column, and the floor point of the start nodecolumn, respectively. The purple points represent the highest points of eachnode columns, and the gray points represent the ideal points at each level.The orange, red, and green lines represent examples of different paths, andthe black area represents black-box sections between level and level N − . Fig. 5. From this, we can make two heuristic definitions.
Definition . Let ST be the sum of the minimum costsbetween adjacent levels.If we expressed the the edge costs between level k − andlevel k as C ( k − , ( k ) , then the length of ST is as follows: ST = min C (0) , (1) + min C (1) , (2) + · · · + min C ( N − , ( N ) = (cid:88) Nk =1 min C ( k − , ( k ) , (8)where min means the minimum value. Since ST is the lengthof the longest side of (cid:52) SOT , the entire voltage correspondingto the length of SO should be smaller than ST . Thus, we canestimate the entire voltage of the graph as a positive value lessthan the sum of the minimum costs between adjacent levels. Definition . Let the ratio of the lengths between adjacentlevels which divide OT be equal to the ratio of average costsbetween adjacent levels.The OT is the sum of the lengths between adjacent levels: OT = (cid:88) Nk =1 L ( k − , ( k ) , (9)where L ( k − , ( k ) is the lengths between level k − andlevel k . We do not estimate the length of OT directly asa specific value, but we estimate the ratio of the lengthsbetween adjacent levels that divide OT . The ratio of thelengths between adjacent levels is as follows: L (0) , (1) : L (1) , (2) : · · · : L ( N − , ( N ) = avgC (0) , (1) : avgC (1) , (2) : · · · : avgC ( N − , ( N ) , (10)where avg means the average value. According to the similar-ity in geometry, this ratio is equal to the ratio of the lengthsbetween adjacent ideal points which divide ST . Since weestimated the length of ST from (8), each appropriate lengthbetween adjacent ideal points also can be estimated with thisratio. This can be interpreted as an appropriate small edgecosts between adjacent levels. lgorithm 1 Graph Simplification
Volatage EstimationInput: G ( v, e ) Output: V max Determine the level of each node in the given graph G . Transform G to level unit graph G (cid:48) ( v (cid:48) , e ) . Transform G (cid:48) to -D potential graph andalign in a straight line. Construct a right triangle with three points:
O, S, T . Place ideal nodes of each level on ST . Estimate ST = (cid:80) Nk =1 min C ( k − , ( k ) . Choose one real number x ∈ Π , where Π = { x | < x < ST } . return x . Edge Removal via Sub-current EstimationInput: G ( v, e ) , V max = x Output: G ∗ ( v, e (cid:48) ) Map G to an electric circuit as C ( e j ) → Resistance j . Set the sub-currents of
Resistance j as I j . Create the system of linear equations usingKCL and KVL.
Solve the system of linear equations and obtain I · · · I j . for int i = 1 ; i ≤ j ; i ++ do if I i = 0 then Remove e i on G . G = G removal,e i . end if end for return G .At the end of this section, we’ve shown the various transfor-mations and interpretations of graphs through the concept ofhypothetical electric potentials and also described hypotheticalvoltage estimation and appropriate edge cost estimation usingtwo definitions. The related example is in Sec. IV-B.IV. G RAPH S IMPLIFICATION USING K IRCHHOFF ’ S C IRCUIT L AW This section describes the graph simplification algorithmbased on the graph analysis and the voltage estimation of theentire graph, that are described in the previous section.
A. Proposed Algorithm
The algorithm consists of two processes, voltage estimationand edge removal via sub-current estimation.A summary of the first process, voltage estimation, whichdescribed in the previous section as follows. At first, determinethe level of each node in the given graph G ( v, e ) , with | v | = i nodes and | e | = j edges, where i and j are positiveintegers. Construct a right triangle with three points: origin O = (0 , , , start node S = (0 , V max , , and terminal node T = ( L, , , where V max and L are positive real numbers,and L < ST . Place ideal nodes of each level within ST inlevel order. In other words, as shown in Fig. 5, ideal nodes Fig. 6. Weighted-graph G (5 , . Each number next to each edge representsthe edge cost (or weight). should be placed sequentially on the diagonal of the righttriangle. Calculate the estimated length of ST as shown in (8).Choose one of any positive real number smaller than the lengthof ST , and determined as V max . Normally, the value of V max is chosen from positive integer values.The second process, edge removal via sub-current esti-mation, is performed as follows. Consider each edge costs(or weights) as each resistance, and consider V max , whichis determined in the first process, as an entire voltage ofgraph. Set the sub-currents flowing at each edge of the graphas I · · · I j , and create the system of linear equations usingKCL and KVL. Solve the system of linear equations and findthe values of the sub-currents I · · · I j . To find the values ofthe sub-currents, the number of required linear equations ismaximum j . Remove the edges with zero sub-currents.This algorithm is effective when there are many equipoten-tial nodes with no current flowing between them. In a complexgraph, there is also a high probability of many equipotentialnodes, so utilization is expected. B. Case Study
In this section, we explain the graph simplification algorithmwith a simple example.Suppose that, there is a weighted-graph, refer to Fig. 6. Weneed to find the shortest path in a given graph G (5 , , andwe want to simplify this graph first. The levels of nodes S , a , b , c , and T in this graph correspond to , , , , and , respectively. Thus, we can convert graph G to level unitgraph G (cid:48) (3 , . Through the process to of the algorithm 1,a right triangle with points S = (0 , V max , , O = (0 , , ,and T = ( L, , can be formed, and the length of ST canbe estimated as: ST = min C (0) , (1) + min C (1) , (2) = min(2 , ,
1) + min(4 , , ,
3) = 1 + 3 = 4 . (11) ig. 7. Graph of sub-current applying KCL. The current flows from S withpotential V max to T with potential zero. Through the process to of Algorithm 1, V max can be areal number where < V max < , i.e., we set V max = 3 .We consider each edge cost as each resistance and findthe sub-current flowing through each edge. Fig. 7 shows thesub-currents flowing through each edge by applying KCL.Since there are sub-currents in this graph, we may createthe system of linear equations with closed-circuit loopsaccording to KVL are as follows: I + 4 I , I + 6 I , I + 3( I − I − I ) , I + 6( I + I − I + I ) , I − I − I , I + ( I − I ) − I . (12)The values of sub-currents I , I , I , I , I , and I areobtained from (12) as , , , , , and , respectively. Weconfirm that there is no sub-current flowing through the edges ab and cb (i.e., I ab = I − I = 0 and I cb = I = 0 ), so theywill be removed. Fig 8 shows a simplified graph G ∗ (5 , withtwo edges removal. In G ∗ , there are only four paths from S to T , i.e., we can easily find the shortest path.In addition, due to Definition
2, the ratio of the lengthsbetween adjacent level which divides OT is obtained as: L (0) , (1) : L (1) , (2) = avgC (0) , (1) : avgC (1) , (2) = avg (2 , ,
1) : avg (4 , , , . (13)This ratio is equal to the ratio of the lengths between adjacent Fig. 8. Graph G ∗ (5 , , which is the output of the graph simplificationalgorithm. The orange path is the shortest path (or the minimum cost path). ideal points which divide ST , so SD and DT are as: SD = (cid:18)
88 + 19 (cid:19) ST ≈ . ,DT = (cid:18)
198 + 19 (cid:19) ST ≈ . , (14)where D is an ideal point of level and ST = 4 is anobtained value from (11). SD and DT can be consider asrelatively small edge costs between level to and level to , respectively. In Fig. 6, the closest to SD = 1 . amongthe edge costs between level to is and the closest to DT = 2 . among the edge costs between levels to is . These two edges correspond to the actual shortest path,represented by the orange path in Fig. 8. This is because, inthis example, all the edges between the same level nodes areremoved by the graph simplification algorithm.V. C ONCLUSIONS AND F UTURE W ORK
In this paper, we have proposed graph analysis methodsusing electric potentials, such as level unit transformed graphanalysis, straight-line alignment -D potential graph analysis,and geometric analysis. Based on these analysis methods, agraph simplification algorithm using Kirchhoff’s Circuit Lawhas been proposed. The graph simplification algorithm consistsof two processes, i.e., voltage estimation and edge removal viasub-current estimation. We have applied this algorithm to theexample graph, and have demonstrated its usefulness as a pre-processing algorithm for path-finding problems. Thus, we alsohave confirmed the validity of the definitions underlying theproposed graph simplification algorithm.As a future work direction, we will figure out which kindsof applications can be useful; and then conduct data-intensiveperformance evaluations. CKNOWLEDGMENT
This research was supported by National Research Founda-tion of Korea (2019M3E4A1080391). J. Kim is a correspond-ing author (e-mail: [email protected]).R
EFERENCES[1] L. Wang and O. Shayevitz, “Graph information ratio,” in . IEEE, 2017,pp. 913–917.[2] M. Molkaraie and H.-A. Loeliger, “Partition function of the ising modelvia factor graph duality,” in . IEEE, 2013, pp. 2304–2308.[3] S. Prakash, A. Reisizadeh, R. Pedarsani, and S. Avestimehr, “Codedcomputing for distributed graph analytics,” in . IEEE, 2018, pp. 1221–1225.[4] A. Host-Madsen and J. Zhang, “Coding of graphs with application tograph anomaly detection,” in . IEEE, 2018, pp. 1829–1833.[5] A. Anis, A. El Gamal, A. S. Avestimehr, and A. Ortega, “A samplingtheory perspective of graph-based semi-supervised learning,”
IEEETransactions on Information Theory , vol. 65, no. 4, pp. 2322–2342,2018.[6] V. Aggarwal, A. S. Avestimehr, and A. Sabharwal, “On achievinglocal view capacity via maximal independent graph scheduling,”
IEEETransactions on Information Theory , vol. 57, no. 5, pp. 2711–2729,2011.[7] R. Duncan, A. Kissinger, S. Pedrix, and J. van de Wetering, “Graph-theoretic simplification of quantum circuits with the zx-calculus,” arXivpreprint arXiv:1902.03178 , 2019.[8] T. Matsumine, T. Koike-Akino, and Y. Wang, “Channel decoding withquantum approximate optimization algorithm,” in , 2019, pp. 2574–2578.[9] J. Choi and J. Kim, “A tutorial on quantum approximate optimizationalgorithm (qaoa): Fundamentals and applications,” in . IEEE, 2019, pp. 138–142.[10] N. Ruan, R. Jin, and Y. Huang, “Distance preserving graph simplifi-cation,” in .IEEE, 2011, pp. 1200–1205.[11] B. Wang, J. Fang, H. Duan, and H. Li, “Graph simplification-aidedadmm for decentralized composite optimization,”
IEEE Transactions onCybernetics , 2019.[12] M. D. Dias, F. Petronetto, P. Valdivia, and L. G. Nonato, “Graph spectralfiltering for network simplification,” in . IEEE, 2018, pp. 345–352.[13] H.-J. Jongsma, H. L. Trentelman, and M. K. Camlibel, “Model reductionof consensus networks by graph simplification,” in . IEEE, 2015, pp. 5340–5345.[14] Y. Zhonghua and W. Lingda, “Research on network simplification byedge bundling,” in . IEEE, 2016, pp. 466–472.[15] S. Yaw, R. S. Middleton, and B. Hoover, “Graph simplification for infras-tructure network design,” in
International Conference on CombinatorialOptimization and Applications . Springer, 2019, pp. 576–589.[16] M. D. Dias, M. R. Mansour, F. Dias, F. Petronetto, C. T. Silva, andL. G. Nonato, “A hierarchical network simplification via non-negativematrix factorization,” in . IEEE, 2017, pp. 119–126.[17] E. Ko, M. Kang, H. J. Chang, and D. Kim, “Graph-theory basedsimplification techniques for efficient biological network analysis,” in . IEEE, 2017, pp. 277–280.[18] K. C. Sou, H. Sandberg, and K. H. Johansson, “Nonserial dynamicprogramming with applications in smart home appliances scheduling-part i: Precedence graph simplification,” in . IEEE, 2014, pp. 1643–1648. [19] H. Jung and S. Kim, “Sigcon: Simplifying a graph based on degreecorrelation and clustering coefficient,” in .IEEE, 2017, pp. 372–379.[20] D. J. Griffiths, “Introduction to electrodynamics,” 2005.[21] R. A. Serway and J. W. Jewett,
Physics for scientists and engineers withmodern physics . Cengage learning, 2018.[22] M. Spivak,
Calculus on manifolds: a modern approach to classicaltheorems of advanced calculus . CRC press, 2018.[23] K. T. S. Oldham,
The doctrine of description: Gustav Kirchhoff, classicalphysics, and the “purpose of all science” in 19 th-century Germany .University of California, Berkeley, 2008.[24] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein,
Introductionto algorithms . MIT press, 2009.[25] C. M. Wilt, J. T. Thayer, and W. Ruml, “A comparison of greedy searchalgorithms,” in third annual symposium on combinatorial searchthird annual symposium on combinatorial search