![]() |
VOOZH | about |
In graph theory, a dominating set for a graph G = (V, E) is a subset D of V such that every vertex not in D is adjacent to at least one member of D. The domination number is the number of vertices in a smallest dominating set for G.
Examples:
Input : A graph with 4 vertex and 4 edges
Output : The Dominant Set S= { a, b } or { a, d } or { a, c } and more.
Input : A graph with 6 vertex and 7 edges
Output : The Dominant Set S= { a, d, f } or { e, c } and more.
It is believed that there may be no efficient algorithm that finds a smallest dominating set for all graphs, but there are efficient approximation algorithms.
Algorithm :
Implementation:
The Dominant Set is : { 1 3 5 }