1 Introduction

Building and modifying large-scale structures is a fundamental task in many practical settings, ranging from classic manufacturing and buildung construction to modern aspects of digital production, engineering and even medicine. In many cases, the use of autonomous agents (such as robots) promises significant advantages, but also a number of additional challenges. Particularly intriguing challenges arise in space, with difficulties of expensive supply chains, scarcity of building materials, dramatic costs and consequences of even small errors, and the limitations of outside intervention in case of malfunctions. For many applications, an important aspect in this process is connectivity of the overall arrangement throughout the reconfiguration process, which is critical for overall coherence (in particular for assemblies in space, where disconnected pieces cannot regain connectivity), or for autonomous devices (such as catoms in claytronics [46]), which need connectivity for local motion, electric power and communication.

As described in parallel, practically oriented work [63], and visualized in our video [1], a number of significant advances have been made to facilitate overall breakthroughs; see Fig. 1 for an illustration. One important step has been the development of ultra-light and scalable composite lattice materials [48] that allow the construction of modular, reconfigurable, lattice-based structures [55]. A second step has been the design of simple autonomous robots [54, 56] that are able to move on the resulting lattice structures and move their elementary cell components, thereby allowing the reconfiguration of the overall edifice. Combining such materials and robots in space promises to greatly increase the dimensions of constructible facilities and spacecraft, as well as offering to extend mission capabilities with reconfiguration and re-use [47]. Because moving mass and volume into space remains a critical factor, it is conceivable that the involved robots (just like the building material) can be produced and assembled in space; because robots will still require more complex production steps than the passive material, their availability will remain a bottleneck, so limiting their number is highly desirable. Moreover, production in space is not possible for sophisticated components such as complex microchips, adding a second objective: enabling the use of very simple robots.

In this paper, we provide algorithmic foundations for enabling extremely simple robots, i.e., finite automata, to perform a complex spectrum of construction tasks for cellular structures in space, such as computing a bounding box for a cellular arrangement, scaling up a given seed construction, and a number of other design operations. At all stages in this algorithmic process, we maintain connectivity of the overall assembly.

Fig. 1
figure 1

Demonstrating the connection between the simplified theoretical model and real-world robots: snapshots from building a bounding box for a Z-shaped polyomino using 2D simulator, 3D simulator, and staged hardware robots, synchronized so all are shown at steps {0, 24, 48, 72, 96, 120}

1.1 Our Results

We present the following results.

  1. 1.

    We show how two finite-state robots suffice to construct a bounding box for a given connected planar arrangement of grid cells (a polyomino P) in a limited number of steps; see Fig. 1 for an illustration.

  2. 2.

    We provide an algorithmic method that enables two finite-state robots to construct (for a polyomino P with a surrounding bounding box) a scaled up copy of P in a limited number of steps, while preserving connectivity of intermediate arrangements; see Fig. 2.

  3. 3.

    We give a more efficient method for scaling a monotone polyomino P, while preserving connectivity of intermediate arrangements.

  4. 4.

    We describe how other arbitrary reconfigurations can be adapted to our connected scenario.

Fig. 2
figure 2

Sequence from the video [1] illustrating the scaling procedure. (Note that in that video, the blue marker is not distinguished from the red robot; in the rest of this paper, we make that distinction by using a different shape for the marker.) We start with a polyomino P (blue) in the top left and create a copy of P that is scaled by factor of 3 (bottom right). See https://www.ibr.cs.tu-bs.de/users/fekete/Videos/SoCG/2020/Space_final.mp4, in particular, 4:35–5:38

1.2 Related Work

The structures considered in this work are motivated by the possibilities of ultra-light material, as described by Cheung and Gershenfeld [11] and Gregg et al. [48]. Modular two-dimensional elements mechanically link in 3D to form reversibly assembled composite lattices. This process is not limited by scale, and it enables disassembly and reconfiguration. As shown by Cramer et al. [14] and Jenett et al. [53], large but light-weight structures can be built from these components. Jenett et al. have developed autonomous robots that move on the surface [52, 56] or within the cellular structure [54]. With the help of these robots, individual cells can be attached to an existing assembly, or moved to a different location. An approach for global optimization of a corresponding motion plan has been described by Costa et al. [13], while the design of hierarchical structures was addressed by Jenett et al. [57].

Assembly by simple robots has also been considered at the micro scale, where global control control is used for supplying the necessary force for moving agents, e.g., see Becker et al. [6] for the corresponding problem of motion planning, Schmidt et al. [66] for using this model for assembling structures, and Balanza-Martinez et al. [5] for theoretical characterizations. Distributed self-assembly for modular robots with limited computing resources was studied by Tucci et al. [68]. Self-configuration of robots themselves has been considered by Naz et al. [62]. A basic model in which robots themselves are used as building material was introduced by Derakhshandeh et al. [23, 24]. This resembles Claytronics robots like Catoms, see Goldstein and Mowry [46]. A large spectrum of methods for tile-based assembly in biology has also been considered. Examples include DNA self-assembly, introduced by Winfree [69, 70] and extended to a variety of models [10, 20]. See Patitz [65] for a survey.

There has been a considerable amount of classic algorithmic work dealing with robots or agents on graphs. Blum and Kozen [8] showed that two finite automata can jointly search any unknown maze. Other work has focused on exploring general graphs (e.g., [35, 40, 64]), as a distributed or collaborative problem using multiple agents (e.g. [7, 9, 18, 28, 38]) or with space limitations (e.g. [3, 31, 39,40,41, 51]). Another problem related to robots on graphs is the rendezvous search problem [2], where two robots are searching for each other in a known or unknown environment. Anderson and Weber [4] presented an optimal strategy for discrete locations. The deterministic rendezvous problem as a variant of the previously described problem has also been considered [27, 61, 67]. For scenarios with more than two robots, we face the gathering problem, which was investigated on graphs [17, 30, 58] or, related to more realistic robotic scenarios, in the plane [12, 15, 37]. See also [36] for a comprehensive survey.

