1 Introduction

In this paper we study the following reconstruction problem for colorings. Given a countable set X (finite or infinite), a coloring on X is a function \(\varphi : [X]^{2}\rightarrow \{0,1\}\), where \([X]^{2}\) is the collection of 2-element subsets of X. Let \({{\,\textrm{hom}\,}}(\varphi )\) be the homogeneous sets for \(\varphi\); that is, the collection of \(H\subseteq X\) such that \(\varphi\) is constant on \([H]^2\). Clearly, \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(1-\varphi )\). We say that \(\varphi\) is reconstructible up to complementation from its homogeneous sets, if for any coloring \(\psi\) on X such that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\) we have that either \(\psi =\varphi\) or \(\psi =1-\varphi\). In the terminology of graphs, we are talking about graphs that can be reconstructed (up to complementation) from the collection of their cliques and independent sets.

This type of reconstruction problem was considered long time ago in [3] for finite graphs but apparently was not pursued any further. A somewhat similar problem was addressed in [4, 5, 9]. They analyzed a variant of the well known graph reconstruction conjecture (see [1]), and studied conditions under which a pair of graphs with the same homogeneous sets are isomorphic up to complementation. In this paper we study conditions under which a pair of graphs with the same homogeneous sets are equal up to complementation.

An example of a reconstructible coloring is given by the random graph. We extract from this example a general method for showing reconstrutibility which is quite useful. Suppose that for every \(F\subseteq X\) with \(|F|=4\) there is \(Y\supseteq F\) such that the restriction of \(\varphi\) to \([Y]^2\) is reconstructible, then \(\varphi\) is reconstructible. In particular, whenever a coloring \(\varphi\) on \({{\,\mathrm{{\mathbb {N}}}\,}}\) has infinitely many initial segments which are reconstructible, then \(\varphi\) itself is reconstructible.

The first example that we found of a non-reconstructible coloring is given by a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into two infinite sets. We associate to this partition a coloring \(\varphi\) where \(\varphi (\{x,y\})=1\) if and only if both x and y belong to the same part of the partition. This example satisfies a very simple criterion for non reconstructibility: If there is a pair \(\{x,y\}\) (an edge) such that \(\varphi (\{x,z\})=1-\varphi (\{y,z\})\) for all \(z\in \!\!\!\!\!/\{x,y\}\), then \(\varphi\) is non-reconstructible. The reciprocal is not true. Such pairs (edges) will be called critical. We show a characterization of colorings that admits a critical pair.

In the example mentioned above of a coloring associated to a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into two parts, the collection of its homogeneous sets has exactly two maximal elements with respect to inclusion. Motivated by that, we present some results relating the structure of the family of maximal homogeneous sets to the reconstruction problem.

In the last section of the paper we study the reconstruction problem from a descriptive set theoretic point of view. For instance, the collection of reconstructible colorings on \({{\,\mathrm{{\mathbb {N}}}\,}}\) is a dense \(G_\delta\) subset of the space of colorings \(\{0,1\}^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\), that is, from the Baire category point of view, almost every coloring is reconstructible. We can regard \({{\,\textrm{hom}\,}}(\varphi )\) as a closed subset of the Cantor space \(\{0,1\}^{{{\,\mathrm{{\mathbb {N}}}\,}}}\) (which will be denoted, as usual, by \(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\)), thus as an element of the hyperspace \(K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\), which is a Polish space endowed with the usual Vietoris topology. We show that there is a Borel way to recover a coloring from its homogeneous sets. More precisely, there is Borel map \(f:K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\rightarrow \{0,1\}^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) such that \(f({{\,\textrm{hom}\,}}(\varphi ))\) is a reconstruction of \(\varphi\), i.e., \({{\,\textrm{hom}\,}}(f({{\,\textrm{hom}\,}}(\varphi ))={{\,\textrm{hom}\,}}(\varphi )\).

To finish this introduction we comment about our original motivation. A collection \({\mathcal {H}}\) of subsets of \({{\,\mathrm{{\mathbb {N}}}\,}}\) is tall, if for every infinite set \(A\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\), there is an infinite set \(B\in {\mathcal {H}}\) such that \(B\subseteq A\). Ramsey’s Theorem says that \({{\,\textrm{hom}\,}}(\varphi )\) is tall for every coloring \(\varphi\) on \({{\,\mathrm{{\mathbb {N}}}\,}}\). Some tall families admit a Borel selector, that is, a Borel map such that given an infinite set A, the map selects an infinite subset of A belonging to the tall family [6]. The collection \({{\,\textrm{hom}\,}}(\varphi )\) is an important example of a tall family admitting a Borel selector [6, 7]. It is an open problem to find a characterization of those tall Borel families that admit a Borel selector. A quite related question is to characterize when a tall Borel family \({\mathcal {H}}\) admits a coloring \(\varphi\) such that \({{\,\textrm{hom}\,}}(\varphi )\subseteq {\mathcal {H}}\). In other words, when is it possible to extract from such tall family \({\mathcal {H}}\) a coloring \(\varphi\) such that \({{\,\textrm{hom}\,}}(\varphi )\subseteq {\mathcal {H}}\)? These considerations lead naturally to a Borel reconstruction problem: Suppose \({\mathcal {H}}={{\,\textrm{hom}\,}}(\varphi )\), can we recover from \({\mathcal {H}}\), in a Borel way, a coloring \(\psi\) such that \({{\,\textrm{hom}\,}}(\psi )={\mathcal {H}}\)? In the last section of the paper we show that the answer is positive.

2 Preliminaries

We will use standard notation from set theory. Throughout the article, X will denote a countable (finite or infinite) set. Given \(k\in {{\,\mathrm{{\mathbb {N}}}\,}}\), we will denote by \([X]^{k}\) the collection of all subsets of X of size k, by \([X]^{<k}\) the subsets of X of size strictly less than k, and by \([X]^{\le k}\) the union \([X]^{k}\cup [X]^{<k}\). The collection of all finite subsets of X will be denoted by \([X]^{<\omega }\). \(X^{<\omega }\) denotes the collection of all finite sequences of elements of X and \(X^{\le n}\) the collection of sequences of length at most n of elements of X.

A coloring on a set X, is any mapping \(\varphi :[X]^2\rightarrow \{0,1\}\). Whenever is clear from the context, we identify 2 with \(\{0,1\}\). For instance, the collection of all colorings \(\{0,1\}^{[X]^2}\) will be denoted by \(2^{[X]^2}\). Given a coloring \(\varphi\) on X and \(Y\subseteq X\), we will denote by \(\varphi |_Y\) the restriction of \(\varphi\) to \([Y]^2\). We say that \(\psi\) extends \(\varphi\), and write \(\varphi \subseteq \psi\), whenever \(\varphi\) is a coloring on Y, \(\psi\) is a coloring on X, \(Y\subseteq X\) and \(\psi |_Y=\varphi\). We write \(\varphi \subset \psi\) when \(\varphi \subseteq \psi\) and \(\varphi \ne \psi\). For X infinite, the family of colorings \(2^{[X]^2}\) will be seen as a topological space with the usual product topology which makes it homeomorphic to \(2^X\).

A partition of X is a collection \((A_i)_{i\in I}\) of non empty subsets of X such that \(I\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\), \(X=\bigcup _{i\in I}A_i\), and \(A_i\cap A_j=\emptyset\) for every \(i\ne j\) in I. Given \(X=\bigcup _{i\in I}A_i\) a partition of X, we let the coloring associated to the partition be the mapping \(\varphi :[X]^2\rightarrow 2\) defined by \(\varphi (\{x,y\})=1\) if and only if \(x,y\in A_i\) for some \(i\in I\). Given a linear ordering \((X,<)\) and \(\{n,m\}\in [X]^2\), we denote by \(\{n,m\}_<\) the fact that \(n<m\). If \(e=\{r_n\}_n\) is an enumeration of \({{\,\mathrm{{\mathbb {Q}}}\,}}\), the Sierpiński coloring \(\varphi _e:[{{\,\mathrm{{\mathbb {N}}}\,}}]^2\rightarrow 2\), associated to e, is defined by \(\varphi _e(\{n,m\}_<)=1\) if and only if \(r_n<r_m\).

The random graph \(R=\langle {{\,\mathrm{{\mathbb {N}}}\,}}, E\rangle\) (see [2]) has the following extension property. Given two finite disjoint subsets AB of \({{\,\mathrm{{\mathbb {N}}}\,}}\), there is \(n\in {{\,\mathrm{{\mathbb {N}}}\,}}\) such that \(\{x,n\}\in E\) for all \(x\in A\) and \(\{y,n\}\not \in E\) for all \(y\in B\). This makes R universal in the following sense. Given a graph \(\langle {{{\,\mathrm{{\mathbb {N}}}\,}},G}\rangle\), there is a subset \(X\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\) such that \(\langle {{{\,\mathrm{{\mathbb {N}}}\,}},G}\rangle\) and \(\langle {X, E|_X}\rangle\) are isomorphic.

Given a coloring \(\varphi :[X]^2\rightarrow 2\), we say that \(H\subseteq X\) is i-homogeneous (for \(\varphi\)) if \(\varphi ([H]^2)=\{ i\}\) for \(i\in \{0,1\}\). This notion is clearly trivial if \(|H|=2\), so we assume that an homogeneous set has at least three elements. Denote by \({{\,\textrm{hom}\,}}(\varphi )\) the set of homogeneous sets for \(\varphi\); that is,

$$\begin{aligned} {{\,\textrm{hom}\,}}(\varphi )=\{H\subseteq X:\varphi \text { is constant on }[H]^2\}. \end{aligned}$$

Proposition 2.1

Let \(\varphi\) and \(\psi\) be two colorings on a set X. Then \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\) if and only if \({{\,\textrm{hom}\,}}(\varphi )\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{3}={{\,\textrm{hom}\,}}(\psi )\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{3}\).

Proof

Suppose \({{\,\textrm{hom}\,}}(\varphi )\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{3}={{\,\textrm{hom}\,}}(\psi )\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{3}\) and let H be a homogeneous set for \(\varphi\). Let \(\{x,y\},\{w,z\}\) be two different pairs in \([H]^2\), by hypothesis \(\{x,y,w\}\) and \(\{y,w,z\}\) are \(\psi\)-homogeneous, hence H is \(\psi\)-homogeneous. \(\square\)

