Repository navigation
🧩 Constraint Solving POTD:Problem of the Day: Graph Isomorphism via SAT/SMT #71634
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #71869. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem Statement
Graph Isomorphism asks: given two graphs G and H, do they have identical structure? More formally, is there a bijection (one-to-one mapping) between their vertices such that two vertices are adjacent in G if and only if their images are adjacent in H?
Concrete instance:
Consider two 4-vertex graphs:
Is G ≅ H? (Can we find a permutation that makes their adjacency structures identical?)
Input & Output:
Why It Matters
Computational Complexity: Graph isomorphism occupies a unique complexity position—neither known to be in P nor NP-complete, despite decades of study. It has motivated new algorithmic paradigms.
Real-world Applications:
Modeling Approaches
Approach 1: Constraint Programming (Permutation-Based)
Paradigm: Discrete constraint satisfaction with global constraints.
Decision variables:
Let
π[i]denote the image of vertexifrom G in H (a permutation). Eachπ[i] ∈ {0, 1, ..., n-1}, with all-different constraint.Constraints:
Trade-offs:
Key strength: Symmetry breaking is straightforward—fix
π[0] = 0and order-by-degree heuristics reduce search space dramatically.Approach 2: SAT Encoding
Paradigm: Boolean satisfiability via CNF reduction.
Decision variables:
x[i,j]= true iff vertex i ∈ V_G maps to vertex j ∈ V_H.Constraints (encoded as clauses):
Trade-offs:
Key strength: CDCL conflict analysis learns global patterns, avoiding redundant search branches.
Approach 3: SMT (Satisfiability Modulo Theories)
Paradigm: SAT with integer linear arithmetic and uninterpreted functions.
Idea: Use SMT solver with bitvector or finite-domain theories to encode permutation constraints more naturally than raw CNF:
Trade-offs:
Modeling Approaches
Example Model (MiniZinc - Constraint Programming)
Key Techniques
1. Symmetry Breaking
Graph isomorphism exhibits heavy symmetry (multiple valid isomorphisms for symmetric graphs). Breaking symmetry early is critical:
πto be lexicographically minimal2. Constraint Propagation & Feasibility Pruning
3. Sophisticated Search Strategies
Challenge Corner
Questions for readers:
Symmetry Reduction: The graph isomorphism problem has automorphism groups that can be exponentially large. Can you design a refinement procedure that partitions vertices by their "role" in the graph structure and dramatically reduce the search space?
Spectral Insights: Isomorphic graphs have the same eigenvalues (spectrum) of their adjacency matrices. How could you use spectral information (e.g., eigenvalue multiplicity, eigenvector structure) to prune candidate mappings before solving?
Extension to Graph Monomorphism: How would you modify your model if the goal were not full isomorphism but a monomorphism (injective homomorphism)—finding if G "embeds" into H as a subgraph? What new constraints would help?
References
Babai, L. (2016). Graph Isomorphism in Quasipolynomial Time. In Proc. 48th STOC. A landmark result showing GI can be solved in quasipolynomial time.
Foggia, P., Sansone, C., & Vento, M. (2001). Graph Matching: A Fast Algorithm and Its Evaluation on 3D Face Databases. In IEEE Transactions on Pattern Analysis and Machine Intelligence. Practical algorithms for graph matching with industrial applications.
Rossi, F., van Beek, P., & Walsh, T. (Eds.) (2006). Handbook of Constraint Programming. Chapter 18 covers CSP approaches to combinatorial problems, including graph isomorphism encodings.
Järvisalo, M., & Heule, M. (2013). Inprocessing Techniques for SAT. A survey of SAT solver techniques applicable to highly symmetric problems like isomorphism.
Next time: Stay tuned for tomorrow's problem in the Packing & Cutting category!
All reactions