CN104732547A - Graph isomorphism judgment method based on high-order power adjacency matrix hash comparison - Google Patents

Graph isomorphism judgment method based on high-order power adjacency matrix hash comparison Download PDF

Info

Publication number
CN104732547A
CN104732547A CN201510159006.8A CN201510159006A CN104732547A CN 104732547 A CN104732547 A CN 104732547A CN 201510159006 A CN201510159006 A CN 201510159006A CN 104732547 A CN104732547 A CN 104732547A
Authority
CN
China
Prior art keywords
adjacency matrix
matches
isomorphism
vertex
summit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510159006.8A
Other languages
Chinese (zh)
Inventor
何洁月
沈斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN201510159006.8A priority Critical patent/CN104732547A/en
Publication of CN104732547A publication Critical patent/CN104732547A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

The invention discloses a graph isomorphism judgment method based on high-order power adjacency matrix hash comparison. The method comprises the steps that path information of graphs with different lengths is calculated through a high-order power adjacency matrix; statistics is conducted on a vertex path in the high-order power adjacency matrix through a hash function; division is conducted on a candidate vertex matching set according to vertex path information; rapid isomorphism judgment of two graphs is achieved. According to the graph isomorphism judgment method based on the high-order power adjacency matrix hash comparison, the division can be conducted on the candidate vertex matching set in the comparison process, and the time complexity of graph isomorphism judgment is greatly reduced. The range of application of using feature information of graphs from local to global to conduct the graph isomorphism judgment is wide, and higher judgment efficiency of the graph isomorphism with different types and different sizes is achieved. Therefore, the graph isomorphism judgment method based on the high-order power adjacency matrix hash comparison has higher use value.

Description

