简体   繁体   English

匹配非同构图

[英]Matching non-isomorphic graphs

I have two graphs G1 and G2, which are not isomorphic. 我有两个图G1和G2,它们不是同构的。 I need to make a new graph G1' such that, with the minimum changes in G1, it will have the nodes of both G1 as well as G2. 我需要制作一个新图G1',以使G1的变化最小,它将具有G1和G2的节点。 For example, let's say there is a node n1 in G1 with three connecting nodes n11, n12, n13. 例如,假设G1中有一个节点n1,其中有三个连接节点n11,n12,n13。 If now a 'corresponding' node n2 in G2 has 5 nodes n21, n22, n23, n24, n25, then n1' in G1' also needs to have five nodes n11', n12', n13', n14', n15'. 如果现在G2中的“对应”节点n2具有5个节点n21,n22,n23,n24,n25,则G1'中的n1'也需要具有五个节点n11',n12',n13',n14',n15'。 The first three copied from G1 and the two extra nodes which will have value of the last of the three. 从G1复制的前三个和另外两个节点,其值将是三个中最后一个的值。 The tree emanating from the extra nodes will be either entirely newly created or will comprise some extra nodes from G1 that haven't got equivalent nodes in G2 (are not 'exhausted' in some sense). 从额外节点发出的树将是全新创建的,或者将包含一些来自G1的额外节点,这些额外节点在G2中没有等效节点(从某种意义上来说并不是“用尽”)。

The problems are 1) finding the most suitable seed as the starting point so that the starting views are as much similar as possible 2) Building the tree from the extra nodes keeping the added node count to the minimum 问题是:1)找到最合适的种子作为起点,以使起点视图尽可能相似2)从额外的节点构建树,使添加的节点数保持最小

Edit: 编辑:

I will try to explain this further with the help of an illustration. 我将尝试借助插图进一步解释这一点。 My knowledge of graph theory is very superficial, so please excuse me if something sounds silly. 我对图论的知识很肤浅,因此,如果听起来有些愚蠢,请原谅。

I broadly want to obtain a graph which, with the minimum number of node manipulations, can take the form of one of the two non-isomorphic source graphs. 我广泛地希望获得一种图,该图在节点操作最少的情况下可以采用两个非同构源图之一的形式。

非同构图的通用图

In the example above graph G' can take two forms G or H with some amount pf node shuffling. 在上面的示例中,图形G'可以采用G或H的两种形式,其中有一些pf节点混洗。

1) To make it G, we keep all the orange nodes at their position. 1)为了使其为G,我们将所有橙色节点保持在其位置。 The dotted nodes will 'merge' to their neighboring nodes. 点状节点将“合并”到其相邻节点。 So B21' will have the value of A21 and will be at the same position (dissolving the corresponding edges). 因此,B21'将具有A21的值,并且将在相同位置(溶解相应的边)。 Likewise will happen with the pairs B31'-A31, B14'-A15 B25'-B23, A32'-A22 and A23'-A32. 对B31'-A31,B14'-A15 B25'-B23,A32'-A22和A23'-A32也将发生。 With this configuration the graph would resembles G completely, without any edges 'sticking out' 使用此配置,图形将完全类似于G,而没有任何边“伸出”

2) To make it isomorphic with H, A11 and A12, will take the values of A13, A32 and A32' that of A23, A23' that of A22. 2)为了使其与H,A11和A12同构,将采用A13的A13,A32和A32'的值,A22的A23'的值。 The dotted nodes will 'come out' of their merged positions. 点状节点将从合并位置“出来”。

The problem is to find G'. 问题是找到G'。 Maybe there is no ready graph operation or the solution is impossible, but any pointer to achieve this with any degree of approximation and efficiency is most welcome. 也许没有现成的图形操作或解决方案是不可能的,但是最欢迎以任何程度的逼近度和效率实现这一目标的指针。

NB: The starting nodes A1 and B1 are arbitrary. 注意:起始节点A1和B1是任意的。 First half of the problem is identifying these nodes so that the views are as much similar as possible. 问题的前半部分是识别这些节点,以使视图尽可能相似。

This is at least as hard as the graph isomorphism problem which is currently not known to be solvable in polynomial time. 这至少与目前不知道在多项式时间内可解决的图同构问题一样困难。 As such, you should not expect to be able to find an efficient algorithm for your problem. 因此,您不应期望能够找到解决问题的有效算法。

The correspondence is straightforward to see because if G1 and G2 were in fact isomorphic, you would have G1' = G1 , so an algorithm which solves this problem could be used to solve the graph isomorphism problem. 这种对应关系很容易看出来,因为如果G1G2实际上是同构的,则您将具有G1' = G1 ,因此可以使用解决该问题的算法来解决图同构问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM