# numberOfTriangles -- counts how many subtriangles are present in a graph

## Synopsis

• Usage:
t = numberOfTriangles G
• Inputs:
• G, an instance of the type Graph,
• Outputs:
• t, an integer, number of subtriangles in a graph

## Description

A triangle is formed by three vertexSet which are mutually adjacent.

 i1 : G = graph({{1,2},{2,3},{3,1},{3,4},{2,4}},EntryMode=>"edges"); i2 : numberOfTriangles G o2 = 2