A kind of isomorphism of graph decision method based on high math power adjacency matrix hash comparison
Technical field
The present invention relates to graph theory field, particularly graph isomorhpism decision method.
Background technology
Graph isomorhpism decision problem is one of basic problem in graph theory subject, has a wide range of applications in fields such as pattern-recognition, circuit analysis, molecular structure and bioinformatics.Graph isomorphism problem be not both included into NPC problem, was not included into P problem yet.At present, scholars have proposed some effective isomorphism of graph decision algorithms, but when judging for particular type figure, these algorithms can lose efficacy usually.
Isomorphism of graph algorithm roughly can be divided into 3 classes: 1. based on the decision algorithm of model.Xu Jin etc. propose a kind of isomorphism of graph decision algorithm based on neural network, and set up corresponding mathematical model by simplifying energy function, are a kind of ultra-large parallel calculating methods can simulating local function.2. based on the algorithm of search.Ullman algorithm utilizes predictive equation to decrease the space of search; Figure is first expressed as certain canonical form by Nauty algorithm, then judges whether isomorphism.3. according to the algorithm that the characteristic information of figure (going out underlay reconstructing, feeder number, tree number, be communicated with sheet number etc. as figure) proposes, as degree series method, breadboardin relative method etc.
But these algorithms all have respective limitation.Such as, the isomorphism of graph algorithm based on neural network all needs to explore in the step-length of energy function when judging at every turn, is easy to be absorbed in local optimum, affects the efficiency of algorithm.Nauty algorithm is the algorithm that in searching algorithm, overall efficiency is higher, but when mesh figure complete failure.The breadboardin improved compares to determine method obtain good efficiency under large node, but loses efficacy when there is isolated point in figure, and efficiency is not high for the strong figure of symmetry.
Summary of the invention
Goal of the invention: in order to overcome the deficiencies in the prior art, the invention provides a kind of isomorphism of graph decision method based on high math power adjacency matrix hash comparison, for solving the technical matters of existing isomorphism of graph algorithm scope of application limitation.
Technical scheme: for achieving the above object, the technical solution used in the present invention is:
Based on an isomorphism of graph decision method for high math power adjacency matrix hash comparison, two that need to judge are had to the topological diagram G of same vertices number aand G bperform following operation:
Step 1, respectively acquisition topological diagram G aand G badjacency matrix A and B, and set the power coefficient initial value k=1 of the high math power adjacency matrix of adjacency matrix A and B;
Step 2, judge that whether A and B be equal, if equal, judge two isomorphism of graphs and end operation; If unequal, then perform step 3 downwards;
Step 3, utilize matrix multiplication can in the hope of topological diagram G aand G bk power adjacency matrix AP k=AP k-1a and BP k=BP k-1b, utilizes hash function to add up AP kand BP kobtain the routing information on each summit;
Step 4, according to the routing information on summit by vertex partition in each candidate vertices set of matches;
Step 5, the summit in candidate vertices set of matches each in step 4 to be checked, if having at least in a candidate vertices set of matches from G aand G bnumber of vertices unequal, namely from G aand G bsummit must occur in pairs, if can not above-mentioned requirements be met, namely occur in certain candidate vertices set of matches from G aand G bnumber of vertices unequal, then judge two figure tripe systems and end operation; If equal, then perform step 6 downwards;
Step 6, according to the vertex partition result in step 4, A and B is carried out isomorphic convert, obtain the adjacency matrix A ' after adjustment and B ', judge that whether A ' is equal with B ', if equal, judges two isomorphism of graphs, if unequal, execution step 7 downwards;
Step 7, when k meet be less than G aor G bnumber of vertices time, k increases by 1 and also returns step 3; Otherwise, to G aand G bin the summit that still cannot distinguish, carry out enumerating coupling, whether isomorphism is schemed in final judgement.
Further, in the present invention, the middle statistical method of step 3 is as follows: with AP kand BP kevery a line represent a summit, add up the element kind of every a line and the number routing information as corresponding vertex i.
Further, in the present invention, following process is comprised in step 4:
First, if k=1, by topological diagram G aand G ball vertex partition in same candidate vertices set of matches;
Then, the basis that current candidate matches vertex set divides divides new candidate vertices set of matches, a kind of one_to_one corresponding in the routing information obtained in the candidate vertices set of matches of each new division and epicycle step 3, will have the vertex partition of this routing information in the corresponding candidate vertices set of matches newly marked off.Divided by the coupling of above-mentioned routing information, candidate vertices set of matches is progressively refined.
Beneficial effect:
The present invention proposes a kind of isomorphism of graph decision method based on high math power adjacency matrix hash comparison, the present invention has following characteristics:
1) with hash function statistics k power adjacency matrix, the routing information on each summit is calculated;
2), when program starts, all summits of two topological diagrams are all in a candidate matches vertex set, and divided by the coupling of routing information, candidate matches vertex set is gradually by refinement;
3) if the candidate vertices coupling set after the division of two figure is not identical, then two figure tripe systems are returned;
4) according to routing information, matrix is adjusted, if the adjacency matrix after adjustment is equal, two isomorphism of graphs;
5) utilize high math power matrix multiplication can be in the hope of, calculate the routing information of two figure multiple-lengths.
The method is by calculating the path characteristic information from local to the overall situation, carry out little by little segmenting to topological diagram candidate vertices set of matches, thus greatly reduce time complexity, in polynomial time complexity, isomorphism of graph judgement can be carried out fast, most of graph isomorhpism is judged all to obtain higher efficiency.Through experimental verification, the present invention judges experimentally to obtain good experiment effect in the isomorphism of graph and can be applicable to most of isomorphism of graph and judges.
Accompanying drawing explanation
Fig. 1 is process flow diagram of the present invention;
Fig. 2 is two topological diagram G aand G b;
Fig. 3 be the present invention in Random Graph with CS algorithm, the comparing of Nauty Riming time of algorithm;
Fig. 4 is the present invention in rule 2 dimension mesh figure and CS algorithm, the comparing of Nauty Riming time of algorithm;
Fig. 5 is the present invention in irregular 2 dimension mesh figure and CS algorithm, the comparing of Nauty Riming time of algorithm;
Fig. 6 be the present invention in fixing number of degrees figure with CS algorithm, the comparing of Nauty Riming time of algorithm.
Embodiment
Below in conjunction with accompanying drawing, the present invention is further described.
As shown in Figure 1, the invention discloses a kind of isomorphism of graph decision method based on high math power adjacency matrix hash comparison, comprise following steps:
Step 1, for two of Fig. 2 topological diagram G aand G ball have 5 summits, the adjacency matrix inputting them is respectively
A = 1 2 3 4 5 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 B = 1 2 3 4 5 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0
The power coefficient initial value k=1 of the high math power adjacency matrix of setting adjacency matrix A and B;
Step 2, judge that whether A and B be equal, equal, return judgement two isomorphism of graph and end operation, if unequal, then perform step 3 downwards; Obviously now A and B is unequal;
Step 3, acquisition topological diagram G aand G bk=1 power adjacency matrix AP 1=A and BP 1=B, utilize hash function to add up A and B, every a line represents a summit, adds up the element kind of every a line and the number routing information as corresponding vertex i, when obtaining k=1 and the routing information on the first round each summit as follows, topological diagram G athe routing information on 1 to summit, middle summit 5 is respectively 2,3,3,3,4, topological diagram G bthe routing information on 1 to summit, middle summit 5 is respectively 3,2,3,4,3;
Step 4, according to the routing information on summit by vertex partition in each candidate vertices set of matches, specifically comprise the steps:
First, due to k=1, by topological diagram G aand G ball vertex partition in same candidate vertices set of matches, represent according to following form:
A B 1 2 3 4 5 1 2 3 4 5
Then, the basis that current candidate matches vertex set divides divides new candidate vertices set of matches, a kind of one_to_one corresponding in the routing information obtained in the candidate vertices set of matches of each new division and epicycle step 3, will have the vertex partition of this routing information in the corresponding candidate vertices set of matches newly marked off; Operate according to the method described above, by all vertex partition to 3 different candidate vertices set of matches, represent according to following form:
A B 1 2 2 3 4 1 3 5 5 4
Step 5, compare each candidate vertices set of matches, if having at least in a candidate vertices set of matches from G aand G bnumber of vertices unequal, then judge two figure tripe systems and end operation; If equal, then perform step 6 downwards; Due to 3 candidate vertices set of matches above, from G in each aand G bnumber of vertices all equal, therefore need to continue downwards to perform step 6;
Step 6, according to the vertex partition result in step 4, A and B is carried out isomorphic convert, obtains the adjacency matrix A ' after adjustment and B ' as follows:
A ′ = 1 2 3 4 5 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 B ′ = 1 2 3 4 5 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0
Judge that whether A ' is equal with B ', if equal, judges two isomorphism of graphs, if unequal, perform step 7 downwards; Now, judge that A ' is equal with B ', therefore obtains the conclusion of two isomorphism of graphs, without the need to performing step 7 below.
Above-described embodiment only need proceed to step 6 can be terminated, if but the deterministic process of other embodiments proceed to step 6 judge A ' and B ' unequal, then need the operation carrying out step 7.
Step 7, when k meet be less than G aor G bnumber of vertices time, k increases by 1 and also returns step 3; Otherwise, to G aand G bin the summit that still cannot distinguish, carry out enumerating coupling, whether isomorphism is schemed in final judgement.
Still with the topological diagram G in that embodiment above aand G bfor example, suppose in step 6, to judge that A ' and B ' is unequal, be less than G because k=1 meets aor G bnumber of vertices 5, then k increase by 1 obtains k=2, and carries out the operation of a step 3 again, now, obtains topological diagram G aand G bk=2 power adjacency matrix AP 2=AA and BP 2=BB, utilizes hash function to add up AP 2and BP 2, every a line represents a summit, adds up the element kind of every a line and the number routing information as corresponding vertex i, and when obtaining k=2, second to take turns the routing information on each summit as follows, topological diagram G athe routing information on 1 to summit, middle summit 5 is respectively 3,2,2,2,1, topological diagram G bthe routing information on 1 to summit, middle summit 5 is respectively 2,3,2,1,2;
Then according to step 4 according to the routing information on summit by vertex partition in each candidate vertices set of matches.Detailed process is, due to k=2, the basis of therefore direct 3 candidate vertices set of matches dividing at present divides the candidate vertices set of matches made new advances, the method for division and last round of similar.
Divide well and carry out the operation that step 5 also carries out step 6, step 7 as required again.
More succinct in order to illustrate, not quite identical to the order described in step 6, step 7 in Fig. 1, but do not affect the carrying out of whole deterministic process, essence is consistent with the determination methods of text description.
Utilize the inventive method for the isomorphism of graph determination time comparative experiments of dissimilar, different size, number of vertices covers 1 to 1000, has carried out nearly 30,000 groups of experiment tests.Major part test group can complete isomorphic products by k=2 power adjacency matrix at most, and the more topological diagram of number of vertex than to just needing the comparison carrying out more high order, and does not occur to enumerate the method for coupling for isomorphic products with use.
Fig. 3 is the present invention comparing at Random Graph and CS algorithm and Nauty Riming time of algorithm.Fig. 4 is the present invention in rule 2 dimension mesh figure and the comparing of CS algorithm and Nauty Riming time of algorithm.Fig. 5 is the present invention in irregular 2 dimension mesh figure and the comparing of CS algorithm and Nauty Riming time of algorithm.Fig. 6 be the present invention in fixing number of degrees figure with the comparing of CS algorithm and Nauty Riming time of algorithm.
In above-mentioned comparison diagram, the present invention HPIC represents.Can find out that the present invention is better than CS algorithm in time performance, slightly be inferior to Nauty algorithm; But for rule 2 dimension mesh figure, Nauty algorithm lost efficacy, but algorithm that the present invention carries still can carry out isomorphism of graph judgement fast.
The above is only the preferred embodiment of the present invention; be noted that for those skilled in the art; under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (3)

1. based on an isomorphism of graph decision method for high math power adjacency matrix hash comparison, it is characterized in that: two topological diagram G with same vertices number that needs are judged aand G bperform following operation:
Step 1, respectively acquisition topological diagram G aand G badjacency matrix A and B, and set the power coefficient initial value k=1 of the high math power adjacency matrix of adjacency matrix A and B;
Step 2, judge that whether A and B be equal, if equal, judge two isomorphism of graphs and end operation; If unequal, then perform step 3 downwards;
Step 3, acquisition topological diagram G aand G bk power adjacency matrix AP kand BP k, utilize hash function to add up AP kand BP kobtain the routing information on each summit;
Step 4, according to the routing information on summit by vertex partition in each candidate vertices set of matches;
Step 5, the summit in each candidate vertices set of matches to be checked, if having at least in a candidate vertices set of matches from G aand G bnumber of vertices unequal, then judge two figure tripe systems and end operation; If equal, then perform step 6 downwards;
Step 6, according to the vertex partition result in step 4, A and B is carried out isomorphic convert, obtain the adjacency matrix A ' after adjustment and B ', judge that whether A ' is equal with B ', if equal, judges two isomorphism of graphs, if unequal, execution step 7 downwards;
Step 7, when k meet be less than G aor G bnumber of vertices time, k increases by 1 and also returns step 3; Otherwise, to G aand G bin the summit that still cannot distinguish, carry out enumerating coupling, whether isomorphism is schemed in final judgement.
2. the isomorphism of graph method based on high math power adjacency matrix hash comparison according to right 1, is characterized in that: the middle statistical method of step 3 is as follows: with AP kand BP kevery a line represent a summit, add up the element kind of every a line and the number routing information as corresponding vertex i.
3. the isomorphism of graph method based on high math power adjacency matrix hash comparison according to right 1, is characterized in that: comprise following process in step 4:
First, if k=1, by topological diagram G aand G ball vertex partition in same candidate vertices set of matches;
Then, the basis that current candidate matches vertex set divides divides new candidate vertices set of matches, a kind of one_to_one corresponding in the routing information obtained in the candidate vertices set of matches of each new division and epicycle step 3, will have the vertex partition of this routing information in the corresponding candidate vertices set of matches newly marked off.
CN201510159006.8A 2015-04-03 2015-04-03 Graph isomorphism judgment method based on high-order power adjacency matrix hash comparison Pending CN104732547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510159006.8A CN104732547A (en) 2015-04-03 2015-04-03 Graph isomorphism judgment method based on high-order power adjacency matrix hash comparison

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510159006.8A CN104732547A (en) 2015-04-03 2015-04-03 Graph isomorphism judgment method based on high-order power adjacency matrix hash comparison

