Glossary

Algo: Edge List Format

The first line contains two numbers, the number of vertices $n$ and the number of edges $m$, each of the following $m$ lines contains an edge given by two vertices. The format can be used to specify directed and undirected graphs as well as weighted and unweighted graphs.

Example:

6 7
1 2
2 3
6 3
5 6
2 5
2 4
4 1

Depending on whether the specified graph is directed or not this input specifies one of the following graphs: Edge list format

To specify a weighted graph each edge should be followed by its weight:

6 7
1 2 4
2 3 1
6 3 3
5 6 2
2 5 -2
2 4 5
4 1 1

Weighted graph