In the context of programmable matter, the spectrum of approaches includes self-folding matter [34, 49, 60] or self-disassembling magnetic robot pebbles [42]. From an algorithmic perspective, we are interested in different models representing programmable matter and further recent results. D’Angelo et al. [16] provide a simple model in which leader election can still be performed. Inspired by the single-celled amoeba, Derakhshandeh et al. [21] introduced the Amoebot model and later a generalized variant, the general Amoebot model [26]. The Amoebot model provides a framework based on a triangular lattice and active particles that can occupy a single lattice vertex or a pair of adjacent vertices. With just a few possible movements, these particles can be formed into different shapes like lines, triangles or hexagons [23], and perform distributed tasks such as leader election [19, 26]. A universal shape formation algorithm within the Amoebot model was described by Di Luna et al. in [29]. An algorithm for solving the problem of coating an arbitrarily shaped object with a layer of self-organizing programmable matter was presented in [25] and analyzed in [22]. Kim et al. [59] generalized this model where each amoeba consists of two robots that simulate extend and retract by allowing at most two robots on a single cell. Other models with active particles were introduced in [71] as the Nubot model and in [50] with modular robots. Gmyr et al. [45] introduced a model with two types of particles: active robots acting like a deterministic finite automaton and passive particles. Furthermore, they presented algorithms for shape formation [44] and shape recognition [43]. Based on this model, Fekete et al. [32] presented algorithms to bound a given shape and for counting the number of particles or corners. They also introduced more complex geometric algorithms for copying, reflecting, rotating and scaling a given polyomino as well as an algorithm for constructing a bounding box surrounding a polyomino; however, this work did not account for connectivity of the particle configurations, which is critical for applications as the ones mentioned earlier.

2 Preliminaries

In the following, we introduce models, general definitions as well as a description of the underlying limitations.

2.1 Model

We consider an infinite square grid graph \(G=(V,E)\), where \(V={\mathbb {Z}}^2\) is the set of pixels, and two pixels \(p_1\) and \(p_2\) are adjacent when \(||p_1-p_2||_1 = 1\). We call two pixels a diagonal pair when both their x-coordinates and their y-coordinates differ by one. We use the compass directions \((N,E,S,W)\) for orientation when moving on the grid with a global orientation.

Every pixel of \(G\) is either occupied by a passive particle (i.e., a tile) or empty. Passive particles cannot move or manipulate themselves. A maximal connected set of occupied pixels is called a polyomino. A tile p of a polyomino P is called convex if there is a \(2\times 2\) square solely containing p. Throughout this paper, we denote the number of convex tiles by k.

The boundary of a polyomino \(P\) is denoted by \(\partial P \) and includes all tiles of \(P\) that are adjacent to an empty pixel or that form a diagonal pair with an empty pixel (see also Fig. 3 (a)). Polyominoes can have holes, i.e., finite maximal connected sets of empty pixels (see Fig. 3 (b)). Polyominoes without holes are called simple; otherwise, they are non-simple. The bounding box \(bb(P)\) of a given polyomino \(P\) is defined as the boundary of the smallest axis-aligned rectangle enclosing but not touching P; see Fig. 3 (d). Because the bounding box and polyomino are comprised of indistinguishable particles, we use a gap to differentiate the two.

Fig. 3
figure 3

(a) Dark blue tiles indicate the boundary \(\partial P\) of the polyomino P (dark and light blue). (b) A non-simple polyomino with one hole. (c) Tiles on the grid induce two separate connected components. (d) A polyomino \(P\) and bb(P) (gray)

We use a robot as active particle. This robot works like a finite deterministic automaton that can move around on the grid and manipulate the polyomino. Because we only consider one robot in this paper, the robot knows the global orientation. In particular, we may assume that the robot’s local orientation and the global orientation match in the beginning. As there are only four possible orientations (looking north, east, south, or west), the robot can always return to the initial orientation. The robot has the ability to move along the edges of the grid graph, to change the state of the current pixel by placing or removing a tile on it, and to place a special marker on top of a tile. These markers are indistinguishable passive particles that allow the robot to recognize a specific tile. The Robot works in a series of Look-Compute-Manipulate-Move cycles.

  • Look Phase: The robot checks if it stands on a tile and if a marker lies on top.

  • Compute Phase: The robot computes the next motion step based on the current state and the information received from the look phase.

  • Manipulation Phase: The robot sets the state of the current pixel to empty or occupied, or places / removes a marker from a tile.

  • Move Phase: The robot performs the computed motion step w.r.t. its local orientation, which is one of the form {up, right, down, left, \(\bot \)} with \(\bot \) denoting no motion.

Note that we can extend the look phase by checking any constant sized neighborhood. In particular, we may assume that the robot is able to observe the state of all eight surrounding pixels. For this we define the following look-up functions w.r.t. the robot’s local orientation.

  • isOnTile: Checks if the robot is on a tile.

  • top, bottom, left, right: Returns the state of the pixel to the top, bottom, left, or right of the robot’s current position.

  • top-left, top-right, bottom-left, bottom-right: Returns the state of the pixel in the respective corner of the robot’s current position.

  • top-row, bottom-row, left-column, right-column: Returns the states of all (diagonal) adjacent pixels that lie above, left, below, or right of the robot.

Further, many of the algorithms presented in this paper use a subroutine, where the robot moves into a given direction as long as there is still a tile in this direction. We denote this motion by appending most to the moving direction, e.g., rightmost.

In the following, we assume that connectivity is ensured if the union of all tiles and the robot is connected.

3 Constructing a Bounding Box

Fekete et al. [32] showed how to construct a bounding box around a polyomino. However, that algorithm does not guarantee connectivity. We describe an algorithm to construct the bounding box, maintaining connectivity after each step. To accomplish the required connectivity, we specify without loss of generality that the connection between \(bb(P)\) and \(P\) must be on the south side of the boundary. For easier distinction, we show the tiles of the original polyomino in blue, while those of the bounding box (which is composed of additional tiles that are added during the process) are shown in gray. Note that this is for illustrative purposes only; the robots cannot distinguish between those tiles. (We follow this convention in the illustrations throughout this paper.)

The construction can be split into three phases: (1) finding a start position, (2) constructing the bounding box, and (3) clean-up.

3.1 Phase 1: Find a Start Position

To find a suitable start position, the robot R searches for a locally y-minimal pixel that is occupied by a tile; see Algorithm 1. This can be achieved by scanning the current row and moving down whenever possible. When there is no tile further down, R places a tile t with marker below the left most tile. Afterwards, R checks if there is sufficient space to start the bounding box below t, i.e., if there is no adjacent tile from P. With sufficient space, R can start constructing the bounding box and we proceed with phase (2). If not, we can restart phase (1) from the tile blocking construction.

figure a

3.2 Phase 2: Constructing the Bounding Box