Publications (1)

Publication Number Publication Date
CN104732547A true CN104732547A (en) 2015-06-24

Family

ID=53456415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510159006.8A Pending CN104732547A (en) 2015-04-03 2015-04-03 Graph isomorphism judgment method based on high-order power adjacency matrix hash comparison

Country Status (1)

Country Link
CN (1) CN104732547A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851925A (en) * 2019-10-31 2020-02-28 武汉科技大学 Planetary gear train isomorphism determination method, system and medium based on improved adjacency matrix
WO2020121316A1 (en) * 2018-12-12 2020-06-18 Telefonaktiebolaget Lm Ericsson (Publ) Identifying faults in system data
US10803122B2 (en) 2017-04-11 2020-10-13 International Business Machines Corporation Labeled graph isomorphism allowing for false positive
CN113254722A (en) * 2021-05-24 2021-08-13 北京华大九天科技股份有限公司 RC network isomorphism identification method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080235315A1 (en) * 2006-10-01 2008-09-25 Javaid Aslam Technique for solving np-hard problems using polynomial sequential time and polylogarithmic parallel time

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080235315A1 (en) * 2006-10-01 2008-09-25 Javaid Aslam Technique for solving np-hard problems using polynomial sequential time and polylogarithmic parallel time

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何洁月等: ""基于路径信息比较的图同构新算法"", 《东南大学学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10803122B2 (en) 2017-04-11 2020-10-13 International Business Machines Corporation Labeled graph isomorphism allowing for false positive
US10878032B2 (en) 2017-04-11 2020-12-29 International Business Machines Corporation Labeled graph isomorphism allowing for false positive
WO2020121316A1 (en) * 2018-12-12 2020-06-18 Telefonaktiebolaget Lm Ericsson (Publ) Identifying faults in system data
CN110851925A (en) * 2019-10-31 2020-02-28 武汉科技大学 Planetary gear train isomorphism determination method, system and medium based on improved adjacency matrix
CN110851925B (en) * 2019-10-31 2024-02-20 武汉科技大学 Planetary gear train isomorphism judging method, system and medium based on improved adjacency matrix
CN113254722A (en) * 2021-05-24 2021-08-13 北京华大九天科技股份有限公司 RC network isomorphism identification method

