(1) For   
(2) If ceil(  +  )==1
(3)  If rand
(4)   
(5)  Else
(6)    
(7)  
(8) 
(9) End
Algorithm 2