An L(2,1)-labeling of a graph is a mapping from its vertex set into a set of integers {0,..,k} such that adjacent vertices get labels that differ by at least 2 and vertices in distance 2 get different labels. The main result of the paper is an algorithm finding an optimal L(2,1)-labeling of a graph (i.e. an L(2,1)-labeling in which the largest label is the least possible) in time O *(7.4922^n ) and polynomial space.
Moreover, a new interesting extremal graph theoretic problem is defined and solved.