Similar Documents

Publication Publication Date Title
CN104732547A (en) Graph isomorphism judgment method based on high-order power adjacency matrix hash comparison
CN112449009B (en) SVD-based communication compression method and device for Federal learning recommendation system
CN104466959A (en) Power system key line identification method and system
CN109064348A (en) A method of it blocking rumour community in social networks and inhibits gossip propagation
CN105354675A (en) AC/DC power grid cascading failure analysis method based on key power transmission section recognition
CN106067074B (en) A method of network system robustness is promoted by optimizing the switch state of link
WO2019014894A1 (en) Link prediction method and device
CN106878067B (en) method for identifying key nodes of dynamic ad hoc network
CN106912040B (en) Ad Hoc network key node identification method fusing deletion method
Hassan et al. Evaluation of clustering algorithms for DAP placement in wireless smart meter network
Behera et al. An efficient modularity based algorithm for community detection in social network
CN106789588B (en) Label transmission method and device
Amestoy et al. A parallel matrix scaling algorithm
CN111191867B (en) Reliability evaluation method for complex network of power system
Jain et al. A distributed self-stabilizing algorithm for finding a connected dominating set in a graph
CN108599141B (en) Rapid dynamic self-adaptive identification method for multi-energy local area network
CN106961350B (en) Simulation control method for cascade faults of smart power grid
Akram et al. TAPU: Test and pick up-based $ k $-connectivity restoration algorithm for wireless sensor networks
Ali et al. Simulating the Wireless Sensor Networks Coverage area
CN105337759A (en) Internal and external ratio measurement method based on community structure, and community discovery method
Chang et al. Spreading of messages in random graphs
CN104753795B (en) A kind of random network topology structure generation method and device
Laarhoven et al. A randomized Delaunay triangulation heuristic for the Euclidean Steiner tree problem in ℜ.
Ma et al. InfMatch: Finding isomorphism subgraph on a big target graph based on the importance of vertex
Niu et al. Identification of critical nodes in ad hoc network based on the analysis of network partition

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150624