OJDMOpen Journal of Discrete Mathematics2161-7635Scientific Research Publishing10.4236/ojdm.2019.94009OJDM-94234ArticlesPhysics&Mathematics Reconstruction of 2-Convex Polyominoes with Non-Empty Corners KhalilTawbe1*SalwaMansour2Department of Mathematics, Lebanese University, Beirut, LebanonDepartment of Mathematics, Lebanese International University, Beirut, Lebanon090820190904831095, May 20196, August 2019 9, August 2019© Copyright 2014 by authors and Scientific Research Publishing Inc. 2014This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/

This paper uses the theoretical material developed in a previous study by the authors in order to reconstruct a subclass of 2-convex polyominoes called where the upper left corner and the lower right corner of the polyomino contain each only one cell. The main idea is to control the shape of these polyominoes by using 32 types of geometries. Some modifications are made in the reconstruction algorithm of Chrobak and D ürr for HV-convex polyominoes in order to impose these geometries.

Polyomino Convex Objects Monotone Path
1. Introduction

The present paper uses the theoretical material developed in a previous study by the authors in order to reconstruct a subclass of 2-convex polyominoes. Indeed, 2-convex polyominoes are the first difficult class of polyominoes in terms of tomographical reconstruction in the hierarchy of k-polyominoes and in this article we design an algorithm of reconstruction for a subclass of L-convex which is the second step in the whole comprehension of the hierarchy of k-polyominoes.

One main problem in discrete tomography consists on the reconstruction of discrete objects according to their horizontal and vertical projection vectors. In order to restrain the number of solutions, we could add convexity constraints to these discrete objects. There are many notions of discrete convexity of polyominoes (namely HV-convex  , Q-convex  , L-convex polyominoes  ) and each one leads to interesting studies. One natural notion of convexity on the discrete plane is the class of HV-convex polyominoes that are polyominoes with consecutive cells in rows and columns. Following the work of Del Lungo, Nivat, Barcucci, and Pinzani  we are able using discrete tomography to reconstruct polyominoes that are HV-convex according to their horizontal and vertical projections. In addition to that, for an HV-convex polyomino P every pairs of cells of P can be reached using a path included in P with only two kinds of unit steps (such a path is called monotone). A polyomino is called k-convex if for every two cells we find a monotone path with at most k changes of direction. Obviously a k-convex polyomino is an HV-convex polyomino. Thus, the set of k-convex polyominoes for k ∈ ℕ forms a hierarchy of HV-convex polyominoes according to the number of changes of direction of monotone paths. This notion of 1-convex polyominoes has been considered by several points of view. In  combinatorial aspects of 1-convex polyominoes are analyzed, giving the enumeration according to the semi-perimeter and the area. In  it is given an algorithm that reconstructs a 1-convex polyomino from the set of its maximal L-polyominoes. Similarly in  it is given another way to reconstruct a L-convex polyomino from the size of some special paths, called bordered L-paths.

In fact 2-convex polymoninoes are more geometrically complex and there was no result for their direct reconstruction. We could notice that Duchi, Rinaldi, and Schaeffer are able to enumerate this class in an interesting and technical article  . But the enumeration technique gives no idea for the tomographical reconstruction.

The first subclass that creates the link with 2-convex polyominoes is the class of HV-centered polyominoes. In  , it is showed that if P is an HV-centered polyomino then P is 2-convex. Note that the tomographical properties of this subclass have been studied in  and its reconstruction algorithm is well known.

The main contribution of this paper is an O ( m 3 n 3 ) -time algorithm for reconstructing a subclass of 2-convex polyominoes using the geometrical properties studied in a previous study, and the algorithm of Chrobak and Dürr  . In particular, we add well-chosen clauses to the original construction of Chrobak and Dürr in order to control the 2L-convexity using 2SAT satisfaction problem.

This paper is divided into 5 sections. After basics on polyominoes, Section 3 shows the different geometrical shapes of a subclass of 2-convex polyominoes  . In Section 4, the algorithm of Chrobak and Dürr for the reconstruction of the HV-convex polyominoes is given  . Section 5 describes the reconstruction of different subclasses of 2-convex polyominoes.

2. Definition and Notation

A planar discrete set is a finite subset of the integer lattice ℤ 2 defined up to translation. A discrete set can be represented either by a set of cells, i.e. unitary squares of the cartesian plane, or by a binary matrix, where the 1’s determine the cells of the set (see Figure 1).

A polyomino P is a finite connected set of adjacent cells, defined up to translations, in the cartesian plane. A row convex polyomino (resp. column-convex) is

a self avoiding convex polyomino such that the intersection of any horizontal line (resp. vertical line) with the polyomino has at most two connected components. Finally, a polyomino is said to be convex (or HV-convex) if it is both row and column-convex (see Figure 2).

To each discrete set S, represented as a m × n binary matrix, two integer vectors H = ( h 1 , ⋯ , h m ) and V = ( v 1 , ⋯ , v n ) are associated such that, for each 1 ≤ i ≤ m ,1 ≤ j ≤ n , h i and v j are the number of cells of S (elements 1 of the matrix) which lie on row i and column j, respectively. The vectors H and V are called the horizontal and vertical projections of S, respectively (see Figure 3). Moreover if S has H and V as horizontal and vertival projections, respectively, then we say that S satisfies (H, V). Using the usual matrix notations, the element ( i , j ) denotes the entry in row i and column j.

For any two cells A and B in a polyomino, a path Π A B , from A to B, is a sequence ( i 1 , j 1 ) , ( i 2 , j 2 ) , ⋯ , ( i r , j r ) of adjacent disjoint cells belonging in P, with A = ( i 1 , j 1 ) , and B = ( i r , j r ) . For each 1 ≤ k ≤ r − 1 , we say that the two consecutive cells ( i k , j k ) , ( i k + 1 , j k + 1 ) form:

• an east step if i k + 1 = i k and j k + 1 = j k + 1 ;

• a north step if i k + 1 = i k − 1 and j k + 1 = j k ;

• a west step if i k + 1 = i k and j k + 1 = j k − 1 ;

• a south step if i k + 1 = i k + 1 and j k + 1 = j k .

Finally, we define a path to be monotone if it is entirely made of only two of the four types of steps defined above (see   ).

Proposition 1 (Castiglione, Restivo). A polyomino P is HV-convex if and only if every pair of cells is connected by a monotone path.

Let us consider a polyomino P. A path in P has a change of direction in the cell ( i k , j k ) , for 2 ≤ k ≤ r − 1 , if

i k ≠ i k − 1 ⇔ j k + 1 ≠ j k .

Definition 1. We call k-convex an HV-convex polyomino such that every pair of its cells can be connected by a monotone path with at most k changes of direction respectively.

In  , it is proposed a hierarchy on convex polyominoes based on the number of changes of direction in the paths connecting any two cells of a polyomino.

For k = 1 , we have the first level of hierarchy, i.e. the class of 1-convex polyominoes, also denoted L-convex polyominoes for the typical shape of each

path having at most one single change of direction. In the present study, we focus our attention on the next level of the hierarchy, i.e. the class of 2-convex polyominoes, whose geometrical properties are more complicated and harder to be investigated than those of 1-convex polyominoes (see Figure 4).

3. 2-Convex Polyominoes

