#Python type psuedocode for finding all N = subgraphsize V = list subGraph = [] def findSubGraph(v, n): subGraph.append(v) if n == N: doSomethingWithSubgraph() for w in V[v+1:]: if w is connected to v: findSubGraph(w, n+1) subGraph.pop() for v in V: findSubGraph(v,1)