For the following question:
We call an undirected graph a basic graph if its adjacency matrix is such that all diagonal entries are zero and all off-diagonal entries are less than or equal to one. Let $G = (V,E)$ be a basic graph. We call any set of three distinct vertices $\{u,v,w\} \in V$ a trinity, if each pair of vertices in the set is connected by an edge.
I need to find an expression for the number of trinitys (made up term for this question) contained in a basic graph, in terms of the trace of an appropriate matrix and ended up obtaining the expression trace(A³)/6.
Would this be correct?