Let ( H , V ) be two projection vectors and let P be an HV-convex polyomino, that satisfies ( H , V ) . By a classical argument P is contained in a rectangle R (called minimal bounding box) where in this box no projection gives a zero. Let [ min ( S ) , max ( S ) ] ( [ min ( E ) , max ( E ) ] ,#Math_41#, [ min ( W ) , max ( W ) ] ) be the intersection of P’s boundary on the lower (right, upper, left) side of R (see  ). By abuse of notation, we call min ( S ) [resp. min ( E ) , min ( N ) , min ( W ) ] the cell at the position ( m , min ( S ) ) [resp. ( min ( E ) , n ) , ( 1, min ( N ) ) , ( min ( W ) ,1 ) ] and max ( S ) [resp. max ( E ) , max ( N ) , max ( W ) ] the cell at the position ( m , max ( S ) ) [resp. ( max ( E ) , n ) , ( 1, max ( N ) ) , ( max ( W ) ,1 ) ] (see Figure 5).

Definition 2. The segment [ min ( S ) , max ( S ) ] is called the S-foot. Similarly, the segments [ min ( E ) , max ( E ) ] , [ min ( N ) , max ( N ) ] and [ min ( W ) , max ( W ) ] are called E-foot, N-foot and W-foot.

For a bounding rectangle R and for a given polyomino P, let us define the following sets:

• W N = { ( i , j ) ∈ P | i < min ( W )     and     j < min ( N ) } ,

• S E = { ( i , j ) ∈ P | i > max ( E )     and     j > max ( S ) } ,

• N E = { ( i , j ) ∈ P | i < min ( E )     and     j > max ( N ) } ,

• W S = { ( i , j ) ∈ P | i > max ( W )     and     j < min ( S ) } .

Let C be the class of HV-convex polyominoes, thus we have the following classes of polyominoes regarding the position of the non-intersecting feet.

• α 1 , 1 = { P ∈ C | max ( N ) < min ( S )     and     max ( W ) < min ( E ) ;                   c a r d ( W N ) = 1     and     c a r d ( S E ) = 1 } ,

• β 1 , 1 = { P ∈ C | max ( S ) < min ( N )     and     max ( E ) < min ( W ) ;                     c a r d ( N E ) = 1     and     c a r d ( W S ) = 1 } ,

• α 2 L 1 , 1 = { P ∈ C | max ( N ) < min ( ( S )     and     max ( W ) < min ( E ) ;                     c a r d ( W N ) = 1     and     c a r d ( S E ) = 1 } , where P is a 2-convex polyomino.

• β 2 L 1 , 1 = { P ∈ C | max ( S ) < min ( N )     and     max ( E ) < min ( W ) ;                       c a r d ( N E ) = 1     and     c a r d ( W S ) = 1 } , where P is a 2-convex polyomino.

Now in order to understand the different geometries of the class α 2 L 1,1 , let us define the following subclasses of the class α 1,1 .

• γ 1 , 1 = { P ∈ C | max ( N ) < min ( S )     and     max ( W ) < min ( E ) ; c a r d ( W N ) = 1 and     c a r d ( S E ) = 1 ; min ( E ) = max ( W ) + 1     and     min ( S ) = max ( N ) + 1 } (see Figure 6).

• δ 1 , 1 = { P ∈ C | max ( S ) < min ( N )     and     max ( E ) < min ( W ) ; c a r d ( N E ) = 1 and     c a r d ( W S ) = 1 ; min ( E ) ≠ max ( W ) + 1     and     min ( S ) = max ( N ) + 1 } . (see Figure 6).

• Δ 1 , 1 = { P ∈ C | max ( N ) < min ( S )     and     max ( W ) < min ( E ) ; c a r d ( W N ) = 1 and     c a r d ( S E ) = 1 ;   min ( E ) = max ( W ) + 1     and     min ( S ) ≠ max ( N ) + 1 } (see Figure 6).

• χ 1 , 1 = { P ∈ C | max ( N ) < min ( S )     and     max ( W ) < min ( E ) ; c a r d ( W N ) = 1 and     c a r d ( S E ) = 1 ; min ( E ) ≠ max ( W ) + 1     and     min ( S ) ≠ max ( N ) + 1 } (see Figure 6).

• γ 2 L 1 , 1 = { P ∈ C | max ( N ) < min ( S )     and     max ( W ) < min ( E ) ; c a r d ( W N ) = 1 and     c a r d ( S E ) = 1 ; min ( E ) = max ( W ) + 1     and     min ( S ) = max ( N ) + 1 } , where P is a 2-convex polyomino.

• δ 2 L 1 , 1 = { P ∈ C | max ( S ) < min ( N )     and     max ( E ) < min ( W ) ; c a r d ( N E ) = 1 and     c a r d ( W S ) = 1 ; min ( E ) ≠ max ( W ) + 1     and     min ( S ) = max ( N ) + 1 } , where P is a 2-convex polyomino.

• Δ 2 L 1 , 1 = { P ∈ C | max ( N ) < min ( S )     and     max ( W ) < min ( E ) ; c a r d ( W N ) = 1 and     c a r d ( S E ) = 1 ; min ( E ) = max ( W ) + 1     and     min ( S ) ≠ max ( N ) + 1 } , where P is a 2-convex polyomino.

• χ 2 L 1 , 1 = { P ∈ C | max ( N ) < min ( S )     and     max ( W ) < min ( E ) ; c a r d ( W N ) = 1 and     c a r d ( S E ) = 1 ; min ( E ) ≠ max ( W ) + 1     and     min ( S ) ≠ max ( N ) + 1 } , where P is a 2-convex polyomino.

Theorem 1. Let P be a convex polyomino in the class γ 1,1 , P is 2-convex if and only if there exists an L-path from

1) { min ( N ) to min ( E ) and the corner cell in W N to min (S)

or

2) { min ( W ) to min ( S ) and the corner cell in W N to min (E)

or

3) { max ( N ) to max ( E ) and max ( W ) tothe corner cell in S E

or

4) { max ( W ) to max ( S ) and max ( N ) tothe corner cell in S E

Corollary 1. If P satisfies the conditions of Theorem 2, then P is in the class γ 2 L 1,1 and hence it is in the class α 2 L 1,1 (see Figure 7).

Theorem 2. Let P be a convex polyomino in the class δ 1,1 , P is 2-convex if and only if there exists an L-path from

1) { min ( N ) to min ( E ) and the corner cell in W N to min (S)

or

2) { max ( W ) to max ( S ) and max ( N ) tothe corner cell in S E

or

3) { max ( N ) to max ( E ) and max ( W ) tothe corner cell in S E

or

4) { min ( W ) to min ( S ) and the corner cell in W N to min (E)

or

5) { max ( N ) to max ( E ) and the corner cell in W N to min ( S ) and 2 L -path starting by a south step from min ( N ) to the corner cell in S E

or

6) { min ( W ) to min ( S ) and max ( N ) tothe corner cell in S E and 2 L -path starting by a south step from the corner cell in W N to max (S)

or

7) { min ( W ) to min ( S ) and max ( N ) to max ( E ) and 2 L -path starting by a south step fromthe corner cell in W N to the corner cell in S E

Corollary 2. If P satisfies the conditions of Theorem 3, then P is in the class δ 2 L 1,1 and hence it is in the class α 2 L 1,1 (see Figure 8).

Theorem 3. Let P be a convex polyomino in the class Δ 1,1 , P is 2-convex if and only if there exists an L-path from

1) { min ( W ) to min ( S ) and the corner cell in W N to min (E)

or

2) { max ( N ) to max ( E ) and max ( W ) tothe corner cell in S E

or

3) { max ( W ) to max ( S ) and max ( N ) tothe corner cell in S E

or

4) { min ( N ) to min ( E ) and the corner cell in W N to min (S)

or

5) { max ( W ) to max ( S ) and the corner cell in W N to min ( E ) and 2 L -path starting by an east step from min ( W ) to the corner cell in S E

or

6) { min ( N ) to min ( E ) and max ( W ) tothe corner cell in S E and 2 L -path starting by an east step from the corner cell in W N to max (E)

or

7) { min ( N ) to min ( E ) and max ( W ) to max ( S ) and 2 L -path starting by an east step fromthe corner cell in W N to the corner cell in S E

Corollary 3. If P satisfies the conditions of Theorem 4, then P is in the class Δ 2 L 1,1 and hence it is in the class α 2 L 1,1 (see Figure 9).

Theorem 4. Let P be a convex polyomino in the class χ 1,1 , P is 2-convex if and only if there exists an L-path from

1) { max ( N ) to max ( E ) and max ( W ) tothe corner cell in S E

or

2) { min ( N ) to min ( E ) and min ( W ) tothe corner cell in S E and 2 L -path starting by an east step from the corner cell in W N to max (E)

or

3) { min ( N ) to min ( E ) and the corner cell in W N to min (S)

or

4) { max ( N ) to max ( E ) and the corner cell in W N to min ( S ) and 2 L -path starting by a south step from mi ( ( N ) to the corner cell in S E

or

5) { max ( W ) to max ( S ) and max ( N ) tothe corner cell in S E

or

6) { min ( W ) to min ( S ) and max ( N ) tothe corner cell in S E and 2 L -path starting by a south step from the corner cell in W N to max (S)

or

7) { min ( W ) to min ( S ) and the corner cell in W N to min (E)

or

8) { max ( W ) to max ( S ) and the corner cell in W N to min ( E ) and 2 L -path starting by an east step from min ( W ) to the corner cell in S E

or

9) { max ( W ) to max ( S ) and min ( N ) to min ( E ) and 2 L -path starting by an east step from the corner cell in W N tothe corner cell in S E

or

10) { max ( W ) to max ( S ) and max ( N ) to max ( E ) and 2 L -path starting by an east step fromthe corner cell in W N to the corner cell in S E and 2 L -path starting by a south step from min ( N ) to the corner cell in S E

or

11) { min ( W ) to min ( S ) a n d min ( N ) to min ( E ) and 2 L -path starting by an east step fromto the corner cell in W N tothe corner cell in S E and 2 L -path starting by a south step from the corner cell in W N to max (S)

or

12) { max ( N ) to max ( E ) and min ( W ) to min ( S ) and 2 L -path starting by a south step from the corner cell in W N tothe corner cell in S E

or

13) { max ( W ) to max ( S ) and max ( N ) to max ( E ) and 2 L -path starting by a south step from the corner cell in W N tothe corner cell in S E and 2 L -path starting by an east step from min ( W ) to the corner cell in S E

or

14) { min ( W ) to min ( S ) and min ( N ) to min ( E ) and 2 L -path starting by a south step from the corner cell in W N tothe corner cell in S E and 2 L -path starting by an east step from the corner cell in W N to max (E)

Corollary 4. If P satisfies the conditions of Theorem 5, then P is in the class χ 2 L 1,1 and hence it is in the class α 2 L 1,1 (see Figure 10 and Figure 11).

4. HV-Convex Polyominoes

Assume that H, V denote strictly positive row and column sum vectors. We also assume that ∑ i h i = ∑ j v j , since otherwise ( H , V ) do not have a realization.

The idea of Chrobak and Dürr  for reconstructing an HV-convex polyomino is to impose convexity on the four corner regions outside of the polyomino.

An object A is called an upper-left corner region if ( i + 1, j ) ∈ A or ( i , j + 1 ) ∈ A implies ( i , j ) ∈ A . In an analogous way other corner regions can be defined. Let P ¯ be the complement of P. The definition of HV-convex polyominoes directly implies the following lemma.

Lemma 1. P is an HV-convex polyomino if and only if P ¯ = A ∪ B ∪ C ∪ D , where A , B , C , D are disjoint corner regions (upper-left, upper-right, lower-left and lower-right, respectively) such that 1) ( i − 1, j − 1 ) ∈ A implies ( i , j ) not in D, and 2) ( i − 1, j + 1 ) ∈ B implies ( i , j ) ∉ C .

Given an HV-convex polyomino P and two row indices 1 ≤ k , l ≤ m . P is anchored at ( k , l ) if ( k ,1 ) , ( l , n ) ∈ P . The idea of Chrobak and Dürr is, given ( H , V ) , to reconstruct a 2SAT expression (a boolean expression in conjunctive normal form with at most two literals in each clause) F k , l ( H , V ) with the property that F k , l ( H , V ) is satisfiable iff there is an HV-convex polyomino realization P of ( H , V ) that is anchored at ( k , l ) . F k , l ( H , V ) consists of several sets of clauses, each set expressing a certain property: “Corners” (Cor), “Disjointness” (Dis), “Connectivity” (Con), “Anchors” (Anc), “Lower bound on column sums” (LBC) and “Upper bound on row sums” (UBR).

C o r = ∧ i , j { A i , j ⇒ A i − 1, j B i , j ⇒ B i − 1, j C i , j ⇒ C i + 1, j D i , j ⇒ D i + 1, j A i , j ⇒ A i , j − 1 B i , j ⇒ B i , j + 1 C i , j ⇒ C i , j − 1 D i , j ⇒ D i , j + 1 }

The set of clauses C o r means that the corners are convex, that is for the corner A if the cell ( i , j ) belongs to A then cells ( i − 1, j ) and ( i , j − 1 ) belong also to A. Similarly for corners B, C, and D.

D i s = ∧ i , j { X i , j ⇒ Y ¯ i , j : forsymbols X , Y ∈ { A , B , C , D } , X ≠ Y }

The set of clauses D i s means that all four corners are pairwise disjoint, that is X ∩ Y = ∅ for X , Y ∈ { A , B , C , D } .

C o n = ∧ i , j { A i , j ⇒ D ¯ i + 1, j + 1 B i , j ⇒ C ¯ i + 1, j − 1 }

The set of clauses C o n means that if the cell ( i , j ) belongs to A then the cell ( i + 1, j + 1 ) does not belong to D, and similarly if the cell ( i , j ) belongs to B then the cell ( i + 1, j − 1 ) does not belong to C.

A n c = { A ¯ k ,1 ∧ B ¯ k ,1 ∧ C ¯ k ,1 ∧ D ¯ k ,1 ∧ A ¯ l , n ∧ B ¯ l , n ∧ C ¯ l , n ∧ D ¯ l , n }

The set of clauses A n c means that we fix two cells on the west and east feet of the polyomino P, for k , l = 1 , ⋯ , m the first one at the position ( k ,1 ) and the second one at the position ( l , n ) .

L B C = ∧ i , j { A i , j ⇒ C ¯ i + v j , j A i , j ⇒ D ¯ i + v j , j B i , j ⇒ C ¯ i + v j , j B i , j ⇒ D ¯ i + v j , j } ∧ ∧ j { C ¯ v j , j D ¯ v j , j }

The set of clauses LBC implies that for each column j, we have that ∑ i P i , j ≥ v j .

U B R = ∧ j { ∧ i ≤ min { k , l } A ¯ i , j ⇒ B i , j + h i ∧ k ≤ i ≤ l C ¯ i , j ⇒ B i , j + h i ∧ l ≤ i ≤ k A ¯ i , j ⇒ D i , j + h i ∧ max { k , l } ≤ i C ¯ i , j ⇒ D i , j + h i }

The set of clauses UBR implies that for each row i, we have that ∑ j P i , j ≤ h i .

Define F k , l ( H , V ) = C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R . All literals with indices outside the set { 1, ⋯ , m } × { 1, ⋯ , n } are assumed to have value 1.

The following theorem allows to link the existence of HV-convex solution and the evaluation of F k , l ( H , V ) . The crucial part of this algorithm comes from the constraints on the two sets of clauses LBC and UBR.

Theorem 5 (Chrobak, Durr). F k , l ( H , V ) is satisfiable if and only if ( H , V ) have a realization P that is an HV-convex polyomino anchored at ( k , l ) .

Each formula F k , l ( H , V ) has size O ( m n ) and can be computed in time O ( m n ) . Since 2SAT can be solved in linear time see   , Chrobak and Dürr give the following result.

Theorem 6 (Chrobak, Durr). Algorithm 1 solves the reconstruction problem for HV-convex polyominoes in time O ( m n min ( m 2 , n 2 ) ) .

5. Reconstruction of 2-Convex Polyominoes in α 2 L 1 , 1

The present section uses the theoretical material of the previous sections in order to reconstruct 2-convex polyominoes in the class α 2 L 1,1 . Some modifications are made to the reconstruction algorithm of Chrobak and Dürr for HV-convex polyominoes in order to impose our geometries.

Finally, by defining an horizontal symmetry S H , we show how to reconstruct P in the class β 2 L 1,1 .

5.1. Clauses for the Class γ 2 L 1 , 1

We code by a 2SAT formula the four geometries that characterize all 2-convex polyominoes in the class γ 2 L 1,1 in order to reconstruct them.

P o s = { C ( max ( W ) + 1,1 ) ∧ C ( m , max ( N ) ) ∧ A 1,1 ∧ D m , n }

C o r = ∧ i , j { A i , j ⇒ A i − 1, j B i , j ⇒ B i − 1, j C i , j ⇒ C i + 1, j D i , j ⇒ D i + 1, j A i , j ⇒ A i , j − 1 B i , j ⇒ B i , j + 1 C i , j ⇒ C i , j − 1 D i , j ⇒ D i , j + 1 }

D i s = ∧ i , j { X i , j ⇒ Y ¯ i , j : forsymbols X , Y ∈ { A , B , C , D } , X ≠ Y }

C o n = ∧ i , j { A i , j ⇒ D ¯ i + 1, j + 1 B i , j ⇒ C ¯ i + 1, j − 1 }

A n c = { A ¯ min ( W ) , 1 ∧ A ¯ max ( W ) + 1 , n ∧ B ¯ min ( W ) , 1 ∧ B ¯ max ( W ) + 1 , n ∧ C ¯ min ( W ) , 1 ∧ C ¯ max ( W ) + 1 , n ∧ D ¯ min ( W ) , 1 ∧ D ¯ max ( W ) + 1 , n ∧ A ¯ 1 , min ( N ) ∧ A ¯ m , max ( N ) + 1 ∧ B ¯ 1 , min ( N ) ∧ B ¯ m , max ( N ) + 1 ∧ C ¯ 1 , min ( N ) ∧ C ¯ m , max ( N ) + 1 ∧ D ¯ 1 , min ( N ) ∧ D ¯ m , max ( N ) + 1 ∧ A ¯ max ( W ) , 1 ∧ A ¯ max ( E ) , n ∧ B ¯ max ( W ) , 1 ∧ B ¯ max ( E ) , n ∧ C ¯ max ( W ) , 1 ∧ C ¯ max ( E ) , n ∧ D ¯ max ( W ) , 1 ∧ D ¯ max ( E ) , n ∧ A ¯ 1 , max ( N ) ∧ A ¯ m , max ( S ) ∧ B ¯ 1 , max ( N ) ∧ B ¯ m , max ( S ) ∧ C ¯ 1 , max ( N ) ∧ C ¯ m , max ( S ) ∧ D ¯ 1 , max ( N ) ∧ D ¯ m , max ( S ) }

L B C = ∧ i { ∧ j < min ( N ) A i , j ⇒ C ¯ i + v j , j ∧ max ( N ) + 1 ≤ j ≤ max ( S ) B i , j ⇒ C ¯ i + v j , j ∧ min ( N ) ≤ j ≤ max ( N ) C i + v j , j ⇒ A ¯ i , j ∧ j > max ( S ) B i , j ⇒ D ¯ i + v j , j ∧ max ( N ) < j < max ( N ) + 1 B i , j ⇒ C ¯ i + v j , j }                     ∧ ∧ j { C ¯ v j , j D ¯ v j , j }

U B R = ∧ j { ∧ i < max ( W ) + 1 A ¯ i , j ⇒ B i , j + h i ∧ min ( W ) ≤ i ≤ max ( W ) A ¯ i , j ⇒ D i , j + h i ∧ max ( W ) + 1 ≤ i ≤ max ( E ) B ¯ i , j + h i ⇒ A i , j ∧ i > max ( W ) C ¯ i , j ⇒ D i , j + h i ∧ max ( E ) < i < min ( W ) A ¯ i , j ⇒ D i , j + h i }

R E C = { A ¯ min ( W ) − 1, min ( N ) − 1 ∧ D ¯ max ( E ) + 1, max ( S ) + 1 }

R E C 1 = { A min ( W ) − 1, min ( N ) − 2 ∧ A min ( W ) − 2, min ( N ) − 1 ∧ D max ( E ) + 1, max ( S ) + 2 ∧ D max ( E ) + 2, max ( S ) + 1 }

G E O 1 = { A ¯ min ( N ) , max ( W ) + 1 ∧ B ¯ min ( N ) , max ( W ) + 1 ∧ C ¯ min ( N ) , max ( W ) + 1 ∧ D ¯ min ( N ) , max ( W ) + 1 ∧ A ¯ min ( W ) − 1 , max ( N ) + 1 ∧ B ¯ min ( W ) − 1 , max ( N ) + 1 ∧ C ¯ min ( W ) − 1 , max ( N ) + 1 ∧ D ¯ min ( W ) − 1 , max ( N ) + 1 }

G E O 2 = { A ¯ min ( W ) , max ( N ) + 1 ∧ B ¯ min ( W ) , max ( N ) + 1 ∧ C ¯ min ( W ) , max ( N ) + 1 ∧ D ¯ min ( W ) , max ( N ) + 1 ∧ A ¯ min ( W ) − 1 , max ( W ) + 1 ∧ B ¯ min ( W ) − 1 , max ( W ) + 1 ∧ C ¯ min ( W ) − 1 , max ( W ) + 1 ∧ D ¯ min ( W ) − 1 , max ( W ) + 1 }

G E O 3 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ max ( W ) , max ( S ) + 1 ∧ B ¯ max ( W ) , max ( S ) + 1 ∧ C ¯ max ( W ) , max ( S ) + 1 ∧ D ¯ max ( W ) , max ( S ) + 1 }

G E O 4 = { A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) ∧ A ¯ max ( E ) + 1 , max ( N ) ∧ B ¯ max ( E ) + 1 , max ( N ) ∧ C ¯ max ( E ) + 1 , max ( N ) ∧ D ¯ max ( E ) + 1 , max ( N ) }

In order to reconstruct all 2-convex polyominoes in the class γ 2 L 1,1 , we use the set of clauses that impose the 4 geometries.

γ 2 L , G e o 1 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 1.

γ 2 l , G e o 2 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 2.

γ 2 L , G e o 3 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 3.

γ 2 L , G e o 4 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 4.

Proof. The following modifications of the original algorithm of Chrobak and Durr  are made in order to add the geometrical constraints of the class γ 2 L 1,1 .

• The set P o s imposes the constraint of the relative positions of feet in γ 2 L 1, with min ( E ) = max ( W ) + 1 and min ( S ) = max ( N ) + 1 .

• The set R E C implies that thes cells at the positions ( min ( W ) − 1, min ( N ) − 1 ) and ( max ( E ) + 1, max ( S ) + 1 ) are in the interior of the polyomino.

• The set R E C 1 implies that the cells at the prositions ( min ( W ) − 1, min ( N ) − 2 ) , ( min ( W ) − 2, min ( N ) − 1 ) , ( max ( E ) + 1, max ( S ) + 2 ) , and ( max ( E ) + 2, max ( S ) + 1 ) are not in the interior of the polyomino.

