Given a graph G = (V, E), a set of vertices V* in V, and an integer k, how do we remove vertices from G such that the remaining vertices are either in V* or are in a clique of size k with at least one vertex in V*?
Here is a toy example and solution:
The graph G = (V, E) is shown below. The vertices with a white "x" are in V*. k = 3. The vertices that are light orange are the vertices that should be removed from G.
I have tried finding a clique for each vertex in V*, keeping track of the vertices covered by those cliques, and then removing the vertices in the graph that are not covered by cliques.
However, finding a clique for each vertex takes a very long time when the graph is large, and I was wondering if there was a simpler way to prune out the vertices that do not belong to any cliques.

So, only invoke the clique finding if all other conditions have been met: