The program nauty uses two string-based formats for storing graphs: Graph6 and Sparse6 format. Each format has benefits and drawbacks.
In particular, the length of a Graph6 string representation of a graph depends only on the number of vertices. However, this also means that graphs with few edges take as much space as graphs with many edges. On the other hand, Sparse6 is a variable length format which can use dramatically less space for sparse graphs but can have a much larger storage size for dense graphs.
C26 = graph append(apply(25, i -> {i, i+1}), {0, 25}); |
g6 = graphToString C26; #g6 |
s6 = graph6ToSparse6 g6; #s6 |
K26 = graph flatten for i from 0 to 25 list for j from i+1 to 25 list {i,j}; |
g6 = graphToString K26; #g6 |
s6 = graph6ToSparse6 g6; #s6 |