The construction of the bounding box is performed clockwise around \(P\), i.e., whenever possible, R makes a right turn. For this, several subroutines will be performed.

  • CheckTile: Starting at a tile t lying on a boundary, the robot follows this boundary until the marked tile is found. This function decides, if a boundary tile belongs to P or the current construction. See also Algorithm 2.

  • ShiftLine: The last constructed line of the current construction gets shifted along the boundary of P. This routine returns true, if the line has been shifted. False is returned, if it is the first line of the construction. See also Algorithm 3.

  • CheckTurn: Checks if a right turn is possible. If so, the robot performs the turn. See also Algorithm 4.

  • Restart: When there is a tile t of P to the left of the starting position, the robot will not be able to construct bb(P) completely. When t is found, we call this routine to disassemble our construction to initiate a restart with phase (1) at t. See also Algorithm 5.

figure b
figure c
figure d
figure e

We will now show how the interplay of these subroutines constructs bb(P), see Algorithm 6. As long as we can extend the current line, we place a new tile and check if we can perform a right turn. At some point during construction, R finds a tile either belonging to P or to the current bounding box construction. To decide whether a tile t belongs to P or the current bounding box, we start moving around the boundary of the shape t belongs to. At some point, R reaches the marked tile. If R arrives from north then t is a tile of P, otherwise t is a tile of the bounding box. To find t again, we move to the south of the marked tile and follow the construction until we cannot move any further. From there we can carry on building bb(P).

Now consider the two cases: If the tile does not belong to P, we are done with phase (2) and can proceed with phase (3). If it is a tile belonging to P, we need to shift the current line outwards and then continue the construction (see Fig. 4). If there are tiles blocking the shift process, then we deconstruct the current bounding box construction until we can shift again or until we can proceed adding tiles to the current line. If the line to shift is the first line of the constructed bounding box, we know that there exists a tile of \(P\) that has the same y-coordinate as the current starting position. Therefore, we build a bridge to traverse this gap, as shown in Fig. 5. Afterwards, we can restart from phase (1).

Note that after a shifting process, the robot would perform a new check if it is still blocked. This would take \(O(|\partial P|)\) time for each tile on \(\partial P\). However, by keeping track of Top before and after the shifting process, the robot can identify a continuous line of P’s boundary. Therefore, we can shift a line until we find a convex corner of P. Thus, we can modify the procedure such that CheckTile is called at most k times, where k is the number of convex tiles of P.

Fig. 4
figure 4

(a) The robot hits a tile belonging to \(P\). (b) The triggered shifting process is finished

Fig. 5
figure 5

Traversing a gap by building a bridge

figure f
Fig. 6
figure 6

The second case of finishing the bounding box. (a) An already constructed part of the bounding box is hit. (b) The last boundary side is shifted. (c) R found a suitable new connectivity pixel above the southern side, places a tile and retraces its path to the initial starting position. (d) The unnecessary part of the bounding box is removed and both robot and marker catch up to the new connection

3.3 Phase 3: Clean-up

We will now describe the final phase. A pseudocode for this phase can be found in Algorithm 7. Consider the case when R reaches a tile of the bounding box. Firstly, we prepare the clean-up phase by shifting the last line outwards until the next corner is reached (see Fig. 6(a)). Let this position be t. Then we can search for another suitable connection between P and bb(P), place a tile there, and move back to t. From there, we move to the marked tile to remove all tiles of the bounding box between the marked tile and t (see Fig. 6(b)-(d)). Note that during the preparation the robot may created a line of width two: When the last tile is placed underneath a corner that lies to the right, the robot continues construction until the next corner is hit. In order to remove the correct line in RemoveAppendix, we turn right whenever the next tile has a neighbor to the right and the top row contains at most two tiles (see Algorithm 7, RemoveAppendix, line 9).

Note that the new connection between P and bb(P) may not be on the south side of P. If desired, the robot can simply add a new connection to any side and remove the old connection by moving around the bounding box. This way, we can also ensure that the connection will always be on the south side of P.

figure g

Theorem 1

Let \(P\) be a polyomino of width \(w\) and height \(h\) with k convex tiles. Constructing bb(P) such that bb(P) and \(P\) are always connected can be performed by one robot with one marker in \(O(\max (w,h) \cdot (wh + k \cdot |\partial P|))\) steps.

Proof

Correctness:

It is straightforward to see that the robots will find a local y-minimum in phase (1): Consider a horizontal line \(\ell \) the robot is on. If \(\ell \) has tiles adjacent to the south, the robot eventually finds such tile by the scan from right to left. If \(\ell \) has no tiles to the south, then \(\ell \) is a local minimum and the robot will stop on the leftmost tile. By the simple check if there is sufficient space beneath this found local minimum, we can guarantee a suitable start position to construct bb(P).

For phase (2), we first prove that the membership test of a tile t is decided correctly by the robot. For that let \({\mathcal {F}}\) be the set of all maximally connected components of empty pixels. Assume that the tiles of the bounding box are placed in one of these connected components \(F\subset {\mathcal {F}}\).

Then, t is adjacent to a position of F, and also the marker is placed on a tile that is adjacent to a position of F. Because the robot traverses a boundary of P, it never steps on a tile that is not adjacent to a position of F, and thus the robot eventually reaches the marked tile. It is straightforward that t must belong to P if the marker is met from above, because the robot started the bounding box construction below the marker. In summary, the robot can decide whether t belongs to P or to the bounding box.

