Let's say you have a graph like this:
The largest subset of nodes so that every pair of vertices have an edge between them is $\{3, 5, 7, 12\}$. The second largest subsets are
- $\{4, 7, 21\}$,
- $\{3, 5, 7\}$,
- $\{3, 5, 12\}$,
etc.
Is there an algorithm to find the largest subset efficiently?
Also, keep in mind that I know virtually nothing about graphs (haven't learned at school, haven't taught myself). The data was originally given as a set of pairs of numbers.