convertNodePair function

Convert node pair (i,j)(i,j)