Input: A trapezoid graph with a trapezoid diagram and coverage radius 𝑅 .
Output: A conditional covering set 𝐷 in 𝑉 .
 Initially 𝐷 = 𝜙 and 𝑖 = 0 .
Step 𝟏 : Compute the sets 𝑇 ( 𝑢 ) , 𝐵 ( 𝑢 ) and 𝑁 ( 𝑢 ) for each vertex 𝑢 𝑉 .
Step 𝟐 : Construct the caterpillar. Compute the vertices of the spine and the sets 𝑋 𝑖 for
    𝑖 = 0 , 1 , 2 , , 𝑙 ; where 𝑙 is the highest length of the caterpillar.
Step 𝟑 : Compute 𝑝 = 𝑖 + 𝑅 .
   If 𝑑 ( 𝑢 , 𝑣 𝑗 ) 𝑅 , 𝑗 > 𝑝 + 2 and for all 𝑢 𝑌 𝑖 then
      𝐷 = 𝐷 { 𝑣 𝑗 } such that 𝑗 is maximum, replace 𝑖 by 𝑗 1 , 𝑝 = 𝑖 + 𝑅 , goto Step 4;
   elseif 𝑋 𝑝 = or 𝑢 𝑁 ( 𝑢 𝑝 1 ) 𝑁 ( 𝑢 𝑝 2 ) for all 𝑢 𝑋 𝑝 then
      𝐷 = 𝐷 { 𝑢 𝑝 } , replace 𝑖 by 𝑝 , 𝑝 = 𝑖 + 𝑅 , goto Step 5;
   else 𝐷 = 𝐷 { 𝑢 𝑝 1 } , replace 𝑖 by 𝑝 1 , 𝑝 = 𝑖 + 𝑅 , goto Step 5;
   endif
Step 𝟒 : If 𝑝 > 𝑙 then
     𝐷 = 𝐷 { 𝑣 } such that 𝑑 ( 𝑣 , 𝑣 𝑗 ) 𝑅 and finish;
   elseif 𝑝 = 𝑙 then
     𝐷 = 𝐷 { 𝑢 𝑝 } and finish;
   else go to step 6;
   endif;
Step 𝟓 : If 𝑝 > 𝑙 then
     𝐷 = 𝐷 { 𝑣 } such that 𝑑 ( 𝑣 , 𝑢 ) 𝑅 and finish;// 𝑢 is the latest selected member
                             of 𝐷 //
   elseif 𝑝 = 𝑙 then 𝐷 = 𝐷 { 𝑢 𝑝 } and finish;
   else go to step 6;
   endif;
Step 𝟔 : If 𝑑 ( 𝑢 , 𝑣 𝑗 ) 𝑅 , 𝑗 > 𝑝 + 2 and for all 𝑢 𝑌 𝑖 then
      𝐷 = 𝐷 { 𝑣 𝑗 } such that 𝑗 is maximum, replace 𝑖 by 𝑗 1 , 𝑝 = 𝑖 + 𝑅 , goto Step 7;
   elseif 𝑋 𝑝 = or 𝑢 𝑁 ( 𝑢 𝑝 1 ) 𝑁 ( 𝑢 𝑝 2 ) for all 𝑢 𝑋 𝑝 then
      𝐷 = 𝐷 { 𝑢 𝑝 } , replace 𝑖 by 𝑝 , 𝑝 = 𝑖 + 𝑅 , goto Step 7;
   else 𝐷 = 𝐷 { 𝑢 𝑝 1 } , replace 𝑖 by 𝑝 1 , 𝑝 = 𝑖 + 𝑅 , goto Step 7;
   endif;
Step 𝟕 : If 𝑝 > 𝑙 then
     𝐷 is the required solution;
   elseif 𝑝 = 𝑙 then
     If 𝑋 𝑝 = or 𝑢 𝑁 ( 𝑢 𝑝 1 ) 𝑁 ( 𝑢 𝑝 2 ) for all 𝑢 𝑋 𝑝 then
        𝐷 is the required solution;
     else 𝐷 = 𝐷 { 𝑢 𝑝 } and finish;
     endif;
   else go to Step 8;
   endif;
Step 𝟖 : If 𝑑 ( 𝑢 , 𝑣 𝑗 ) 𝑅 , 𝑗 > 𝑝 + 2 and for all 𝑢 𝑌 𝑖 and 𝑗 1 + 𝑅 > 𝑙 then
      𝐷 = 𝐷 { 𝑣 𝑗 } and finish;
   elseif 𝑝 + 𝑅 > 𝑙 then
      𝐷 = 𝐷 { 𝑢 𝑝 } and stop;
   elseif 𝑝 + 𝑅 = 𝑙 and 𝑋 𝑝 + 𝑅 = or 𝑢 𝑁 ( 𝑢 𝑝 + 𝑅 1 ) 𝑁 ( 𝑢 𝑝 + 𝑅 2 ) for all 𝑢 𝑋 𝑝 + 𝑅 then
      𝐷 = 𝐷 { 𝑢 𝑝 } and stop;
   else goto next Step;
   endif;
Step 𝟗 : If 𝑢 𝑁 ( 𝑢 𝑝 1 ) 𝑁 ( 𝑢 𝑝 2 ) , for all 𝑢 𝑋 𝑝 then
    replace 𝑖 by 𝑝 + 1 and goto Step 3;
   else replace 𝑖 by 𝑝 and goto Step 3;
   endif;
Algorithm 1: Algorithm CCP.