It is clear that if \(\varphi\) is the coloring associated to the partition \(X=\bigcup _{i\in I}A_i\), then \({{\,\textrm{hom}\,}}(\varphi )=\{H:H\subseteq A_i\text { for some }i\in I\}\cup \{H:|H\cap A_i|\le 1\text { for every }i\in I\}\). On the other hand, if \(\varphi _e\) is the Sierpiński coloring associated to an enumeration \(e=\{r_n\}_n\) of \({{\,\mathrm{{\mathbb {Q}}}\,}}\), then \(H\in {{\,\textrm{hom}\,}}(\varphi _e)\) if and only if H is monotone respect to e; that is, if either \(r_n<r_m\) for every \(n<m\) in H, or \(r_n\ge r_m\) for every \(n<m\) in H. In general, it is well known, that if \(|X|\ge 6\), there is an homogeneous set of size 3. Furthermore, we recall that Ramsey’s Theorem states that every coloring \(\varphi :[X]^2\rightarrow 2\) on an infinite set X has an infinite homogeneous set.

A coloring \(\varphi :[X]^2\rightarrow 2\) is said to be reconstructible (up to complementation) from its homogeneous sets if given a coloring \(\psi :[X]^2\rightarrow 2\) such that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\), we have that either \(\varphi =\psi\) or \(\varphi =1-\psi\). Let \({\mathcal {R}}\) be the collection of all reconstructible colorings, and let \(\lnot {\mathcal {R}}\) be its complement. We will call a coloring non-reconstructible if it belongs to \(\lnot {\mathcal {R}}\). Since \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(1-\varphi )\), we have that \(\varphi \in {\mathcal {R}}\) if and only if \(1-\varphi \in {\mathcal {R}}\). Finally, given \(\varphi ,\psi \in 2^{[X]^2}\), we say that \(\psi\) is a reconstruction of \(\varphi\), if \({{\,\textrm{hom}\,}}(\psi )={{\,\textrm{hom}\,}}(\varphi )\) and we say it is a non-trivial reconstruction if in addition \(\psi \ne \varphi\) and \(\psi \ne 1-\varphi\).

3 Reconstructible Colorings

The aim of this section is to present some sufficient conditions for the reconstructibility of a coloring. On the one hand, we shall see that in order to determine if a coloring belongs to \({\mathcal {R}}\), it is enough to ensure that some finite restrictions do. On the other, we will introduce properties \(E_0\) and \(E_1\), and we will see that any coloring with any of these properties is in \({\mathcal {R}}\).

3.1 Finitistic Conditions for Reconstructibility

Our first result is a very useful criterion for reconstructibility.

Proposition 3.1

Let \(\varphi\) be a coloring on X. If for every \(F\in [X]^{\le 4}\) there is \(Y\subseteq X\) such that \(F\subseteq Y\) and \(\varphi |_Y\in {\mathcal {R}}\), then \(\varphi \in {\mathcal {R}}\).

Proof

Let \(\psi\) be a coloring on X such that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). Suppose that for every \(F\in [X]^{\le 4}\) there is \(Y\subseteq X\) such that \(F\subseteq Y\) and \(\varphi |_Y\in {\mathcal {R}}\); and that there are \(x,y\in X\) such that \(\varphi (\{x,y\})=\psi (\{x,y\})\). We will show that \(\varphi =\psi\). Let \(w,z\in X\) with \(\{x,y\}\ne \{z,w\}\). By hypothesis, there is \(Y\subseteq X\) such that \(\{x,y,w,z\}\subseteq Y\) and \(\varphi |_Y\in {\mathcal {R}}\). We have \({{\,\textrm{hom}\,}}(\varphi |_Y)={{\,\textrm{hom}\,}}(\psi |_Y)\), \(\varphi |_Y\in {\mathcal {R}}\) and \(\varphi (\{x,y\})=\psi (\{x,y\})\), therefore \(\varphi |_Y=\psi |_Y\). In particular, \(\varphi (\{w,z\})=\psi (\{w,z\})\) and we are done. \(\square\)

There are colorings \(\varphi \in {\mathcal {R}}\) such that \(\varphi |_F\not \in {\mathcal {R}}\) for some \(|F|\le 4\) (see Example 5.2).

Corollary 3.2

Let \(\varphi\) be a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\). Suppose that for infinitely many n, \(\varphi |_{\{0, \cdots , n\}}\in {\mathcal {R}}\), then \(\varphi \in {\mathcal {R}}\).

The previous result naturally suggests the following problem.

Question 3.3

Let \(\varphi\) be a reconstructible coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) and \(F\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\) be a finite set. Is there a finite set \(G\supseteq F\) such that \(\varphi |_G\in {\mathcal {R}}\)?

Proposition 3.1 stresses the importance of knowing examples of colorings on finite sets belonging to \({\mathcal {R}}\). Our first example is trivial but we include it for future reference.

Example 3.4

Any constant coloring belongs to \({\mathcal {R}}\).

The next result provides a general method to extend any coloring on a finite set to a reconstructible one. It will be used several times in the sequel.

Proposition 3.5

Let \(\varphi _0\) be any coloring of the pairs of \(F=\{x,y,w,z\}\). Let a and b be two elements not in F. The coloring \(\varphi\) on \(F\cup \{a,b\}\) extending \(\varphi _0\) as in Fig. 1 is reconstructible (where the colors between the elements of F are not drawn).

Fig. 1
figure 1

Partial drawing of \(\varphi\)

Fig. 2
figure 2

Partial drawing of \(\psi\)

Proof