• The set G E O 1 implies that we put a cell in the interior of the polyomino at the position ( max ( W ) − 1, max ( N ) + 1 ) (resp. ( min ( N ) , max ( W ) + 1 ) and then by convexity an L-path between max ( W ) − 1 and max ( N ) + 1 (resp. min ( N ) and max ( W ) + 1 ). Thus we have exactly the definition of the first geometry. The set G E O 2 , G E O 3 and G E O 4 give respectively the L-paths of the second geometry, the third geometry and the fourth geometry.

Using the conjunction of the whole set of clauses, if one of the γ 2 L , G e o 1 1,1 ( H , V ) or γ 2 L , G e o 2 1,1 or γ 2 L , G e o 3 1,1 or γ 2 L , G e o 4 1,1 is satisfiable then we are able to reconstruct an HV-convex with the constraints of the subclass γ 2 L 1,1 (see Figure 12). □

5.2. Clauses for the Class δ 2 L 1 , 1

We code by a 2SAT formula the seven geometries that characterize all 2-convex polyominoes in the class δ 2 L 1,1 in order to reconstruct them.

P o s = { C ( min ( E ) ,1 ) ∧ C ( m , max ( N ) ) ∧ A 1,1 ∧ D m , n }

C o r = ∧ i , j { A i , j ⇒ A i − 1, j B i , j ⇒ B i − 1, j C i , j ⇒ C i + 1, j D i , j ⇒ D i + 1, j A i , j ⇒ A i , j − 1 B i , j ⇒ B i , j + 1 C i , j ⇒ C i , j − 1 D i , j ⇒ D i , j + 1 }

D i s = ∧ i , j { X i , j ⇒ Y ¯ i , j : forsymbols X , Y ∈ { A , B , C , D } , X ≠ Y }

C o n = ∧ i , j { A i , j ⇒ D ¯ i + 1, j + 1 B i , j ⇒ C ¯ i + 1, j − 1 }

A n c = { A ¯ min ( W ) ,1 ∧ A ¯ min ( E ) , n ∧ B ¯ min ( W ) ,1 ∧ B ¯ min ( E ) , n ∧ C ¯ min ( W ) ,1 ∧ C ¯ min ( E ) , n ∧ D ¯ min ( W ) ,1 ∧ D ¯ min ( E ) , n ∧ A ¯ 1, min ( N ) ∧ A ¯ m , max ( N ) + 1 ∧ B ¯ 1, min ( N ) ∧ B ¯ m , max ( N ) + 1 ∧ C ¯ 1, min ( N ) ∧ C ¯ m , max ( N ) + 1 ∧ D ¯ 1, min ( N ) ∧ D ¯ m , max ( N ) + 1 ∧ A ¯ max ( W ) ,1 ∧ A ¯ max ( E ) , n ∧ B ¯ max ( W ) ,1 ∧ B ¯ max ( E ) , n ∧ C ¯ max ( W ) ,1 ∧ C ¯ max ( E ) , n ∧ D ¯ max ( W ) ,1 ∧ D ¯ max ( E ) , n ∧ A ¯ 1, max ( N ) ∧ A ¯ m , max ( S ) ∧ B ¯ 1, max ( N ) ∧ B ¯ m , max ( S ) ∧ C ¯ 1, max ( N ) ∧ C ¯ m , max ( S ) ∧ D ¯ 1, max ( N ) ∧ D ¯ m , max ( S ) }

L B C = ∧ i { ∧ j < min ( N ) A i , j ⇒ C ¯ i + v j , j ∧ max ( N ) + 1 ≤ j ≤ max ( S ) B i , j ⇒ C ¯ i + v j , j ∧ min ( N ) ≤ j ≤ max ( N ) C i + v j , j ⇒ A ¯ i , j ∧ j > max ( S ) B i , j ⇒ D ¯ i + v j , j ∧ max ( N ) < j < max ( N ) + 1 B i , j ⇒ C ¯ i + v j , j }                       ∧ ∧ j { C ¯ v j , j D ¯ v j , j }

U B R = ∧ j { ∧ i < min ( E ) A ¯ i , j ⇒ B i , j + h i ∧ min ( W ) ≤ i ≤ max ( W ) A ¯ i , j ⇒ D i , j + h i ∧ min ( E ) ≤ i ≤ max ( E ) B ¯ i , j + h i ⇒ A i , j ∧ i > max ( W ) C ¯ i , j ⇒ D i , j + h i ∧ max ( E ) < i < min ( W ) A ¯ i , j ⇒ D i , j + h i }

R E C = { A ¯ min ( W ) − 1, min ( N ) − 1 ∧ D ¯ max ( E ) + 1, max ( S ) + 1 }

R E C 1 = { A min ( W ) − 1, min ( N ) − 2 ∧ A min ( W ) − 2, min ( N ) − 1 ∧ D max ( E ) + 1, max ( S ) + 2 ∧ D max ( E ) + 2, max ( S ) + 1 }

G E O 1 = { A ¯ min ( E ) , min ( N ) ∧ B ¯ min ( E ) , min ( N ) ∧ C ¯ min ( E ) , min ( N ) ∧ D ¯ min ( E ) , min ( N ) ∧ A ¯ min ( W ) − 1, max ( N ) + 1 ∧ B ¯ min ( W ) − 1, max ( N ) + 1 ∧ C ¯ min ( W ) − 1, max ( N ) + 1 ∧ D ¯ min ( W ) − 1, max ( N ) + 1 }

G E O 2 = { A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) ∧ A ¯ max ( E ) + 1, max ( N ) ∧ B ¯ max ( E ) + 1, max ( N ) ∧ C ¯ max ( E ) + 1, max ( N ) ∧ D ¯ max ( E ) + 1, max ( N ) }

