当前位置:网站首页>Subgraph isomorphism -subgraph isomorphism
Subgraph isomorphism -subgraph isomorphism
2022-07-03 23:46:00 【Dark blue blue blue】
Subgraph isomorphism is subgraph isomorphism,
hypothesis G Figure ,S Is a subgraph , If S All in node( node ) Between and edge( edge ) Can be mapped to G In the words of ( Just have the same structure ), It is called subgraph isomorphism .
induced subgraph isomorphism:G and S Corresponding node Between edge One-to-one correspondence
non-induced subgraph isomorphism:G Corresponding node Between some edge There is no in S in
Subgraph matching (Subgraph matching computation):
- Calculate candidates node(Candidate computation)
That is to help each S Medium node seek G Nodes in may correspond to each other
Pseudo code :
candidate_node=list()
for node_u in S:
for node_v in G:
if v Have all the u Of label and len(v.neighbours)>=len(u.neighbours):
candidate_node.append(v)
Set the search order
In the simple method, search in random orderIsomorphic search
Use recursive form to put S Each of them node Corresponding G Candidates in node Put in the new sub graph , And match ( Backtracking algorithm ,backtracking, It is somewhat similar to the traversal of a tree )
query_node: S Medium node
data_node: G Medium node( Those correspondences S Of candidate node)
O:query_node Search order of ( It's just one. query_node Of list)
Φ \Phi Φ: All isomorphic sets
ϕ \phi ϕ: An isomorphic object ( Contains query_node And corresponding data_node)
v: One data node
u: One query node
Pseudo code :
def IsomorphismSearch(G,S,C,O,i,$\phi$,$\Phi$):
if $\phi$.query_node=S.node:
$\Phi$.append($\phi$)
else:
u=O[i]
for v in u Of candidate node:
if v not in $\phi$.data_node and IsValid(G,S,$\phi$,u,v):
$\phi$[U]=v
IsomorphismSearch(G,S,C,O,i,$\phi$,$\Phi$)
$\phi$.query_node.remove(u)
return $\Phi$
def IsValid(G,S,$\phi$,u,v):
for u' in u.neighbours:
if neighbour stay $\phi$.query_node in , however u and u' The mapping of edge(v,$\phi$(u')) But in the G Does not exist in the :
return False
if isomorphism yes induced Of :
for u' in u.query_node:
if u' and u Not connected , But they are G Mapping in (v,$\phi$(u')) It's connected :
return False
return True
边栏推荐
- Scratch uses runner Py run or debug crawler
- EPF: a fuzzy testing framework for network protocols based on evolution, protocol awareness and coverage guidance
- The difference between single power amplifier and dual power amplifier
- 2022.02.14
- Live app source code, jump to links outside the station or jump to pages inside the platform
- Selenium library 4.5.0 keyword explanation (II)
- [MySQL] sql99 syntax to realize multi table query
- Gossip about redis source code 75
- A preliminary study on the middleware of script Downloader
- Day30-t540-2022-02-14-don't answer by yourself
猜你喜欢

Double efficiency. Six easy-to-use pychar plug-ins are recommended

Unsafe and CAS principle

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

Selenium check box

Pyqt5 sensitive word detection tool production, operator's Gospel
![[note] IPC traditional interprocess communication and binder interprocess communication principle](/img/f6/36c28df02198539e27352e3cdf4ba6.jpg)
[note] IPC traditional interprocess communication and binder interprocess communication principle
![[network security] what is emergency response? What indicators should you pay attention to in emergency response?](/img/ff/c733ffbb922760910ab09af3ae2886.jpg)
[network security] what is emergency response? What indicators should you pay attention to in emergency response?
![[Happy Valentine's day]](/img/d9/9280398eb64907a567df6eea772adb.jpg)
[Happy Valentine's day] "I still like you very much, like sin ² a+cos ² A consistent "(white code in the attached table)

How to quickly build high availability of service discovery

The interviewer's biggest lie to deceive you, bypassing three years of less struggle
随机推荐
How to make recv have a little temper?
Open 2022 efficient office, starting from project management
Loop compensation - explanation and calculation of first-order, second-order and op amp compensation
It is forbidden to splice SQL in code
How can I get the Commission discount of stock trading account opening? Is it safe to open an account online
X Opencv feature point detection and matching
After the Lunar New Year and a half
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Sword finger offer day 4 (Sword finger offer 03. duplicate numbers in the array, sword finger offer 53 - I. find the number I in the sorted array, and the missing numbers in sword finger offer 53 - ii
2022 t elevator repair registration examination and the latest analysis of T elevator repair
[BSP video tutorial] stm32h7 video tutorial phase 5: MDK topic, system introduction to MDK debugging, AC5, AC6 compilers, RTE development environment and the role of various configuration items (2022-
2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination
Fashion cloud interview questions series - JS high-frequency handwritten code questions
Amway by head has this project management tool to improve productivity in a straight line
Solve the problem that the kaggle account registration does not display the verification code
D29:post Office (post office, translation)
Maxwell equation and Euler formula - link
2022.02.13
The upload experience version of uniapp wechat applet enters the blank page for the first time, and the page data can be seen only after it is refreshed again
Common mode interference of EMC