Updated README.md: Graph-isomorphism limitation and Mathematica snippet

This commit is contained in:
Ämin Baumeler 2023-05-04 16:46:15 +00:00
parent 1505dd17b5
commit 263805631e

View File

@ -76,11 +76,20 @@ Verifying the admissibility of 6 graphs in the file `3.soc' (line 1 to line 6)
These graphs are admissible These graphs are admissible
``` ```
The SOCs generated can easily be displayed with Mathematica using the following:
```
SOCs = DirectedGraph[AdjacencyGraph[#]] & /@ ToExpression[Import["./3.soc", "List"]];
SOCs = DeleteDuplicatesBy[SOCs, CanonicalGraph];
SOCs
```
## Limitations ## Limitations
In `SOCgen`, each simple directed graph is represented by a 64bit unsigned integer: In `SOCgen`, each simple directed graph is represented by a 64bit unsigned integer:
This integer is interpreted as a vector of bits, where each bit specifies the absence or presence of a directed edge from one node to another. This integer is interpreted as a vector of bits, where each bit specifies the absence or presence of a directed edge from one node to another.
Since we consider simple directed graphs only (no self-loops), there are `n(n-1)` possible directed edges, where `n` is the number of nodes. Since we consider simple directed graphs only (no self-loops), there are `n(n-1)` possible directed edges, where `n` is the number of nodes.
This means that the largest number of nodes possible is limited by `n=8`. This means that the largest number of nodes possible is limited by `n=8`.
While the SOCs generated by `SOCgen` satisfy some degree-order (see function `isdegreeordered(...)` in [SOCgen.c](./SOCgen.c)), `SOCgen` does not perform graph-isomorphism tests, and may output multiple isomorphic graphs.
## License ## License
[GPL-3.0-or-later](./LICENSES/GPL-3.0-or-later.txt) [GPL-3.0-or-later](./LICENSES/GPL-3.0-or-later.txt)