G E O 3 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ max ( W ) , max ( S ) + 1 ∧ B ¯ max ( W ) , max ( S ) + 1 ∧ C ¯ max ( W ) , max ( S ) + 1 ∧ D ¯ max ( W ) , max ( S ) + 1 }

G E O 4 = { A ¯ min ( W ) , max ( N ) + 1 ∧ B ¯ min ( W ) , max ( N ) + 1 ∧ C ¯ min ( W ) , max ( N ) + 1 ∧ D ¯ min ( W ) , max ( N ) + 1 ∧ A ¯ min ( E ) , min ( N ) − 1 ∧ B ¯ min ( E ) , min ( N ) − 1 ∧ C ¯ min ( E ) , min ( N ) − 1 ∧ D ¯ min ( E ) , min ( N ) − 1 }

L G E O 5 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ min ( W ) − 1, max ( N ) + 1 ∧ B ¯ min ( W ) − 1, max ( N ) + 1 ∧ C ¯ min ( W ) − 1, max ( N ) + 1 ∧ D ¯ min ( W ) − 1, max ( N ) + 1 }

2 L G E O 5 = { C i , min ( N ) ⇒ B ¯ i − 1, max ( S ) + 1 ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) ∧ X ¯ min ( E ) − 1, max ( S ) + 1 , ∀ X ∈ { A , B , C , D } }

