  A {\em dominating set} of a graph $G=(V,E)$ is a subset of vertices
$S\subseteq V$ such that every vertex $v\in V\setminus S$ has at least one
neighbor in $S$. Finding a dominating set with the minimum cardinality in a
connected graph $G=(V,E)$ is known to be NP-hard. A polynomial-time
approximation algorithm for this problem, described here, works in two stages.
At the first stage a dominant set is generated by a greedy algorithm, and at
the second stage this dominating set is purified (reduced). The reduction is
achieved by the analysis of the flowchart of the algorithm of the first stage
and a special kind of clustering of the dominating set generated at the first
stage. The clustering of the dominating set naturally leads to a special kind
of a spanning forest of graph $G$, which serves as a basis for the second
purification stage. We expose some types of graphs for which the algorithm of
the first stage already delivers an optimal solution and derive sufficient
conditions when the overall algorithm constructs an optimal solution. We give
three alternative approximation ratios for the algorithm of the first stage,
two of which are expressed in terms of solely invariant problem instance
parameters, and we also give one additional approximation ratio for the overall
two-stage algorithm. The greedy algorithm of the first stage turned out to be
essentially the same as the earlier known state-of-the-art algorithms for the
set cover and dominating set problem Chv\'atal \cite{chvatal} and Parekh
\cite{parekh}. The second purification stage results in a significant reduction
of the dominant set created at the first stage, in practice. The practical
behavior of both stages was verified for randomly generated problem instances.
The computational experiments emphasize the gap between a solution of Stage 1
and a solution of Stage 2.
