If I have an undirected graph, G = (V, E)
, and I want to find the subset S
of vertices in G
such that all the vertices in S
have at least n
connections to other vertices in S
. What would be the best way to do this?
Asked
Active
Viewed 85 times
1

Alexander
- 59,041
- 12
- 98
- 151

Timothy Tran
- 91
- 3
- 9
1 Answers
1
At first, this task sounds similar to the clique problem. Which might suggest your task will be NP-hard as well.
At second thought, it's actually much simpler and here's an algorithm:
- remove all v of degree less than n
- repeat (1) on the restricted G until it's empty or all remaining vertices have degree n or more
- the remaining vertices are your subset S

voidengine
- 2,504
- 1
- 17
- 29