In graph theory, the girth of an undirected graph is the length of a shortest cycle contained in the graph.[1] If the graph does not contain any cycles (that is, it is a forest), its girth is defined to be infinity.[2] For example, a 4-cycle (square) has girth 4. A grid has girth 4 as well, and a triangular mesh has girth 3. A graph with girth four or more is triangle-free.