1 Introduction

The center of distances seems to be an elementary and natural notion which, as far as we know, has not been studied in the literature. It is an intuitive and natural concept which allows us to prove a generalization of von Neumann’s theorem on permutations of two sequences with the same set of cluster points in a compact metric space, see Theorem 2.1. We have realized that the computation of centers of distances—even for well-known metric spaces—is not an easy task because it requires skillful use of fractions. We have only found a few algorithms which enable us to compute centers of distances, see Proposition 3.2 and Lemma 5.1.

We present the use of this notion for impossibility proofs, i.e., to show that a given set cannot be the set of subsums, for example see Corollary 5.5. We refer the readers to the paper [14] by Nitecki, as it provides a good introduction to facts about the set of subsums of a given sequence. It is also worth to look into the papers [1,2,3, 8] as well as others cited therein.

In several papers, the set of all subsums of the sequence \(\frac{3}{4}, \frac{1}{2}, \frac{3}{16}, \frac{1}{8}, \ldots , \frac{3}{4^n}\), \(\frac{2}{4^n}, \ldots \), i.e., the set \(\mathbb {X}\) consisting of all sums

where A and B are arbitrary subsets of positive natural numbers, is considered. Guthrie and Nymann, see [5] and cf. [15] and [14, p. 865], have shown that But, as it can be seen in Corollary 4.2, we get that For these reasons, we have an impression that the arithmetical properties of \( \mathbb {X}\) are not known well and described in the literature. Results concerning some properties of \(\mathbb {X}\) are discussed in Propositions 4.14.3 and 4.4; Corollary 4.5; Theorems 5.25.35.46.1 and 6.2; and they are also presented in Figs. 12 and 3.

2 A generalization of von Neumann’s theorem

Given a metric space X with the distance d. Suppose that sequences \(( x_n)_{n\in \omega } \) and \((y_n)_{ n\in \omega } \) in X have the same set of cluster points C. For them, von Neumann [13] proved that there exists a permutation \(\pi :\omega \rightarrow \omega \) such that Proofs of the above statement can be found in [6, 18]. However, we would like to present a slight generalization of this result. To prove it we use the so-called “back-and-forth” method, which was developed in [7, pp. 35–36] and is still used successfully by many mathematicians, for example cf. [4, 16] or [17], etc. It is also worth mentioning the modern development of classical works of Fraïssé by Kubiś [11].

Consider the set

which will be called the center of distances of X.

Theorem 2.1

Suppose that sequences and in X have the same set of cluster points \( C \subseteq X\), where (Xd) is a compact metric space. If \(\alpha \in S(C)\), then there exists a permutation \(\pi :\omega \rightarrow \omega \) such that

Proof

Given \(\alpha \in S(C)\), we shall renumber by establishing a permutation \(\pi :\omega \rightarrow \omega \) such that

Put \(\pi (0)= 0\) and assume that values and inverse values are already defined. We proceed step by step as follows.

If is not defined, then take points \( x_m, y_m \in C\) such that and \(d(x_m, y_m)=\alpha \). Choose to be the first element of not already used such that

If is not defined, then take points \( p_m, q_m \in C\) such that and \(d(p_m, q_m)=\alpha \). Choose to be the first element of not already used such that

The set \(C\subseteq X\), as a closed subset of a compact metric space, is compact. Hence the required points \(x_m,y_m,p_m\) and \(q_m\) always exist and also

It follows that \(\square \)

Let us note that von Neumann’s theorem mentioned above is applicable for some other problems, for example cf. [9] or [10], etc. As we have seen, the notion of a center of distances appears in a natural way in the context of metric spaces. Though the computation of centers of distances is not an easy task, it can be done for important examples giving further information about these objects.

3 On the center of distances and the set of subsums

Given a metric space X, observe that \(0\in S(X)\) and also, if and \(0\in X\), then \(S(X) \subseteq X\).

If is a sequence of reals, then the set

is called the set of subsums of In this case, we have \(d(x,y)=|x-y|\). If X is a subset of the reals, then any maximal interval disjoint from X is called an X-gap. Additionally, when X is a closed set, then any maximal interval included in X is called an X-interval.

Proposition 3.1

If X is the set of subsums of a sequence , then \(a_n\in S(X)\), for all \(n\in \omega \).

Proof

Suppose If \(n\in A\), then \(x-a_n\in X\) and \(d(x, x-a_n)= a_n\). When \(n\notin A\), then \(x+a_n\in X\) and \(d(x, x+a_n)= a_n\). \(\square \)

