New THE MATHEMATICA JOURNAL article:
by ROBERT COWEN
ABSTRACT: An important problem in graph theory is to find the number of complete subgraphs of a given size in a graph. If the graph is very large, it is usually only possible to obtain upper bounds for these numbers based on the numbers of complete subgraphs of smaller sizes. The Kruskal–Katona bounds are often used for these calculations. We investigate these bounds in specific cases and study how they might be improved.
For further computational exploration, you may be interested in the following functions:
FindClique can find cliques efficiently (much more efficiently than taking Subgraphs of vertex Subsets).
The IGraph/M package has the IGCliqueSizeCounts function which can count cliques of various sizes even more efficeintly. E.g.,
will counts cliques between sizes 3 and 5.
Finally, I would advise against trying to use ' in variable names. While a = 1; a' = 2; appears to work and create two distinct variable, the ' is quite literally interpreted as a derivative, in this case the derivative of "1" (which is of course nonsense). Now try b=1, then evaluate b'—and you get 2 as the answer, because according to Mathematica, that is "the derivative of 1).
a = 1; a' = 2;