<p>I do not think there's a single standard format. igraph library (http://igraph.sourceforge.net/) could be of use, however, as it supports reading/writing of number of different graph formats.</p>

CC BY-SA 3.0
2011-09-11T10:12:26.180Z
2011-09-11T10:12:26.180Z
Anton Belov
<p>I am aware of the <a href="http://dimacs.rutgers.edu/Challenges/" rel="nofollow">"famous" DIMACS graph format</a> (which frankly looks a little clunky to me - "c" for a comment line ?) and the <a href="http://people.sc.fsu.edu/~jburkardt/data/metis_graph/metis_graph.html" rel="nofollow">METIS file format</a>. </p>

<p>While it's not particularly hard to invent my own graph format, it's nice to follow something accepted so that reuse of code for generating examples and testing algorithms is easier. </p>

<blockquote>
  <p>Is there a standard accepted format for representing graphs for use
  with testing graph algorithms ?</p>
</blockquote>

CC BY-SA 3.0
2011-09-09T16:23:42.263Z
I forgot about LEDA. In fact there's also the GML format.
Suresh Venkat
CC BY-SA 3.0
2011-09-09T16:31:59.263Z
Brendan McKay's [nauty](http://cs.anu.edu.au/~bdm/nauty/) package uses [graph6 and sparse6 formats](http://mapleta.maths.uwa.edu.au/~gordon/g6.html).
mhum
CC BY-SA 3.0
2011-09-11T15:25:21.220Z
For large graphs of million nodes and billion edges such as twitter, the input and output time will be significant and I think it is much faster to use binary formats. I am not aware of any well-known binary format thought.
Thang Dinh
<ds.algorithms><graph-algorithms><data-sets>
Standard format for representing large graphs
Suresh Venkat
# Standard format for representing large graphs

(Asked by: username_0 on 2011-09-09)

I am aware of the ["famous" DIMACS graph format](http://dimacs.rutgers.edu/Challenges/) (which frankly looks a little clunky to me - "c" for a comment line ?) and the [METIS file format](http://people.sc.fsu.edu/~jburkardt/data/metis_graph/metis_graph.html).

While it's not particularly hard to invent my own graph format, it's nice to follow something accepted so that reuse of code for generating examples and testing algorithms is easier.

> Is there a standard accepted format for representing graphs for use
> with testing graph algorithms ?

**Tags:** ds.algorithms, graph-algorithms, data-sets

> **Comments:**
> **username_0**: I forgot about LEDA. In fact there's also the GML format.  
> **username_1**: Brendan McKay's [nauty](http://cs.anu.edu.au/~bdm/nauty/) package uses [graph6 and sparse6 formats](http://mapleta.maths.uwa.edu.au/~gordon/g6.html).  
> **username_2**: For large graphs of million nodes and billion edges such as twitter, the input and output time will be significant and I think it is much faster to use binary formats. I am not aware of any well-known binary format thought.  

---

## 1 answers

### Answer by username_3 on 2011-09-11. Score: 1

I do not think there's a single standard format. igraph library (http://igraph.sourceforge.net/) could be of use, however, as it supports reading/writing of number of different graph formats.


---