In some cases, the center of distances of the set of subsums of a given sequence can be determined. For example, the unit interval is the set of subsums of the sequence So, the center of distances of the subsums of is equal to

Proposition 3.2

Assume that , for a number \(\lambda >0\) and a set If and \(n \in \omega \), then \(\lambda ^n x\notin X\).

Proof

Without loss of generality, assume that \(X\cap (0,b)\not =\varnothing \). Thus \(\lambda \leqslant 1\), since otherwise we would get \( b < \lambda ^m t \in X\), for some \(t\in X\) and \(m\in \omega \). Obviously Assume that \(\lambda ^nx\notin X\), so we get

Therefore \(\lambda ^{n+1}x\notin X\), which completes the induction step. \(\square \)

Using Proposition 3.2 with \(\lambda = \frac{1}{q^n} \) and \(b=1\), one can prove the next theorem. In fact, this proposition explains the hidden argument in the next proof.

Theorem 3.3

If \(q>2\) and \(a> 0\), then the center of distances of the set of subsums of a geometric sequence consists of exactly zero and the terms of this sequence.

Proof

By Proposition 3.1, we get \(\frac{a}{q^n} \in S(X)\) for \(n>0\). Without loss of generality we can assume \(a=1\). The diameter of the set X of subsums of the sequence equals Putting , since \(\frac{1}{q-1} < 1\), we get

So, \( \frac{1}{q} \in X \) witnesses that no \(t > \frac{1}{q} \) belongs to S(X). Indeed,

$$\begin{aligned} \frac{1}{q} -t <0 \quad \text{ and }\quad \frac{1}{q} +t> \frac{2}{q} > \frac{1}{q-1}=\mathscr {X}(0). \end{aligned}$$

If \(t\in I\), where I is an X-gap, then \(t\notin S(X)\). Indeed, then \(t\notin X\) and , i.e., \(0\in X\) witnesses that \(t\notin S(X)\). But the intervals are X-gaps, hence is disjoint from S(X).

Now, assume that \(n>0\) is fixed. Suppose that and Thus witnesses that \(t \notin S(X)\). Indeed, implies , and implies that the X-gap has to contain

If and , then the interval is included in the interval No X-gap of the length

is contained in the interval Therefore, one can find

which witnesses that \(t \notin S(X)\). Indeed, we get hence \(x-t<0\); and we have that \(x+t \) belongs to the X-gap

By Proposition 3.1, we get \(\frac{1}{q^n} \in S(X)\) for \(n>0\). \(\square \)

Note that, when we put \(a = 2\) and \(q = 3\), Theorem 3.3 applies to the Cantor ternary set. For and \(q=4\) this theorem applies to sets \(\mathscr {C}_1\) and \(\mathscr {C}_2\) which will be defined in Sect. 4.

4 An example of a Cantorval

Following [5, p. 324], consider the set of subsums

Thus, , where and Following [12, p. 330], because of its topological structure, one can call this set a Cantorval (or an \(\mathscr {M}\)-Cantorval).

Before discussing the affine properties of the Cantorval \(\mathbb {X}\) we shall introduce the following useful notions. Every point x in \(\mathbb {X}\) is determined by a sequence \((x_n)_{n>0} \), where The value \(x_n\) is called the n-th digit of x and the sequence \( (x_n)_{n>0}\) is called a digital representation of the point \(x\in \mathbb {X}\). Keeping in mind the formula for the sum of an infinite geometric series, we denote the tails of series as follows:

Since \(\mathscr {X}(0) = \frac{5}{3}\) we get The involution \(h:\mathbb {X}\rightarrow \mathbb {X}\) defined by the formula

$$\begin{aligned} x\mapsto h(x)=\frac{5}{3} - x \end{aligned}$$

is the symmetry of \(\mathbb {X}\) with respect to the point \(\frac{5}{6}\). In order to check this, it suffices to note that

and also that

So, we get \(\mathbb {X}=\frac{5}{3} -\mathbb {X}\) and \(\mathbb {X}=h[\mathbb {X}]\).

Fig. 1
figure 1

An approximation of the Cantorval

In Fig. 1, there are marked gaps and , both of the length \(\frac{1}{12}\). Six gaps and have the length \(\frac{1}{48}\). The rest of gaps are shorter and have lengths not greater than \(\frac{1}{192}\). To describe intervals which lie in \(\mathbb {X}\), we need the following. Let

We get and Keeping in mind \(\mathscr {C}_1(0)=\frac{2}{3}\) and , we check that is the smallest real number in \(K_n\). Similarly, using and \(\mathscr {C}_2(0)=1\), we check that is the greatest real number in \(K_n\). In fact, we have the following.

