Further steps on the reconstruction of convex polyominoes from orthogonal projections

A remarkable family of discrete sets which has recently attracted the attention of the discrete geometry community is the family of convex polyominoes, that are the discrete counterpart of Euclidean convex sets, and combine the constraints of convexity and connectedness. In this paper we study the problem of their reconstruction from orthogonal projections, relying on the approach defined by Barcucci et al. (Theor Comput Sci 155(2):321–347, 1996). In particular, during the reconstruction process it may be necessary to expand a convex subset of the interior part of the polyomino, say the polyomino kernel, by adding points at specific positions of its contour, without losing its convexity. To reach this goal we consider convexity in terms of certain combinatorial properties of the boundary word encoding the polyomino. So, we first show some conditions that allow us to extend the kernel maintaining the convexity. Then, we provide examples where the addition of one or two points causes a loss of convexity, which can be restored by adding other points, whose number and positions cannot be determined a priori.


Introduction
This paper aims at studying the tomographical problem of reconstructing convex polyominoes from their orthogonal projections, using tools from the area of combinatorics on words.
Discrete tomography has its own mathematical theory mostly based on discrete mathematics. It shows connections with combinatorics and geometry, and the mathematical techniques developed in this area find applications in other scientific fields such as: image processing (Shliferstein and Chien 1978), statistical data security (Irving and Jerrum 1994), biplane angiography (Prause and Onnasch 1996), graph theory (Brlek and Frosini 2016;Frosini et al. 2013), to name a few. For a survey of the state of the art of discrete tomography we refer the reader to the books edited by Kuba (1999, 2007).
Interestingly, mathematicians have been concerned with abstract formulations of these problems before the emergence of practical applications. Many problems of discrete tomography were first considered as combinatorial problems during the late 1950s and early 1960s. Ryser (1963) and Gale (1957) in 1957 gave a necessary and sufficient condition for a pair of vectors to be the row and column sums, later called horizontal and vertical projections, of an m × n binary matrix, and they also defined an O(nm) time algorithm to provide one of them. We refer the reader to an excellent survey on binary matrices with given row and column sums by Brualdi (1980). In general, the number of matrices sharing the same projections grows exponentially with their dimension, so in most practical applications some extra information are needed to achieve a solution as close as possible to a starting unknown object. So, researchers tackle the algorithmic challenges of limiting the class of possible solutions in different ways: increasing the number of projections (Gardner and Gritzmann 1997;Gardner et al. 1999), fixing the wideness of the unknown object (Dulio et al. 2015(Dulio et al. , 2016(Dulio et al. , 2017b or adding geometrical information (mainly connectedness and convexity). Concerning this last, among connected sets a dominant role deserved polyominoes, that are commonly intended as finite 4-connected sets of points of the integer lattice, considered up to translation.
In particular, convex polyominoes are very natural objects, as they can be viewed as the discrete counterpart of Euclidean convex sets. It is remarkable that several problems from various research areas about them remain open.
For instance, concerning enumeration, no exact result has been determined about them. Bodini et al. (2013) performed an asymptotic analysis to obtain a combinatorial symbolic description of convex polyominoes, to analyze their limit properties and to define a uniform sampler.
Our research follows the mainstream of studying the reconstruction of convex polyominoes from orthogonal projections. Different approaches to this problem have been considered in the past (see for example Balazs and Gara 2008), providing interesting results on several classes of polyominoes, and leaving the main problem still unsolved (see again Kuba 1999, 2007).
In particular, Barcucci et al. (2001) defined an interesting strategy for the reconstruction of polyominoes that are convex along the horizontal and vertical directions only, say hv-convex polyominoes, from the projections along them. Their polynomial time algorithm consists of two separate parts: it first reconstructs an internal hv-convex kernel of points which is common to all the convex polyominoes having the input projections; then, it expands the kernel maintaining the hv-convexity by means of a 2-SAT logic formula, one of whose valuations, representing a solution of the problem, can be computed in polynomial time. We underline that this reconstruction strategy provides one convex polyomino among exponentially many that may satisfy a couple of given projections.
The kernel reconstruction iteratively uses four filling operations that have become quite common when dealing with convex sets. As a matter of fact several studies after (Barcucci et al. 2001) have been devoted to enhance the efficiency and to modify the target of the four filling operations by modifying them in order to speed up the reconstruction process (Gȩbala 1998) [a fifth operation was also introduced in Brunetti et al. (2001) and studied in Brunetti et al. (2006)] and to specialize the reconstruction to different convex polyominoes subclasses (Brunetti et al. 2001).
Recently, the problem of reconstructing convex polyominoes from two projections has been approached by Gérard (2017) who considered the possibility of a direct extension of the second part of the strategy in Barcucci et al. (2001) on a convex kernel whose reconstruction can be performed in polynomial time (Graham 1972). As Gérard pointed out, such a direct approach has to manage, in general, complex relationships between points and needs, at a first sight, a more complex logic formulation, not belonging to 2-SAT any more.
In our study, we show a possible way of performing the kernel expansion that uses an alternative characterization of convex polyominoes given by Brlek et al. in terms of combinatorial properties of words coding their contour (Brlek et al. 2009). This paper is an extended and enhanced version of Dulio et al. (2017a), where the authors provided a local geometrical property that allows the addition of one single point along the convex border of a kernel without losing its convexity. Here, we push this result further by first characterizing a set of suitable positions where one point at a time can be added, still preserving the convexity. Such a result provides a way of performing multiple expansions of a convex kernel, one or more points at a time, until reaching given horizontal and vertical projections, and following the reconstruction strategy of Barcucci et al. (2001). Then, we show some cases where the addition of one or more points cause a loss of convexity, so forcing new points to be added to re-establish the property. The existence of these situations may prevent, in general, the convex kernel from reaching the desired horizontal and vertical projections and may cause a failure in the reconstruction process. Furthermore, in these cases, we show how convexity can be recovered without the use of a logic formula as suggested in Gérard (2017). Finally, an example of a class of convex polyominoes whose reconstruction can be performed in polynomial time by the defined kernel expansion is also presented.
The paper is organized as follows: In Sect. 2 we present the problem of reconstructing (finite) sets of points from projections and we focus on hv-convex polyominoes sketching the reconstruction strategy defined in Barcucci et al. (2001). Then, we introduce the notions of Christoffel and Lyndon word, that will be used in Sect. 3 to characterize convexity.
In Sect. 3 we characterize some positions in the contour of a polyomino where it is possible to add one or more points in order to maintain the convexity during . 1 a A discrete set and its representation as a set of cells inside the minimal bounding rectangle of dimensions 7 × 6; b a v-convex polyomino; c a hv-convex polyomino that is not convex. The grey cell does not belong to the polyomino, but it is included in its convex hull; d a convex polyomino. The convex hull is represented and no cells outside the polyomino belong to it the reconstruction process. Examples of single or double points additions that do not maintain the convexity are also shown. Finally, we provide a class of WN-paths that can be expanded by adding points obtained with the split operation.
The last section contains some comments on the presented results and some hints for future researches that our study might open.

Preliminaries and known results
A planar discrete set S is a finite subset of points of the integer lattice Z 2 considered up to translation, and it is commonly represented as a set of cells on a squared surface. The dimensions of the set are those of its minimal bounding rectangle, as shown in Fig. 1a.
A polyomino is a 4-connected discrete set of cells (see Fig. 1b-d). There is a vast literature on polyominoes, so for further definitions and results, we address the interested reader to Guttmann (2009).
A column (resp. row) of a polyomino is the intersection between the polyomino and an infinite strip of cells whose centers lie on a vertical (resp. horizontal) line.
Several subclasses of interest were considered by putting on polyominoes constraints defined by the notion of convexity along different directions. In particular, considering the horizontal and vertical directions, it turns out that a polyomino is hconvex (resp. v-convex) if each of its rows (resp. columns) is connected (see Fig. 1b). A polyomino is hv-convex, if it is both h-convex and v-convex (see Fig. 1c).
Concerning the notion of convexity, there are different definitions in case of discrete sets of points that take care of pathological situations that may arise when continuous shapes are discretized and that are mainly due to the fact that the discretization process does not preserve connectedness or convexity. Since the present research considers polyominoes only, connectedness is assumed, so we consider a polyomino P to be convex, if its convex hull contains no integer points outside P, where the convex hull of P is defined as the intersection of all Euclidean convex sets containing P. Obviously, a convex polyomino is also hv-convex.

Outline of discrete tomography
To each discrete set S of dimensions m × n, we can associate two integer vectors H = (h 1 , . . . , h m ) and V = (v 1 , . . . , v n ) such that for each 1 ≤ i ≤ m, 1 ≤ j ≤ n, h i and v j are the number of cells of S which lie on row i and column j, respectively. We call the vectors H and V horizontal and vertical projections of S, respectively. As an example, the projections of the 7 × 6 discrete set in Fig. 1a are H = (1, 1, 2, 0, 2, 2, 1) and V = (1, 3, 2, 1, 1, 1).
One of the main aims in the field of discrete tomography is the achievement of a faithful reconstruction of an unknown object, regarded as a discrete set of points at a certain resolution, from a set of projections along discrete directions. The existence of different sets of points sharing the same projections may dramatically change into meaningless the whole process, so the relevance of considering some a priori information that may guide the reconstruction process toward an element or a smaller set of elements of a specific subclass of discrete sets.
In particular, Barcucci et al. (2001) defined an algorithm that reconstructs an hv-convex polyomino compatible with a given couple of horizontal and vertical projections, if it exists, and that runs in O(m 4 n 4 ), where m × n are their dimensions. In Del , it has been proved that imposing the reconstructed object to belong to the class of hv-convex polyominoes does not guarantee its uniqueness.
The strategy of the algorithm concerns the possibility to let a preprocessed hvconvex kernel grow by adding points in order both to keep the desired convexity, and to satisfy the projections. This additions are performed by coding the two constraints by a 2-SAT formula whose valuation can be obtained in polynomial time w.r.t. the number of clauses.
More precisely, on the input vectors H and V , the two stages reconstruction can be described as follows: Stage 1: According to each possible placement of the elements of the polyomino touching the minimal bounding rectangle, detect the cells that are common to all the hv-convex polyominoes having H and V as horizontal and vertical projections, say the kernel. At the same time, a common external area is also detected, called the shell; Stage 2: Label each cell not yet assigned, i.e., that lies between the kernel and the shell, with a boolean variable whose value determines the inclusion or the exclusion of the cell in the polyomino. Finally, define a 2-SAT formula involving those variables that encodes both the constraints imposed by the projections and the hv-convexity. The valuations of the formula determine all the possible hv-convex polyominoes having H and V as projections, if any.
A possible approach to the reconstruction of convex polyominoes consists in modifying the above algorithm as follows: Stage 1 is enriched with a further operation that produces the convex hull of the detected kernel. The complexity of this new step can be performed in polynomial time (Graham 1972).
In Stage 2, it can be defined a different formula to encode the convexity constraint and whose valuations determine all the solution of the convex polyomino reconstruction problem. As underlined by Gérard (2017), this formula may involve clauses with at most three literals at a time (so belonging to 3-SAT) and whose valuation, in general, is not available in polynomial time.
Our purpose is to provide some conditions to bypass the use of the 3-SAT formula in Stage 2 and perform the kernel expansion maintaining both the convexity constraint at each step, and the polynomiality of the whole process. These conditions rely on the possibility of defining the geometry of the border of a convex kernel by means of combinatorial properties of the related boundary word, as described below.

Notions of combinatorics of words related to discrete geometry
From Lothaire (1997) we borrow all the basic standard terminology in combinatorics on words: alphabet, word, length of a word, occurrence of a letter, factor, prefix, suffix, period, conjugate, primitive, reversal, palindrome etc. . . The related notations will be recalled when used.

Christoffel words
In discrete geometry, the theory of Christoffel words started in Christoffel (1875), has been considered in the last decades and has acquired a prominent role in the study of digital straightness, see for example (Eckhardt 2001). For the discretization of line's segments: let a, b be two co-prime numbers, the lower Christoffel path of slope a/b is defined as the connected path in the discrete plane joining the origin O(0, 0) to the point (b, a) such that it is the nearest path strictly below the Euclidean line segment joining these two points, that is, there are no points of the discrete plane between the path and the line segment, see Fig. 2a.
Analogously, an upper Christoffel path is defined as the nearest path that lies above the line segment, as depicted in Fig. 2b. By convention, the Christoffel path is exactly the lower Christoffel path.
In this study, without loss of generality, we consider Christoffel paths whose point (b, a) lies in the first quadrant. To each such Christoffel path it can be associated a word, say Christoffel word, on the binary alphabet A = {0, 1}, such that the letter 0 is associated with an horizontal step, and the letter 1 is associated with a vertical step.
The slope a/b of a Christoffel path can be obtained from the related Christoffel word w as ρ(w) = |w| 1 |w| 0 , where the notation |w| x stands for the number of occurrences of the letter x in w. We further define ρ( ) = 1 and ρ( k 0 ) = ∞, for k > 0. We recall the following, well known property from (Berstel et al. 2008): Property 1 Any Christoffel word w of length greater than one can be written as w = 0w 1, where w is a (possibly void) palindrome.
The part w of w of the previous property is called the central part of w. Note that the lower and upper Christoffel words have the same central part.  The words, w, u and v are Christoffel words with palindromic central parts w 1 , u 1 , and v 1 resp. We have that u 1 and v 1 are palindromes, u 1 10v 1 = w 1 is also palindrome, thus w 1 = v 1 01u 1 . The property of palindromes gives the palindromic Finally, we define the minimal point m(w) of a Christoffel word w to be the unique point of the related path that has maximum distance from the line segment (see Fig. 2a).
The uniqueness of the minimal point of a Christoffel path can be obtained from the uniqueness of another point of the Christoffel path that is the closest to the related line segment. The standard factorization of a Christoffel word introduced by Borel and Laubie split the word at this closest point: Theorem 1 (Theorem 2 Borel and Laubie 1993). A Christoffel word w has a unique factorization w = uv (indicated as standard factorization), where u and v are both Christoffel words.
Later, Chuan (1997) defined the notion of palindromic factorization of a Christoffel word as its unique factorization into two palindromic subwords that always occurs at its minimal point.
The result can be obtained from Theorem 1 and Property 1: starting from the standard factorization of a Christoffel word w = (u, v), we can apply Property 1 to each of the Christoffel words w, u and v, and we obtain the results as sketched in the Fig. 3.
So, since the standard factorization uses the unique minimal point of the Christoffel path closest to the line segment, then by construction, the palindromic factorization uses the unique furthest point, that turns out to be unique as well. The uniqueness of the minimal point represents a crucial result in our study.

Lyndon words
The second relevant class of words that we consider is that of Lyndon words introduced by Lyndon in 1954. Among many different characterizations (see Lothaire 1997), we present Lyndon words as those words that are strictly smaller than their proper conjugates with respect to the lexicographical order. By definition, we note that Lyndon words are always primitive, i.e., they cannot be expressed as power of a strictly shorter word. Lyndon words became immediately very popular and, among others, they have applications in constructing bases in free Lie algebras and finding the lexicographically smallest or largest substring in a string. The following factorization on Lyndon words is from Lothaire (1997) Theorem 2 Every non-empty word w admits a unique factorization as a lexicographically decreasing sequence of Lyndon words w = w n 1 1 w n 2 2 · · · w n k k , such that w 1 > l w 2 > l . . . > l w k , n i ≥ 1 and w i are Lyndon words for all 1 ≤ i ≤ k.
As an example, consider the word w = 0010101001001101001001. Its standard factorization is (0010101) 1 (001001101) 1 (001) 2 . A linear time algorithm to factorize a word can be found in Duval (1983).
Lyndon words are minimal under cyclic shift (in their conjugate class); cyclic shifts of Cristoffel words are also studied, for instance, in Hegedus and Nagy (2016).

Adding points to a convex polyomino
The Freeman code associates to each polyomino its boundary word, see Freeman (1961), i.e., the word on a four letter alphabet A = {0, 0, 1, 1} obtained by coding the path that clockwise follows the boundary of the cell representation of the polyomino starting from a specific point s. The letters 0 and 1 represent the horizontal step and the vertical step when travelled in the opposite directions with respect to 0 and 1, respectively. If the polyomino is hv-convex, we can identify four points W , N , E and S as the points where the polyomino's boundary first touches the west, north, east and south sides of its minimal bounding rectangle, respectively, when moving clockwise along it.
If we choose to set s = W , then the boundary word can be uniquely decomposed into four different paths joining the four extremal points W , N , E and S defined by their positions as depicted in Fig. 4. The path leading from W to N is called WNpath, and it is WN-convex if it is the WN-path of a convex polyomino. The notions of NE, ES, and SW paths and the related notions of NE, ES, and SW convexity can be similarly defined. If convex, each path uses at most two of the four steps of the Freeman alphabet.

Perturbations on WN-convex paths
From now on, we will consider the WN-path only, since all the obtained results can be extended to the other three paths up to rotations. Brlek et al. (2009)  Our aim is now to use this decomposition to determine a set of positions of a WNconvex path where it is possible to make local modifications, i.e., adding one single point, without losing the property. As outlined in the Introduction, this result shows its relevance in a reconstruction strategy for convex polyominoes that relies on the approach in Barcucci et al. (1996). More precisely, the kernel expansion defined there, asks to add points to the kernel border in order to satisfy some given projections: our results characterize positions' sets where such an expansion can be performed and show some cases where multiple additions are required in order to preserve convexity.
The following proposition from Dulio et al. (2017a) stresses the role of the positions min(w) and min(w) + 1 of a Christoffel word w, in order to decompose it into two shortest Christoffel words: Proposition 1 Let w be a Christoffel word of length n and k = min(w).

Definition of the split operator
Relying on the previous results, let us define a split operator that acts on a Christoffel word w and decomposes it into the concatenation of two Christoffel words u and v by changing the subword 01 in positions w[m(w), m(w) + 1] into 10, as defined in Proposition 1, i.e., split(w) = u v. The split operator can be naturally extended to sequences of Christoffel words, by adding an index to indicate the word where the split operator acts. More formally, if w = w 1 w 2 . . . w n is a sequence of Christoffel words, then split t (w) = w 1 w 2 . . . split(w t ) . . . w n . Accordingly, consecutive applications of the split operator will be indexed by the corresponding sequence of indexes, in application order. From a geometrical point of view, the split of the Christoffel word can be regarded as the addition of one point in the minimal position of the related path, preserving the Christoffel property of the obtained factors. If we consider the decomposition of a WN-convex path defined in Theorem 3, then the split operator can be used to add one point at a time on the boundary of a convex polyomino. Unfortunately, when sequences of Christoffel words with decreasing slopes are involved as in a WN-convex path, the application of the split operator may not preserve the decreasing of the slopes and cause the loss of the global convexity of the path.
As an example, Fig. 6 shows two cases of this action on w 2 : the added cells and the factors u 2 and v 2 are highlighted.
Proof By Corollary 1, it only remains to prove that ρ(v) ≥ 1. By the geometrical definition of Christoffel word, ρ(w) > 1 implies that w = w 11. Since v is a Christoffel word, if its length is greater than two, then it ends with the factor 11 as well and its slope is greater than one. On the other hand, if it has length equal to two, then v = 01 and its slope is one.
A symmetric reasoning holds if ρ(w) < 1. We stress that, if ρ(w) = 1, i.e., w = 01, then the word w k with k ≥ 1, can be split into two different Christoffel words u and v by changing any of the factors 01 into 10, and it holds that ρ(u) > 1 and ρ(v) < 1, by changing any of the factors 01 into 10.
The previous property allows us to consider, without loss of generality, the action of the split operator only on those words whose slopes range from one down to zero.
In the next section, we investigate different situations which may occur to a WNpath as a consequence of one or more applications of the split operator. We also show solutions and drawbacks when problems are caused. The following cases are classified according to the number of points added at each step.

Classification of the splitting action
The split operator produces perturbations on the path, which can be classified in three different types according to the slopes of the obtained factors: Type 1: the added point performed by the split operator preserves both the Lyndon factorization and the global convexity (see Fig. 6a). This means that the two new factors u i and v i globally preserve the decreasing slope of the line segments of the path. Type 2: the added point preserves the convexity of the obtained path, but the Lyndon factorization is not preserved. In practice, w i−1 u i v i w i+1 , with w i+1 possibly void, is not a Lyndon factorization, i.e. the slopes of the line segments of the path are not decreasing. As an example, we can obtain a new Lyndon factorization by joining w i−1 and u i in a new Christoffel word (w i−1 u i )v i w i+1 , as shown in Fig. 6b. Type 3: the added point does not preserve both the convexity of the path, and the Lyndon factorization. In practice, w i−1 u i v i w i+1 , with w i+1 possibly void, is not a Lyndon factorization and the new Lyndon factorization is not composed by Christoffel words only, as we can see in Example 2. In this case it is necessary to act on the path by adding at least a second point to get back the convexity, as shown in the example below.

Adding one point
As simplest case, we consider the splitting of a single word w i in the Lyndon factorization of the WN-convex path.
Example 2 Let w 1 and w 2 be two Christoffel words, with ρ(w 1 ) = 3 5 > ρ(w 2 ) = 11 20 as in Fig. 7. The application of the split operator to w 1 produces split(w 1 ) = u 1 v 1 , with ρ(u 1 ) = 2 3 and ρ(v 1 ) = 1 2 , so the sequence of slopes ρ(u 1 ), ρ(v 1 ) and ρ(w 2 ) is not decreasing. Furthermore, the Lyndon factorization after the split is u 1 (v 1 w 2 ), with (v 1 w 2 ) that is not a Christoffel word, so the corresponding path is not WN-convex any more. We can fix the problem by replacing a subword 01 with a subword 10 in (v 1 w 2 ), obtaining the word w 3 indicated below (changed elements are in boldface). The change of 01 into 10 corresponds to the insertion of a second point in the initial WN-path, as shown in Fig. 7: (v 1 w 2 ) = 001 0010010010010 01 0100100100100101 w 3 = 001 0010010010010 10 0100100100100101. Now, the WN-convexity is acquired again and v 1 w 2 changes into the Christoffel word w 3 (right path of Fig. 7).

Adding two points
Now, we push further our research by considering the case of the addition of two points in consecutive line segments of a WN-convex path: the results we are going to present can be generalized to the addition of a generic number of points.
A fortiori when adding two points in a path, one can expect to lose the WNconvexity, so in Dulio et al. (2017a), sufficient conditions to its preservation are provided: Fig. 7 The split of the Christoffel word w 1 into u 1 and v 1 . The concatenation of v 1 and w 2 forces the addition of a second point Theorem 4 Let w 1 and w 2 be two consecutive Christoffel words of a WN-convex path, and let split(w 1 ) = u 1 v 1 and split(w 2 ) = u 2 v 2 . If ρ(v 1 ) > ρ(w 2 ) and ρ(w 1 ) > ρ(u 2 ) (i.e. the split operator causes two perturbations of Type 1 to w 1 and w 2 , separately), then ρ(v 1 ) > ρ(u 2 ).
On the other hand, if the splitting of w 1 and w 2 causes ρ(v 1 ) < ρ(u 2 ) different situations occur; in particular it may happen that one or more new points need to be added to gain back the WN-convexity.
As in the previous section, the concatenation of v 1 and u 2 does not produce a Christoffel word. Then, to get back the convexity, a third point has to be added to the path, precisely by changing the boldface occurrence of 01 in v 1 into 10, and obtaining the word: w 3 = 0010100101010010101001010 10 0101001010100101010010101.
In general, the point or the points to be added can be detected by checking where (v 1 u 2 ) differs from the Christoffel word of slope w 3 = |(v 1 u 2 )| 0 |(v 1 u 2 )| 1 . We underline that w 3 is not primitive, being the concatenation of two Christoffel words of slope 11 15 . With such an addition the slopes are in decreasing order as required by the WN-convexity.
Finally, a second case occurs when splitting the two Christoffel words w 1 and w 2 produces factors u 1 , v 1 , u 2 , v 2 and the concatenation of v 1 and u 2 gives a Christoffel word w 3 , yet the convexity is not preserved (which means that the order of the slopes is not correct). To solve this problem, again we need to add other points, as we can see in Example 4. Example 4 Let w 1 , w 2 be two Christoffel words in the WN-path boundary of a polyomino P and such that ρ(w 1 ) = 3 5 > ρ(w 2 ) = 57 100 (the words w 1 and w 2 are not reported for simplicity). By applying the split operator to both words, we get split(w 1 ) = u 1 v 1 and split(w 2 ) = u 2 v 2 , with v 1 = 001 and u 2 = 00100100101. Now, the slopes of these four paths are: ρ(u 1 ) = 2 3 , ρ(v 1 ) = 1 2 , ρ(u 2 ) = 4 7 , and ρ(v 2 ) = 53 93 . We observe that the slopes are not in a decreasing order, since ρ(v 1 ) < ρ(u 2 ). By concatenating v 1 and u 2 we get w 3 = 00100100100101 that is a Christoffel word of slope 5 9 . Unfortunately ρ(u 1 ) > ρ(w 3 ) < ρ(v 2 ), which means that the order of the slopes is still not correct and the convexity is not respected. Hence, some more points have to be added to obtain back the convexity. In this case only one more point is needed, placed exactly where the two Christoffel words w 3 and v 2 join.

A remarkable class of WN-paths
In Dulio et al. (2017a) a stability result for WN-convex paths has been given, under a sequence of split operations. However, no class of WN-convex paths to which such a sequence of operations can be effectively applied has been presented. Indeed, all the assumptions of Theorem 4 must be fulfilled at each step, so the problem of real application of the method is not trivial. In what follows we define a family WN of WN-convex paths with such a property.
Let us consider the set P E R, introduced in de Luca and Mignosi (1994), of all words w having two periods p and q which are coprimes and such that |w| = p + q − 2, i.e. those words having maximal length and not satisfying the Fine and Wilf theorem in Fine and Wilf (1965). Also, we denote by C P the set of all Christoffel words, and by P AL the set of all palindromes. The following properties hold (see Berstel and de Luca 1997;de Luca 1997) (a) P E R = 0 * ∪ 1 * ∪ (P AL ∩ (P AL 01 P AL)) (de Luca 1997, Proposition 7). (b) C P = 0 P E R 1 ∪ {0, 1} (Berstel and de Luca 1997, Theorem 4.1).
Proof For i, j < 2 all results are trivial, so, let us assume i, j ≥ 2.
1. The word w i, j can be written as Then P, Q ∈ P AL, and r i, j = P 01 Q. Therefore, r i, j ∈ P AL ∩ (P AL 01 P AL), and consequently, by de Luca (1997, Proposition 7), r i, j ∈ P E R. Therefore w i, j ∈ 0 P E R 1, and consequently, by Berstel and de Luca (1997, Theorem 4.1), w i, j ∈ C P. 2. The prefix of length i + 1 of each conjugate word of w i, j has the form (0) , then w i, j is the smallest among all its conjugate words with respect to the lexicographic order. Therefore w i, j is a Lyndon word. Consequently, the factorization w j (n) = w 1, j w 2, j . . . w n, j is precisely the Lyndon factorization of w j (n). By 1., w i, j ∈ C P for all i, and consequently, by Brlek et al. (2009, Proposition 7), w j (n) is WN-convex. 3. By definition of the Christoffel word w i, j , its slope is Let Q i j = (α, β) be the minimal point of w i, j . Then Q i j has the maximal vertical distance from the line segment from (0, 0) to (i j + 1, j). By Dulio et al. (2017a, Lemma 1) it is obtained when α j − β(i j + 1) = −1[mod( j + i j + 1)], and consequently when α = i + 1 and β = 0. Therefore independently of j we have 4. By 2. the word w s, j represents a WN-path for each s ∈ {1, . . . , n}. Consider two consecutive words w s, j and w s+1, j of the Lyndon factorization of w j (n). By 3. we have split(w s, j ) = u s, j v s, j , where u s, j = (0) s 1 and v s, j = 0 ((0) s 1) j−1 . Analogously, it results split(w s+1, j ) = u s+1, j v s+1, j , where u s+1, j = (0) s+1 1 and v s+1, j = 0 (0) s+1 1 j−1 . Therefore we have Therefore we have ρ(v s, j ) > ρ(w s+1, j ) if and only if j 2 − j − 1 > 0, which is always satisfied for j > 1. Also we have ρ(w s, j ) > ρ(u s+1, j ) if and only if j > 1. Consequently, all the assumptions of Dulio et al. (2017a, Theorem 3) are fulfilled, so that split s (w j (n)) = w 1, j w 2, j . . . split(w s, j ) . . . w n, j represents a WN-path. 5. This immediately follows from Dulio et al. (2017a, Corollary 2).
Example 5 Below we list some words of WN , for small values of i and j: For i = j = 1 we have w i, j = 0r i, j 1, where r i, j is trivial, and the palindromic words P, Q determined in the proof (part (1)) cannot be defined. The first non trivial word of WN is obtained when i = j = 2, and, in this case we have r 2,2 = 00100, so that r i, j = P 01 Q, where P = 0 and Q = 00. Assuming n = i = 2, we also have w 2 (2) = w 1,2 w 2,2 = (00101)(000010001) = 00101000010001, and consequently split 1 (w 2 (2)) = 01001000010001 split 1,2 (w 2 (2)) = 01001000100001.

Example 6
The cases when j = 2 represent a kind of extremal WN-path. In fact ρ(v s,2 ) = ρ(u s+1,2 ) for all s ∈ {1, . . . , n} (see the proof of point 4. in Theorem 5), meaning that the application of the split operator to consecutive words of the Lyndon factorization of w i,2 provides (independently of i), pairs of collinear segments. In Fig. 9 it is shown the case when n = i = 3.

Example 8
In the case of the word r i, j associated with a generic w i, j ∈ WN , i, j > 1, as described in the proof of Theorem 5, we have shown that P = (0) i−1 and Q = (0) i 1 j−2 (0) i . Therefore |P| = i − 1 and |Q| = i j + j − i − 2. By de Luca (1997, Section 5), p = |P|+2 and q = |Q|+2 are periods of r i, j such that |r i, j | = p +q −2, which, in our case, precisely equals i j + j − 1.

Conclusions and perspectives
In this paper we have studied the possibility of reconstructing convex polyominoes, i.e. finite connected sets of points, from two orthogonal projections. Yan Gérard, in a recent communication (Gérard 2017), suggested an approach to the problem that resembles the strategy defined in Barcucci et al. (2001) for the super class of hvconvex polyominoes. Interestingly, the mutual dependencies between points in the contour of a convex polyomino are not clearly understood yet, preventing an immediate generalization of the reconstruction. We have studied under which conditions and how the addition of one or more points to the contour of a convex polyomino may affect the neighboring areas, in the intent of handling, step by step, its reconstruction process without falling into non polynomiality. The obtained results show, on one side, that strong geometrical constraints are needed to maintain the convexity when the kernel of a convex polyomino is extended by means of the addition of new point, on the other side that there exist some classes of boundary paths where the addition of points can be performed in an unexpected simple way.
We have provided several examples illustrating local strategies that can be adopted, i.e., strategies involving one point or few close points, as well as some global results on a special class of WN-paths.
Summing up, something more remains to be investigated in order to show that the class of convex polyominoes can be reconstructed in polynomial time, as we would expect, basing on experimental results. In particular, it has prominent relevance the characterization of the positions and the number of the points that are included into a convex polyomino as consequence of a single further addition. A related research line includes the study of the combinatorial properties of those paths that have a mutual independent growth.
Funding Open access funding provided by Politecnico di Milano within the CRUI-CARE Agreement.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.