Let \(X=F\cup \{a,b\}\) and \(\psi\) be a coloring of \([X]^2\) such that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). Suppose there is \(\{u,v\}\in [X]^2\) such that \(\varphi (\{u,v\})=1-\psi (\{u,v\})\). We will show that \(\varphi =1-\psi\). We will assume that \(u=x\) and \(v=y\). A completely analogous argument works for the other cases. Notice that \(\{a,b,x\},\{a,b,y\}, \{a,b,z\}, \{a,b,w\}\in {{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). Let \(i=\varphi (\{x,a\})\). Thus \(\psi\) looks as depicted in Fig. 2. Again the colors between elements of F are not drawn.

We consider two cases:

Case 1: Suppose \(\varphi (\{x,y\})=i\). It follows that \(\{x,y,a\}\in {{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\), and therefore \(\psi (\{a,z\})=\psi (\{a,b\})=\psi (\{a,w\})=\psi (\{a,y\})=\psi (\{x,y\})=1-i\). Now notice that \(\varphi (\{z,w\})=\psi (\{z,w\})\) would imply \(\{a,z,w\}\in {{\,\textrm{hom}\,}}(\varphi )\triangle {{\,\textrm{hom}\,}}(\psi )\) which is a contradiction. It follows that \(\varphi (\{z,w\})=1-\psi (\{z,w\})\).

Case 2: Suppose \(\varphi (\{x,y\})=1-i\). Then \(\{x,y,a\}\notin {{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). But, \(\psi (\{a,x\})=\psi (\{a,b\})=\psi (\{a,y\})\), thus \(\psi (\{a,x\})\ne \psi (\{x,y\})=i\) and therefore \(\psi (\{a,w\})=\psi (\{a,z\})= \psi (\{a,x\})=1-i\). Then, we argue as in the previous case to see that \(\varphi (\{z,w\})\ne \psi (\{z,w\})\).

In either case, we have that \(\varphi =1-\psi\). \(\square\)

From the previous result we get the following more general fact.

Proposition 3.6

Let \(\varphi\) be a coloring on X and \(a,b\not \in X\). Then, there is a coloring \(\psi\) on \(X\cup \{a,b\}\) such that \(\varphi \subset \psi\) and \(\psi \in {\mathcal {R}}\).

Proof

Define \(\psi\) on \(X\cup \{a,b\}\) by \(\psi (\{a,b\})=\psi (\{a,x\})=\psi (\{b,x\})=1\) for all \(x\in X\), and \(\varphi \subset \psi\). From Proposition 3.5 we get that \(\psi\) satisfies the hypothesis of Proposition 3.1, hence \(\psi \in {\mathcal {R}}\).\(\square\)

As an application of Proposition 3.1 we have the following result about a coloring on binary sequences.

Proposition 3.7

The coloring associated to the extension ordering on binary sequences is reconstructible.

Proof

Let \(\varphi\) be the coloring associated to the extension ordering on \(2^{<\omega }\), i.e., \(\varphi (\{x,y\})=1\) if and only if y is an extension of x. We first show the result for the restriction of \(\varphi\) to \(X=2^{\le 3}\). This coloring looks as despicted in Fig. 3, where only some 1-edges are drawn.

Fig. 3
figure 3

Partial drawing of \(\varphi\)

We show that \(\varphi \in {\mathcal {R}}\). Let \(\psi\) be a coloring of \([X]^2\) such that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). Notice that every branch and every antichain is homogeneous (for both colorings). Suppose that \(\varphi (\{x,y\})=1-\psi (\{x,y\})\) for some \(\{x,y\}\in [X]^2\). We need to show that \(\varphi =1-\psi\). We consider the case \(x=d\) and \(y=b\), the other cases are similar. Then all branches starting on i, h, j or k are of color 1 for \(\varphi\) and of color 0 for \(\psi\). Since \(\{i,h,d\}\) is not homogeneous, then \(\psi (\{i,h\})=1\). Therefore \(\{i,h,j,k,l,m,n,o\}\) is 1-homogeneous for \(\psi\). Since \(\{l,m,f\}\) is not homogeneous, then \(\psi (\{l,f\})= 0\) or \(\psi (\{m,f\})=0\). In either case, we get that all branches starting from l, m, n or o are all 0-homogeneous for \(\psi\). As before, we conclude that \(\{d,e,f,g\}\) and \(\{b,c\}\) are 1-homogeneous for \(\psi\). This shows that \(\varphi =1-\psi\).

Now we finish the proof of the proposition. To see that \(\varphi \in {\mathcal {R}}\), we use Proposition 3.1. Let \(F\subset 2^{<\omega }\) be a set with at most four elements. It is easy to verify that \(\langle F,\varphi |_F\rangle\) is isomorphic (as a graph) to a subset of \(\langle X,\varphi |_ X\rangle\). From the result above, \(\varphi |_X\in {\mathcal {R}}\) and we are done. \(\square\)

The following examples will be needed later in the paper.

Example 3.8

Let \(X=\{0,1,2,3,4,5\}\) and consider the partition of X given by \(\{0,1,2\}\), \(\{3,4\}\) and \(\{5\}\). Let \(\varphi\) be the coloring associated to this partition. It is depicted in Fig. 4, where we only draw the pairs with color 1, i.e. those \(\{x,y\}\) which are a subset of a part of the partition.

Fig. 4
figure 4

Coloring of a partition

We claim that \(\varphi |_Y\in {\mathcal {R}}\) for every \(Y\subseteq X\). We show it for \(X=Y\), the rest is similar. Let \(\psi\) be a coloring on X such that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). Notice that \(\{0,4,5\}\), \(\{0,3,5\}\) and \(\{2,4,5\}\) are \(\varphi\)-homogeneous and \(\{0,1,3\}\) and \(\{3,4,5\}\) are not \(\varphi\)-homogeneous. Since \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\), \(\psi (\{0,1\})= \psi (\{3,4\})=1-\psi (\{0,3\})\). Thus, \(\psi\) is either \(\varphi\) of \(1-\varphi\).

Proposition 3.9

Let \(\varphi\) be a coloring on a set \(F=\{a,b,c,d, e\}\), and let \(G=\{x,y,z\}\) be disjoint from F. Let \(X=F\cup G\), and \(\psi\) be the extension of \(\varphi\) to X as depicted in Fig. 5, where we only draw the pairs \(\{u,v\}\) of color 1 with \(u\in F\)and \(v\in G\). Then \(\psi \in {\mathcal {R}}\).

Fig. 5
figure 5

Partial drawing of \(\psi\)

Proof

Let \(\rho\) be a coloring on X such that \({{\,\textrm{hom}\,}}(\psi )={{\,\textrm{hom}\,}}(\rho )\). We assume without lost of generality that \(\rho (\{x,a\})=\psi (\{x,a\})=1\), and we prove that \(\rho =\psi\). Using the same kind of arguments as in Example 3.8, it is easy to verify that \(\rho (\{u,v\})=\psi (\{u,v\})\) for every \(u\in F\) and \(v\in G\), and also for \(u, v\in G\). So, it remains to show that \(\rho\) also extends \(\varphi\). Indeed, given \(u, v\in F\), there is \(w\in \{x,y,z\}\) such that \(\psi (\{w, u\})=\psi (\{w,v\})=0\). Thus, \(\rho (\{w, u\}) =\rho (\{w,v\})=0\). We need to show that \(\psi (\{ u,v\})=\rho (\{u,v\})\). Suppose otherwise, \(\psi (\{ u,v\})\not =\rho (\{u,v\})\). Then, \(\{u,v,w\}\in {{\,\textrm{hom}\,}}(\rho )\triangle {{\,\textrm{hom}\,}}(\psi )\), a contradiction. \(\square\)

Example 3.10

The coloring \(\varphi\) on \(\{0,1,2,3,4,5\}\) depicted in Fig. 6 is reconstructible.

Fig. 6
figure 6

Coloring \(\varphi\)

Let \(\psi\) be a reconstruction of \(\varphi\), i.e. \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). Notice that any homogeneous set is a subset of either \(H_1=\{0,1,2,3\}\) or \(H_2=\{0,4,5\}\). It is easy to check that if \(\psi\) gives the same color, say black, to \(H_1\) and \(H_2\), then \(\psi =\varphi\). So, suppose \(\psi\) gives to \(H_1\) and \(H_2\) color black and gray, respectively. Then one has to consider two completely analogous cases depending on whether \(\psi (\{1,4\}\) is black or gray. Suppose it is black. Since \(\psi (\{1,2\})\) is black and \(\{1,2,4\}\) is not homogeneous, \(\psi (\{2,4\})\) is gray. Since \(\{2,4,5\}\) is not homogeneous, \(\psi (\{2,5\})\) is black. Analogously, one conclude that \(\psi (\{1,5\})\) is gray. Since \(\{3,4,5\}\) is not homogeneous, \(\{3,5\}\) must be black. On the other hand, since \(\{2,3,5\}\) is not homogeneous, \(\{3,5\}\) must be gray. A contradiction.

3.2 Properties \(E_0\) and \(E_1\)

Now we introduce a property for a coloring stronger than being in \({\mathcal {R}}\). It was motivated by the extension property of the random graph. Given \(i\in \{0,1\}\), we say that a coloring \(\varphi :[{{\,\mathrm{{\mathbb {N}}}\,}}]^2\longrightarrow 2\) has the property \(E_i\) if for every finite set \(F\subset {{\,\mathrm{{\mathbb {N}}}\,}}\) there is \(z\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus F\) such that \(\varphi (\{z,x\})=i\) for every \(x\in F\).

It is clear that if \(\varphi\) has the property \(E_0\) then \(1-\varphi\) has the property \(E_1\). So, for our reconstruction problem, we could only work with either \(E_0\) or \(E_1\). The random graph clearly has the property \(E_i\), for \(i\in \{0,1\}\). Another example is the following.

Proposition 3.11

Let \(R\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\times {{\,\mathrm{{\mathbb {N}}}\,}}\) be a strict linear ordering on \({{\,\mathrm{{\mathbb {N}}}\,}}\). Let \(\varphi _R\) be defined by \(\varphi _R (\{n,m\}_<)=1\) if and only if \((n,m)\in R\). If \(\langle {{\,\mathrm{{\mathbb {N}}}\,}}, R\rangle\) does not have a maximal (resp. a minimal) element, then \(\varphi _R\) has the property \(E_1\) (resp. \(E_0\)).

Proof

Suppose \(\langle {{\,\mathrm{{\mathbb {N}}}\,}}, R\rangle\) does not have a maximal element. Let \(F\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\) be a finite set. Then, there is \(z\in {{\,\mathrm{{\mathbb {N}}}\,}}\) such that \((x,z)\in R\) for all \(x\in F\). Thus, \(\varphi _R(\{z,x\})=1\) for all \(x\in F\). \(\square\)

Proposition 3.12

Every coloring with property \(E_i\), \(i\in \{0,1\}\), belongs to \({\mathcal {R}}\).

Proof

We will use Proposition 3.1. Let \(\varphi\) be a coloring with the property \(E_i\). Let \(F=\{x,y,z,w\}\) be a subset of \({{\,\mathrm{{\mathbb {N}}}\,}}\). By the property \(E_i\), there is \(a\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x,y,z,w\}\) such that

$$\begin{aligned} \varphi (\{a,x\})=\varphi (\{a,y\})=\varphi (\{a,z\})=\varphi (\{a,w\})=i \end{aligned}$$

and there is \(b\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x,y,z,w,a\}\) such that

$$\begin{aligned} \varphi (\{b,x\})=\varphi (\{b,y\})=\varphi (\{b,z\})=\varphi (\{b,w\})=\varphi (\{b,a\})=i. \end{aligned}$$

Let \(X=F\cup \{a,b\}\). Now observe that \(\langle X,\varphi |_X\rangle\) is isomorphic to the graph in Proposition 3.5. Thus, \(\varphi |_X\in {\mathcal {R}}\) and we are done. \(\square\)

We will now see that any coloring with the property \(E_i\) provides infinitely many reconstructible colorings obtained by making finite changes to the original one.

Let \(\varphi \in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) and \(a\subset [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\) be a finite set. Let \(\varphi _a\in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) be defined by \(\varphi _a^{-1}(1)=a\triangle \varphi ^{-1}(1)\). In other words, \(\varphi _a(\{x,y\})=\varphi (\{x,y\})\) if \(\{x,y\}\notin a\); and \(\varphi _a(\{x,y\})=1-\varphi (\{x,y\})\) if \(\{x,y\}\in a\), for every \(\{x,y\}\in [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\). Such colorings are the finite changes of \(\varphi\).

Proposition 3.13

Let \(\varphi\) be a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) and \(a\subset [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\) a finite set. If \(\varphi\) has the property \(E_i\), for \(i\in \{0,1\}\), then \(\varphi _a\) has the property \(E_i\).

Proof

Let us fix \(i\in \{0,1\}\) and assume that \(\varphi\) has property \(E_i\). Let \(F\subset {{\,\mathrm{{\mathbb {N}}}\,}}\) be a finite set, and consider \(G=F\cup \{w: \{w,z\}\in a \;\text {for some} z\in {{\,\mathrm{{\mathbb {N}}}\,}}\}\). By the property \(E_i\) of \(\varphi\), there is \(z\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus G\) such that \(\varphi (\{z,x\})=i\) for every \(x\in G\). Given \(x\in F\), we have \(\{z,x\}\notin a\) since \(z\not \in G\). Thus, \(\varphi _a(\{z,x\})=\varphi (\{z,x\})=i\).\(\square\)

Corollary 3.14

The finite changes of the following colorings are reconstructible:

  1. (i)

    Constant colorings on \({{\,\mathrm{{\mathbb {N}}}\,}}\).

  2. (ii)

    The random graph.

  3. (iii)

    The Sierpiński’s coloring.

  4. (iv)

    \(\varphi _R\), for \(R\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\times {{\,\mathrm{{\mathbb {N}}}\,}}\) a linear ordering on \({{\,\mathrm{{\mathbb {N}}}\,}}\) without maximal or minimal element.

4 Non-Reconstructible Colorings

In this section we analyze non-reconstructible colorings. We start by showing a condition that implies non reconstructibility and which is used in almost all examples presented. We also show that any coloring can be extended to a non- reconstructible one (Proposition 4.9).

Definition 4.1

For a coloring \(\varphi\) on X and \(x, y\in X\), we say that an edge \(\{x,y\}\) is critical for \(\varphi\), if \(\varphi (\{x,z\})=1-\varphi (\{y,z\})\), for all \(z\in X\setminus \{x,y\}\).

The following simple observation gives a very useful criterion to show non reconstructibility.

Proposition 4.2

Let \(\varphi\) be a coloring on X with \(|X|\ge 3\). If \(\varphi\) has a critical pair, then \(\varphi\) is non-reconstructible.

Proof

Let \(\{x,y\}\) be a critical pair for \(\varphi\). Define \(\psi :[X]^2\longrightarrow 2\) by \(\psi (\{w,z\})=\varphi (\{w,z\})\) if \(\{w,z\}\ne \{x,y\}\) and \(\psi (\{x,y\})=1-\varphi (\{x,y\})\). Notice that \(\{x,y\}\not \subseteq H\) for any \(H\in {{\,\textrm{hom}\,}}(\varphi )\cup {{\,\textrm{hom}\,}}(\psi )\). Therefore \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\) and \(\psi\) witnesses that \(\varphi \not \in {\mathcal {R}}\).

The condition of being a critical pair is stronger than just requiring that the pair is not contained in a homogeneous set. For instance, let \(\varphi\) be a constant coloring over \({{\,\mathrm{{\mathbb {N}}}\,}}\) and consider the finite change \(\varphi _a\) of \(\varphi\) with \(a=\{0,1\}\). Then \(\varphi _a\) is reconstructible and \(\{0,1\}\) is not contained in any \(\varphi _a\)-homogeneous sets.

Now we give our first example of a non-reconstructible coloring, which is the prototype of such colorings.

Example 4.3

Consider a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into two infinite sets, for instance, let \(A_0\) be the set of even numbers and \(A_1\) be the set of odd numbers. Let \(\varphi\) be the coloring associated to this partition, i.e., \(\varphi (\{x,y\})=1\) if and only if \(\{x,y\}\subseteq A_i\) for some i. Then, the pair \(\{0,1\}\) is critical for \(\varphi\), thus by Proposition 4.2, \(\varphi \in \lnot {\mathcal {R}}\).

Moreover, given any nonempty set \(B\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\) consider the coloring \(\varphi _B:[{{\,\mathrm{{\mathbb {N}}}\,}}]^2\longrightarrow 2\) given by \(\varphi _B(\{x,y\})=\varphi (\{x,y\})\) if \(\{x,y\}\ne \{2n, 2n+1\}\) for any \(n\in B\); and \(\varphi _B(\{2n, 2n+1\})=1\) for all \(n\in B\). Then, \(\varphi\) and \(\varphi _B\) have the same homogeneous sets.

Below we depict the coloring \(\varphi\) (see Fig. 7) and a non-trivial reconstruction \(\psi\) (see Fig. 8) of it for the case of a partition of the set \(\{0,1,2,3,4,5\}\).

Fig. 7
figure 7

Coloring \(\varphi\)

Fig. 8
figure 8

Coloring \(\psi\)

We present below a characterization of colorings admitting a critical pair. For that purpose, we introduce a function on colorings. Let X be a set with \(3\le |X|\le \aleph _0\). For each coloring \(\varphi \not \in {\mathcal {R}}\) on X, let

$$\begin{aligned} r(\varphi )=\min \{ |\{\{x,y\}\in [X]^2: \varphi (\{x,y\})\ne \psi (\{x,y\})\}|:\psi \in 2^{[X]^2},\; {{\,\textrm{hom}\,}}(\psi )={{\,\textrm{hom}\,}}(\varphi ), \psi \ne \varphi , \psi \ne 1-\varphi \}. \end{aligned}$$

For convenience, let \(r(\varphi )=0\) if \(\varphi \in {\mathcal {R}}\). Notice \(0\le r(\varphi )\le \aleph _0\).

Lemma 4.4

Let \(\varphi\) be a coloring on a countable set with at least 3 elements.

  1. (i)

    If \(\varphi\) has a critical pair, then \(r(\varphi )=1\).

  2. (ii)

    \(r(\varphi )\ne 2\) for every \(\varphi\).

Proof

  1. (i)

    By Proposition 4.2, \(\varphi \not \in {\mathcal {R}}\) and the result follows from the proof of Proposition 4.2.

  2. (ii)

    If \(\varphi \in {\mathcal {R}}\), then \(r(\varphi )=0\). Let \(\varphi \in \lnot {\mathcal {R}}\), and suppose \(r(\varphi )=2\) to get a contradiction. Let \(\psi\) be a reconstruction of \(\varphi\) such that

    $$\begin{aligned} |\{\{x,y\}: \varphi (\{x,y\})\ne \psi (\{x,y\})\}|=2. \end{aligned}$$
    (1)

    Let \(\{x,y\}\) be such that \(\varphi (\{x,y\})\ne \psi (\{x,y\})\). By (i), \(\varphi\) does not have a critical pair. Since \(\{x, y\}\) is not critical for \(\varphi\), there is \(z\not \in \{x,y\}\) such that \(\varphi (\{x,z\})=\varphi (\{y,z\})\). We claim that \(\{x,y,z\}\not \in {{\,\textrm{hom}\,}}(\varphi )\). Suppose not and let i be its \(\varphi\)-color. Then, \(\{x,y,z\}\) would be a \(\psi\)-homogeneous set of color \(1-i\), which contradicts (1). Thus

    $$\begin{aligned} \varphi (\{y,z\})=\varphi (\{x,z\})=1-\varphi (\{x,y\})=\psi (\{x,y\}). \end{aligned}$$
    (2)

    Since \(\{x,y,z\}\) is not \(\psi\)-homogeneous, we assume, without lost of generality, that

    $$\begin{aligned} \psi (\{x,z\})=1-\psi (\{x,y\}). \end{aligned}$$
    (3)

    Notice that \(\varphi (\{x,z\})\ne \psi (\{x,z\})\) and, by (1), \(\varphi\) and \(\psi\) agree on any pair different from \(\{x,z\}\) and \(\{x,y\}\). Thus

    $$\begin{aligned} \psi (\{y,z\})=\varphi (\{y,z\}). \end{aligned}$$
    (4)

    Since \(\{x,z\}\) is not critical for \(\varphi\), there is \(w\not \in \{x,z\}\) such that \(\varphi (\{x,w\})=\varphi (\{z,w\})\). From (2), \(w\ne y\). By (1), \(\varphi (\{x,w\})=\psi (\{x,w\})=\psi (\{z,w\})\). It is easy to verify that \(\{x,w,z\}\in {{\,\textrm{hom}\,}}(\varphi )\triangle {{\,\textrm{hom}\,}}(\psi )\), a contradiction.

\(\square\)

Theorem 4.5

Let \(\varphi\) be a coloring on a set X with \(|X|\ge 3\). The following are equivalent.

  1. (i)

    There is a critical pair for \(\varphi\).

  2. (ii)

    \(r(\varphi )=1\).

  3. (iii)

    There is a coloring \(\psi\) and \(x\in X\) such that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\), \(\varphi \ne \psi\) and \(\varphi |_{X\setminus \{x\}}=\psi |_{X\setminus \{x\}}\).

Proof

\((i) \Rightarrow (ii)\). By Lemma 4.4.

\((ii) \Rightarrow (iii)\). Obvious.

\((iii) \Rightarrow (i)\). Let \(\psi\) and x be as in the hypothesis of (iii). Towards a contradiction, suppose there are no critical pairs for \(\varphi\). Let \(y\in X\setminus \{x\}\) be such that \(\varphi (\{x,y\})\ne \psi (\{x,y\})\). Since \(\{x,y\}\) is not critical for \(\varphi\), there is \(z\not \in \{x,y\}\) such that \(\varphi (\{x,z\})=\varphi (\{y,z\})\). Since \(\varphi |_{X\setminus \{x\}}=\psi |_{X\setminus \{x\}}\), \(\psi (\{y,z\})=\varphi (\{y,z\})\). Hence, \(\{x,y,z\}\not \in {{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\), otherwise \(\psi (\{x,y\})=\psi (\{y,z\})=\varphi (\{y,z\})=\varphi (\{x,y\})\), a contradiction. Then, \(\varphi (\{x,z\})\ne \psi (\{x,z\})\). By Lemma 4.4, \(r(\varphi )\ge 3\), thus there is \(\{u,w\}\in [X]^2\) with \(\{u,w\}\) different from \(\{x,y\}, \{x,z\}\) such that \(\varphi (\{u,w\})\ne \psi (\{u,w\})\). As \(\varphi |_{X\setminus \{x\}}=\psi |_{X\setminus \{x\}}\), we assume that \(u=x\), i.e. \(\varphi (\{x,w\})\ne \psi (\{x,w\})\). There are two cases to be considered: (a) Suppose \(\varphi (\{x,w\})= \varphi (\{x,y\})\). Then, \(\{x,y,w\}\in {{\,\textrm{hom}\,}}(\varphi )\triangle {{\,\textrm{hom}\,}}(\psi )\). (b) Suppose \(\varphi (\{x,w\})=1- \varphi (\{x,y\})\). Then, \(\{x,w,z\}\in {{\,\textrm{hom}\,}}(\varphi )\triangle {{\,\textrm{hom}\,}}(\psi )\). In both cases we get a contradiction with \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). \(\square\)

We know very little about the function r.

Question 4.6

Is there a coloring \(\varphi\) such that \(r(\varphi )=\aleph _0\)?

There are non-reconstructible colorings without a critical pair, as we show next. However, we do not know a method to construct colorings in \(\lnot {\mathcal {R}}\) without critical pairs.

Example 4.7

The colorings \(\varphi\) and \(\varphi '\) depicted below (Figs. 9 and 11) are non-reconstructible and do not have a critical pair. Colorings \(\psi\) and \(\psi '\) (Figs. 10 and 12) are, respectively, a non-trivial reconstruction of \(\varphi\) and \(\varphi '\).

Fig. 9
figure 9

\(\varphi\)

Fig. 10
figure 10

\(\psi '\)

Fig. 11
figure 11

\(\varphi '\)

Fig. 12
figure 12

\(\psi '\)

We have seen that the finite changes of some reconstructible colorings remain reconstructible (see Proposition 3.13). The following generalization of Example 4.3 shows an analogous fact for some non-reconstructible colorings.

Proposition 4.8

Let \(\varphi\) be the coloring associated to a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into two parts. Then,

  1. (i)

    \(\varphi _a\in \lnot {\mathcal {R}}\), for every finite set \(a\subset [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\).

  2. (ii)

    For every nonempty set \(I\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\), there is \(\varphi _I\in \lnot {\mathcal {R}}\setminus \{\varphi ,1-\varphi \}\).

Proof

Let \({{\,\mathrm{{\mathbb {N}}}\,}}=A\cup B\) be a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\), and \(\varphi :[{{\,\mathrm{{\mathbb {N}}}\,}}]^2\longrightarrow 2\) be the coloring associated to the partition.

  1. (i)

    Consider \(a\subset [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\) a nonempty finite set. Let \(m=\max (\bigcup a)\), \(p\in A\) with \(p>m\) and \(q\in B\) with \(q>m\). Notice that \(\{p,z\},\{q,z\}\notin a\) for every \(z\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{p,q\}\). Thus, \(\varphi _a(\{p,z\})=\varphi (\{p,z\})\) and \(\varphi _a(\{q,z\})=\varphi (\{q,z\})\) for every \(z\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{p,q\}\). Then, \(\{p,q\}\) is critical for \(\varphi _a\), thus by Proposition 4.2, \(\varphi _a\in \lnot {\mathcal {R}}\).

  2. (ii)

    Let \(A=\{a_i:i\in {{\,\mathrm{{\mathbb {N}}}\,}}\}\) and \(B=\{b_i:i\in {{\,\mathrm{{\mathbb {N}}}\,}}\}\) be enumerations of A and B, and consider \(\emptyset \ne I\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\). Define \(\varphi _I:[{{\,\mathrm{{\mathbb {N}}}\,}}]^2\longrightarrow 2\) by \(\varphi _I(\{x,y\})=\varphi (\{x,y\})\) if \(\{x,y\}\ne \{a_n,b_n\}\) for any \(n\in I\); and \(\varphi _I(\{a_n,b_n\})=1\) for every \(n\in I\). Then, for \(n\in I\), \(\{a_n,b_{n}\}\) is critical for \(\varphi _I\) and we are done by Proposition 4.2.

\(\square\)

We have seen in Proposition 3.6 that any coloring can be extended to a coloring belonging to \({\mathcal {R}}\). Our next result shows that it can also be extended to a coloring in \(\lnot {\mathcal {R}}\).

Proposition 4.9

Let \(\varphi\) be a coloring on X and \(a\not \in X\). There is a coloring \(\psi\) on \(X\cup \{a\}\) such that \(\varphi \subset \psi\) and \(\psi \in \lnot {\mathcal {R}}\).

Proof

Fix \(x_0\in X\) and \(a\notin X\). Let \(\psi\) be a coloring on X defined by \(\psi (\{a,x_0\})=1\), \(\psi (\{a,x\})=1-\varphi (\{x_0,x\})=0\) for \(x\in X\setminus \{x_0\}\), and \(\psi |_X=\varphi\). Then, \(\{a, x_0\}\) is critical for \(\psi\). Hence, \(\psi \in \lnot {\mathcal {R}}\) by Proposition 4.2. \(\square\)

5 Colorings Associated to Partitions of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into More Than Two Parts

In this section we will show that, in contrast with Proposition 4.8, the coloring associated to any partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into at least three parts belongs to \({\mathcal {R}}\) (Theorem 5.1). Furthermore, we will provide conditions on the partition so that the finite changes of the corresponding coloring are also in \({\mathcal {R}}\) (Proposition 5.3 and Proposition 5.4).

Theorem 5.1

Let \((A_i)_{i\in I}\) be a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) with \(|I|\ge 3\). Then, the coloring associated to the partition belongs to \({\mathcal {R}}\).

Proof

Let \((A_i)_{i\in I}\) be a partition as in the hypothesis. We will use Proposition 3.1 to show that \(\varphi \in {\mathcal {R}}\). Let \(F\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\) be a set with 4 elements. There are two cases to be considered. If F is homogeneous, then \(\varphi |_F\in {\mathcal {R}}\). Otherwise, there are \(i,j,k\in I\) such that \(F\subseteq A_i\cup A_j\cup A_k\), \(|F\cap A_i|\le 3\), \(|F\cap A_j|\le 2\) and \(|F\cap A_k|\le 1\). Thus, there is Y such that \(F\subseteq Y\subset A_i\cup A_j\cup A_k\) such that \(\varphi |_Y\) is (isomorphic to) the coloring in Example 3.8 and hence \(\varphi |_Y\in {\mathcal {R}}\). \(\square\)

The following example shows that Proposition 3.1 cannot be strengthened in the following sense. It can happen that a coloring \(\varphi\) is reconstructible but there is \(F\subseteq X\) with \(|F|\le 4\) and \(\varphi |_F\not \in {\mathcal {R}}\).

Example 5.2

Let \({{\,\mathrm{{\mathbb {N}}}\,}}=A\cup B\cup C\) be a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into infinite sets, and \(\varphi\) be the coloring associated to the partition. By Theorem 5.1, \(\varphi \in {\mathcal {R}}\). However, if \(x,y\in A\), \(z,w\in B\) and \(F=\{x,y,z,w\}\), then \(\varphi |_F\not \in {\mathcal {R}}\) as \(\{x,z\}\) is critical for \(\varphi |_F\).

In the following we deal with the finite changes of the coloring associated to partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\). We show that whether a finite change of such coloring is in \({\mathcal {R}}\) depends on the type of partitions.

Proposition 5.3

Let \((A_k)_{k}\) be an infinite partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\). Then, every finite change of the coloring associated to the partition belongs to \({\mathcal {R}}\).

Proof

Let \(a\subset [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\) be a finite set and \(\varphi\) be the coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) associated to the partition \((A_k)_{k}\). We claim that \(\varphi _a\) has the property \(E_0\) and thus it is in \({\mathcal {R}}\), by Proposition 3.12. Let \(F\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\) be a finite set. Let k be such that \((F\cup \{x,y\})\cap A_k=\emptyset\) for all \(\{x,y\}\in a\). Pick \(z\in A_k\). Then \(\varphi _a(\{z,w\})=\varphi (\{z,w\})=0\) for all \(w\in F\). \(\square\)

Proposition 5.4

Let \((A_i)_{i<k}\) be a finite partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\), where \(k>2\), and at least three \(A_i\) are infinite. Then, every finite change of the coloring associated to the partition is in \({\mathcal {R}}\).

Proof

Let \(a\subset [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\) be a finite set and \(\varphi\) be the coloring associated to the partition \((A_i)_{i<k}\). We will use Proposition 3.1 to show that \(\varphi _a\in {\mathcal {R}}\). Let \(F\subseteq {{\,\mathrm{{\mathbb {N}}}\,}}\) be a set with 4 elements and \(G=\bigcup a\). We consider two cases: (1) There are ij such that \(A_i\) and \(A_j\) are infinite and \(F\cap ( A_i\cup A_j)=\emptyset\). Let \(u\in A_i\), \(v\in A_j\) such that \(\{u,v\}\not \in G\). Put \(Y=F\cup \{u, v\}\). Since \(\varphi _a(\{u,v\})=\varphi _a(\{u,x\})=\varphi _a(\{v,x\})\) for all \(x\in F\), \(\langle Y,\varphi _a|_Y\rangle\) is (isomorphic to) the coloring in Proposition 3.5 and thus \(\varphi _a|_Y\in {\mathcal {R}}\). (2) Let ijl be such that \(A_i\), \(A_j\) and \(A_l\) are infinite. Let \(x\in A_j\), \(y\in A_j\) and \(z\in A_l\) such that \(\{x,y,z\}\cap (F\cup G)=\emptyset\) Let \(Y=F\cup \{x,y,z\}\). Suppose that at most one of the sets \(A_i\), \(A_j\) and \(A_l\) is disjoint from F. By an argument analogous to that used in Proposition 3.9 it follows that \(\varphi _a|_Y\in {\mathcal {R}}\). \(\square\)

The following example shows that Proposition 5.4 is optimal in the sense that we cannot ensure reconstructibility of all finite changes of the coloring associated to finite partitions of \({{\,\mathrm{{\mathbb {N}}}\,}}\). It is interesting, since it shows that the reconstructibility is a somewhat unstable property (Figs. 13 and 14).

Example 5.5

There is a partition \({{\,\mathrm{{\mathbb {N}}}\,}}=A_0\cup A_1\cup A_2\) of \({{\,\mathrm{{\mathbb {N}}}\,}}\), with \(|A_0|=2\), such that some finite changes of the coloring associated to it are in \({\mathcal {R}}\) and some are in \(\lnot {\mathcal {R}}\).

Let \(A_0=\{0,1\}\), \(A_1=\{2n+1:n>0\}\), \(A_2=\{2n:n>0\}\), \(\varphi\) be the coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) associated to the partition \((A_i)_{i<3}\), and \(a=\big \{\{0,4\},\{1,5\},\{4,5\}\big \}\). Notice that \(\{4,5\}\) is critical for \(\varphi _a\), thus \(\varphi _a\in \lnot {\mathcal {R}}\) by Proposition 4.2.

Fig. 13
figure 13

Graph of \(\varphi _a\)

Fig. 14
figure 14

Graph of \(\varphi _b\)

On the other hand, notice that \(\varphi _\emptyset =\varphi \in {\mathcal {R}}\) by Theorem 5.1. A non-trivial finite change of \(\varphi\) which belongs to \({\mathcal {R}}\) is \(\varphi _b\) for \(b=\big \{\{4,5\}\big \}\). To see this, we argue as in the proof of Proposition 5.4. Let \(F=\{0,1,2,3,4,5\}\). It is easy to verify that \(\varphi _b|_F\in {\mathcal {R}}\).

6 Maximal Homogeneous Sets

In this section we explore reconstructibility of a coloring looking at the maximal homogeneous sets. Let us start by observing the obvious: for any coloring of \({{\,\mathrm{{\mathbb {N}}}\,}}\) there are maximal homogeneous sets (by Zorn’s Lemma). For any cardinal \(1\le \kappa \le \aleph _0\) or \(\kappa =2^{\aleph _0}\) there is a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) with exactly \(\kappa\) maximal homogeneous sets. In fact, a constant coloring has \({{\,\mathrm{{\mathbb {N}}}\,}}\) as the unique maximal homogeneous set. Let \(\varphi\) be the coloring associated to a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into two infinite pieces. Then \(\varphi\) has two maximal homogeneous sets. For \(3\le \kappa <\aleph _0\), we left to the reader to check that a simple finite change of \(\varphi\) produces a coloring with exactly \(\kappa\) maximal homogeneous sets. The coloring associated to a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into three infinite pieces has countable many maximal homogeneous sets. Finally, the coloring associated to a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into infinitely many infinite pieces has \(2^{\aleph _0}\) maximal homogeneous sets. We do not know in general how this relates to the reconstructibility of the colorings. However, we present some results when \(\kappa \le 2\).

Lemma 6.1

Let \(\varphi\) be a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\). We have:

  1. (i)

    Any homogeneous set is contained in a maximal homogeneous set.

  2. (ii)

    Let \(A=\{x\in {{\,\mathrm{{\mathbb {N}}}\,}}: \;x\in H \; \text {for some maximal} H\in {{\,\textrm{hom}\,}}(\varphi ) \}\). Then \(|{{\,\mathrm{{\mathbb {N}}}\,}}\setminus A|\le 2\).

  3. (iii)

    If H is a maximal homogeneous set of color i and \(x\in \!\!\!\!\!/A\), then \(\{y\in H:\; \varphi (\{x,y\})=i\}\) has at most one element.

Proof

  1. (i)

    It is a well known result that easily follows from Zorn’s lemma.

  2. (ii)

    Towards a contradiction, suppose \(v,w,z\in \!\!\!\!\!/A\) with \(\varphi (\{v,z\})=0\) and \(\varphi (\{v,w\})=\varphi (\{w,z\})=1\). Let H be an homogeneous set. One has to consider whether H is of color 0 or 1. Both cases are treated analogously.

    1. (a)

      Suppose H is of color 0. Let \(x_1\in H\). Since \(v\in \!\!\!\!\!/A\), \(\{x_1, v,z\}\) is not homogeneous, we assume w.l.o.g. that \(\varphi (\{v,x_1\})=1\). As \(\{x_1, v,w\}\) is not homogeneous, \(\varphi (\{w,x_1\})=0\). Let \(x_2\in H\) different than \(x_1\). Since \(\{x_1, x_2,w\}\) is not homogeneous, \(\varphi (\{w,x_2\})=1\). Analogously, we conclude that \(\varphi (\{v,x_2\})=\varphi (\{x_2,z\})=0\). Therefore \(\{v,z,x_2\}\) is a 0-homogeneous set, which contradicts that \(z\in \!\!\!\!\!/A\).

    2. (b)

      Suppose H is of color 1. Let \(x_1\in H\). Since \(v\in \!\!\!\!\!/A\), \(\{x_1, v,z\}\) is not homogeneous and thus \(\varphi (\{z,x_1\})=1\). As \(\{x_1, v,w\}\) is not homogeneous, \(\varphi (\{w,x_1\})=0\). Let \(x_2\in H\) be different than \(x_1\). Since \(\{x_1, x_2,z\}\) is not homogeneous, \(\varphi (\{z,x_2\})=0\). Analogously, we conclude that \(\varphi (\{v,x_2\})=1\) and \(\varphi (\{w,x_1\})=\varphi (\{w,x_2\})=0\). Let \(x_3\in H\setminus \{x_1,x_2\}\). Then \(\varphi (\{z,x_3\})=0\) and \(\varphi (\{v,x_3\})=1\). Therefore \(\{v,x_2,x_3\}\) is a 1-homogeneous set, which contradicts that \(v\in \!\!\!\!\!/A\).

  3. (iii)

    Suppose there are \(y,z\in H\) such that \(\varphi (\{x,y\})=\varphi (\{x,z\})=i\). We have that \(\varphi (\{y,z\})=i\) since H is of color i. Then \(\{x,y,z\}\) is homogeneous, which contradicts that \(x\in \!\!\!\!\!/A\).

We extend the definition of the finite changes \(\varphi _a\) of a coloring as follows. For each coloring \(\varphi\) on \({{\,\mathrm{{\mathbb {N}}}\,}}\) and \(A\subseteq [{{\,\mathrm{{\mathbb {N}}}\,}}]^2\), let \(\varphi _A\) be given by \(\varphi _A(s)=\varphi (s)\) if \(s\in \!\!\!\!\!/A\) and \(\varphi _A(s)=1-\varphi (s)\) if \(s\in A\). The next proposition characterizes the colorings with exactly one maximal homogeneous set.

Proposition 6.2

Let \(\varphi\) be a non constant coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\). Then, \(\hom (\varphi )\) has exactly one maximal element if and only if one of the following holds for a constant coloring \(\psi\) on \({{\,\mathrm{{\mathbb {N}}}\,}}\).

  1. (i)

    \(\varphi =\psi _{A_1}\) where \(A_1=\{\{x_0,y\}: \;{y\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x_0\}}\}\) for some \(x_0\in {{\,\mathrm{{\mathbb {N}}}\,}}\).

  2. (ii)

    \(\varphi =\psi _{A_2}\) where \(A_2=\{\{x_0,y\}: \;{y\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x_0, x_1\}}\}\) for some \(x_0, x_1\in {{\,\mathrm{{\mathbb {N}}}\,}}\).

  3. (iii)

    \(\varphi =\psi _{A_3}\) where \(A_3=\{\{x_0,y\}: \;{y\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x_0,x_1,x_2\}}\}\cup \{\{x_2,y\}: \;{y\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x_0,x_2\}}\}\) for some \(x_0, x_1, x_2\in {{\,\mathrm{{\mathbb {N}}}\,}}\).

  4. (iv)

    \(\varphi =\psi _{A_4}\) where \(A_4=\{\{x_0,y\}: \;{y\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x_0, x_2\}}\}\cup \{\{x_2,y\}: \;{y\in {{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{x_2\}}\}\) for some \(x_0, x_2\in {{\,\mathrm{{\mathbb {N}}}\,}}\).

In all cases, \(\{x_0,x_1\}\) is a critical pair for \(\varphi\) and therefore such colorings are non-reconstructible.

Proof

The pictures below describe each case. It is clear that each of the colorings \(\psi _{A_i}\) has exactly one maximal homogeneous set. Let M be the unique maximal homogeneous set of \(\varphi\), say of color i and fix \(x_1\in M\). Let \(A=\{x\in {{\,\mathrm{{\mathbb {N}}}\,}}: \;x\in H \; \text {for some maximal} H\in {{\,\textrm{hom}\,}}(\varphi ) \}\). Since \(\varphi\) is non constant, \(|{{\,\mathrm{{\mathbb {N}}}\,}}\setminus A|\le 2\), by Lemma 6.1. We consider two cases: (1) \({{\,\mathrm{{\mathbb {N}}}\,}}\setminus A=\{x_0\}\). We have two subcases depending on the color of \(\{x_0,x_1\}\). If \(\varphi (\{x_0,x_1\})=1-i\). Then \(\varphi (\{x_0,x\})=1-i\) for all \(x\in M\), by the uniqueness of M. Then \(\varphi =\psi _{A_1}\). Analogously, if \(\varphi (\{x_0,x_1\})=i\), then \(\varphi =\psi _{A_2}\). (2) \({{\,\mathrm{{\mathbb {N}}}\,}}\setminus A=\{x_0,x_2\}\). As in case (1) we have that if \(\varphi (\{x_0,x_1\})=i\), then \(\varphi =\psi _{A_3}\). And, if \(\varphi (\{x_0,x_1\})=1-i\), then \(\varphi =\psi _{A_4}\) (Figs. 15, 16, 17 and 18).

Fig. 15
figure 15

\(\scriptstyle \psi _{A_1}\)

Fig. 16
figure 16

\(\scriptstyle \psi _{A_2}\)

Fig. 17
figure 17

\(\scriptstyle \psi _{A_3}\)

Fig. 18
figure 18

\(\scriptstyle \psi _{A_4}\)

\(\square\)

Now we analyze colorings with exactly two maximal homogeneous sets. The prototype is the coloring associated to a partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into two parts. We present the analysis according to the cardinality of \({{\,\mathrm{{\mathbb {N}}}\,}}\setminus (H_1\cup H_2)\) where \(H_1\) and \(H_2\) are the maximal homogeneous sets.

Lemma 6.3

Let \(\varphi\) be a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) such that \({{\,\textrm{hom}\,}}(\varphi )\) has exactly two maximal elements \(H_1\) and \(H_2\). Then \(\varphi ([H_1]^2)=\varphi ([H_2]^2)\).