Proposition 4.1

Reals from \(K_n\) are distributed consecutively at the distance \(\frac{1}{4^n}\), from up to , in the Therefore and

Proof

Since \(|K_1|=1\) and \(|K_2|=5\), the assertions are correct in these cases. Suppose that \(K_{n-1}= \{ f^{n-1}_1\!, f^{n-1}_2\!, \ldots , f^{n-1}_{|K_{n-1}|}\},\) where

for \(0<j < |K_{n-1}|-1\); in consequence Consider the sum

$$\begin{aligned} K_{n-1} \cup \biggl (\frac{2}{4^n} + K_{n-1}\biggr ) \cup \biggl (\frac{3}{4^n} + K_{n-1}\biggr ) \cup \biggl (\frac{5}{4^n} + K_{n-1}\biggr ), \end{aligned}$$

next remove the point \(\frac{5}{4^n} + \), and then add points and We obtain the set

$$\begin{aligned} K_n=\Bigl \{ f^{n}_1, f^{n}_2, \ldots , f^{n}_{\frac{1}{3}(4^n-1)}\Bigr \} , \end{aligned}$$

which is what we need. \(\square \)

Corollary 4.2

The interval is included in the Cantorval \( \mathbb {X}\).

Proof

The union is dense in the interval \(\square \)

Note that it has been observed that , see [5] or cf. [14]. Since \(\mathbb {X}\) is centrally symmetric with \(\frac{5}{6}\) as a point of inversion, this yields another proof of the above corollary. However, our proof seems to be new and it is different from the one included in [5].

Put , for \(n\in \omega \). So, each \(C_n\) is an affine copy of \(\mathbb {X}\).

Proposition 4.3

The subset is the union of pairwise disjoint affine copies of \(\mathbb {X}\). In particular, this union includes two isometric copies of , for every \(n>0\).

Proof

The desired affine copies of \(\mathbb {X}\) are \(C_1\) and , \(\frac{1}{2} + C_2\) and , and so on, i.e., and \(\square \)

Proposition 4.4

The subset is the union of six pairwise disjoint affine copies of

Proof

The desired affine copies of lie as shown in Fig. 2. \(\square \)

Fig. 2
figure 2

The arrangement of affine copies of D

Corollary 4.5

The Cantorval has Lebesgue measure 1.

Proof

There exists a one-to-one correspondence between \(\mathbb {X}\)-gaps and \(\mathbb {X}\)-intervals as it is shown in Fig. 3.

In view of Propositions 4.3 and 4.4, we calculate the sum of lengths of all gaps which lie in as follows:

Since \(\frac{5}{3} - \frac{2}{3} =1\) we are done. \(\square \)

Fig. 3
figure 3

The correspondence between \(\mathbb {X}\)-gaps and \(\mathbb {X}\)-intervals

If we remove the longest interval from , then we get the union of three copies of D, each congruent to . This observation—we used it above by default—is sufficient to calculate the sum of lengths of all \(\mathbb {X}\)-intervals as follows:

Therefore the boundary is a null set.

5 Computing centers of distances

In case of subsets of the real line we formulate the following lemma.

Lemma 5.1

Given a set disjoint from an interval , assume that Then the center of distances S(C) is disjoint from the interval , i.e.,

Proof

Given , consider We get

$$\begin{aligned} x \leqslant \frac{\alpha }{2} \leqslant \alpha - x< t < \beta -x. \end{aligned}$$

Since \(\alpha< x+t < \beta \), we get \(x+t \notin C\), also \(x<t\) implies \(x-t \notin C\). Therefore \(x\in C\) witnesses \(t\notin S(C)\). \(\square \)

We will apply the above lemma by putting suitable C-gaps in the place of the interval In order to obtain \(t\notin S(C)\), we must find \(x <t\) such that and \(x\in C\). For example, this is possible when \(\frac{\alpha }{2}< t < \alpha \) and the interval includes no C-gap of the length greater than or equal to \(\beta -\alpha \). But if such a gap exists, then we choose the required x more carefully.

Theorem 5.2

The center of distances of the Cantorval \(\mathbb {X}\) is equal to

Proof