L G E O 6 = { A ¯ max ( E ) + 1, max ( N ) ∧ B ¯ max ( E ) + 1, max ( N ) ∧ C ¯ max ( E ) + 1, max ( N ) ∧ D ¯ max ( E ) + 1, max ( N ) ∧ A ¯ min ( W ) , max ( N ) + 1 ∧ B ¯ min ( W ) , max ( N ) + 1 ∧ C ¯ min ( W ) , max ( N ) + 1 ∧ D ¯ min ( W ) , max ( N ) + 1 }

2 L G E O 6 = { C i , min ( N ) − 1 ⇒ B ¯ i − 1, max ( S ) ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) − 1 ∧ X ¯ min ( E ) − 1, max ( S ) , ∀ X ∈ { A , B , C , D } }

L G E O 7 = { A ¯ min ( W ) , max ( N ) + 1 ∧ B ¯ min ( W ) , max ( N ) + 1 ∧ C ¯ min ( W ) , max ( N ) + 1 ∧ D ¯ min ( W ) , max ( N ) + 1 ∧ A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) }

2 L G E O 7 = { C i , min ( N ) − 1 ⇒ B ¯ i − 1, max ( S ) + 1 ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) − 1 ∧ X ¯ min ( E ) − 1, max ( S ) + 1 , ∀ X ∈ { A , B , C , D } }

In order to reconstruct all 2-convex polyominoes in the class δ 2 L 1,1 , we use the set of clauses that impose the 7 geometries.

δ 2 L , G e o 1 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 1.

δ 2 L , G e o 2 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 2.

δ 2 L , G e o 3 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 3.

δ 2 L , G e o 4 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                             ∧ R E C ∧ R E C 1 ∧ G E O 4.

δ 2 L , L G e o 5,2 L G E O 5 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                                   ∧ R E C ∧ R E C 1 ∧ L G E O 5 ∧ 2 L G E O 5.

δ 2 L , L G e o 6,2 L G E O 6 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                                 ∧ R E C ∧ R E C 1 ∧ L G E O 6 ∧ 2 L G E O 6.

δ 2 L , L G e o 7,2 L G E O 7 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                                 ∧ R E C ∧ R E C 1 ∧ L G E O 7 ∧ 2 L G E O 7.

5.3. Clauses for the Class Δ 2 L 1 , 1

We code by a 2SAT formula the seven geometries that characterize all 2-convex polyominoes in the class Δ 2 L 1,1 in order to reconstruct them.

P o s = { C ( max ( W ) + 1,1 ) ∧ C ( m , max ( N ) ) ∧ A 1,1 ∧ D m , n }

C o r = ∧ i , j { A i , j ⇒ A i − 1, j B i , j ⇒ B i − 1, j C i , j ⇒ C i + 1, j D i , j ⇒ D i + 1, j A i , j ⇒ A i , j − 1 B i , j ⇒ B i , j + 1 C i , j ⇒ C i , j − 1 D i , j ⇒ D i , j + 1 }

D i s = ∧ i , j { X i , j ⇒ Y ¯ i , j : forsymbols X , Y ∈ { A , B , C , D } , X ≠ Y }

C o n = ∧ i , j { A i , j ⇒ D ¯ i + 1, j + 1 B i , j ⇒ C ¯ i + 1, j − 1 }

A n c = { A ¯ min ( W ) ,1 ∧ A ¯ max ( W ) + 1, n ∧ B ¯ min ( W ) ,1 ∧ B ¯ max ( W ) + 1, n ∧ C ¯ min ( W ) ,1 ∧ C ¯ max ( W ) + 1, n ∧ D ¯ min ( W ) ,1 ∧ D ¯ max ( W ) + 1, n ∧ A ¯ 1, min ( N ) ∧ A ¯ m , min ( S ) ∧ B ¯ 1, min ( N ) ∧ B ¯ m , min ( S ) ∧ C ¯ 1, min ( N ) ∧ C ¯ m , min ( S ) ∧ D ¯ 1, min ( N ) ∧ D ¯ m , min ( S ) ∧ A ¯ max ( W ) ,1 ∧ A ¯ max ( E ) , n ∧ B ¯ max ( W ) ,1 ∧ B ¯ max ( E ) , n ∧ C ¯ max ( W ) ,1 ∧ C ¯ max ( E ) , n ∧ D ¯ max ( W ) ,1 ∧ D ¯ max ( E ) , n ∧ A ¯ 1, max ( N ) ∧ A ¯ m , max ( S ) ∧ B ¯ 1, max ( N ) ∧ B ¯ m , max ( S ) ∧ C ¯ 1, max ( N ) ∧ C ¯ m , max ( S ) ∧ D ¯ 1, max ( N ) ∧ D ¯ m , max ( S ) }

L B C = ∧ i { ∧ j < min ( N ) A i , j ⇒ C ¯ i + v j , j ∧ min ( S ) ≤ j ≤ max ( S ) B i , j ⇒ C ¯ i + v j , j ∧ min ( N ) ≤ j ≤ max ( N ) C i + v j , j ⇒ A ¯ i , j ∧ j > max ( S ) B i , j ⇒ D ¯ i + v j , j ∧ max ( N ) < j < min ( S ) B i , j ⇒ C ¯ i + v j , j }                       ∧ ∧ j { C ¯ v j , j D ¯ v j , j }

U B R = ∧ j { ∧ i < max ( W ) + 1 A ¯ i , j ⇒ B i , j + h i ∧ min ( W ) ≤ i ≤ max ( W ) A ¯ i , j ⇒ D i , j + h i ∧ max ( W ) + 1 ≤ i ≤ max ( E ) B ¯ i , j + h i ⇒ A i , j ∧ i > max ( W ) C ¯ i , j ⇒ D i , j + h i ∧ max ( E ) < i < min ( W ) A ¯ i , j ⇒ D i , j + h i }

R E C = { A ¯ min ( W ) − 1, min ( N ) − 1 ∧ D ¯ max ( E ) + 1, max ( S ) + 1 }

R E C 1 = { A min ( W ) − 1, min ( N ) − 2 ∧ A min ( W ) − 2, min ( N ) − 1 ∧ D max ( E ) + 1, max ( S ) + 2 ∧ D max ( E ) + 2, max ( S ) + 1 }

G E O 1 = { A ¯ min ( W ) , min ( S ) ∧ B ¯ min ( W ) , min ( S ) ∧ C ¯ min ( W ) , min ( S ) ∧ D ¯ min ( W ) , min ( S ) ∧ A ¯ max ( W ) + 1, min ( N ) − 1 ∧ B ¯ max ( W ) + 1, min ( N ) − 1 ∧ C ¯ max ( W ) + 1, min ( N ) − 1 ∧ D ¯ max ( W ) + 1, min ( N ) − 1 }

G E O 2 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ max ( W ) , max ( S ) + 1 ∧ B ¯ max ( W ) , max ( S ) + 1 ∧ C ¯ max ( W ) , max ( S ) + 1 ∧ D ¯ max ( W ) , max ( S ) + 1 }

G E O 3 = { A ¯ max ( E ) , max ( S ) ∧ B ¯ max ( E ) , max ( S ) ∧ C ¯ max ( E ) , max ( S ) ∧ D ¯ max ( E ) , max ( S ) ∧ A ¯ max ( E ) + 1, max ( N ) ∧ B ¯ max ( E ) + 1, max ( N ) ∧ C ¯ max ( E ) + 1, max ( N ) ∧ D ¯ max ( E ) + 1, max ( N ) }