Proof

Assume towards a contradiction that \(\varphi ([H_1]^2)=\{1\}\) and \(\varphi ([H_2]^2)=\{0\}\). In particular, \(|H_1\cap H_2|\le 1\). By Ramsey’s Theorem, \({{\,\textrm{hom}\,}}(\varphi )\) contains an infinite set, thus we can assume that \(H_1\) is infinite. Then, \(|H_1\setminus H_2|=\aleph _0\) and \(|H_2\setminus H_1|\ge 2\). For every \(x\in \!\!\!\!\!/H_2\), let

$$\begin{aligned} L_x=\{y\in H_2: \varphi (\{x,y\})=0\}. \end{aligned}$$

We claim that \(|L_x|\le 1\). Otherwise, \(|\{x\}\cup L_x|\ge 3\) and thus it is a 0-homogeneous set. Therefore, \(\{x\}\cup L_x\subseteq H_2\), a contradiction. Analogously, letting \(M_y=\{x\in H_1: \varphi (\{y,x\})=1\}\) for any \(y\in \!\!\!\!\!/H_1\), we have that \(|M_y|\le 1\).

Let us fix \(y\in H_2\setminus H_1\). Since \(|M_y|\le 1\), there are \(p,q\in H_1\setminus H_2\) such that \(\varphi (\{y,p\})=\varphi (\{y,q\})=0\). Thus, \(L_p=L_q=\{y\}\). Since \(|H_1\cap H_2|\le 1\) and \(|H_2|\ge 3\), fix \(z\in H_2\setminus (H_1\cup \{y\})\). Thus, \(z\notin L_p\cup L_q\). That is, \(\varphi (\{z,p\})=\varphi (\{z,q\})=1\), and therefore \(\{p,q,z\}\in {{\,\textrm{hom}\,}}(\varphi )\). By Proposition 6.1(i), \(\{p,q,z\}\) is contained in either \(H_1\) or \(H_2\), which is impossible. \(\square\)

