Trivial Graph Format

Trivial Graph Format (TGF) is a simple text-based adjacency list file format for describing graphs,[1] widely used because of its simplicity.

[2] The format consists of a list of node definitions, which map node IDs to labels, followed by a list of edges, which specify node pairs and an optional edge label.

[1] For instance, some implementations of the format require the node IDs to be integers,[3] while others allow more general alphanumeric identifiers.

Each node definition is a single line of text starting with the node ID, separated by a space from its label.

If the edge has a label, it appears on the same line after the endpoint IDs.