G E O 4 = { A ¯ max ( W ) + 1, min ( N ) ∧ B ¯ max ( W ) + 1, min ( N ) ∧ C ¯ max ( W ) + 1, min ( N ) ∧ D ¯ max ( W ) + 1, min ( N ) ∧ A ¯ min ( W ) − 1, min ( S ) ∧ B ¯ min ( W ) − 1, min ( S ) ∧ C ¯ min ( W ) − 1, min ( S ) ∧ D ¯ min ( W ) − 1, min ( S ) }

L G E O 5 = { A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) ∧ A ¯ min ( W ) − 1, max ( W ) + 1 ∧ B ¯ min ( W ) − 1, max ( W ) + 1 ∧ C ¯ min ( W ) − 1, max ( W ) + 1 ∧ D ¯ min ( W ) − 1, max ( W ) + 1 }

2 L G E O 5 = { B min ( W ) , j ⇒ C ¯ max ( E ) + 1, j − 1 ∧ j > 1 X ¯ min ( W ) , max ( N ) + 1 ∧ X ¯ max ( E ) + 1, min ( S ) − 1 , ∀ X ∈ { A , B , C , D } }

L G E O 6 = { A ¯ max ( W ) + 1, min ( N ) ∧ B ¯ max ( W ) + 1, min ( N ) ∧ C ¯ max ( W ) + 1, min ( N ) ∧ D ¯ max ( W ) + 1, min ( N ) ∧ A ¯ max ( W ) , max ( S ) + 1 ∧ B ¯ max ( W ) , max ( S ) + 1 ∧ C ¯ max ( W ) , max ( S ) + 1 ∧ D ¯ max ( W ) , max ( S ) + 1 }

2 L G E O 6 = { B min ( W ) − 1, j ⇒ C ¯ max ( E ) , j − 1 ∧ j > 1 X ¯ min ( W ) − 1, max ( N ) + 1 ∧ X ¯ max ( E ) , min ( S ) − 1 , ∀ X ∈ { A , B , C , D } }

L G E O 7 = { A ¯ max ( W ) + 1, min ( N ) ∧ B ¯ max ( W ) + 1, min ( N ) ∧ C ¯ max ( W ) + 1, min ( N ) ∧ D ¯ max ( W ) + 1, min ( N ) ∧ A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) }

2 L G E O 7 = { B min ( W ) − 1, j ⇒ C ¯ max ( E ) + 1, j − 1 ∧ j > 1 X ¯ min ( W ) − 1, max ( N ) + 1 ∧ X ¯ max ( E ) + 1, min ( S ) − 1 , ∀ X ∈ { A , B , C , D } }

In order to reconstruct all 2-convex polyominoes in the class Δ 2 L 1,1 , we use the set of clauses that impose the 7 geometries.

Δ 2 L , G e o 1 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                 ∧ R E C ∧ R E C 1 ∧ G E O 1.

Δ 2 L , G e o 2 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                 ∧ R E C ∧ R E C 1 ∧ G E O 2.

Δ 2 L , G e o 3 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                 ∧ R E C ∧ R E C 1 ∧ G E O 3.

Δ 2 L , G e o 4 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                 ∧ R E C ∧ R E C 1 ∧ G E O 4.

Δ 2 L , L G e o 5,2 L G E O 5 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                                   ∧ R E C ∧ R E C 1 ∧ L G E O 5 ∧ 2 L G E O 5.

Δ 2 L , L G e o 6,2 L G E O 6 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                                 ∧ R E C ∧ R E C 1 ∧ L G E O 6 ∧ 2 L G E O 6.

Δ 2 L , L G e o 7,2 L G E O 7 1,1 ( H , V ) = P o s ∧ C o r ∧ D i s ∧ C o n ∧ A n c ∧ L B C ∧ U B R                                                                 ∧ R E C ∧ R E C 1 ∧ L G E O 7 ∧ 2 L G E O 7.

5.4. Clauses for the Class #Math_352#

We code by a 2SAT formula the fourteen geometries that characterize all 2-convex polyominoes in the class χ 2 L 1,1 in order to reconstruct them.

P o s = { C ( min ( E ) ,1 ) ∧ C ( m , max ( N ) ) ∧ A 1,1 ∧ D m , n }

C o r = ∧ i , j { A i , j ⇒ A i − 1, j B i , j ⇒ B i − 1, j C i , j ⇒ C i + 1, j D i , j ⇒ D i + 1, j A i , j ⇒ A i , j − 1 B i , j ⇒ B i , j + 1 C i , j ⇒ C i , j − 1 D i , j ⇒ D i , j + 1 }

D i s = ∧ i , j { X i , j ⇒ Y ¯ i , j : forsymbols X , Y ∈ { A , B , C , D } , X ≠ Y }

C o n = ∧ i , j { A i , j ⇒ D ¯ i + 1, j + 1 B i , j ⇒ C ¯ i + 1, j − 1 }

A n c = { A ¯ min ( W ) ,1 ∧ A ¯ min ( E ) , n ∧ B ¯ min ( W ) ,1 ∧ B ¯ min ( E ) , n ∧ C ¯ min ( W ) ,1 ∧ C ¯ min ( E ) , n ∧ D ¯ min ( W ) ,1 ∧ D ¯ min ( E ) , n ∧ A ¯ 1, min ( N ) ∧ A ¯ m , min ( S ) ∧ B ¯ 1, min ( N ) ∧ B ¯ m , min ( S ) ∧ C ¯ 1, min ( N ) ∧ C ¯ m , min ( S ) ∧ D ¯ 1, min ( N ) ∧ D ¯ m , min ( S ) ∧ A ¯ max ( W ) ,1 ∧ A ¯ max ( E ) , n ∧ B ¯ max ( W ) ,1 ∧ B ¯ max ( E ) , n ∧ C ¯ max ( W ) ,1 ∧ C ¯ max ( E ) , n ∧ D ¯ max ( W ) ,1 ∧ D ¯ max ( E ) , n ∧ A ¯ 1, max ( N ) ∧ A ¯ m , max ( S ) ∧ B ¯ 1, max ( N ) ∧ B ¯ m , max ( S ) ∧ C ¯ 1, max ( N ) ∧ C ¯ m , max ( S ) ∧ D ¯ 1, max ( N ) ∧ D ¯ m , max ( S ) }

L B C = ∧ i { ∧ j < min ( N ) A i , j ⇒ C ¯ i + v j , j ∧ min ( S ) ≤ j ≤ max ( S ) B i , j ⇒ C ¯ i + v j , j ∧ min ( N ) ≤ j ≤ max ( N ) C i + v j , j ⇒ A ¯ i , j ∧ j > max ( S ) B i , j ⇒ D ¯ i + v j , j ∧ max ( N ) < j < min ( S ) B i , j ⇒ C ¯ i + v j , j }                     ∧ ∧ j { C ¯ v j , j D ¯ v j , j }

U B R = ∧ j { ∧ i < min ( E ) A ¯ i , j ⇒ B i , j + h i ∧ min ( W ) ≤ i ≤ max ( W ) A ¯ i , j ⇒ D i , j + h i ∧ min ( E ) ≤ i ≤ max ( E ) B ¯ i , j + h i ⇒ A i , j ∧ i > max ( W ) C ¯ i , j ⇒ D i , j + h i ∧ max ( E ) < i < min ( W ) A ¯ i , j ⇒ D i , j + h i }

R E C = { A ¯ min ( W ) − 1, min ( N ) − 1 ∧ D ¯ max ( E ) + 1, max ( S ) + 1 }

R E C 1 = { A min ( W ) − 1, min ( N ) − 2 ∧ A min ( W ) − 2, min ( N ) − 1 ∧ D max ( E ) + 1, max ( S ) + 2 ∧ D max ( E ) + 2, max ( S ) + 1 }