Proposition 6.4

Let \(\varphi\) be a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) with exactly two maximal homogeneous sets \(H_1\) and \(H_2\) such that \({{\,\mathrm{{\mathbb {N}}}\,}}=H_1\cup H_2\). Then, \(\varphi\) is reconstructible if and only if \(H_1\cap H_2\ne \emptyset\).

Proof

Clearly, \({{\,\textrm{hom}\,}}(\varphi )\) has exactly two maximal elements: \(H_1\) and \(H_2\). By Proposition 6.3, we assume that \(H_1\) and \(H_2\) are homogeneous of color 1. Suppose \(H_1\cap H_2\ne \emptyset\). Let \(x_0\in H_1\cap H_2\) and \(y\in H_1\setminus H_2\), \(z\in H_2\setminus H_1\). Notice that \(\{x_0,y,z\}\) is not homogeneous, otherwise \(\{x,y,z\}\subseteq H_1\) or \(\{x,y,z\}\subseteq H_2\), which is impossible. Thus \(\varphi (\{y,z\})=0\). Then, this coloring looks similar to the one depicted in Fig. 19. The points below \(x_0\) are the elements in \(H_1\cap H_2\).

Fig. 19
figure 19

Two maximal homogeneous sets

To see that \(\varphi\) is reconstructible we use Proposition 3.1. Let \(F\subset {{\,\mathrm{{\mathbb {N}}}\,}}\) of size 4. If F is not contained in an homogeneous set, then there is a set Y of size 5 such \(F\subset Y\) and \(\varphi |_Y\) is isomorphic to the coloring given in Example 3.10. Then, \(\varphi\) is reconstructible by Proposition 3.1.

