# Uniform Circle Formation for Fully, Semi-, and Asynchronous Opaque Robots with Lights
## 6 The Algorithm for the Semi-Synchronous Mode  
This section introduces and explains an algorithm for solving the UCF problem in the sysynch mode, pointing out the differences with the fsynch algorithm presented in the previous section. Let \(C_{H}\) be the configuration where all the \(n\) robots sit on their SEC with the same color. Again, the dynamic of the algorithm depends on the symmetry degree of \(C_{H}\). One of the main differences with respect to the fsynch algorithm is the need for an initial epoch where some initial information about the original configuration (symmetrydegree, symmetry axis position) must be encoded by robot positions and colors. In particular, in this epoch, just some pivots and the placeholders will be set. In fact, pivots and placeholders (note that placeholders are needed when pivots have to reach their final destination) fix the safe segments and the sectors where all other robots must travel. Moreover, all pivots will assume a specific color \(pivotx\) where \(x\) is the suffix encoding the initial symmetry degree. Due to the sysnch dynamic, this extra epoch ensures subsets of robots follow the proper path of the algorithm, determined by the initial configuration. **Asymmetry. ** For this case, the strategy used in the fsynch mode is adapted to achieve the regular \(n\)-gon within the sysnch mode. In the **first epoch**, one or two pivots must be set, at the endpoints of the main diameter \(d\) (which is chosen with the same strategy as in the fsynch mode). If \(n\) is odd, the robot on \(d\) colors itself as _pivot_. If \(n\) is even, two pivots will be placed on the endpoints of \(d\), with two different colors _pivot_ and _pivot_down_, to fix the upper and lower part of the SEC. Notice that the asymmetrical configuration allows robots to agree on these two directions. In the **second epoch**, the regular tuples are set, but now more angle robots in each half-SEC are required. These longer tuples will allow robots on the SEC to compute the base angle and the safe diameters where they have to rappel down. In fact, internal robots can hide the pivots on the main diameter from the remaining robots on the SEC, preventing the computation of their target positions on the safe diameters. So, for the odd case, robots complete the regular 3-tuple (_angle, pivot, angle_) around the pivot, whereas they set the regular 4-tuple (_angle, angle, angle_) on the opposite side of \(d\) (centered on it). For the even case, robots complete the regular 3-tuple (_angle, pivot, angle_) around the upper pivot, and the regular 5-tuple (_angle, angle, pivot_down, angle, angle_) on the lower side of the SEC (centered on \(d\)). Notice that, in this epoch, no more than three robots per half-SEC move to angle positions, so that Theorem 2 can be still applied. In the **third epoch**, the remaining robots (i.e., not belonging to any regular tuples) update their color to _internal_ and move to their safe diameter, following the same strategy as in the fsynch mode. Possibly, if an activated robot sits on a vertex of the target \(n\)-gon and it is neither a pivot nor an angle robot, it is assumed to color itself as _sec_ and stay still. At the beginning of the **fourth epoch**, all robots are on their own safe diameter, except those on the SEC with light color _pivot_, _pivot_down angle, sec_. Each _internal_ robot sees at least three lighted robots on the SEC. So, it computes its target vertex on the SEC and reaches it by traveling perpendicularly to the main diameter. **Symmetry with exactly one axis. ** In this case, pivot lights _pivot_s1, pivot_s2, and pivot_s3_ are set depending on the odd or even number of robots and on the number of robots (zero, one, or two) laying on the symmetry axis at the beginning of this epoch.