The diameter of \(\mathbb {X}\) is \(\frac{5}{3}\) and \(\frac{5}{6} \in \mathbb {X}\), hence no \(t>\frac{5}{6}\) belongs to \(S(\mathbb {X})\). We use Lemma 5.1 with respect to the gap Keeping in mind the affine description of \(\mathbb {X}\), we see that the set has a gap of the length \(\frac{1}{12}\). For , we choose x in \(\mathbb {X}\) such that So, if , then \(t\notin S(\mathbb {X})\). Similarly using Lemma 5.1 with the gap , we check that for there exists x in \(\mathbb {X}\) such that Hence, if , then \(t\notin S(\mathbb {X})\). Analogously, using Lemma 5.1 with the gap , we check that if \(\frac{5}{24}< t \leqslant \frac{29}{96} < \frac{5}{12}\), then \(t\notin S(\mathbb {X})\).

For the remaining part of the interval \([0,+\infty )\) the proof uses the similarity of \(\mathbb {X}\) with \(\frac{1}{4^n}{\cdot } \mathbb {X}\) for \(n>0\). Indeed, we have shown that the \(\mathbb {X}\)-gaps and witness that For \(n>0\), by the similarity, the \(\mathbb {X}\)-gaps , and witness that

We have by Proposition 3.1. \(\square \)

Denote Thus the closure of an \(\mathbb {X}\)-gap is a \(\mathbb {Z}\)-interval and the interior of an \(\mathbb {X}\)-interval is a \(\mathbb {Z}\)-gap.

Theorem 5.3

The center of distances of the set \(\mathbb {Z}\) is trivial, i.e., \(S(\mathbb {Z})= \{0\}\).

Proof

If \(\alpha >1\), then \( \cap \mathbb {Z}= \varnothing \), hence \(1\in \mathbb {Z}\) implies \(\alpha \notin S(\mathbb {Z})\). If , then implies \(\alpha \notin S(\mathbb {Z})\). Indeed, the number \(1+\frac{11}{24}\) belongs to the \(\mathbb {Z}\)-gap and the number \(\frac{1}{4}+\frac{11}{24}\) belongs to the \(\mathbb {Z}\)-gap and the number \(\frac{11}{24} - \frac{1}{4}\) belongs to the \(\mathbb {Z}\)-gap Also \(0\in \mathbb {Z}\) implies since is a \(\mathbb {Z}\)-gap. For the same reason \(\frac{1}{4} \in \mathbb {Z}\) implies \(\frac{2}{3} \notin S(\mathbb {Z})\) and \(\frac{1}{3} \in \mathbb {Z}\) implies that no belongs to \(S(\mathbb {Z})\). Since \(\frac{1}{6}<\frac{17}{32} -\frac{1}{3} <\frac{1}{4}\) and \(\frac{2}{3}<\frac{17}{32} +\frac{1}{3} <1\), then \(\frac{17}{32} \in \mathbb {Z}\) implies \(\frac{1}{3} \notin S(\mathbb {Z})\). But, if , then \(\frac{1}{2} \in \mathbb {Z}\) implies \(\alpha \notin S(\mathbb {Z})\). Indeed, \(\frac{1}{6}<\frac{1}{2} - \alpha <\frac{1}{4} \) and \(\frac{3}{4}<\frac{1}{2} + \alpha <\frac{5}{6}\). So far, we have shown In fact, sets and \(S(\mathbb {Z})\) are always disjoint, since

Therefore implies , a contradiction. Finally, we get \(S(\mathbb {Z}) = \{0\}\). \(\square \)

Now, denote Thus, each \(\mathbb {X}\)-gap is also a \(\mathbb {Y}\)-gap, and the interior of an \(\mathbb {X}\)-interval is a \(\mathbb {Y}\)-gap.

Theorem 5.4

Proof

Since the numbers \(0, \frac{1}{4}, \frac{1}{2}, \frac{17}{32}, 1\) and are in \(\mathbb {Y}\), we get

as in the proof of Theorem 5.3. We see that \(1\in S(\mathbb {Y})\), because

$$\begin{aligned} \mathbb {Y}\cap \biggl [0,\frac{2}{3}\biggr ] + 1 = \mathbb {Y}\cap \biggl [1, \frac{5}{3}\biggr ]. \end{aligned}$$

Moreover

$$\begin{aligned} \biggl (\mathbb {Y}\cap \biggl [0,\frac{1}{6}\biggr ] +\frac{1}{4}\biggr ) \cup \biggl ( \mathbb {Y}\cap \biggl [0, \frac{1}{6}\biggr ] + \frac{1}{2}\biggr ) \subset \mathbb {Y}, \end{aligned}$$

so \(\frac{1}{4} \in S(\mathbb {Y})\). Similarly, we check that \(\frac{1}{4^n} \in S(\mathbb {Y})\). \(\square \)