Conversely, suppose now that \(H_1\cap H_2=\emptyset\). Let \(x\in H_1\). Then \(\{y\in H_2:\; \varphi \{x,y\}=1\}\) has at most one point. If for some \(x\in H_1\), there is \(y\in H_2\) such that \(\varphi (\{x,y\})=1\), then \(\{x,y\}\) is a critical pair. Otherwise, if \(\varphi (\{x,y\})=0\) for all \(x\in H_1\) and all \(y\in H_2\), then \(\{x,y\}\) is critical for any \(x\in H_1\) and \(y\in H_2\). In any case, \(\varphi\) is non-reconstructible by Proposition 4.2.

Now we treat the case where \(|{{\,\mathrm{{\mathbb {N}}}\,}}\setminus (H_1\cup H_2)|=1\). Before presenting a general result, we give an example illustrating this case.

Example 6.5

Define \(\varphi :[{{\,\mathrm{{\mathbb {N}}}\,}}]^2\longrightarrow 2\) by

$$\begin{aligned} \varphi (\{n,m\})={\left\{ \begin{array}{ll} 0, &{} \text {if } n=0 \text {and } m>1;\\ 0, &{} \text {if } n=1 \text {and } m>0 \text { is even;}\\ 1, &{} \text {if } n=0 \text {and } m=1;\\ 1, &{} \text {if } n=1 \text {and } m>0 \text { is odd;}\\ 1, &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

See Fig. 20. It is not difficult to see that the only maximal homogeneous sets are \(H_1={{\,\mathrm{{\mathbb {N}}}\,}}\setminus \{0,1\}\) and \(H_2=\{2n+1:n\in {{\,\mathrm{{\mathbb {N}}}\,}}\}\).

Fig. 20
figure 20

Partial drawing of \(\varphi\)

Proposition 6.6

Let \(\varphi\) be a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) with exactly two maximal homogeneous sets \(H_1\) and \(H_2\) and such that \({{\,\mathrm{{\mathbb {N}}}\,}}\setminus (H_1\cup H_2)=\{z\}\) for some z. Then, \(\varphi\) has a critical pair and therefore is non-reconstructible.

Proof

By Proposition 6.3, we assume that \(H_1\) and \(H_2\) are homogeneous of color 1.We have to consider several cases.

  1. (i)

    Suppose there is \(x_0\in H_1\) and \(y_0\in H_2\) such \(\varphi (\{z,x_0\})=\varphi (\{z,y_0\})=1\). We claim that \(\{x_0, z\}\) is a critical pair for \(\varphi\). By a simple argument (as in the proof of Proposition 6.1) we have that such \(x_0\) and \(y_0\) are unique. Thus

    $$\begin{aligned} \varphi (\{z,x\})=\varphi (\{z,y\})=0\;\; \text {for all } x\in H_1\setminus \{x_0\} \text { and} y\in H_2\setminus \{y_0\}. \end{aligned}$$
    (5)

    We claim that \((H_1\cup H_2)\setminus \{x_0,y_0\}\) is homogeneous. In fact, if \(x\in H_1\setminus \{x_0\}\) and \(y\in H_2\setminus \{y_0\}\), then \(\{z,x,y\}\) is not homogeneous. By (5), \(\varphi (\{x,y\})=1\) and from this the claim follows. By the maximality of \(H_1\) and \(H_2\), we can assume w.l.o.g. that \(H_2\setminus \{y_0\}\subseteq H_1\). Notice that \({{\,\mathrm{{\mathbb {N}}}\,}}=(H_1\setminus \{x_0\})\cup \{x_0,y_0, z\}\). Let \(p\in \!\!\!\!\!/\{x_0,z\}\). If \(p\ne y_0\), by (5), \(\varphi (\{z, p\})=0\) and \(\varphi (\{x_0,p\})=1\) as \(p\in H_1\). On the other hand, \(\varphi (\{y_0,z\})=\varphi (\{z,x_0)=1\) and \(\{x_0, y_0, z\}\) is not homogeneous. Thus \(\varphi (\{x_0, y_0\})=0\). This shows that \(\{x_0, z\}\) is a critical pair.

  2. (ii)

    Suppose there is \(x_0\in H_1\) such \(\varphi (\{z,x_0\})=1\) and for all \(y\in H_2\), \(\varphi (\{z,y\})=0\). By a similar argument as before one can show that \(H_1\setminus \{x_0\}\subseteq H_2\). Let \(y_0\in H_2\setminus H_1\). Then we consider two subcases. If \(\varphi (\{x_0, y_0\})=1\), then \(\{x_0,y_0\}\) is a critical pair. And, if \(\varphi (\{x_0, y_0\})=0\), then \(\{z,y_0\}\) is a critical pair. By the symmetry of the problem, we are left with the case where \(\varphi (\{z,x\})=\varphi (\{z,y\})=0\) for all \(x\in H_1\) and all \(y\in H_2\). This implies that \(H_1\cup H_2\) is homogeneous, which is imposible by the maximality of \(H_1\) and \(H_2\). In fact, given \(x\in H_1\) and \(y\in H_2\) different, we have that \(\{x,y,z\}\) is not homogeneous, thus \(\varphi (\{x,y\})=1\).

We do not have a general result about colorings such that \({{\,\mathrm{{\mathbb {N}}}\,}}\setminus (H_1\cup H_2)\) has two elements. We just present an example which seems interesting as it is non-reconstructible but does not have a critical pair.

Example 6.7

The coloring \(\varphi\) (see Fig. 21) has two maximal homogeneous sets, is non-reconstructible and has no critical pair.

Fig. 21
figure 21

\(\varphi\)

Fig. 22
figure 22

\(\psi\)

Then, \(H_1=\{2,4,5,6,\cdots \}\) and \(H_2=\{3,4,5,6,\ldots \}\) are the only maximal homogeneous sets and \({{\,\mathrm{{\mathbb {N}}}\,}}\setminus (H_1\cup H_2)=\{0,1\}\). There is no critical pair for \(\varphi\) but \(\psi\) (see Fig. 22) is a non-trivial reconstruction of \(\varphi\).

We finish this section with an example of a non-reconstructible coloring with three pairwise disjoint infinite maximal homogeneous sets. Contrarily, we have proved in Theorem 5.1 that the coloring associated to any partition of \({{\,\mathrm{{\mathbb {N}}}\,}}\) into three parts belongs to \({\mathcal {R}}\). Thus, knowing that \({{\,\textrm{hom}\,}}(\varphi )\) has at least three infinite maximal pairwise disjoint elements does not guarantee that \(\varphi \in {\mathcal {R}}\).

Example 6.8

Let \(A=\{a_i:i\in {{\,\mathrm{{\mathbb {N}}}\,}}\}\), \(B=\{b_i:i\in {{\,\mathrm{{\mathbb {N}}}\,}}\}\) and \(C=\{c_i:i\in {{\,\mathrm{{\mathbb {N}}}\,}}\}\) be pairwise disjoint subsets of \({{\,\mathrm{{\mathbb {N}}}\,}}\) such that \({{\,\mathrm{{\mathbb {N}}}\,}}=A\cup B\cup C\). Define \(\varphi :{{\,\mathrm{[{\mathbb {N}}]^2}\,}}\longrightarrow 2\) by \(\varphi (\{a_i,a_j\})=\varphi (\{b_i,b_j\})=\varphi (\{c_i,c_j\})=1\) for every \(i\ne j\); \(\varphi (\{a_0,b_0\})=\varphi (\{a_0,c_{2i}\})=\varphi (\{b_0,c_{2i+1}\})=1\) for every \(i\in {{\,\mathrm{{\mathbb {N}}}\,}}\); and \(\varphi (\{n,m\})=0\) for any other \(\{n,m\}\in {{\,\mathrm{[{\mathbb {N}}]^2}\,}}\). See Fig. 23.

Fig. 23
figure 23

Partial drawing of \(\varphi\)

Notice that AB and C are maximal elements of \({{\,\textrm{hom}\,}}(\varphi )\). Moreover, \(\{a_0,b_0\}\) is critical for \(\varphi\), thus \(\varphi \in \lnot {\mathcal {R}}\), by Proposition 4.2.

7 Complexity of the Reconstruction Problem

This section is devoted to analyzing the reconstruction problem from the descriptive set theoretic point of view. We show that the problem of recovering a coloring from the collection of its homogeneous sets can be done in a Borel way.

The space of colorings \(2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) is endowed with the product topology which has as basic open sets \(\{\varphi \in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}: \; \varphi _0\subseteq \varphi \}\) for \(\varphi _0\) a coloring on a finite subset of \({{\,\mathrm{{\mathbb {N}}}\,}}\). Let \(K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\) be the hyperspace of compact subsets of \(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\) with the Vietoris topology (see, for instance, [8, 4F]). A subbasis for \(K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\) consists of the sets \(V^+=\{L\in K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}): \; L\subset V\}\) and \(V^-=\{L\in K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}): \; L\cap V\ne \emptyset \}\), for \(V\subseteq 2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\) open. As \(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\) is zero dimensional, we can also assume that V is clopen. We recall that a subset of a topological space is \(G_\delta\) (respectively, \(F_\sigma\)), if it is a countable intersection of open sets (respectively, a countable union of closed sets).

