Research Article

Distance Two Surjective Labelling of Paths and Interval Graphs

Algorithm 1

AMPSPL21.
Input: The nodes of the path , .
Output: The -label of the path .
Step 1: Rearrange the intervals as follows:
Case I: is odd
;
, for ;
, for ;
remains same;
Case II: is even
;
, for ;
, for ;
remain same;
Step 2: Label the node by , i.e., , for
end.