neighbor nodes 1 and 2 are generated by formula