  This paper deals with the $\lambda$-labeling and $L(2,1)$-coloring of simple
graphs. A $\lambda$-labeling of a graph $G$ is any labeling of the vertices of
$G$ with different labels such that any two adjacent vertices receive labels
which differ at least two. Also an $L(2,1)$-coloring of $G$ is any labeling of
the vertices of $G$ such that any two adjacent vertices receive labels which
differ at least two and any two vertices with distance two receive distinct
labels. Assume that a partial $\lambda$-labeling $f$ is given in a graph $G$. A
general question is whether $f$ can be extended to a $\lambda$-labeling of $G$.
We show that the extension is feasible if and only if a Hamiltonian path
consistent with some distance constraints exists in the complement of $G$. Then
we consider line graph of bipartite multigraphs and determine the minimum
number of labels in $L(2,1)$-coloring and $\lambda$-labeling of these graphs.
In fact we obtain easily computable formulas for the path covering number and
the maximum path of the complement of these graphs. We obtain a polynomial time
algorithm which generates all Hamiltonian paths in the related graphs. A
special case is the Cartesian product graph $K_n\Box K_n$ and the generation of
$\lambda$-squares.
