Input: A trapezoid graph with a trapezoid diagram and coverage radius . |
Output: A conditional covering set in . |
βInitially and . |
Step : Compute the sets , and for each vertex . |
Step : Construct the caterpillar. Compute the vertices of the spine and the sets for |
βββ; where is the highest length of the caterpillar. |
Step : Compute . |
βββIf , and for all then |
βββββ such that is maximum, replace by , , goto Step 4; |
βββelseif or for all then |
βββββ, replace by , , goto Step 5; |
βββelse , replace by , , 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 , and for all then |
βββββ such that is maximum, replace by , , goto Step 7; |
βββelseif or for all then |
βββββ, replace by , , goto Step 7; |
βββelse , replace by , , goto Step 7; |
βββendif; |
Step : If then |
ββββ is the required solution; |
βββelseif then |
βββββIf or for all then |
βββββββ is the required solution; |
βββββelse and finish; |
βββββendif; |
βββelse go to Step 8; |
βββendif; |
Step : If , and for all and then |
βββββ and finish; |
βββelseif then |
βββββ and stop; |
βββelseif and or for all then |
βββββ and stop; |
βββelse goto next Step; |
βββendif; |
Step : If , for all then |
βββββreplace by and goto Step 3; |
βββelse replace by and goto Step 3; |
βββendif; |