VF2 subgraph isomorphism algorithm in Rust.
Go to file
Owen Troke-Billard 199cdb0ec2 Update documentation 2024-09-16 15:13:08 -06:00
.github/workflows Add continuous integration 2024-09-16 12:36:34 -06:00
images Add problem description 2024-09-16 13:58:20 -06:00
src Update documentation 2024-09-16 15:13:08 -06:00
tests Change VF2++ to VF2 2024-09-16 10:46:47 -06:00
.gitignore Copy code from private repository 2024-09-16 10:39:31 -06:00
Cargo.toml Add MIT and APACHE licenses 2024-09-16 11:07:07 -06:00
LICENSE-APACHE Add MIT and APACHE licenses 2024-09-16 11:07:07 -06:00
LICENSE-MIT Add MIT and APACHE licenses 2024-09-16 11:07:07 -06:00
README.md Correct explanation 2024-09-16 14:03:15 -06:00

README.md

vf2 — VF2 subgraph isomorphism algorithm in Rust

This crate implements the VF2 subgraph isomorphism algorithm [1]. It can find graph isomorphisms, subgraph isomorphisms, and induced subgraph isomorphisms. Graphs can be directed or undirected.

Features

  • Enumerate graph isomorphisms
  • Enumerate subgraph isomorphisms
  • Enumerate induced subgraph isomorphisms
  • Support directed graphs
  • Support undirected graphs
  • Support disconnected graphs
  • Support node labels
  • Support edge labels
  • Graph trait

What is subgraph isomorphism?

A graph is a structure consisting of a set of objects where some pairs of objects are connected. A graph isomorphism is a one-to-one correspondence between two graphs such that objects connected in one are also connected in the other.

Graph isomorphism

For two graphs to be isomorphic, there must be a one-to-one correspondence between nodes such that neighbors in one are also neighbors in the other. The query and data graphs in the following image are isomorphic.

graph-isomorphism.svg

Subgraph isomorphism

It is often desirable to find instances of one graph within another. To do this, we search for subgraph isomorphisms. A subgraph isomorphism is when one graph is isomorphic to a subgraph of another. There are two subgraph isomorphisms in the following image.

subgraph-isomorphism.svg

Induced subgraph isomorphism

An induced subgraph isomorphism is the same as a subgraph isomorphism except that the subgraph must be induced. Edges in the data subgraph must also exist in the query graph.

induced-subgraph-isomorphism.svg

Remaining work

  • Implement VF2 cutting rules
  • Implement VF2++ (only VF2 implemented so far)

References

[1] L. P. Cordella, P. Foggia, C. Sansone, and M. Vento, “A (sub)graph isomorphism algorithm for matching large graphs,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 26, no. 10, pp. 13671372, Oct. 2004, doi: https://doi.org/10.1109/tpami.2004.75.

[2] A. Jüttner and P. Madarasi, “VF2++—An improved subgraph isomorphism algorithm,” Discrete Applied Mathematics, vol. 242, pp. 6981, Jun. 2018, doi: https://doi.org/10.1016/j.dam.2018.02.018.