For the remaining correctness proof, we show that the construction encloses P after phase (2). We show that (a) the tile of the construction placed last has distance two to the nearest tile of P using the \(L_\infty \)-metric, and (b) we do not construct loops not containing any tile of P. It is straightforward to see that (a) and (b) are true after phase (1). Now assume both are true after placing tile t. We will show that (a) and (b) also hold after placing the next tile \(t'\). Consider the operations from the algorithm.

  • Make a right turn: When we find a convex corner \(t_\textsc {corner}\), we perform a right turn. Then t and \(t'\) are within distance two of \(t_\textsc {corner}\).

  • Shift line: Because the next tile would connect a tile \(t_\textsc {shift}\) of P and t, a shift by one unit will not increase the distance between \(t'\) (i.e., t shifted by one unit) and \(t_\textsc {shift}\).

  • Deconstruct line: This is similar to the previous case. Consider the lowest tile \(t_\textsc {block}\) of P that blocks further shifting. After deconstructing the current line two units below \(t_\textsc {blocked}\), the remaining last tile \(t'\) of the construction has distance two to \(t_\textsc {blocked}\).

Combining all three cases, the last placed tile of the construction has a tile of P within distance two. Therefore, by induction, (a) holds for during the whole construction process.

Because we only perform a right turn after finding a convex corner of P, we must enclose at least one tile of P. Combining (a) and (b) it follows that we enclose P.

The easy structure of the construction after phase (2) make it straightforward to see that we can easily find a new connection between bb(P) and P, and move to the marked tile to remove unwanted tiles in phase (3).

Connectivity: While assembling the bounding box or checking the membership of a tile, there is always the marked tile that holds together \(P\) and the current construction. Whenever we have to build a bridge for traversing a gap, the constructed bridge between the previous starting position and the first intersection with \(P\) will not be removed until one robot ensures connectivity at this intersection. Finally, there is at least one connection between \(P\) and the bounding box when we are finishing the construction.

Time: Again, it is straightforward to see that phase (1) needs at most \(O(N)\subseteq O(wh)\) steps to find a minimum. This includes also possible restarts from phase 2, because each maximal line of P can be visited at most once.

For phase (2), we split the runtime analysis into two parts: check a tile for membership and the actual construction. Analogous to [32], we show that in the actual construction every position within the final bounding box is visited a constant number of times for a fixed starting position in phase (2). Consider a pixel \(v\) within the final bounding box. At some point, \(v\) will be visited for the first time while constructing bb(P). Other visits are possible during shifting and removing the boundary tile placed on \(v\). However, after a shift or removing the tile, which is part of the shifting process, we move away from v and never visit v again. Finally, there may be a constant number of additional visits while building a bridge for searching a new starting position. This results in \(O(wh)\) steps.

However, during the construction, we may need to restart up to \(\max (w,h)\) times. Figure 7 shows a worst-case example. There are possibly up to \(\max (w,h)\) starting positions \(s_i\) that have a pixel somewhere to the left blocking the construction at some point during construction. Then, a pixel \(v\) could be visited after every restart of phase (2) implying that \(v\) can be visited up to \(\max (w,h)\) times. This yields \(O(\max (w,h) \cdot wh)\) steps for the construction process.

Fig. 7
figure 7

For every starting position \(s_i\) there is some tile to the left of \(s_i\) blocking the shifting process and forcing a restart. If \(s_1\) is the first start position, we have \(\max (w,h)\) restarts. Then the pixel \(v\) is visited once after every restart

For every tile that leads to a conflict during construction, the decision of whether that tile belongs to \(P\), or the bounding box is completed by using the subroutine checkTile in Algorithm 2. This subroutine takes \(O(|\partial P|)\) steps for tiles of \(P\) and \(O(|{\mathcal {C}}|)\) steps for tiles on the current construction \({\mathcal {C}}\) of bb(P). It is also straightforward to see that \(O({\mathcal {C}}|) \subseteq O(|\partial P|)\): Every tile of P can be charged with constant many tile of C. To this end, consider rays emanating from a tile \(t\in C\). Then at least one ray hits a tile from P. Any tile of \(\partial P\) can only hit by at most four of these rays. If no ray hits a tile of P, then t must be a corner or adjacent to a corner of C. Because we only make turn at convex tiles, C can have at most k convex tiles. Therefore, these convex tiles and their neighbors can be charged to one convex corner of \(\delta P\). In total, any tile of \(\delta P\) is charged with O(1) cost.

As described above, we can shift a line until we reach a convex corner of P without repeating a membership test. Thus, we only need to check for O(k) tiles if they belong to P or bb(P). Therefore, we have a total of \(O(\max (w,h) \cdot (wh + k \cdot |\partial P|))\) steps.

For phase (3) note that the robot moves at most twice over each tile of the current construction. Again, the number of these tiles can be bounded by \(O(|\partial P|)\). Thus, the time complexity of phase (2) dominates the total time complexity. \(\square \)

If we know in advance that the given polyomino contains no holes, then we can build a non-simple bounding box. Because we can always look for a hole to distinguish tiles from P and the bounding box, we require only a single robot without any markers. In particular, we adapt our algorithm as follows.

Fig. 8
figure 8

Bounding box elements for simple polyominoes. (a) Starting position. (b) Bounding box elements. (c) Bridge element. (d) Connecting element for finishing bounding box construction

  • The first bounding box element, which is placed right beneath a possible starting position has two vertically consecutive unoccupied pixels. (see Fig. 8 (a)).

  • Instead of creating a boundary of width one as described before, we construct it as a strip of width three, consisting of an outer, middle and inner lane. On the middle lane, every second pixel is unoccupied. Because there are no holes within simple polyominoes, the robot can easily distinguish between \(P\) and the bounding box (see Fig. 8 (b)).

  • When the robot recognizes that there is a tile t of P to the left of the starting position, we build the bridge as shown in Fig. 9: We add the gadget of Fig. 8 (c) to t and afterwards deconstruct the bounding box beginning with the starting position. Now we can restart with phase (1).

  • The minimum distance between P and bb(P) can either be two or three and may differ for every side of the bounding box. Because it may be necessary to search for a new connection between bb(P) and \(P\) while finishing the construction, and the minimal distance between the southern bounding box and \(P\) could be three, we need a second connection element, shown in Fig. 8 (d), with three vertically consecutive unoccupied pixels. For an example, see Fig. 10.

Fig. 9
figure 9

Bridge construction in case of simple polyominoes. (a) The bridge cannot be completed. (b) Using the additional bridge element

Fig. 10
figure 10

Finishing process in case of simple polyominoes. (a) Searching for a new connection. (b) Using the additional connection element. (c) Finished construction after retracing to initial start and removing unnecessary boundary elements

This yields the following corollary.

Corollary 1

Given a simple polyominino \(P\) of width \(w\) and height \(h\), building a bounding box surrounding \(P\) such that the boundary and \(P\) are always connected, can be done with one robot in \(O(\max (w,h) \cdot wh)\) steps.

4 Scaling Polyominoes

Now we consider scaling a given shape by a positive integer factor c. We start by increasing the scale of the shape (upscaling, i.e., \(c>1\)) in Sect. 4.1, before considering how to decrease the size (downscaling, i.e., \(\frac{1}{c}<1\)) in Sect. 4.2.

4.1 Upscaling

In the following we assume that the robot has already built the bounding box and is positioned below the marked tile. See Figs. 2 and 11.

The scaling process can be divided into two phases: (1) the preparation phase, and (2) the scaling phase. In phase (1) we proceed as follows (see Algorithm 8).

  • We fill up the last, i.e., rightmost column within bb(P) except for the topmost pixel,

  • add a tile in the second last column above the south side of bb(P),

  • remove the lowest tile (called column marker) and third lowest tile (called row marker) on the east side of bb(P) (see Fig. 11(a)).

This yields three columns within the bounding box (including bb(P) itself). The first (from west to east) is the current column of \(P\) to scale. The second column, is used to ensure connectivity and to decide if we finished scaling the current column. The third column marks the current overall progress, i.e., we can find the pixel in the correct current column and row that we want to scale next.

After this preparation, we can remove the marked tile that was used for connectivity in the beginning. Note that in special cases the marked tile had distance two to the right side of bb(P). In this case, we move the marker one unit to the left during the preparation. See Algorithm 8 line 4.

figure h

In phase (2) we consider four main operations using three variables. \(b_{\textsc {col}}\) denotes whether we scaled the last pixel of the current column, \(b_{\textsc {pixel}}\) denotes the state of the pixel that we want to scale, and \(b_{\textsc {new}}\) denotes whether we started scaling up a new column. We initialize phase (2) with \(b_\textsc {col}:= 0\), and \(b_\textsc {new}:= 1\).

  • Initialize next scaling: The robot moves along the bottom side of bb(P) until it finds an empty pixel. This is the column marker. Then we check if we need to prepare the next column. See Algorithm 9 left. Afterwards, we scale the next pixel.

  • Prepare next column: If \(b_{\textsc {col}} = 1\), then we prepare the next column. We move the column marker one pixel left and remove the tile two pixels above the column marker, i.e., we place the row marker. In addition, we place a tile one pixel above and two pixel to the left of the column marker. If this pixel was already occupied, then we completely scaled P and we can move on to phase (3). See Algorithm 9 right.

  • Scaling the next pixel: We start from the column marker and move up until we reach the row marker. We place a tile, move one pixel up and set its state to empty. If there is no tile to the left, then we are about to scale the last pixel in the current column. Let \(b_{\textsc {col}}\) denote whether the pixel was empty or not.

    Then the robot moves to the pixel that is scaled next, i.e., the robot moves one pixel down and two pixels left. The robot stores the state of the pixel in \(b_{\textsc {pixel}}\), and places a tile if \(b_{\textsc {pixel}} =\) empty. See also Algorithm 10 left. Afterwards, we perform the scaling operation.

  • Perform the scaling operation: First we move to the bottom side of the bounding box. Then we move left until the next pixel is empty.

    If \(b_{\textsc {new}} = 1\), we build the \(c\times c\)-square to the left (with a middle tile missing if \(b_{\textsc {pixel}}=\) empty) and we set \(b_{\textsc {new}} := 0\).

    Else, if \(b_{\textsc {new}} = 0\), we move up until we step on an empty pixel and build the \(c\times c\)-square. We leave out the middle tile of the square if \(b_{\textsc {pixel}}=\) empty. In case of c being even, this corresponds to the top-right pixel of the middle square. See also Algorithm 10 right.

figure i
figure j
figure k

As seen in Algorithm 11, we iterate through these operations until we scale a column that only contains empty pixels. This is recognized when trying to place a tile during the preparation of the next column. See Algorithm 9 right, line 6. Afterwards, we start the clean-up phase. We remove all tiles from the old bounding box area, proceeding column-wise from right to left. Due to the simple structure, we know that we finished removing this area when the removed column has no empty pixel.

If necessary, all scaled empty tiles can also be removed. For each scaled column (e.g. from left to right), we remove empty scaled pixels from top to bottom until we find a scaled occupied pixel t. Then we remove scaled empty pixels from bottom to top until we reach t again. This way, the whole arrangement is always connected.

Fig. 11
figure 11

Intermediate steps of scaling by factor \(c=3\). Dashed and dotted lines denote the robot’s paths. (a) Configuration after the preparation phase showing the column marker (dotted blue circle), row marker (dashed red circle) and the next tile to scale (teal circle). (b)-(d) Cases that appear during the scaling: (b) Scaling an occupied pixel; (c) scaling an empty pixel; (d) preparing the next column. See also Fig. 2

Theorem 2

After building bb(P), scaling a polyomino \(P\) of width \(w\) and height \(h\) by a constant scaling factor \(c\) without losing connectivity can be performed with a single robot in \(O(wh \cdot (c^2 + cw + ch))\) steps.

Proof

Correctness: We scan through the whole bounding box of P and scale every pixel. This implies that we scale every tile of P. Because we scale column-wise, we ensure that every scaled tile is built at the correct position. Connectivity is guaranteed because we never remove a tile that is necessary to preserve connectivity.

Time: Each of the \(w \cdot h\) pixels within the bounding box of \(P\) is scaled. To this end, the robot has to move \(O(c(w+h))\) steps to reach the position at which the scaled pixel needs to be constructed. A further \(O(c^2)\) steps are needed to construct the tile. Finding the next pixel to scale takes \(O(c(w+h))\) steps, including going back, finding the correct column and row, and moving the row and column marker. In total we have \(O(wh(c^2 + cw + ch))\) steps.\(\square \)

4.2 Downscaling

In this section, we show that a shape P that is already scaled up by a factor \(c>1\), can be downscaled to its original size, i.e., we scale the shape by the factor \(\frac{1}{c}\). We assume that the scaled area, i.e., the \(cw\times ch\) area containing P, is filled with scaled empty pixels (i.e., \(c\times c\) squares with their middle tiles missing) and the scaled tiles of P. If this is not the case, we can simply fill up this area until we obtain a rectangular box. See Fig. 12 for an arrangement that satisfies these conditions and Fig. 13 for an overview of the construction.

In the following, we describe a strategy that positions the downscaled version of P at the bottom right corner of the scaled area. Similar to our other strategies, we proceed in three phases: (1) the preparation phase, (2) the downscaling phase, and (3) the clean-up phase.

In phase (1), we start building a vertical line \(\ell _v\) on the right side of the scaled area starting to the right of the top right corner. We construct the line downwards until the last tile \(t_s\) of \(\ell _v\) has no tile to its left. The line \(\ell _v\) will guarantee connectivity throughout the downscaling process, and we can use \(t_s\) to recognize the start of the scaled area. Then, from the tile above \(t_s\), we construct a horizontal line \(\ell _h\) of length three and place a further tile above the rightmost tile of \(\ell _h\). We use \(\ell _h\) for indicating where we want to construct the downscaled version of P. In particular, the last tile of \(\ell _h\) marks the current column of P we are processing. See Fig. 12 for the configuration after the preparation phase. See also Algorithm 12 for pseudocode of phase (1).

figure l
Fig. 12
figure 12

(a) An arrangement that satisfies the described prerequisites. The \(cw\times ch\) area contains P (blue) and scaled empty pixels. (b) Starting arrangement for downscaling where the target area lies to the right of \(P\)

In phase (2), we downscale P from left to right and from bottom to top. We use the Boolean variable \(b_\textsc {new}\) to decide whether to start a new column in the next iteration or not. We initialize phase (2) with \(b_\textsc {new} = 1\). With \(b_\textsc {pixel}\) we store the state of the scaled pixel that we want to downscale. We split phase (2) into three main operations: move to next pixel, get state of next pixel, and downscale pixel. See also Algorithm 13 for pseudocode of phase (2).

  • Move to next pixel: Assume the robot starts on \(\ell _h\). Then the robot moves leftmost.

    Then, if \(b_\textsc {new} = 0\), it moves up as long as there is a tile above our position and no tile to the left. Three cases occur:

    1.:

    \(b_\textsc {new} = 0\) and there is a tile to the left (see Fig. 13 (a), (c), and (e) right). The robot moves leftmost.

    2.:

    \(b_\textsc {new} = 1\) and there is no tile below the robot’s position (see Fig. 13 (b), and (d) right). In this case \(b_\textsc {new} = 1\), i.e., we start a new column.

    3.:

    \(b_\textsc {new} = 1\) and \(t_s\) is below the robot (see Fig. 13 (f) right). In this case we know that the downscaling procedure is completed and we can proceed with phase (3).

    The robot now stands in the bottom-left corner of the next scaled pixel.

  • Get state of next pixel: The robot moves to the center of the scaled pixel and stores the state of this scaled pixel, i.e. \(b_\textsc {pixel}:=\) occupied, if the \(c\times c\) square is completely filled with tiles, and \(b_\textsc {pixel}:=\) empty, otherwise. Then we proceed with downscaling the pixel.

  • Downscaling pixel: We remove the scaled pixel currently hosting the robot, such that it sits on a pixel to the right after removal. While removing the top row of the \(c\times c\) square, the robot checks if there are further tiles above the top row. If that is the case, we set \(b_\textsc {new} := 0\) (or \(b_\textsc {new} := 1\), otherwise). For both cases see also Figure 13 left.

    After removing the \(c\times c\) square, the robot moves down until there are no more tile below its position. In case there are no tiles to the right (i.e., it moved to \(t_s\)), it moves one step up. Then it moves right until no further tile lie to the right (i.e., the robot reached the rightmost tile of \(\ell _h\)). From there, it moves up until it steps on the first empty pixel. It places a tile, if \(b_\textsc {new} = 0\), and moves one step down and left. This is the position where we want to downscale our current pixel. The robot changes the state of the pixel to empty if \(b_\textsc {pixel}:=\) empty, or to occupied if \(b_\textsc {pixel}:=\) occupied. Afterwards it moves one step right and moves down to \(\ell _h\). If \(b_\textsc {new} = 1\), then it extends \(\ell _h\) by one tile on the right side plus a tile above it. Then it gets the state of the next pixel.

figure m

Figure 13 shows an example for phase (2). In the clean-up phase (3), we remove the auxiliary structures, first \(t_2\), then \(\ell _v\) from top to bottom. Afterwards, we can remove the rightmost tile of \(\ell _h\), the tile above it and the last column from top to bottom, which is not part of the polyomino. To remove the rest of \(\ell _h\), we start to remove the line from the right to left until there is a tile t of the polyomino above \(\ell _h\). Then we remove the remaining part of \(\ell _h\) from left to right until we find t again. Only the downscaled version of our original shape remains.

Fig. 13
figure 13

Intermediate steps of downscaling a given polyomino P (blue). The resulting polyomino is shown in dark grey. Left: Path of the robot for scale down pixel. Right: Path of the robot for move to next pixel

Theorem 3

Given a polyomino \(P\) scaled by c of width \(cw\), height \(ch\). Downscaling \(P\) by c without losing connectivity can be performed without markers in \(O(wh \cdot (c^2 + cw + ch))\) steps.

Proof

Correctness: We prove that (a) we scan the columns completely from bottom to top, and (b) we downscale each scaled pixel at the correct position. Assume that we leave out one scaled pixel p in a column. Then we will not consider the scaled pixels above p and we start a new column. This, however, requires that the robot has not seen any tile above the previous scaled pixel. Thus it must have been the last scaled pixel in the column and p does not exist.

Consider a scaled pixel p that we downscale next. Because the column above the rightmost tile of \(\ell _h\) shows how many pixels are already downscaled in the current column, we will find the correct position to downscale p.

Due to the simple structure, the clean-up phase is straightforward.

Connectivity: Similar to the upscaling operation, the column above the rightmost tile of \(\ell _h\) guarantees connectivity of the downscaled area. For this, consider any connected shape P, we can cut through P with a vertical line and add tiles along this line. Clearly, this structure is still connected. Because all tiles have a connection to this vertical line, we can remove everything to the right of the line without loosing connectivity..

Similarly, \(\ell _v\) preserves connectivity of the upscaled area with the downscaled area, especially when processing the last column.

Time: Phase (1) takes at most O(ch) time to construct \(\ell _v\) and O(1) to construct \(\ell _h\). In phase (2), for each scaled pixel we get its state in time \(O(cw+ch)\). Removing this scaled pixel needs \(O(c^2)\) time, scaling it down takes another \(O(cw+ch)\) steps. Because there are wh many scaled pixels, we need \(O(wh\cdot (c^2+cw+ch))\) steps for phase (2).

Removing the auxiliary structures in phase (3) needs only O(ch) steps to remove \(\ell _v\) and O(w) to remove \(\ell _h\). For all three phases, we get a total runtime of \(O(wh \cdot (c^2 + cw + ch))\). \(\square \)

5 Scaling Monotone Polyominoes

When the polyomino P is x- or y-monotone, we can scale P using two robots without constructing a bounding box. P is called x-monotone (y-monotone) if the intersection with any vertical (horizontal) line with P is a connected set. See Fig. 14 for a polyomino and its scaled version. In the following we consider an x-monotone polygon P. We proceed in two phases: (I) scaling the columns of P vertically, (II) scaling the columns of P horizontally.

Fig. 14
figure 14

Left: An x-monotone input polyomino \(P\). Right: \(P\) scaled by factor \(c=3\)

5.1 Phase I

During the first phase, we process the polyomino column-wise from left to right to scale the columns of P vertically by the factor \(c\). The marker is placed on the uppermost tile of the current column. For every tile in that column, the robot moves the marker one unit down. If there is no further tile, the robot keeps the marker. The robot extends the current column on the upper side by \(c-1\) tiles and moves down until the marker or the end of the column is reached. In the latter case, the current column is finished. See Fig. 15 for an example.

Fig. 15
figure 15

Intermediate arrangements of scaling a monotone polyomino. Scaled tiles are marked in (dark) gray. (a) Processing one column during the first phase: The robot extends the column to the upper side and the current progress within that column is marked. (b) The first tile scaled. (c) The first column scaled in y-direction by factor \(c=3\)

To scale the next column, we consider three cases. The lowest tile of the next column may have an equal, a higher or a lower y-coordinate than the lowest tile of the current column. Let \(t_n\) (\(t_c\), resp.) be the lowest tile of the next (current, resp.) column and \(y_{t_n}\) (\(y_{t_c}\), resp.) the y-coordinate of that tile. The three cases are handled as follows; see also Algorithm 14.

  1. 1.

    \(y_{t_n} = y_{t_c}\): We can simply continue with the next column, see Algorithm 15.

  2. 2.

    \(y_{t_n} > y_{t_c}\): Before moving to the next column we have to scale empty pixels. For each empty pixel \(t_e\) below \(t_n\) with y-coordinate \(y_{t_e}\ge y_{t_c}\), we move every column to the right of the current column \(c-1\) units up. This can be done by marking the next empty pixel and by letting the robot shift the columns up. The shifting process can be done by adding \(c-1\) tiles above each column and afterwards removing \(c-1\) tiles from the bottom. See also Algorithm 16 for Pseudocode, and Fig. 16 for an example.

  3. 3.

    \(y_{t_n} < y_{t_c}\): This case is more complex because it is not immediately clear in which direction all remaining columns have to be shifted in order to scale the next column correctly. We perform a scaling of the next column and a shifting of remaining columns at the same time. We proceed as follows. Let t be the tile with y-coordinate \(y_t = y_{t_c}\). We scale the column from top to t as described above, i.e., we run monotoneCaseI until we remove the marker from a pixel for which left is occupied and bottom-left is empty. For each tile below t starting from the bottom, we add \(c-1\) to the bottom of the column and shift all columns to the right \(c-1\) steps down, which can be performed analogously to the shifting process from monotoneCaseII. Note that this process is completed when the robot returns to the marker and when the marker is to the right of \(t_c\), i.e., bottom-left is empty and left is occupied. We leave out the Pseudocode for monotoneCaseIII as it is analogously to a combination of the previous two cases. See Fig. 17 for an example. We can now proceed with the next column.

Fig. 16
figure 16

Example for \(y_{t_n} > y_{t_c}\). Scaled tiles are marked dark gray. (a) Recognizing the case. (b) Two tiles (gray) placed above every following column. (c) Two tiles removed from the bottom end of every column. (d) Scaling the column

Fig. 17
figure 17

Recognizing \(y_{t_n} < y_{t_c}\). Scaled tiles are marked gray. (a) Recognizing the case. (b) All pixels having a y-coordinate of at least \(y_{t_c}\) are scaled upwards. (c) All pixels having a y-coordinate of strictly less than \(y_{t_c}\) are scaled downwards

figure n
figure o
figure p

5.2 Phase II

When all columns have been scaled vertically, we proceed with phase II to scale the columns horizontally. The idea of phase II is as follows. Proceed column-wise; for a column C shift all remaining columns \(c-1\) steps to the right to make space for building \(c-1\) copies of C (see Fig. 18). To identify C in a later step, we place a marker on the bottom most tile of C. Clearly, we cannot simply shift a column \(c-1\) steps to the right, as this would disconnect the shape. Instead, we process the columns from right to left until we reach C and shift the columns in the following way.

For a column \(C'\), copy it \(c-1\) times to the right. Then, starting from the bottommost tile of \(C'\), we remove \(c-1\) tiles to the right leaving the tile of the rightmost copy of \(C'\). We repeat this process with the rows above until we find a row with a tile t of \(C'\) that has an adjacent tile to the left. Note that there is no tile below t. Thus, we can simply remove rows of \(C'\) and \(c-2\) copies from the top as long there is a tile below the left most tile.

After this clean-up, the rightmost copy of \(C'\) still exists and is connected with its previous column by a bridge. We can now proceed with the column to the left of t. If this column is C, then we perform the same steps without the clean-up phase. See also Algorithm 17 for Pseudocode.

Fig. 18
figure 18

Intermediate steps of scaling horizontally. Blue tiles denote tiles that need to be scaled horizontally, gray tiles denote auxiliary structures and scaled areas. (a) The rightmost column is copied \(c-1 = 2\) times. (b) The robot identifies tile t. (c) Bridge is built. (d) Construction after shifting the next column. (e) Construction after scaling the first column

figure q

Theorem 4

Scaling an x-monotone polyomino \(P\) with N tiles, width \(w\), and height \(h\) by a constant scaling factor \(c\) without losing connectivity can be done with two robots in \(O(wc^2N)\) steps.

Proof

Correctness phase I: Scaling the first column is correct, because for each tile we add \(c-1\) tiles to the top of the column, which results in scaling the column by factor c. Furthermore, the lowest tile \(t_c\) of the first column still has the same neighbor t (either an empty pixel or a tile) with the same number of empty and occupied pixels above and below t. We use this fact as an invariant to prove that the remaining columns are also scaled correctly. Now assume we correctly scaled the first k columns. In the first case, when \(y_{t_c}=y_{t_n}\), we scale the next column similar to the first column. Therefore, the lowest tile still has the same neighbor after scaling. Now consider the i-th tile \(t_i\) in the column from below before scaling. Then, \(t_i\) moves \(c(i-1)\) units upwards after scaling the first \(i-1\) tiles. This results in \(t_i\) having its correct neighbor to the left, namely the i-th pixel from the previous column (note that we can consider all empty pixels above any column already scaled). Thus, after scaling all tiles, the neighbors to their left are all correct. In conclusion, the invariant still holds for the first \(k+1\) columns for the first case.

For the second case (\(y_{t_c}<y_{t_n}\)), we shift all remaining columns by \(c-1\) steps up, such that \(t_n\) has the correct neighbor to the left. Note that \(t_n\) maintains its right neighbor during the shifting process. Thus, after the shifting process, the invariant holds and we can scale the column.

In the remaining case, we can scale all tiles in the next column with y-coordinate at least \(y_{t_c}\), which does not change the invariant for the first \(k+1\) columns. When scaling the lower tiles, we shift all remaining columns down, such that \(t_n\) keeps it neighbor to the right. Thus, after scaling this complete column, the invariant holds for the first \(k+1\) columns.

By induction, we correctly scale the columns.

Correctness phase II: To prove the correctness of phase II, we show that the shift of columns is performed without losing connectivity. The scaling is done within the shifting process by ignoring the clean-up for the last column. Thus, a repeated shifting phase scales the polyomino.

Consider the rightmost column. After copying this column c times, the whole polyomino is still connected. In the clean-up phase, we keep a bridge between the shifted column and the next column, maintaining connectivity. This bridge can then be used to copy the next column. By induction, we can shift n columns without losing connectivity.

Combining phase I and II, we scale the polyomino by the factor c.

Time phase I: Let \(n_i\) denote the number of tiles in the ith column in P. Before scaling the ith column, we may need to shift all remaining columns by at most \(O(cn_{i-1})\) unit steps in case 2, or \(O(cn_i)\) unit steps in case 1. Because there are at most w columns, this lasts \(O(wc(n_{i-1} + n_i))\) steps. Scaling each tile in the column takes at most \(O(cn_i)\) steps. Summing this up over all columns, we have at most \(O(cn_1) + \sum _{i=2}^{w} O(wc(n_{i-1} + n_i))+ O(cn_i) = O(wcN)\).

Time phase II: Consider the ith column of P containing \(cn_i\) tiles. Shifting all remaining columns \(c-1\) unit steps to the right needs \(O(c^2N)\) steps. Scaling the ith column needs another \(O(c^2n_i)\) steps. Over all columns, phase (2) needs \(O(\sum _{i=1}^{w} c^2N + c^2n_i)= O(wc^2N)\) steps in total. \(\square \)

6 Adapting Algorithms

As shown in [32], there are algorithms that may not preserve connectivity. An immediate consequence of being able to scale a given shape is that we can simulate any algorithm \({\mathcal {A}}\) within our model while guaranteeing connectivity: We first scale the polyomino by three and then execute \({\mathcal {A}}\) by always performing three steps into one direction if \({\mathcal {A}}\) does one step. If at some point the robot needs to move through empty pixels, then we place a \(3\times 3\)-square with the middle pixel empty (if a clean-up is desired at the end of \({\mathcal {A}}\), i.e., removing all scaled empty pixels, we fill up the complete row/column with these squares). This guarantees connectivity during the execution and we obtain the following theorem.

Theorem 5

If there is an algorithm \({\mathcal {A}}\) for some problem \(\Pi \) with runtime \(\mathcal {T(A)}\), such that the robot moves within a \(w'\times h'\) rectangle, then there is an algorithm \(\mathcal {A'}\) for \(\Pi \) with runtime \(O(wh\cdot (w + h) + \max ((w'-w)h',(h'-h)w') + \mathcal {T(A)})\) guaranteeing connectivity during the execution.

Proof

Approach:

The first step is to scale the polyomino \(P\) of width \(w\) and height \(h\) by a factor \(c = 3\) with the strategy above. We keep any \(3\times 3\) square in the clean-up phase of the scaling algorithms. This gives us a \(3w \times 3h\) rectangle containing the scaled polyomino and \(3 \times 3 \) segments representing empty pixels from the \(w \times h\) area of the initial polyomino.

We adapt the algorithm \({\mathcal {A}}\) as follows. When the robot places a tile in \({\mathcal {A}}\), then we place a tile in the middle of the \(3\times 3\) square in \(\mathcal {A'}\). A removal in \({\mathcal {A}}\) is represented by removing the middle tile of the \(3\times 3\) square in \(\mathcal {A'}\).

For each step the robot moves into direction d in \({\mathcal {A}}\), we move 3 steps into direction d in \(\mathcal {A'}\), i.e., the robot effectively moves on a grid scaled up by a factor of three (see Fig. 19(a)). If the robot reaches a pixel at which no \(3\times 3\) square is present (see Fig. 19(b)), then the robot adds such a square representing an empty node and leaves the middle bottom tile missing (see Fig. 19(c)). Then the robot fills up the complete row/column with \(3 \times 3\) squares and returns to the pixel at which the middle bottom tile is missing (see Fig. 19(d)). From there we can continue the execution of \({\mathcal {A}}\).

Analysis: The scaling procedure requires \(O(wh\cdot (w+h))\) steps. Due to the described movement adjustment of doing three steps in \(\mathcal {A'}\) instead of one step in \({\mathcal {A}}\), the runtime of \({\mathcal {A}}\) increases by the constant factor three. Finally, we consider the fill-in procedure to be used in case of stepping on an empty pixel. Depending on the robot’s movement area for \({\mathcal {A}}\), we get \(O(max((w'-w)h',(h'-h)w'))\) steps for filling in. This results in an overall runtime of \(O(wh\cdot (w+h) + max((w'-w)h',(h'-h)w') + \mathcal {T(A)})\) steps. \(\square \)

When the algorithm terminates and there is only one polyomino left in the constructed rectangle area, we can either remove empty cells or downscale the polyomino to its original size.

Fig. 19
figure 19

(a) A polyomino scaled by a factor of \(c = 3\). The robot moves along the red lines when an algorithm is executed. (b) The robot enters an empty pixel when it tries to move south. (c) Marked the first \(c \times c\) segment, which the robot has entered, by removing the bottom-middle tile. (d) The robot has filled the row with \(c \times c\) segments and moves back to the previously marked segment

7 Conclusion

We have demonstrated how geometric algorithms for finite automata can be used to enable very simple robots to perform a number of fundamental construction tasks while preserving connectivity. At this point, the main focus of our paper has been a feasibility study of the considered problems rather than a tight analysis of the proposed solutions; as a consequence, non-trivial lower bounds have yet to be established.

There is also a whole range of possible extensions. Is it possible to scale general polyominoes without the preceding bounding box construction? A possible approach is to cut the polyomino into a subset of monotone polyominoes, which could be handled separately. Expanding the existing repertoire of operations to three-dimensional configurations and operations is another logical step. An equally relevant challenge is to develop distributed algorithms with multiple robots that are capable of solving a range of problems with the requirement of connectivity, without having to rely on the preceding scaling procedure that we used in our work. Other questions arise from additional requirements of real-world applications, such as the construction and reconfiguration of space habitats.