In[8]   indexrule2to1  =   1,  1}  ->  1,  {2,  2}  ->  2,  {3,  3}  ->  3,  {2,  3}  ->
4  ,  {3,  1}  ->  5,  {1,  2}  ->  6,  {3,  2}  ->  4  ,  {1,  3}  ->
5,  {2,  1}  ->  6}
indexrule1to2  =  Map[Rule[#[[2]],  #[[1]]  ]  &  ,  indexrule2to1]  
  In[9]   Index6[1]  =  Range[  6]  /.  indexrule1to2
Algorithm 3