Corollary 5.5

Neither \(\mathbb {Z}\) nor \(\mathbb {Y}\) is the set of subsums of a sequence.

Proof

Since \(S(\mathbb {Z})=\{0\}\), Proposition 3.1 decides the case of \(\mathbb {Z}\). Also, this proposition decides the cases of \(\mathbb {Y}\), since \(\square \)

Let us add that the set of subsums of the sequence is included in \(\mathbb {Y}.\) One can check this, observing that each number , where the nonempty set \(A\subset \omega \) is finite, is the right end of an \(\mathbb {X}\)-interval.

6 Digital representation of points in the Cantorval \(\mathbb {X}\)

Assume that and are digital representations of a point \(x\in \mathbb {X}\), i.e.,

where We are going to describe dependencies between \( a_n\) and \( b_n \). Suppose \(n_0\) is the least index such that Without loss of generality, we can assume that \(a_{n_0}\!=2 <b_{n_0}\!=3\), bearing in mind that And then we say that A is chasing B (or B is being caught by A) in the \(n_0\)-step: in other words, and \(a_k=b_k\) for \(k<n_0\). If it is never the case that \(a_k=5\) and \(b_k=0\), then it has to be \(b_k+3=a_k\) for all \(k>n_0\). In such a case, we obtain since

Suppose \(n_1\) is the least index such that \(a_{n_1}\!=5\) and \(b_{n_1}\!=0\), thus B is chasing A in the \(n_1\)-step. Proceeding this way, we obtain an increasing (finite or infinite) sequence \(n_0< n_1 < \cdots \) such that and for Moreover, A starts chasing B in the \(n_k\)-step for even k’s and B starts chasing A in the \(n_k\)-step for odd k’s, for the rest of steps changes of chasing do not occur.

Theorem 6.1

Assume that \(x\in \mathbb {X}\) has more than one digital representation. There exist a finite or infinite sequence of positive natural numbers \(n_0< n_1 < \cdots \) and exactly two digital representations and of x such that:

  • , whenever \(0<k<n_0\);

  • \(a_{n_0}\!= 2\) and \(b_{n_0}\!=3\);

  • \(a_{n_k}\!= 5\) and \(b_{n_k}\!=0\), for odd k;

  • \(a_{n_k}\!= 0\) and \(b_{n_k}\!=5\), for even \(k>0\);

  • \(a_i \in \{3,5\}\) and \(a_i - b_i =3\), whenever

  • \(a_i \in \{0,2\}\) and \(b_i - a_i =3\), whenever

Proof

According to the chasing algorithm described above in the step \(n_k \) the roles of chasing are reversed. But, if the chasing algorithm does not start, then the considered point has a unique digital representation. \(\square \)

The above theorem makes it easy to check the uniqueness of digital representation. For example, if \(x \in \mathbb {X}\) has a digital representation \((x_n)_{n>0}\) such that \(x_n=2\) and \(x_{n+1}=3\) for infinitely many n, then this representation is unique. Indeed, suppose and are two different digital representations of a point \(x\in \mathbb {X}\) such that \(a_k =b_k\), whenever \(0<k<n_0\) and \(a_{n_0}\!= 2 < b_{n_0}\!=3\). By Theorem 6.1, the digit 3 never occurs immediately after the digit 2 in digital representations of x for the digits greater than \(n_0\), since it has to be for \(k>n_0\).

The map is a continuous function from the Cantor set (a homeomorphic copy of the Cantor ternary set) onto the Cantorval such that the preimage of a point has at most two points. In fact, the collection of points with two-point preimages and its complement are both of the cardinality continuum. By the algorithm described above, each sequence \(n_0< n_1 < \cdots \) of positive natural numbers determines exactly two sequences and such that

and vice versa. In the following theorem, we will use the abbreviation

Theorem 6.2

Let \(A\subset B\) be such that and A are infinite. Then the set of subsums of a sequence consisting of different elements of A is homeomorphic to the Cantor set.

Proof

Fix a nonempty open interval \(\mathbb {I}\). Assume that is the digital representation of a point Choose natural numbers \(m>k\) such that numbers and belong to \(\mathbb {I}\). Then choose \(j>m\) such that , where \(a =2\) or \(a=3\). Finally put \(b_{n} = a_{n}\), for \( 0<n \leqslant k\); and \(b_{i} = 0\) for other cases. Since \(b_m=0\), we get Theorem 6.1 together with conditions and imply that the point is not in the set of subsums of A. Thus, this set being dense in itself and closed is homeomorphic to the Cantor set. \(\square \)