Under the usual identification of a subset of \({{\,\mathrm{{\mathbb {N}}}\,}}\) with its characteristic function, \(\hom (\varphi )\) is not topologically closed in \(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\). Notice, however, that if \(A\in cl({{\,\textrm{hom}\,}}(\varphi ))\setminus {{\,\textrm{hom}\,}}(\varphi )\), then \(|A|\le 2\). Thus \(cl({{\,\textrm{hom}\,}}(\varphi ))= cl({{\,\textrm{hom}\,}}(\psi ))\) iff \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). Since we want to analyze the reconstruction problem from a topological point of view, it is better to work with a closed set instead of \({{\,\textrm{hom}\,}}(\varphi )\). However, it is more convenient to use a closed set larger than the closure. Let

$$\begin{aligned} {{\,\mathrm{{\overline{hom}}}\,}}(\varphi )={{\,\textrm{hom}\,}}(\varphi )\cup \{A\subset {{\,\mathrm{{\mathbb {N}}}\,}}: |A|\le 2\}. \end{aligned}$$

Notice that \(cl({{\,\textrm{hom}\,}}(\varphi ))\subseteq {{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\) and \({{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\) is closed. Also, \({{\,\mathrm{{\overline{hom}}}\,}}(\varphi )= {{\,\mathrm{{\overline{hom}}}\,}}(\psi )\) iff \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\).

The main result of this section is to show that there is a Borel function \(g:K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\rightarrow 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) such that

$$\begin{aligned} {{\,\mathrm{{\overline{hom}}}\,}}(g({{\,\mathrm{{\overline{hom}}}\,}}(\varphi )))={{\,\mathrm{{\overline{hom}}}\,}}(\varphi ) \end{aligned}$$

for all \(\varphi \in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\). So \(g({{\,\mathrm{{\overline{hom}}}\,}}(\varphi ))\) is a coloring recovered from \({{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\), but notice that \(g({{\,\mathrm{{\overline{hom}}}\,}}(\varphi ))\) might be neither \(\varphi\) nor \(1-\varphi\) when \(\varphi \not \in {\mathcal {R}}\).

Proposition 7.1

The collection of all colorings on \({{\,\mathrm{{\mathbb {N}}}\,}}\) belonging to \({\mathcal {R}}\) is a dense \(G_\delta\) subset of \(2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\).

Proof

Recall that \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\) if and only if \({{\,\textrm{hom}\,}}(\varphi )\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{3}={{\,\textrm{hom}\,}}(\psi )\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{3}\) (see Proposition 2.1). The following set is closed:

$$\begin{aligned} E=\{(\varphi ,\psi )\in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\times 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}: \; {{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\}. \end{aligned}$$

In fact, \((\varphi ,\psi )\not \in E\) if and only if there is \(H\in [{{\,\mathrm{{\mathbb {N}}}\,}}]^{3}\) such that either \(H\in {{\,\textrm{hom}\,}}(\varphi )\setminus {{\,\textrm{hom}\,}}(\psi )\) or \(H\in {{\,\textrm{hom}\,}}(\psi )\setminus {{\,\textrm{hom}\,}}(\varphi )\). For every finite set H, it is straightforward to verify that \(\{\varphi \in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}: \; H\in {{\,\textrm{hom}\,}}(\varphi )\}\) is clopen. Thus the complement of E is open.

Now consider the relation \(\varphi \approx \psi\) if either \(\varphi =\psi\) or \(\psi = 1-\varphi\). Clearly \(\approx\) is a closed subset of \(2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\times 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\). Finally we have

$$\begin{aligned} \varphi \not \in {\mathcal {R}}\;\Leftrightarrow \;\; \exists \psi \in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\; ( (\varphi ,\psi )\in E \wedge (\varphi \not \approx \psi )). \end{aligned}$$

Thus, the collection of colorings that are not reconstructible is the projection of a \(K_\sigma\) set (i.e. a countable union of compact sets) and thus it is also \(K_\sigma\).

Finally, from the definition of the product topology on \(2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\), given a coloring \(\varphi\), we have that the collection of all its finite changes, i.e. \(\{\varphi _a:\; a\subseteq [{{\,\mathrm{{\mathbb {N}}}\,}}]^2 \text{ is } \text{ finite }\}\) is a dense subset of \(2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\). Thus, by Corollary 3.14, \({\mathcal {R}}\) is dense. \(\square\)

Proposition 7.2

The function \({{\,\mathrm{{\overline{hom}}}\,}}:2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\rightarrow K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\) given by \(\varphi \mapsto {{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\) is Borel.

Proof

Let V be a clopen subset of \(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\). We need to show that \(C(V^+)=\{\varphi \in 2^{{{\,\mathrm{[{\mathbb {N}}]^2}\,}}}:\; {{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\in V^+\}\) and \(C(V^-)=\{\varphi \in 2^{{{\,\mathrm{[{\mathbb {N}}]^2}\,}}}:\; {{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\in V^-\}\) are Borel.

First, if \([{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}\not \subseteq V\), then \(C(V^+)=\emptyset\) and there is nothing to show. So we assume that \([{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}\subseteq V\), In this case, \({{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\subseteq V\) is equivalent to \({{\,\textrm{hom}\,}}(\varphi )\subseteq V\). Then, we have that

$$\begin{aligned} {{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\subseteq V \Leftrightarrow (\forall H\in [{{\,\mathrm{{\mathbb {N}}}\,}}]^{<\omega })(H\in {{\,\textrm{hom}\,}}(\varphi )\rightarrow H\in V). \end{aligned}$$
(6)

Notice that \(\{\varphi \in 2^{{{\,\mathrm{[{\mathbb {N}}]^2}\,}}}:\; H\in {{\,\textrm{hom}\,}}(\varphi )\}\) is clopen for every finite \(H\subset {{\,\mathrm{{\mathbb {N}}}\,}}\). From this and (6) we conclude that \(C(V^+)\) is \(G_\delta\).

For \(C(V^-)\) notice that if \(V\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}\ne \emptyset\), then \(C(V^-)=2^{{{\,\mathrm{[{\mathbb {N}}]^2}\,}}}\) and there is nothing to show. Since, \([{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}\) is a closed nowhere dense subset of \(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\), we can assume w.l.o.g. that \(V\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}=\emptyset\). In this case, we have \({{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\cap V\ne \emptyset\) if and only if \({{\,\textrm{hom}\,}}(\varphi )\cap V\ne \emptyset\). And, as before, this happens when \({{\,\textrm{hom}\,}}(\varphi )\cap [{{\,\mathrm{{\mathbb {N}}}\,}}]^{<\omega }\cap V\ne \emptyset\). Thus \(C(V^-)\) is open. \(\square\)

Let \(HOM=\{{{\,\mathrm{{\overline{hom}}}\,}}(\varphi ):\;\varphi \in 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\}\).

Proposition 7.3

HOM is \(G_\delta\) in \(K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\) and thus it is Polish.

Proof

Let \({\mathcal {P}}_n\) denote the collection of subsets of \(n+1\) of size at least 3. Let \(L\in K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\). We claim

$$\begin{aligned} L\in HOM\;\;\Leftrightarrow \;\; [{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}\subseteq L\; \& \; (\forall n\ge 2)\,(\exists \varphi \in 2^{[n+1]^2})\, ( L\cap {\mathcal {P}}_n={{\,\textrm{hom}\,}}(\varphi )). \end{aligned}$$
(7)

In fact, suppose \(\varphi\) is a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\) and \(L={{\,\textrm{hom}\,}}(\varphi )\). Then, \(\varphi |_{n+1}\) satisfies the right hand side of (7).

For the other direction, let \(L\in K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\) be such that \([{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}\subseteq L\) and consider the following set

$$\begin{aligned} T_L=\{\varphi \in 2^{[n+1]^2}: \; L\cap {\mathcal {P}}_n={{\,\textrm{hom}\,}}(\varphi )\; \text{ and } n\in {{\,\mathrm{{\mathbb {N}}}\,}}\}. \end{aligned}$$

Then, \(T_L\) is a finitely branching tree. If L satisfies the right hand side of (7), then \(T_L\) is infinite, thus it has a branch \(\varphi\) which is clearly a coloring on \({{\,\mathrm{{\mathbb {N}}}\,}}\). Then, L and \({{\,\textrm{hom}\,}}(\varphi )\) contain the same finite sets of size at least 3, thus \(L={{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\).

To see that HOM is \(G_\delta\) we observe the following. The collection of all \(L\in K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\) such that \([{{\,\mathrm{{\mathbb {N}}}\,}}]^{\le 2}\subseteq L\) is closed. On the other hand, given \(B\subseteq A\subset 2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\) with A finite. Then, \(\{L\in K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}):\; L\cap A=B\}\) is \(G_\delta\). The reason is that the relation \(``x\in L"\) is closed in \(2^{{{\,\mathrm{{\mathbb {N}}}\,}}}\times K(2^{{{\,\mathrm{{\mathbb {N}}}\,}}})\) and we have

$$\begin{aligned} L\cap A=B\;\Leftrightarrow \; \forall x\in A\; (x\in L\leftrightarrow x\in B). \end{aligned}$$

The last claim is the classical fact that a subset of a Polish space (i.e. a completely metrizable separable space) is itself Polish if and only if it is \(G_\delta\) (see [8, 3.11]). \(\square\)

Theorem 7.4

There is \(g: HOM\rightarrow 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) Borel such that, for all \(L\in HOM\),

$$\begin{aligned} {{\,\mathrm{{\overline{hom}}}\,}}(g(L))= L. \end{aligned}$$

Proof

Consider the following relation:

$$\begin{aligned} A=\{(L, \varphi )\in HOM\times 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}:\; L={{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\}. \end{aligned}$$

Since the function \({{\,\mathrm{{\overline{hom}}}\,}}\) is Borel (see Proposition 7.2), A is Borel. We claim that all vertical sections of A are closed (and hence compact). In fact, let E be the equivalence relation on \(2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) given by \(\varphi E \psi\) if \({{\,\textrm{hom}\,}}(\varphi )={{\,\textrm{hom}\,}}(\psi )\). We have seen in the proof of Proposition 7.1 that E is closed. Recall that \(\hom (\varphi )=\hom (\psi )\) iff \({{\,\mathrm{{\overline{hom}}}\,}}(\varphi )={{\,\mathrm{{\overline{hom}}}\,}}(\psi )\). Thus, for every \(L\in HOM\), if \(L={{\,\mathrm{{\overline{hom}}}\,}}(\varphi )\), then \(A_L\) is the E-equivalence class of \(\varphi\) which is closed, as promised.

Since HOM is Polish (by Proposition 7.3), we can use a classical uniformization theorem to define g. We know that any Borel relation on a Polish space with \(K_\sigma\) sections has a Borel uniformization (see [8, 18.18]). Thus, there is a Borel map \(g:HOM\rightarrow 2^{[{{\,\mathrm{{\mathbb {N}}}\,}}]^2}\) such that \({{\,\mathrm{{\overline{hom}}}\,}}(g(L))= L\).\(\square\)