strict graph example { //"example" is the name of the graph // Between the braces is a list of edges, one per line a -- b [label="2"] // 'a -- b' means there's an // undirected edge between nodes a and b a -- c [label="3"] // '[label="3"]' on this line specifies that // the edge from a to c be labelled with "3" // The labels are used to show the edge weights // in this graph. b -- c [label="1"] c -- d [label="12"] c -- e [label="2"] b -- f [label="3"] b -- e [label="6"] e -- d [label="1"] e -- g [label="2"] f -- g [label="1"] }