G E O 1 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ max ( W ) , max ( S ) + 1 ∧ B ¯ max ( W ) , max ( S ) + 1 ∧ C ¯ max ( W ) , max ( S ) + 1 ∧ D ¯ max ( W ) , max ( S ) + 1 }

L G E O 2 = { A ¯ min ( E ) , min ( N ) ∧ B ¯ min ( E ) , min ( N ) ∧ C ¯ min ( E ) , min ( N ) ∧ D ¯ min ( E ) , min ( N ) ∧ A ¯ min ( W ) , max ( S ) + 1 ∧ B ¯ min ( W ) , max ( S ) + 1 ∧ C ¯ min ( W ) , max ( S ) + 1 ∧ D ¯ min ( W ) , max ( S ) + 1 }

2 L G E O 2 = { B min ( W ) − 1, j ⇒ C ¯ max ( E ) , j − 1 ∧ j > 1 X ¯ min ( W ) − 1, max ( N ) + 1 ∧ X ¯ max ( E ) , max ( N ) + 1 , ∀ X ∈ { A , B , C , D } }

G E O 3 = { A ¯ min ( E ) , min ( N ) ∧ B ¯ min ( E ) , min ( N ) ∧ C ¯ min ( E ) , min ( N ) ∧ D ¯ min ( E ) , min ( N ) ∧ A ¯ min ( W ) − 1 , min ( S ) ∧ B ¯ min ( W ) − 1 , min ( S ) ∧ C ¯ min ( W ) − 1 , min ( S ) ∧ D ¯ min ( W ) − 1 , min ( S ) }

L G E O 4 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ min ( W ) − 1, min ( S ) ∧ B ¯ min ( W ) − 1, min ( S ) ∧ C ¯ min ( W ) − 1, min ( S ) ∧ D ¯ min ( W ) − 1, min ( S ) }

2 L G E O 4 = { C i , min ( N ) ⇒ B ¯ i − 1, max ( S ) + 1 ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) ∧ X ¯ min ( E ) − 1, max ( S ) + 1 , ∀ X ∈ { A , B , C , D } }

G E O 5 = { A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) ∧ A ¯ max ( E ) + 1, max ( N ) ∧ B ¯ max ( E ) + 1, max ( N ) ∧ C ¯ max ( E ) + 1, max ( N ) ∧ D ¯ max ( E ) + 1, max ( N ) }

L G E O 6 = { A ¯ min ( W ) , min ( S ) ∧ B ¯ min ( W ) , min ( S ) ∧ C ¯ min ( W ) , min ( S ) ∧ D ¯ min ( W ) , min ( S ) ∧ A ¯ max ( E ) + 1, max ( N ) ∧ B ¯ max ( E ) + 1, max ( N ) ∧ C ¯ max ( E ) + 1, max ( N ) ∧ D ¯ max ( E ) + 1, max ( N ) }

2 L G E O 6 = { C i , min ( N ) − 1 ⇒ B ¯ i − 1, max ( S ) ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) − 1 ∧ X ¯ min ( E ) − 1, max ( S ) , ∀ X ∈ { A , B , C , D } }

G E O 7 = { A ¯ min ( W ) , min ( S ) ∧ B ¯ min ( W ) , min ( S ) ∧ C ¯ min ( W ) , min ( S ) ∧ D ¯ min ( W ) , min ( S ) ∧ A ¯ min ( W ) − 1, min ( E ) ∧ B ¯ min ( W ) − 1, min ( E ) ∧ C ¯ min ( W ) − 1, min ( E ) ∧ D ¯ min ( W ) − 1, min ( E ) }

L G E O 8 = { A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) ∧ A ¯ min ( W ) − 1, min ( E ) ∧ B ¯ min ( W ) − 1, min ( E ) ∧ C ¯ min ( W ) − 1, min ( E ) ∧ D ¯ min ( W ) − 1, min ( E ) }

2 L G E O 8 = { B min ( W ) , j ⇒ C ¯ max ( E ) + 1, j − 1 ∧ j > 1 X ¯ min ( W ) , min ( N ) + 1 ∧ X ¯ max ( E ) + 1, min ( S ) − 1 , ∀ X ∈ { A , B , C , D } }

L G E O 9 = { A ¯ min ( E ) , min ( N ) ∧ B ¯ min ( E ) , min ( N ) ∧ C ¯ min ( E ) , min ( N ) ∧ D ¯ min ( E ) , min ( N ) ∧ A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) }

2 L G E O 9 = { B min ( W ) − 1, j ⇒ C ¯ max ( E ) + 1, j − 1 ∧ j > 1 X ¯ min ( W ) − 1, max ( N ) + 1 ∧ X ¯ max ( E ) + 1, min ( S ) − 1 , ∀ X ∈ { A , B , C , D } }

L G E O 10 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) }

2 L 1 G E O 10 = { B min ( W ) − 1, j ⇒ C ¯ max ( E ) + 1, j − 1 ∧ j > 1 X ¯ min ( W ) − 1, max ( N ) + 1 ∧ X ¯ max ( E ) + 1, min ( S ) − 1 , ∀ X ∈ { A , B , C , D } }

2 L 2 G E O 10 = { C i , min ( N ) ⇒ B ¯ i − 1, max ( S ) + 1 ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) ∧ X ¯ min ( E ) − 1, max ( S ) + 1 , ∀ X ∈ { A , B , C , D } }

L G E O 11 = { A ¯ min ( W ) , min ( S ) ∧ B ¯ min ( W ) , min ( S ) ∧ C ¯ min ( W ) , min ( S ) ∧ D ¯ min ( W ) , min ( S ) ∧ A ¯ min ( E ) , min ( N ) ∧ B ¯ min ( E ) , min ( N ) ∧ C ¯ min ( E ) , min ( N ) ∧ D ¯ min ( E ) , min ( N ) }

2 L 1 G E O 11 = { B min ( W ) − 1, j ⇒ C ¯ max ( E ) + 1, j − 1 ∧ j > 1 X ¯ min ( W ) − 1, max ( N ) + 1 ∧ X ¯ max ( E ) + 1, min ( S ) − 1 , ∀ X ∈ { A , B , C , D } }

2 L 2 G E O 11 = { C i , min ( N ) − 1 ⇒ B ¯ i − 1, max ( S ) ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) − 1 ∧ X ¯ min ( E ) − 1, max ( S ) , ∀ X ∈ { A , B , C , D } }

L G E O 12 = { A ¯ min ( W ) , min ( S ) ∧ B ¯ min ( W ) , min ( S ) ∧ C ¯ min ( W ) , min ( S ) ∧ D ¯ min ( W ) , min ( S ) ∧ A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) }

2 L G E O 12 = { C i , min ( N ) − 1 ⇒ B ¯ i − 1, max ( S ) + 1 ∧ i > 1 X ¯ max ( W ) + 1, min ( N ) − 1 ∧ X ¯ max ( E ) + 1, max ( S ) + 1 , ∀ X ∈ { A , B , C , D } }

L G E O 13 = { A ¯ max ( E ) , max ( N ) ∧ B ¯ max ( E ) , max ( N ) ∧ C ¯ max ( E ) , max ( N ) ∧ D ¯ max ( E ) , max ( N ) ∧ A ¯ max ( W ) , max ( S ) ∧ B ¯ max ( W ) , max ( S ) ∧ C ¯ max ( W ) , max ( S ) ∧ D ¯ max ( W ) , max ( S ) }

In order to reconstruct all 2-convex polyominoes in the class, we use the set of clauses that impose the 14 geometries.