2

First, I know there has been a lot of works to compute the edit distance between two graphs. But most of the GED algorithms are applied in general cases.

Now considering my case, there are two graphs G(V1,E1) and G(V2,E2). Vk is a set of nodes which includes k vertices(k is a constant), and Vk satisfies both Vk⊆V1 and Vk⊆V2. I want to remain the correspondance between these two graphs when computing the edit distance between them.

I am wondering if there any algorithm aim at this situation? If there is not, does any one have any advice for me? thanks a lot

PS

Assume that vi is a node in Vk. What I am concerned about is that vi remains unchanged when G1 is transformed to G2, which means there is no operation on vi(e.g substitute vi in G1 to u in G2, delete vi in G1, insert vi in G2) during the operations sequence which transform G1 to G2.

Yu Gu
  • 2,382
  • 5
  • 18
  • 33
  • Don't you mean V1⊆Vk and V2⊆Vk ? –  Oct 20 '16 at 07:32
  • Nope. I mean Vk is a subset of both V1 and V2 – Yu Gu Oct 20 '16 at 07:45
  • What use is this Vk in solving the problem ? (Except for making it a little more difficult ?) –  Oct 20 '16 at 08:08
  • Are you assuming that all the edges *Ek* that connect between two nodes in *Vk* are the same in the two graphs? – user3386109 Oct 20 '16 at 08:12
  • Assume that vi is a node in Vk. What I am concerned about is that vi remains unchanged when G1 is transformed to G2, which means there is no operation on vi(e.g substitute vi in G1 to u in G2, delete vi in G1, insert vi in G2) during the operations sequence which transform G1 to G2. – Yu Gu Oct 20 '16 at 08:21
  • The edges connect between two nodes in Vk are not necessary to be the same in two graphs. – Yu Gu Oct 20 '16 at 08:23

1 Answers1

2

There is no algorithm to solve your specific problem, because there is no use case and there is no mathematical form. How I would solve this:

1) In the comments you specify Vk unchanged but Ek(1) Ek(2) where Ek(i) are the edges between nodes in Vk for Vi. In that case compute edge add/rem/replace, GED(Vk1, Vk2) ignoring edges out of Vk1/2

2) compute GED(V1-Vk1, V2-Vk2) ignoring the edges between Vi-Vki and Vki. Where V1-Vk1 is the graph V1 after removing all nodes in Vk and all edges linked to Vk

3) compute GED(E(V1-Vk1 <-> Vk1), E(V2-Vk2 <-> Vk2)), that is, compute the GED of replacing "edges linking V1-Vk1 and Vk1" with "edges linking V2-Vk2 and Vk2".

4) Add the 3 GED together.