Algorithm 1. FindPUGS algorithm: finding (nearly-optimal) prototypes using greedy search.
| Result: Two ordered lists, N and R, of the minimum number of prototypes required for each circle and their rotations relative to the previous circle. |
| T ← the number of circles |
| c ← the length by which radii should grow |
| Algorithm FindPUGS (T, c) |
| N ← [1] |
| R ← [0] |
| for t = 1,2,…,T – 1 do |
| m ← N[−1]; |
| n ← m + 1; |
| p ← 0; |
| while True do |
| ; |
| ; |
| for i = 0,1,…,4mn do |
| if d1(t,c,m,n,θ) > db and d2(t,c,m,n,θ) > da then |
| break |
| end |
| end |
| if p>0 then |
| N.append(p); |
| R.append(θ); |
| break; |
| end |
| end |
| end |
| return N, R; |
| Procedure d1 (t,c,m,n,θ) |
| dists ← []; |
| for i = 0,…,m – 1 do |
| for j = 0,…,n − 1 do |
| dist ; |
| dists.append(dist); |
| end |
| end |
| return min(dists); |
| Procedure d2 (t,c,m,n,θ) |
| dists ← []; |
| for i = 0,…,m − 1 do |
| for j = 0,…,n − 1 do |
| dist ; |
| dists.append(dist); |
| end |
| end |
| return min(dists); |