Input: dilatation G
Output: subset of self-direction action(ROTATE)
randomly chose a self-direction action for every node and denote it as ;
Let ;
WHILE(every target is covered by self-direction action in )
Randomly chose a self-direction action
;
;
END
RETURN
Algorithm 4: Random algorithm to generate all possible paths in dilatation .