Tiling-Recognizable 2D Languages (REC)
- Tiling-recognizable 2D languages (REC) are defined by local tiling constraints on two-dimensional arrays, generalizing regular string languages.
- They exhibit key closure properties like union, intersection, and rotations while lacking closure under complementation, which corresponds to NP-complete recognition.
- Variants such as DREC achieve deterministic, line-unambiguous tiling with O(mn)-time recognition, offering refined expressiveness and practical computational benefits.
Tiling-recognizable two-dimensional languages (REC) generalize the concept of regular string languages to two-dimensional arrays or "pictures", forming a foundational class in the algebraic theory of picture languages. These languages are defined through the paradigm of local tiling constraints and are closely related to strictly locally testable (SLT) languages under projection. The class REC exhibits rich structural properties but diverges in critical ways from its one-dimensional analogs, particularly with respect to determinism, unambiguity, and closure under complement.
1. Formal Definitions and Recognition Paradigms
Let be a finite alphabet. A -picture (2D word) of size is a function . The set of all finite -pictures is denoted (Giammarresi, 2010).
A tiling system is a pair where:
- is a finite set of tiles over a "working" alphabet ,
- is an alphabetic projection.
A picture is accepted if there exists such that every subarray of belongs to and for all . The class comprises all languages accepted by some tiling system (Giammarresi, 2010).
The recognition problem for REC is NP-complete, as shown by reduction from 3SAT (C. Lindgren et al. ’98). This intrinsic complexity reflects the non-deterministic nature of REC.
2. Closure Properties, Descriptive Complexity, and Alphabetic Ratio
REC is closed under union, intersection, row- and column-concatenation (and their Kleene closure), rotations, and mirror images. However, REC is not closed under complementation: NP-completeness of the membership problem implies that, if closure under complement held, NP would equal coNP, which is unlikely (Giammarresi, 2010).
From a descriptive complexity viewpoint, any REC language over an -letter alphabet can be recognized by a -tiling system (for some ) with a working alphabet of size $2n$, yielding a minimal alphabetic ratio of 2 for local SLT representations. This lower bound is tight and is established via the construction of 2D comma-free codes, paralleling a two-dimensional analog of the extended Medvedev theorem for strings (Reghizzi} et al., 2022).
| Property | REC | Proof/Origin |
|---|---|---|
| Union/Intersection | Closed | (Giammarresi, 2010) |
| Row/Col concatenation | Closed | (Giammarresi, 2010) |
| Rotation/Mirror image | Closed | (Giammarresi, 2010) |
| Complementation | Not closed | (Giammarresi, 2010) |
| Minimal alphabetic ratio | 2 | (Reghizzi} et al., 2022) |
| Membership problem | NP-complete | (Giammarresi, 2010) |
3. Unambiguous and Line-Unambiguous Tiling Systems
Unambiguous tiling systems restrict the global ambiguity of tilings: for each picture , there is at most one corresponding local pre-image consistent with the tiling constraints and projection. Formally,
The class consists of all languages in REC admitting an unambiguous tiling system. Strict inclusion holds: (Giammarresi, 2010). Moreover, determining whether a given tiling system is unambiguous is undecidable.
Line-unambiguous tiling systems further strengthen unambiguity by requiring that, when constructing the tiling one row, column, or diagonal at a time, each extension step is uniquely determined by previous choices:
- Column-unambiguous (Col-UREC): uniquely determined extensions in the column direction.
- Row-unambiguous (Row-UREC): uniqueness along rows.
- Diagonal-unambiguous (Diag-UREC): uniqueness along NW-SE diagonals.
Diagonal-unambiguous systems characterize the class DREC (deterministic REC), where a "corner-determinism" constraint ensures deterministic extension in two dimensions (Giammarresi, 2010).
4. Internal Hierarchy and Determinism
A strict containment hierarchy holds among these classes:
Col-UREC and Row-UREC are incomparable; their union is termed Snake-DREC, corresponding to systems alternating between deterministic row and column extensions (Lonati–Pradella '09) (Giammarresi, 2010).
All line-unambiguous/deterministic classes are closed under complementation and allow -time recognition algorithms, in contrast to general REC (Giammarresi, 2010).
| Class | Unambiguity Type | Closure under Complement | Membership Decidability | Recognition Complexity |
|---|---|---|---|---|
| DREC | Diagonal | Yes | Decidable | |
| Col/Row-UREC | Column/Row | Yes | Decidable | |
| UREC | Global | No | Undecidable | NP-complete |
| REC | None (Nondet.) | No | NP-complete | NP-complete |
5. Illustrative Examples
Consider , , the identity, and consisting of the four patterns where all symbols are equal in rows or columns. For the all- picture, many local preimages exist, forming a non-unambiguous and non-line-unambiguous system.
In contrast, a tiling system may be unambiguous (globally unique preimage) but not line-unambiguous: local construction along columns (or rows) may branch, yet only a single full tiling completes. Column-unambiguous constraints forbid such branching, enforcing deterministic local extension (Giammarresi, 2010).
6. Connections with SLT Languages and Alphabet Size Minimization
Every REC language is the projection of a strictly locally testable (SLT) picture language of order 2 (i.e., defined by tiles), and reciprocally any such projection defines a REC language (Reghizzi} et al., 2022). REC languages defined by projections of -SLT languages require at least twice the size of the picture alphabet in the worst case for the local alphabet (). The proof employs 2D comma-free codes to encode the necessary frame (border) information for unique reconstruction under local constraints (Reghizzi} et al., 2022). This construction is optimal regarding the alphabetic ratio, and the lower bound is realized already for the solid-square language.
7. Geometric Examples and Comparison to Other Models
Nontrivial geometric picture languages, such as the language of L-convex polyominoes (binary matrices representing regions where every two cells are connected by a path with at most one turn), are in REC. Such languages can be characterized by explicit local tiling constraints—e.g., forbidding certain adjacency patterns and locally tagging corner cells (Grandjean et al., 2016).
However, not all combinatorially natural languages recognized by two-dimensional cellular automata (CA) fall within REC, and vice versa. For instance, L-convex polyominoes are recognized by both tiling systems and real-time 2D CA, but checkerboard languages in REC may not be recognized by standard time-bounded CA models.
References
- (Giammarresi, 2010) “Tiling-Recognizable Two-Dimensional Languages: From Non-Determinism to Determinism through Unambiguity.”
- (Reghizzi} et al., 2022) “Reducing the local alphabet size in tiling systems by means of 2D comma-free codes.”
- (Grandjean et al., 2016) “L-Convex Polyominoes are Recognizable in Real Time by 2D Cellular Automata.”