<p><a href="https://i.sstatic.net/aFfui.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aFfui.png" alt="enter image description here" /></a>For any problems involving graphs for which you need test data you can use Knuth's less well known work 'The Stanford Graph Base'. This includes many data sets designed to test all kinds of graph problems. The materials are described at <a href="https://www-cs-faculty.stanford.edu/%7Eknuth/sgb.html" rel="nofollow noreferrer">https://www-cs-faculty.stanford.edu/~knuth/sgb.html</a> and are available for download at <a href="ftp://ftp.cs.stanford.edu/pub/sgb/sgb.tar.gz" rel="nofollow noreferrer">ftp://ftp.cs.stanford.edu/pub/sgb/sgb.tar.gz</a></p>

CC BY-SA 4.0
2020-11-29T23:25:44.107Z
Perfect answer given the vagueness of the question!! Nice!
Ben I.
CC BY-SA 4.0
2020-11-29T22:10:14.480Z
2020-11-29T22:10:14.480Z
Jon Guiton
<p>I hope I'm addressing the right community. I was redirected here from CS.SE. For a project for my students, I need to find some weighted graphs (oriented or not) to benchmark their algorithms (shortest paths, flows...). The idea is for them (and me) :</p>
<ol>
<li>to test their code on small examples (running code with the processor they have between the ears ;-), but not completely trivial,</li>
<li>to test their code on a bunch of larger examples (say from 10 to 10000 nodes) to find the complexity from experience, and compare it with what they would expect from their algorithms.</li>
</ol>
<p>The algorithms I want them to study :</p>
<ul>
<li>Dijkstra,</li>
<li>Bellman-Ford,</li>
<li>Floyd-Warshal</li>
<li>Ford-Fullkerson (for the good ones).</li>
</ul>
<p>There are a few samples on the companion site of the ALGS4 course from R. Sedgewick (<a href="https://algs4.cs.princeton.edu/44sp/" rel="nofollow noreferrer">Shortest Paths</a>), it could be OK for benchmarking, but I would like some more datas, encoded in this simplest way (or easily convertible). Examples don't have to contain background (I mean, if there is one, it can be interesting, but then I would have to strip the original datas from all the commentaries...).</p>
<p>Maybe someone here is aware of some samples and could point me to it.</p>
<p>Thanks in advance.</p>

CC BY-SA 4.0
2020-08-06T00:01:07.257Z
You don't list any requirements on the graphs (apparently any will do), so we have no way to evaluate answers -- I'm not sure that kind of question is a good fit for the Stack Exchange model.  You could just generate your own graphs randomly.
D.W.
CC BY-SA 4.0
2020-08-06T05:18:01.760Z
Cross-posted: https://cseducators.stackexchange.com/q/6454/1106, https://cstheory.stackexchange.com/q/47342/5038, https://cs.stackexchange.com/q/128968/755.  Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068).
D.W.
CC BY-SA 4.0
2020-08-07T00:47:30.607Z
@D.W. : As I said : shortest paths, and flows.
Nicolas FRANCOIS
CC BY-SA 4.0
2020-08-07T01:22:03.473Z
Yes, I saw that, and I stand by my comment.  That doesn't provide any requirements - you can compute shortest paths on any weighted graph (and flows on any graph, if you pick a pair of source and destination edge).  If you have no requirements, generating random graphs should meet the requirements.
D.W.
CC BY-SA 4.0
2020-08-08T14:25:13.523Z
Hi Nicolas, welcome to [cseducators.se]! I think that as it currently stands, your question is a little to broad for us to give a helpful answer. Could you [edit] to possibly describe the project so that we'll have a better idea of the kind of graphs you're looking for?
thesecretmaster
<graph-theory>
Dataset colection of weighted graphs
# Dataset colection of weighted graphs

(Asked by: username_0 on 2020-08-05)

I hope I'm addressing the right community. I was redirected here from CS.SE. For a project for my students, I need to find some weighted graphs (oriented or not) to benchmark their algorithms (shortest paths, flows...). The idea is for them (and me) :

1. to test their code on small examples (running code with the processor they have between the ears ;-), but not completely trivial,
2. to test their code on a bunch of larger examples (say from 10 to 10000 nodes) to find the complexity from experience, and compare it with what they would expect from their algorithms.

The algorithms I want them to study :

* Dijkstra,
* Bellman-Ford,
* Floyd-Warshal
* Ford-Fullkerson (for the good ones).

There are a few samples on the companion site of the ALGS4 course from R. Sedgewick ([Shortest Paths](https://algs4.cs.princeton.edu/44sp/)), it could be OK for benchmarking, but I would like some more datas, encoded in this simplest way (or easily convertible). Examples don't have to contain background (I mean, if there is one, it can be interesting, but then I would have to strip the original datas from all the commentaries...).

Maybe someone here is aware of some samples and could point me to it.

Thanks in advance.

**Tags:** graph-theory

> **Comments:**
> **username_1**: You don't list any requirements on the graphs (apparently any will do), so we have no way to evaluate answers -- I'm not sure that kind of question is a good fit for the Stack Exchange model.  You could just generate your own graphs randomly.  
> **username_1**: Cross-posted: https://cseducators.stackexchange.com/q/6454/1106, https://cstheory.stackexchange.com/q/47342/5038, https://cs.stackexchange.com/q/128968/755.  Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068).  
> **username_0**: @username_1 : As I said : shortest paths, and flows.  
> **username_1**: Yes, I saw that, and I stand by my comment.  That doesn't provide any requirements - you can compute shortest paths on any weighted graph (and flows on any graph, if you pick a pair of source and destination edge).  If you have no requirements, generating random graphs should meet the requirements.  
> **username_2**: Hi Nicolas, welcome to [cseducators.se]! I think that as it currently stands, your question is a little to broad for us to give a helpful answer. Could you [edit] to possibly describe the project so that we'll have a better idea of the kind of graphs you're looking for?  

---

## 1 answers

### Answer by username_3 on 2020-11-29. Score: 3 | Accepted answer

[![enter image description here](https://i.sstatic.net/aFfui.png)](https://i.sstatic.net/aFfui.png)For any problems involving graphs for which you need test data you can use Knuth's less well known work 'The Stanford Graph Base'. This includes many data sets designed to test all kinds of graph problems. The materials are described at [https://www-cs-faculty.stanford.edu/~knuth/sgb.html](https://www-cs-faculty.stanford.edu/%7Eknuth/sgb.html) and are available for download at <ftp://ftp.cs.stanford.edu/pub/sgb/sgb.tar.gz>

> **Comments:**
> **username_4**: Perfect answer given the vagueness of the question!! Nice!  

---

