Questions tagged [isomorphism]

An isomorphism is an invertible mapping between two mathematical structures, which guarantees that they are indistinguishable from one another by analyzing their mappings from and into other structures.

In a fixed category, an isomorphism between objects A and B is given by two morphisms:

  • fw : A -> B (forward)
  • bw : B -> A (backward)

Which compose in both directions to identity morphisms:

  • bw . fw = id_A : A -> A
  • fw . bw = id_B : B -> B

Given either morphism, fw or bw, the other is uniquely determined, so it is possible to speak of fw alone as an isomorphism, if it is clear that bw exists.

In the category of sets, as well as in Hask (the category of Haskell types and functions), an isomorphism is just a function that is both injective and surjective. In categories whose objects have more interesting structure, isomorphisms are required to preserve this structure. For example, an isomorphism (and, more generally, a homomorphism) of Haskell Monoids f :: A -> B is required to satisfy:

  • f mempty = mempty
  • f (a <> b) = f a <> f b
154 questions
79
votes
3 answers

Importance of isomorphic functions

Short Question: What is the importance of isomorphic functions in programming (namely in functional programming)? Long Question: I'm trying to draw some analogs between functional programming and concepts in Category Theory based off of some of the…
ThaDon
  • 7,826
  • 9
  • 52
  • 84
20
votes
3 answers

What does it mean for two binary trees to be isomorphic?

What does it mean for two binary trees to be isomorphic? I've been looking online and I can't seem to find a clear explanation. As far as I understand, two trees are isomorphic if they have the same shape. So I'm guessing two identical trees which…
user69514
  • 26,935
  • 59
  • 154
  • 188
19
votes
6 answers

Rejecting isomorphisms from collection of graphs

I have a collection of 15M (Million) DAGs (directed acyclic graphs - directed hypercubes actually) that I would like to remove isomorphisms from. What is the common algorithm for this? Each graph is fairly small, a hybercube of dimension N where N…
SwimBikeRun
  • 4,192
  • 11
  • 49
  • 85
14
votes
4 answers

Colored graph isomorphisms: 1(red)->2(blue) vs 1(blue)->2(red)

Given two simple graphs: library(igraph) g <- graph.empty() g <- g + vertices(1,2,3) g <- g + path(1,2,3) g1 <- g V(g1)$color = c(1,2,2) g2 <- g V(g2)$color = c(2,1,1) which look…
alberto
  • 2,625
  • 4
  • 29
  • 48
13
votes
4 answers

What's the Difference Between Subgraph Isomorphism and Subgraph Monomorphism?

In one of the projects I've worked on, the subject of isomorphism versus monomorphism came up. A little background: I'm no expert on graph theory and have no formal training in it. But this topic is very important in chemistry, where chemists expect…
Rich Apodaca
  • 28,316
  • 16
  • 103
  • 129
13
votes
2 answers

List of C++ libraries for Graph Theory

I'm going to start a scientific project about automata and graph theory, and I'm searching for a graph library that supports features like: directed/undirected graphs graph isomorphism test (i.e. is graph g1 isomorphic w.r.t. g2?) subgraph…
Riccardo T.
  • 8,907
  • 5
  • 38
  • 78
12
votes
2 answers

VF2 algorithm steps with example

Can someone explain the steps of the VF2 algorithm for graph isomorphism in simple words? I am learning this algorithm, but it is harsh without a working example. Can someone lead me the right direction? Thank you.
Abdul Samad
  • 5,748
  • 17
  • 56
  • 70
11
votes
2 answers

Find all subtrees in a tree matching a given subtree in Java

I am writing code in Java that uses an unordered, rooted tree where each node may have any number of child nodes. Given a tree T and a subtree S, I want to be able to find all the subtrees in T that match S (that is all the subtrees in T that are…
tree-hacker
  • 5,351
  • 9
  • 38
  • 39
10
votes
3 answers

Pattern matching in graphs

I'm trying to find tool/algorithm for searching sections that corresponds to specified pattern in oriented graph, e.g.: A->B->C or or A<->B->C Please, suggest me direction of my searches. I mean pattern matching. I need to find all group of nodes…
Jamal
  • 365
  • 2
  • 3
  • 10
10
votes
1 answer

Isomorphisms between 3 and more types using lens

Inspired by a question on polymorphic function between ADTs I'm trying to create isomorphisms between multiple (not just 2) types, so that every time I need an isomorphic but not the same type, I can sprinkle my code with some convert. Suppose I…
Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166
9
votes
2 answers

NetworkX: Subgraph Isomorphism by edge and node attributes

Suppose I have 2 graphs A and B and I want to know if A is a subgraph of B. The nodes contain attributes, say, 'size' and 'material'. When I run: GM = networkx.algorithms.isomorphism.GraphMatcher(B,A) print…
drum
  • 5,416
  • 7
  • 57
  • 91
8
votes
2 answers

How to understand that the types a and forall r. (a -> r) -> r are isomorphic

In the book Thinking with Types, 6.4 Continuation Monad tells that the types a and forall r. (a -> r) -> r are isomorphic, which can be witnessed by the following functions: cont :: a -> (forall r. (a -> r) -> r) cont x = \f -> f x unCont ::…
Z-Y.L
  • 1,740
  • 1
  • 11
  • 15
7
votes
1 answer

'Isomorphic' comparison of NetworkX Graph objects instead of the default 'address' comparison

I would like to use NetworkX Graph objects as keys in a Python dict. However, I do not want the default behavior for comparison (i.e., by the address of the object). Instead, I would like isomorphic graphs to refer to be keys to the same elements in…
user1661473
  • 185
  • 1
  • 6
6
votes
2 answers

Implementing Babai's quasi-polynomial graph isomorphism?

Has anyone implemented Laszlo Babai's quasi-polynomial graph isomorphism? http://people.cs.uchicago.edu/~laci/ I am not an expert in this area. I am wondering why not just implement his algorithm and run it to verify its time complexity?
JackWM
  • 10,085
  • 22
  • 65
  • 92
5
votes
1 answer

Generic isomorphism between sums and heterogeneous sums

Is there a Haskell library providing (or assisting in writing) generic isomorphism between a sum type and an associated heterogenous sum type? Take the following sum type, data TR = TR_Index | TR_Inner R Now we associate it with a heterogenous sum…
Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
1
2 3
10 11