The algebraic difference of central Cantor sets and self-similar Cantor sets
aa r X i v : . [ m a t h . C A ] F e b THE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS ANDSELF-SIMILAR CANTOR SETS
PIOTR NOWAKOWSKI
Abstract.
Let C ( a ) , C ( b ) ⊂ [0 ,
1] be the central Cantor sets generated by sequences a, b ∈ (0 , N .The main result in the first part of the paper gives a necessary condition and a sufficient conditionfor sequences a and b which inform when C ( a ) − C ( b ) is equal to [ − ,
1] or is a finite union of closedintervals. In the second part we investigate some self-similar Cantor sets C ( l, r, p ), which we callS-Cantor sets, generated by numbers l, r, p ∈ N , l + r < p . We give a full characterization of theset C ( l , r , p ) − C ( l , r , p ) which can take one of the form: the interval [ − , Introduction
For
A, B ⊂ R , we denote by A ± B the set { a ± b : a ∈ A, b ∈ B } . The set A − B is called thealgebraic difference of sets A and B . The set A − A is called the difference set of a set A . We willalso write a + A instead { a } + A for a ∈ R . If I ⊂ R is an interval, then by l ( I ), r ( I ) we will denote,respectively, the left and the right endpoint of I .By a Cantor set we mean a bounded perfect and nowhere dense subset of R .Given any set C ⊂ R , every bounded component of the set R \ C is called a gap of C . A componentof C is called proper if it is not a singleton.Let us recall the definitions of three types of Cantorvals (compare [13]). A perfect set E ⊂ R iscalled an M-Cantorval if it has infinitely many gaps and both endpoints of any gap are accumulatedby gaps and proper components of E . A perfect set E ⊂ R is called an L-Cantorval (respectively,R-Cantorval) if it has infinitely many gaps, the left (right) endpoint of any gap is accumulated bygaps and proper components of E , and the right (left) endpoint of any gap is an endpoint of a propercomponent of E .Algebraic differences and sums of Cantor sets were considered by many authors (e.g. [21], [10], [9],[15], [8], [1], [18], [14]). They appear for example in dynamical systems (see [16]), spectral theory (see[6],[20]) or number theory (see [8]). One of the known results is the Newhouse gap lemma from [15](see Theorem 2.2). This is a condition which implies that the sum of two Cantor sets is an interval.The most popular types of examined Cantor sets are central Cantor sets and various self-similarCantor sets. In our paper we will continue this trend. We will consider two classes of Cantor sets: inSection 2 we investigate central Cantor sets, and in Section 3 we study the so-called S-Cantor sets,which are self-similar. Mathematics Subject Classification.
Key words and phrases.
Cantor sets, Cantorvals, algebraic difference of sets, p-adic sets.Piotr Nowakowski was supported by the GA ˇCR project 20-22230L and RVO: 67985840.
Every central Cantor subset C of [0 ,
1] can be uniquely described by a sequence a = ( a n ) ∈ (0 , N (the details are given in Section 2). We then say that C is generated by a and write C = C ( a ).The algebraic difference of two central Cantor sets can be either a Cantor set, a finite union of closedintervals, an L-Cantorval, an R-Cantorval or an M-Cantorval (see [3]). In the paper [11], Kraft provedthat the difference set of a central Cantor set generated by a constant sequence with all terms equalto α is equal to [ − ,
1] if α ≤ , and is a Cantor set if α > . Later, it was proved (see [3], [7]) thatthe difference set of a central Cantor set C ( a ), where a ∈ (0 , N , is equal to [ − ,
1] if and only if a n ≤ for all n ∈ N . In [18], the author proved that if a n > for all n ∈ N , then the difference setof C ( a ) is a Cantor set. In [7] there was given a condition, which implies that the set C ( a ) − C ( a )is an M-Cantorval. In our paper, we will focus only on the case, when the algebraic difference oftwo central Cantor sets is a finite union of closed intervals. In Section 2, we prove a theorem whichconcerns the algebraic difference of two different central Cantor sets and is a generalization of theearlier mentioned theorem concerning the difference set of a central Cantor set. It also gives examplesof central Cantor sets which do not satisfy the assumptions of the Newhouse gap lemma (Theorem2.2), and still their algebraic difference is equal to [ − , , The algebraic difference of central Cantor sets
Let us recall the construction of a central Cantor subset of [0 ,
1] (see e.g. [4]).An interval I is called concentric with an interval J if they have a common centre.Let a = ( a n ) be a sequence such that a n ∈ (0 ,
1) for any n ∈ N and I := [0 , I the open interval P centered at of length a . Then by I and I we denote, respectively, the left and the right components of I \ P (each of length d = − a ).Generally, assume that for some n ∈ N and t , t , . . . , t n ∈ { , } we constructed the interval I t ,...,t n of length d n . Denote by P t ,...,t n the open interval of length a n +1 d n , concentric with I t ,...,t n . Now, let HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 3 I t ,...,t n , and I t ,...,t n , be, respectively, the left and the right components of the set I t ,...,t n \ P t ,...,t n .By d n +1 denote the common length of both components.For every n ∈ N , denote I n := { I t ,...,t n : ( t , . . . , t n ) ∈ { , } n } and C n ( a ) := [ I n . Let C ( a ) := T n ∈ N C n ( a ). Then C ( a ) is called a central Cantor set.Define the thickness of a Cantor set C by (see [19]) τ ( C ) = inf G Theorem 2.2 (the Newhouse gap lemma; [15]) . If a, b ∈ (0 , N and τ ( C ( a )) τ ( C ( b )) ≥ , then C ( a ) − C ( b ) = [ − , . Our purpose is to study the algebraic difference C ( a ) − C ( b ) of two central Cantor sets. We willuse some ideas from [7].To denote the concatenation of two sequences t and s , we write t ˆ s .Let d n = Q ni =1 1 − a i and g n = Q ni =1 1 − b i . By I as ( I bs , respectively) we will denote the interval I s from the construction of the set C ( a ) ( C ( b ), respectively). Let { , } = {∅} (the empty sequence), I a ∅ = I b ∅ = [0 , 1] and d = g = 1. Then we have (see [7, Proposition 1.1 (9)]) C n ( a ) − C n ( b ) = [ p,q ∈{ , } n (cid:16) I ap − I bq (cid:17) . For p, q ∈ { , } n we define the sequence s ∈ { , , , } n and the interval J s , putting s i := 2 p i − q i + 1for i = 1 , . . . n , and J s := I ap − I bq . Then C n ( a ) − C n ( b ) = [ s ∈{ , , , } n J s and | J s | = d n + g n for s ∈ { , , , } n . Observe that J = I a − I b = [ − , − d + g ] ,J = I a − I b = [ − g , d ] ,J = I a − I b = [ − d , g ] ,J = I a − I b = [1 − d − g , . PIOTR NOWAKOWSKI Moreover, if for some n ∈ N and s ∈ { , , , } n we have J s = I ap − I bq , then J s ˆ0 = I ap ˆ0 − I bq ˆ1 = [ l ( I ap ) , l ( I ap ) + d n +1 ] − [ r ( I bq ) − g n +1 , r ( I bq )]= [ l ( J s ) , l ( J s ) + d n +1 + g n +1 ] ,J s ˆ1 = I ap ˆ0 − I bq ˆ0 = [ l ( I ap ) , l ( I ap ) + d n +1 ] − [ l ( I bq ) , l ( I bq ) + g n +1 ]= [ l ( J s ) + g n − g n +1 , r ( J s ) − d n + d n +1 ] ,J s ˆ2 = I ap ˆ1 − I bq ˆ1 = [ r ( I ap ) − d n +1 , r ( I ap )] − [ r ( I bq ) − g n +1 , r ( I bq )]= [ l ( J s ) + d n − d n +1 , r ( J s ) − g n + g n +1 ] ,J s ˆ3 = I ap ˆ1 − I bq ˆ0 = [ r ( I ap ) − d n +1 , r ( I ap )] − [ l ( I bq ) , l ( I bq ) + g n +1 ]= [ r ( J s ) − d n +1 − g n +1 , r ( J s )] . Put J ∅ = I a ∅ − I b ∅ = [ − , 1] and observe that the above formulas remain true for n = 0 and s = ∅ . Lemma 2.3. For any a ∈ (0 , N , n, k ∈ N ∪ { } , where n > k , we have d n − d n +1 < d k − d k +1 .Proof. It suffices to show that d n − d n +1 < d n − − d n , for n > 1, or equivalently 2 d n − d n +1 < d n − .Dividing both sides of the last inequality by d n − , we get1 − a n − (1 − a n )(1 − a n +1 )4 < , which holds for all n . (cid:3) Lemma 2.4. Assume that a = ( a n ) ∈ (0 , N , b = ( b n ) ∈ (0 , N , n ∈ N ∪ { } and s ∈ { , , , } n .The following equivalences hold: (1) g n d n ≥ a n +1 ⇔ l ( J s ˆ2 ) ≤ r ( J s ˆ1 ) ;(2) d n g n ≥ b n +1 ⇔ l ( J s ˆ1 ) ≤ r ( J s ˆ2 ) ;(3) (cid:16) d n g n ≥ b n +1 and g n d n ≥ a n +1 (cid:17) ⇔ J s ˆ1 ∩ J s ˆ2 = ∅ ;(4) d n +1 g n ≥ b n +1 ⇔ J s ˆ0 ∩ J s ˆ1 = ∅ ⇔ J s ˆ2 ∩ J s ˆ3 = ∅ ;(5) g n +1 d n ≥ a n +1 ⇔ J s ˆ0 ∩ J s ˆ2 = ∅ ⇔ J s ˆ1 ∩ J s ˆ3 = ∅ . Proof. Ad (1) We have r ( J s ˆ1 ) − l ( J s ˆ2 ) = r ( J s ) − d n + d n +1 − l ( J s ) − d n + d n +1 = d n + g n − d n + 2 d n +1 = g n − d n + 2 d n +1 . Hence l ( J s ˆ2 ) ≤ r ( J s ˆ1 ) if and only if g n − d n + 2 d n +1 ≥ 0, which is equivalent to g n d n ≥ a n +1 .Ad (2) The proof is analogous to that of (1).Ad (3) The assertion follows from (1), (2) and the equivalence( l ( J s ˆ2 ) ≤ r ( J s ˆ1 ) and l ( J s ˆ1 ) ≤ r ( J s ˆ2 )) ⇔ J s ˆ1 ∩ J s ˆ2 = ∅ . Ad (4) Of course, J s ˆ0 ∩ J s ˆ1 = ∅ if and only if r ( J s ˆ0 ) ≥ l ( J s ˆ1 ). We have r ( J s ˆ0 ) − l ( J s ˆ1 ) = l ( J s ) + d n +1 + g n +1 − l ( J s ) − g n + g n +1 = d n +1 + 2 g n +1 − g n . Thus, J s ˆ0 ∩ J s ˆ1 = ∅ if and only if d n +1 + 2 g n +1 − g n ≥ 0, which is equivalent to d n +1 g n ≥ b n +1 .The equivalence J s ˆ0 ∩ J s ˆ1 = ∅ ⇔ J s ˆ2 ∩ J s ˆ3 = ∅ follows from the equality r ( J s ˆ0 ) − l ( J s ˆ1 ) = d n +1 + 2 g n +1 − g n = r ( J s ˆ2 ) − l ( J s ˆ3 ) . HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 5 Ad (5) The proof is similar to that of (4). (cid:3) Lemma 2.5. Assume that a = ( a n ) ∈ (0 , N , b = ( b n ) ∈ (0 , N and n ∈ N ∪ { } . If d n g n ≥ b n +1 and g n d n ≥ a n +1 and (cid:18) d n +1 g n ≥ b n +1 or g n d n ≥ a n +1 (cid:19) , then C n +1 ( a ) − C n +1 ( b ) = C n ( a ) − C n ( b ) .Proof. Let s ∈ { , , , } n . By Lemma 2.4 we infer that J s ˆ1 ∩ J s ˆ2 = ∅ and J s ˆ0 ∩ J s ˆ1 = ∅ and J s ˆ2 ∩ J s ˆ3 = ∅ or J s ˆ1 ∩ J s ˆ2 = ∅ and J s ˆ0 ∩ J s ˆ2 = ∅ and J s ˆ1 ∩ J s ˆ3 = ∅ . In both cases we have J s ˆ0 ∪ J s ˆ1 ∪ J s ˆ2 ∪ J s ˆ3 = J s . Hence C n ( a ) − C n ( b ) = [ s ∈{ , , , } n J s = [ s ∈{ , , , } n ( J s ˆ0 ∪ J s ˆ1 ∪ J s ˆ2 ∪ J s ˆ3 )= [ t ∈{ , , , } n +1 J t = C n +1 ( a ) − C n +1 ( b ) . (cid:3) Now, we can prove the main theorem. Theorem 2.6. Let a = ( a n ) ∈ (0 , N , b = ( b n ) ∈ (0 , N . (1) If for any n ∈ N ∪ { } ( ∗ ) g n +1 d n ≥ a n +1 or d n +1 g n ≥ b n +1 and ( ∗∗ ) d n g n ≥ b n +1 and g n d n ≥ a n +1 , then C ( a ) − C ( b ) = [ − , . (2) If conditions ( ∗ ) and ( ∗∗ ) hold for sufficiently large n , then C ( a ) − C ( b ) is a finite union ofclosed intervals. (3) If C ( a ) − C ( b ) = [ − , , then condition ( ∗ ) holds for all n ∈ N ∪ { } . (4) If C ( a ) − C ( b ) is a finite union of closed intervals, then condition ( ∗ ) holds for sufficientlylarge n .Proof. Ad (1)–(2) Assume that there is n ∈ N such that conditions ( ∗ ) and ( ∗∗ ) hold for all n ≥ n .By Lemma 2.5 it follows that C n ( a ) − C n ( b ) = C n ( a ) − C n ( b )for n ≥ n , and thus C ( a ) − C ( b ) = \ n ∈ N ( C n ( a ) − C n ( b )) = C n ( a ) − C n ( b ) = [ s ∈{ , , , } n J s , so C ( a ) − C ( b ) is a finite union of closed intervals. If n = 0, that is, conditions ( ∗ ) and ( ∗∗ ) holdfor all n , then C ( a ) − C ( b ) = C ( a ) − C ( b ) = [ − , . PIOTR NOWAKOWSKI Ad (3) Assume on the contrary that condition ( ∗ ) does not hold for some n ∈ N . Let s := 0 ( n − .From Lemma 2.4 it follows that J s ˆ0 ∩ J s ˆ1 = ∅ and J s ˆ0 ∩ J s ˆ2 = ∅ . Put L := min { l ( J s ˆ1 ) , l ( J s ˆ2 ) } .Of course, L > r ( J s ˆ0 ) = r ( J ( n ) ) . Let x ∈ ( r ( J ( n ) ) , L ). Since C ( a ) − C ( b ) = [ − , u ∈ { , , , } n such that x ∈ J u . Then u / ∈ { s ˆ i : i = 0 , , , } , so u k > k < n .In consequence, x ≥ l ( J ( k − ˆ1 ) or x ≥ l ( J ( k − ˆ2 ). Using Lemma 2.3, in the first case we get L > x ≥ l ( J ( k − ˆ1 ) = − g k − − g k > − g n − − g n = l ( J s ˆ1 ) ≥ L, a contradiction. In the second case, a contradiction is obtained similarly.Ad (4) Assume to the contrary that ( ∗ ) does not hold for infinitely many n ∈ N , and C ( a ) − C ( b ) isa finite union of closed intervals. Then there exists w > − , − w ] ⊂ C ( a ) − C ( b ). Let n ∈ N be such that condition ( ∗ ) does not hold and w > d n + g n = r ( J ( n ) ) + 1. Let s := 0 ( n − . FromLemma 2.4 it follows that J s ˆ0 ∩ J s ˆ1 = ∅ and J s ˆ0 ∩ J s ˆ2 = ∅ . Put L := min { l ( J s ˆ1 ) , l ( J s ˆ2 ) , − w } .Of course, L > r ( J s ˆ0 ) = r ( J ( n ) ) . Let x ∈ ( r ( J ( n ) ) , L ). Since ( r ( J ( n ) ) , L ) ⊂ [ − , − w ] ⊂ C ( a ) − C ( b ), there exists a sequence u ∈ { , , , } n such that x ∈ J u . Then u / ∈ { s ˆ i : i = 0 , , , } ,so u k > k < n . Consequently, x ≥ l ( J ( k − ˆ1 ) or x ≥ l ( J ( k − ˆ2 ). Using Lemma 2.3, inthe first case we have L > x ≥ l ( J ( k − ˆ1 ) = − g k − − g k > − g n − − g n = l ( J s ˆ1 ) ≥ L, a contradiction. In the second case, we obtain a contradiction in the similar way. (cid:3) The next example shows that the above theorem gives examples of Cantor sets whose algebraicdifference is the interval [ − , Example 1. Let a = ( , , , , . . . ), b = ( , , , , . . . ). Then for n ∈ N ∪ { } we have d n g n = ( · ) n ( · ) n = 1 ,d n +1 g n +1 = ( · ) n · ( · ) n · = 23 . Hence for all n ∈ N g n d n − = g n − d n − · − b n · 14 = 38 > a n ,d n − g n − = d n − g n − · − a n − · 14 = b n − ,b n < ≤ d n − g n − ,a n < ≤ g n − d n − . Therefore, conditions ( ∗ ) and ( ∗∗ ) hold for every n ∈ N , so C ( a ) − C ( b ) = [ − , τ ( C ( a )) = τ ( C ( b )) = min { , } = , and thus τ ( C ( a )) · τ ( C ( b )) = < 1, so the sufficientcondition from the Newhouse gap lemma does not hold.The characterization of the cases when the set C ( a ) − C ( a ) is the interval [ − , 1] or a finite unionof closed intervals has been already proved with use of various methods (see [3], [7]). However, thisresult also easily follows from Theorem 2.6. HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 7 Corollary 2.7. Let a = ( a n ) ∈ (0 , N . Then C ( a ) − C ( a ) is equal to: (1) the interval [ − , if and only if a n ≤ for all n ∈ N ; (2) a finite union of closed intervals if and only if the set { n ∈ N : a n > } is finite.Proof. For any n we have d n g n = d n d n = 1 and a n < , so condition ( ∗∗ ) holds for all n ∈ N . Since d n d n − = − a n , the inequality d n d n − ≥ a n is equivalent to a n ≤ . From Theorem 2.6 we obtain theassertion. (cid:3) Example 2. Condition ( ∗∗ ) is not necessary for C ( a ) − C ( b ) = [ − , a = , a = , a = , b = , b = , b = . Then we have d = 38 , d = 38 · , d = d ,g = 1740 , g = 1740 · , g = g 122 = 66370400 . Thus, d g = · = , b = > = d g . Therefore, condition ( ∗∗ ) is not satisfied.After tedious calculations we can check that C ( a ) − C ( b ) = [ − , a and b in such a way that b n +1 ≤ d n g n and a n +1 ≤ g n +1 d n for n ≥ 3, we receive sequences which satisfy conditions ( ∗ ) and ( ∗∗ ), so C ( a ) − C ( b ) = C ( a ) − C ( b ) =[ − , The algebraic difference of S-Cantor sets In this section we consider another type of Cantor sets which was examined for example in [17],[22], [12]. We call them p -Cantor sets. In the class of p -Cantor sets we will distinguish the subclass ofS-Cantor sets. But first, we need some additional notation. Let A ⊂ Z be a finite set, p ∈ N , p ≥ A p := ( ∞ X i =1 x i p i : x i ∈ A ) . This notation comes from [17]. For example, we have Z ( p ) p = [0 , {− p +1 , − p +2 , . . . , p − , p − } p =[ − , { } p = { } , { p − } p = { } , { , } = C , where C is the classical Cantor ternary set, and Z ( p ) := { , , . . . , p − } . Note that, if A ⊂ Z ( p ), the set A p consists of all real numbers in [0 , p -adic expansions with all digits in A .We will now give some easy but useful properties of the sets A p . Proposition 3.1. Let A and B be finite subsets of Z , p ∈ N , p ≥ , k ∈ Z . Then: (i) A p + B p = ( A + B ) p ;(ii) A p − B p = ( A − B ) p ;(iii) kA p = ( kA ) p . Proof. (i) We have A p + B p = ( ∞ X i =1 x i p i : x i ∈ A ) + ( ∞ X i =1 y i p i : y i ∈ B ) = ( ∞ X i =1 x i p i + ∞ X i =1 y i p i : x i ∈ A, y i ∈ B ) PIOTR NOWAKOWSKI = ( ∞ X i =1 x i + y i p i : x i ∈ A, y i ∈ B ) = ( ∞ X i =1 z i p i : z i ∈ A + B ) = ( A + B ) p . The proof of (ii) and (iii) is analogous. (cid:3) The next proposition is a mathematical folklore and its proof is easy, so we omit it. Proposition 3.2. Let A be a finite subset of Z and p ∈ N , p ≥ . Then: (i) A p is a closed set. (ii) If A has more than element, then A p is a perfect set. (iii) If A ( Z ( p ) , then A p is nowhere dense. (iv) If A ( Z ( p ) and A has more than element, then A p is a Cantor set. For i, j ∈ Z , we set h i, j i := [ i, j ] ∩ Z if i < j { i } if i = j ∅ if i > j. If ( x i ) ∈ h− p, p i n , then we will write ¯ x n = P ni =1 x i p i , for n ∈ N .In the sequel we will consider sets A p , where p ∈ N , p > A ⊂ h− p +1 , p − i and − p +1 , , p − ∈ A .Note that A p ⊂ [ − , n ∈ N , x ∈ [ − , . We say that x is ( n )-bi-obtainable if for some k ∈ h− p n , p n − i we have x ∈ [ kp n , k +1 p n ] and there exist sequences ( y i ) , ( z i ) ∈ A n such that y n = kp n and z n = kp n + p n . Remark 3. Observe that the condition stating that there exist sequences ( y i ) , ( z i ) ∈ A n such that y n = kp n and z n = kp n + p n implies that kp n , kp n + p n ∈ A p . Indeed, kp n = n X i =1 y i p i + ∞ X i = n +1 p i ∈ A p . Similarly, kp n + 1 p n = n X i =1 z i p i + ∞ X i = n +1 p i ∈ A p . We will often use the following easy observations. Observation 3.3. (i) For any ( x n ) ∈ h− p, p i N and any n ∈ N we have x n = kp n for some k ∈ Z . (ii) For every n ∈ N , k ∈ h− p n , p n i there exists a sequence ( w i ) ∈ h− p, p i n such that w n = kp n . (iii) For every n ∈ N , k ∈ h− p n + 1 , p n − i there exists a sequence ( w i ) ∈ h− p + 1 , p − i n suchthat w n = kp n . (iv) If x ∈ [0 , p n ] , then there is a sequence ( w i ) ∈ h , p − i N such that P ∞ i = n +1 w i p i = x . (v) If x ∈ [ − p n , , then there is a sequence ( w i ) ∈ h− p + 1 , i N such that P ∞ i = n +1 w i p i = x . We will also need the following technical lemma. Lemma 3.4. Let p ∈ N , p > , A ⊂ h− p + 1 , p − i and − p + 1 , , p − ∈ A . HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 9 (1) If x ∈ A p , ( x i ) ∈ A N is such that x = P ∞ i =1 x i p i and, for some n ∈ N and ( y i ) ∈ h− p, p − i n , x ∈ ( y n , y n + p n ) , then x n = y n or x n = y n + p n . Moreover, (1.1) if x n = y n and y n > , then x n = y n or x n = − p + y n ; (1.2) if x n = ¯ y n and y n < , then x n = y n or x n = p + y n ; (1.3) if x n = y n + p n and y n > , then x n = y n + 1 or x n = − p + 1 + y n ; (1.4) if x n = y n + p n and y n < , then x n = y n + 1 or x n = p + y n + 1 . (1.5) if x n = y n and y n = 0 , then x n = 0 . (2) If ( x, y ) is a gap in A p , ( x i ) , ( y i ) ∈ A N are such that x = P ∞ i =1 x i p i and y = P ∞ i =1 y i p i , then thereare n, m ∈ N such that x n + 1 , y m − / ∈ A and x i = p − , y j = − p + 1 for i > n , j > m . (2’) If w ∈ [ − , is such that w = v k for some k ∈ N and ( v i ) ∈ A k , then w is not an endpointof a gap in A p . (3) Let x ∈ [ − , . If there exists n ∈ N such that x is ( i ) -bi-obtainable for i ≥ n , then x ∈ A p . (4) Let x ∈ [ − , . If for any k ∈ h , p − i we have k ∈ A or k − p ∈ A and there is n ∈ N suchthat x is ( n ) -bi-obtainable, then x is ( i ) -bi-obtainable for i ≥ n .Proof. Ad (1) By the assumption, we have 0 < x − y n < p n . Observe that | x − x n | = (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) ∞ X i = n +1 x i p i (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) ≤ p − p n +1 (1 − p ) = 1 p n , and so − p n ≤ x n − x ≤ p n . Adding the obtained inequalities we receive − p n < x n − y n < p n . ByObservation 3.3, we have x n − y n = 0 or x n − y n = p n .Ad (1.1) Since y n > 0, we have y n > y n − . Moreover, y n + 1 p n = y n − + y n + 1 p n ≤ y n − + pp n = y n − + 1 p n − . Hence x ∈ ( y n − , y n − + p n − ) . By (1), x n − = y n − or x n − = y n − + p n − . In the first case, we have x n = y n , and in the second case, x n p n = y n p n − p n − , so x n = y n − p .Ad (1.2) Since y n < 0, we have y n < y n − , and so y n + p n ≤ y n − . Moreover, y n = y n − + y n p n ≥ y n − − pp n = y n − − p n − . Hence x ∈ ( y n − − p n − , y n − ) . By Observation 3.3, there is a sequence ( y ′ i ) ∈ h− p, p − i n − suchthat y ′ n − = y n − − p n − . By (1), x n − = y ′ n − + 1 p n − = y n − or x n − = y ′ n − = y n − − p n − . In the first case, we have x n = y n , and in the second case, x n p n = y n p n + p n − , so x n = y n + p .The proofs of (1.3) and (1.4) are similar.Ad (1.5) We will show that x n − = y n − . Indeed, if | x n − − y n − | > 0, then, by Observation 3.3, | x n − − y n − | ≥ p n − , and hence | x n − y n | = (cid:12)(cid:12)(cid:12)(cid:12) x n − − y n − + x n p n − y n p n (cid:12)(cid:12)(cid:12)(cid:12) ≥ (cid:12)(cid:12) x n − − y n − (cid:12)(cid:12) − (cid:12)(cid:12)(cid:12)(cid:12) x n p n − y n p n (cid:12)(cid:12)(cid:12)(cid:12) ≥ p n − − p − p n = 1 p n > . So, x n − = y n − , and thus x n = y n .Ad (2) First, we will show that there is n ∈ N such that x i = p − i > n . On the contrary,assume that for any k ∈ N there is j > k such that x j < p − 1. Let k ∈ N be such that p k < y − x and let j > k be such that x j < p − 1. Let z i = x i for i = j , and z j = p − 1. Since p − ∈ A and x ∈ A p , we have z = P ∞ i =1 z i p i ∈ A p . Moreover, z = x + p − − x j p j ≤ x + 2( p − p j < x + 2 p j − ≤ x + 2 p k < y. So, z ∈ A p ∩ ( x, y ) , a contradiction. Of course, x < 1, so there is n ∈ N such that x n < p − x i = p − i > n .Now, we will show that x n + 1 / ∈ A . On the contrary, assume that x n + 1 ∈ A . We have x = ∞ X i =1 x i p i = x n + ∞ X i = n +1 p − p i = x n + 1 p n . Let k > n be such that p k − < y − x . Let w i = x i for i < n , w n = x n + 1, w k = p − w i = 0 forthe remaining i . Then w = P ∞ i =1 w i p i ∈ A p and w = x n + 1 p n + p − p k < x + 1 p k − < y, a contradiction. Thus, x n + 1 / ∈ A . The proof for the sequence ( y i ) is analogous.Ad (2’) Immediately follows from (2).Ad (3) Using the definition of ( i )-bi-obtainability and Remark 3, we can find k i ∈ h− p i , p i − i such that x ∈ [ k i p i , k i p i + p i ] and k i p i ∈ A p for any i ≥ n . Then | x − k i p i | ≤ p i , so lim i →∞ k i p i = x . Since A p isclosed, then x ∈ A p .Ad (4) It suffices to show that if x is ( n )-bi-obtainable, then it is ( n + 1)-bi-obtainable.First, suppose that x = kp n for some k ∈ h− p n + 1 , p n − i (of course, 1 and − n )-bi-obtainable). Then, from the definition of ( n )-bi-obtainability it follows that kp n ∈ A p and at least oneof kp n + p n or kp n − p n belongs to A p . Assume that kp n + p n ∈ A p (the proof, when kp n − p n ∈ A p issimilar). Let ( y i ) , ( z i ) ∈ A n be such that y n = kp n and z n = kp n + p n . We have x ∈ [ kpp n +1 , kpp n +1 + p n +1 ]and kpp n +1 = kp n ∈ A p . We need to find a sequence ( w i ) ∈ h− p, p − i n +1 such that w n +1 = kp n + p n +1 .Consider the cases.1o 1 ∈ A . Then put w i = y i for i ≤ n and w n +1 = 1. Then ( w i ) ∈ A n +1 and w n +1 = kp n + p n +1 .2o 1 / ∈ A . By the assumption we have 1 − p ∈ A . Put w i = z i for i ≤ n and w n +1 = 1 − p . Then( w i ) ∈ A n +1 and w n +1 = kp n + 1 p n + 1 − pp n +1 = kp n + 1 p n +1 . Therefore, x is ( n + 1)-bi-obtainable.Now, assume that x ∈ ( kp n , kp n +1 + p n ) for some k ∈ h− p n , p n − i . Then there is k ′ ∈ h , p − i such that x ∈ [ kp + k ′ p n +1 , kp + k ′ p n +1 + p n +1 ]. Since x is ( n )-bi-obtainable, there exist ( y i ) , ( z i ) ∈ A n such that y n = kp n and z n = kp n + p n . We will find a sequence ( v i ) ∈ A n +1 such that v n +1 = kp + k ′ p n +1 . Considerthe cases.1o k ′ ∈ A . Put v i = y i for i ≤ n and v n +1 = k ′ . Then ( v i ) ∈ A n +1 and v n +1 = kp + k ′ p n +1 . HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 11 k ′ / ∈ A . Since k ′ ≥ , by the assumption, we have k ′ − p ∈ A . Put v i = z i for i ≤ n and v n +1 = k ′ − p . Then ( v i ) ∈ A n +1 , and v n +1 = kp n + 1 p n + k ′ − pp n +1 = kp + k ′ p n +1 . Now, we will find a sequence ( u i ) ∈ A n +1 such that u n +1 = kp + k ′ p n +1 + p n +1 . Consider the cases.1o k ′ + 1 ∈ A . Then put u i = y i for i ≤ n and u n +1 = k ′ + 1. Then ( u i ) ∈ A n +1 and u n +1 = kp + k ′ p n +1 + p n +1 .2o k ′ + 1 / ∈ A . If k ′ < p − 1, then k ′ + 1 ∈ h , p − i and, by the assumption, k ′ + 1 − p ∈ A . If k ′ = p − 1, then k ′ + 1 − p = 0 ∈ A . In both cases put u i = z i for i ≤ n and u n +1 = k ′ + 1 − p . Then( u i ) ∈ A n +1 , and u n +1 = kp n + 1 p n + k ′ − p + 1 p n +1 = kp + k ′ p n +1 + 1 p n +1 . Therefore, x is ( n + 1)-bi-obtainable. (cid:3) Let p ∈ N , p ≥ A ( Z ( p ) has more than 1 element. In Proposition 3.2 (iv) it was pointedout that the set A p is a Cantor set. Every such a set will be called a p -Cantor set. In the class of p -Cantor sets we will distinguish some special subclass. Let l, r, p ∈ N , p > l + r < p . We willconsider Cantor sets of the form C ( l, r, p ) := A ( l, r, p ) p where A ( l, r, p ) := h , l − i ∪ h p − r, p − i . We call such a set a special p -Cantor set or, in short, an S-Cantor set. This will not lead to anymisunderstandings because p will be always established. A set C ( l, r, p ) has the following construction.In the first step, we divide [0 , 1] into p subintervals with equal lengths and we enumerate them (startingfrom 0). Then we remove p − l − r consecutive intervals starting from the one with number l . So,there remains l intervals on the left and r intervals on the right of the emergent gap. We continuethis procedure for the remaining intervals. Observe that in the construction of a central Cantor setwe divide intervals into three (usually not equal) parts, and then we delete the middle one. So, thereis clearly no inclusion between these two families of Cantor sets. Note that, unlike central Cantorsets, S-Cantor sets do not have to be symmetric but are always self-similar. However, we will alsoexamine symmetric S-Cantor sets.Let us introduce some more notation. If A ⊂ Z , A = ∅ , then we write diam ( A ) := sup {| a − b | : a, b ∈ A } , ∆( A ) := sup { b − a : a, b ∈ A, a < b, ( a, b ) ∩ A = ∅} ,I ( A ) := ∆( A )∆( A ) + diam ( A ) . Theorem 3.5. [5] Let A ⊂ Z be a nonempty finite set, p ∈ N , p ≥ . Then A p is an interval if andonly if p ≥ I ( A ) . Remark 4. The assertion of the above theorem is equivalent to: A p is an interval if and only if p ≤ diam ( A )∆( A ) . Corollary 3.6. Let p ∈ N , p > , A, B ⊂ Z ( p ) , , p − ∈ A and , p − ∈ B. Then A p − B p = [ − , if and only if ∆( A − B ) ≤ . Proof. It is easily seen that diam ( A − B ) = 2 p − . Hence the inequality p ≤ diam ( A − B )∆( A − B ) is equivalentto p − ≤ p − A − B ) , and so to ∆( A − B ) ≤ . (cid:3) Using the above corollary and Lemma 3.4, we can prove the main theorem of this section, whichgives a full characterization of the sets of the form C ( l , r , p ) − C ( l , r , p ). Some inequalities withparameters p, l , r , l , r will play the key role in this theorem. We will assume that these numbersare natural such that p > l + r < p , l + r < p . Consider the following conditions:( S l + l + r ≥ p or l + r + r ≥ p ;( S l + r + l ≥ p or r + l + r ≥ p ;( S l + r + l + r ≤ p ;( S ∗ ) l + l + r > p or l + r + r > p ;( S ∗ ) l + r + l > p or r + l + r > p. Obviously ( S 1) follows from ( S ∗ ) and ( S 2) from ( S ∗ ). Moreover, if ( S 3) holds, then ( S 1) and ( S S ∗ ) and ( S ∗ ) do not hold as well).In the theorem we will consider the following combinations of conditions:(1) ( S ∧ ( S S S ∗ ) ∧ ¬ ( S S ∗ ) ∧ ¬ ( S ¬ ( S ∗ ) ∧ ¬ ( S ∗ ) ∧ ¬ ( S ∧ ¬ (( S ∧ ( S . It is easy to see that for any parameters exactly one of the conditions (1)–(5) holds. Remark 5. Observe that, when we consider the conditions ( S , ( S ∗ ) , ( S , ( S ∗ ) , ( S 3) for the set C ( l , r , p ) − C ( l , r , p ) = − ( C ( l , r , p ) − C ( l , r , p )) , we need to swap the indices ”1” and ”2” in the original inequalities. This means that conditions( S , ( S ∗ ) , ( S , ( S ∗ ) for the set C ( l , r , p ) − C ( l , r , p ) are the same as conditions ( S , ( S ∗ ) , ( S , and ( S ∗ ), respectively, for the set C ( l , r , p ) − C ( l , r , p ), while condition ( S 3) does not change. Inparticular, (4) holds for C ( l , r , p ) − C ( l , r , p ) if and only if (3) holds for C ( l , r , p ) − C ( l , r , p ). Theorem 3.7. Let l , r , l , r , p ∈ N , p > , l + r < p , l + r < p . (1) C ( l , r , p ) − C ( l , r , p ) = [ − , if and only if ( S and ( S hold. (2) C ( l , r , p ) − C ( l , r , p ) is a Cantor set if and only if ( S holds. (3) C ( l , r , p ) − C ( l , r , p ) is an L-Cantorval if and only if ( S ∗ ) holds, but ( S does not hold. (4) C ( l , r , p ) − C ( l , r , p ) is an R-Cantorval if and only if ( S ∗ ) holds, but ( S does not hold. (5) C ( l , r , p ) − C ( l , r , p ) is an M-Cantorval if and only if ( S ∗ ) , ( S ∗ ) , ( S do not hold andat least one of ( S or ( S also does not hold.Proof. Since for any parameters exactly one of the conditions given in (1)–(5) holds and a set cannothave at the same time two of the following forms: the interval [ − , ⇐ ”. HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 13 Let us put A := A ( l , r , p ) = h , l − i ∪ h p − r , p − i ,B := A ( l , r , p ) = h , l − i ∪ h p − r , p − i . Then A − B is equal to h− p + 1 , l + r − p − i ∪ h− l + 1 , l − i ∪ h− r + 1 , r − i ∪ h p − r − l + 1 , p − i . Observe that the second and the third component contain 0. Hence A − B is equal to h− p + 1 , l + r − p − i ∪ h min {− l , − r } + 1 , max { l , r } − i ∪ h p − r − l + 1 , p − i . Let L = h l + r − p, min {− l , − r }i ,R = h max { l , r } , p − r − l i . Then A − B = h− p + 1 , p − i \ ( L ∪ R ).Observe that L has at most one element if and only if l + r − p ≥ − l or l + r − p ≥ − r and R has at most one element if and only if p − r − l ≤ l or p − r − l ≤ r . So we have(3.1) ( S ) ⇔ | L | ≤ ⇔ l + r − p + 1 / ∈ L ( S ∗ ) ⇔ L = ∅ ⇔ l + r − p / ∈ L ( S ) ⇔ | R | ≤ ⇔ p − r − l − / ∈ R ( S ∗ ) ⇔ R = ∅ ⇔ p − r − l / ∈ R Moreover, since p + min {− l , − r } > p − r − l and R ∩ ( p + L ) = h max { l , r } , p − r − l i ∩ h l + r , p + min {− l , − r }i , we have(3.2) ( S ⇔ R ∩ ( p + L ) = ∅ ⇔ p − r − l , l + r ∈ R ∩ ( p + L ) . Note that − p + 1 , , p − ∈ A − B , so the assumptions of Lemma 3.4 are satisfied. Observe alsothat if R ∩ ( p + L ) = ∅ , then k ∈ A − B or k − p ∈ A − B for any k ∈ h , p − i . Indeed, if k / ∈ A − B ,then k ∈ R , and thus 0 > k − p / ∈ L , so k − p ∈ A − B . Hence if ( S 3) does not hold, then theassumptions of Lemma 3.4 (4) are satisfied.By Proposition 3.1 we have C ( l , r , p ) − C ( l , r , p ) = A p − B p = ( A − B ) p . Since A − B has more than one element, ( A − B ) p is perfect, by Proposition 3.2.Ad (1) From Corollary 3.6 it follows that the equality C ( l , r , p ) − C ( l , r , p ) = [ − , 1] is equivalentto the inequality ∆( A − B ) ≤ 2, which holds if and only if L and R have at most one element. Andthis is satisfied if and only if ( S 1) and ( S 2) hold.Ad (2) We have to show that ( A − B ) p is nowhere dense. Let x ∈ ( A − B ) p , ( x i ) ∈ ( A − B ) N besuch that x = P ∞ i =1 x i p i and ε > 0. We will find an interval ( y, z ) ⊂ ( x − ε, x + ε ), which is disjointwith ( A − B ) p . Let n ∈ N be such that p n < ε . Define y, z ∈ [0 , 1] in the following way: y i = x i = z i for i ≤ n, y n +1 = z n +1 = p − r − l − ,y n +2 = p − r − l − , z n +2 = y n +2 + 3 = p − r − l + 1 ,y i = p − , z i = − p + 1 for i > n + 2and let y = P ∞ i =1 y i p i , and z = P ∞ i =1 z i p i . Then y i , z i ∈ h− p + 1 , p − i for i ∈ N . Hence z − y = 3 p n +2 − ∞ X i = n +3 p − p i = 1 p n +2 > . We have | x − y | ≤ P ∞ i = n +1 2 p − p i = p n < ε. Similarly, | z − x | < ε , and thus ( y, z ) ⊂ ( x − ε, x + ε ).Let w ∈ ( y, z ). We will show that w / ∈ ( A − B ) p . On the contary, assume that w ∈ ( A − B ) p . So,there is a sequence ( w i ) ∈ ( A − B ) N such that w = P ∞ i =1 w i p i . Since y n +2 = p − r − l − ≥ p − r − l − l − r ≥ , we have y = y n +1 + y n +2 p n +2 + ∞ X i = n +3 p − p i > y n +1 and z = y n +1 + p − r − l + 1 p n +2 − ∞ X i = n +3 p − p i < y n +1 + pp n +2 < y n +1 + 1 p n +1 , and so w ∈ ( y n +1 , y n +1 + p n +1 ) . By Lemma 3.4 (1), w n +1 = y n +1 or w n +1 = y n +1 + p n +1 . Considerthe cases.1o w n +1 = y n +1 . We have w ∈ ( y, z ) = y n +2 + ∞ X i = n +3 p − p i , z n +2 − ∞ X i = n +3 p − p i ! = (cid:18) y n +2 + 1 p n +2 , z n +2 − p n +2 (cid:19) = (cid:18) y n +2 + 1 p n +2 , y n +2 + 3 p n +2 − p n +2 (cid:19) = (cid:18) y n +2 + 1 p n +2 , y n +2 + 2 p n +2 (cid:19) . Using again Lemma 3.4 (1), we have w n +2 = y n +2 + 1 = p − r − l − w n +2 = y n +2 + 2 = p − r − l . Since ( S 2) does not hold, by (3.1), we obtain | R | > 1, and consequently { p − r − l − , p − r − l } ⊂ R .Thus w n +2 ∈ R , a contradiction.2o w n +1 = y n +1 + p n +1 . Since y n +1 + 1 > 0, by Lemma 3.4 (1.1), we have w n +1 = y n +1 + 1 = p − r − l ∈ R or w n +1 = − p + y n +1 + 1 = − p + p − r − l . Since p − r − l ∈ R and w n +1 ∈ A − B , we must have w n +1 = − r − l , but, because ( S 3) holds,by (3.2), p − r − l ∈ ( L + p ), and hence − r − l ∈ L . So, w n +1 / ∈ ( A − B ), a contradiction. Thus,( y, z ) ∈ ( x − ε, x + ε ) \ ( A − B ) p , so ( A − B ) p is nowhere dense. It is also perfect, so it is a Cantor set.Ad (3)–(5) First, we will show some additional conditions ( C , ( C 2) and ( C HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 15 ( C 1) If conditions ( S 2) and ( S 3) do not hold, then every gap in ( A − B ) p is accumulated on theleft by infinitely many gaps and proper components of ( A − B ) p .First, observe that 1 ∈ A − B . Indeed, if 1 / ∈ A − B , then 1 ∈ R , and so l = r = 1. Since ( S r + l < p − 1. Hence r + l + l + r < p + 1 , i.e. ( S 3) holds, a contradiction.Thus, 1 ∈ A − B .Now, let x be the left endpoint of a gap in ( A − B ) p and ( x i ) ∈ ( A − B ) N be such that x = P ∞ i =1 x i p i .Then, by Lemma 3.4 (2), there is n ∈ N such that x i = p − i > n. Let ε > m > n be such that p m < ε . We will find intervals [ y, z ] ⊂ ( x − ε, x ) ∩ ( A − B ) p and( s, t ) ⊂ ( x − ε, x ) \ ( A − B ) p . Define y, z, s, t in the following way: y i = z i = s i = t i = x i for i ≤ m,y m +1 = 0 , z m +1 = 1 , s m +1 = p − r − l − , t m +1 = s m +1 + 3 = p − r − l + 1 ,y i = z i = 0 , s i = x i = p − , t i = − p + 1 for i > m + 1and put y = P ∞ i =1 y i p i , z = P ∞ i =1 z i p i , t = P ∞ i =1 t i p i , s = P ∞ i =1 s i p i . Observe that z > y , x > t and t − s = 3 p m +1 − ∞ X i = m +2 p − p i = 1 p m +1 > . Since 1 ∈ A − B , we have 1 / ∈ R , so every element of R is greater than 1. Because ( S 2) does not hold,from (3.1) we obtain p − r − l − ∈ R . Hence p − r − l − > 1, and therefore s m +1 = p − r − l − ≥ z m +1 . Consequently, s > z . Thus0 < x − t < x − s < x − z < x − y = ∞ X i = m +1 p − p i = 1 p m < ε, which implies [ y, z ] ⊂ ( x − ε, x ) and ( s, t ) ⊂ ( x − ε, x ).Now we will show that [ y, z ] ⊂ ( A − B ) p . Let w ∈ [ y, z ]. Then w ∈ [ y, z ] = (cid:2) y m +1 , z m +1 (cid:3) = (cid:20) y m +1 , y m +1 + 1 p m +1 (cid:21) . Since y m +1 = 0 ∈ ( A − B ) , z m +1 = 1 ∈ ( A − B ) and y i = z i = x i ∈ ( A − B ) for i ≤ m , the point w is( m + 1)-bi-obtainable. Since ( S 3) does not hold, by (3.2), we have R ∩ ( p + L ) = ∅ . By Lemma 3.4 (4), w is ( i )-bi-obtainable for i > m + 1, and by Lemma 3.4 (3), w ∈ ( A − B ) p , and thus [ y, z ] ⊂ ( A − B ) p . Now, we will show that ( s, t ) ∩ ( A − B ) p = ∅ . Let v ∈ ( s, t ). Assume on the contrary that thereexists a sequence ( v i ) ∈ ( A − B ) N such that v = P ∞ i =1 v i p i . Since s m +1 ≥ > s i = p − > i > m + 1, we have s m < s . Thus s m < s < t < x , and so v ∈ ( s, t ) ⊂ (cid:18) s m , s m + 1 p m (cid:19) = s m , s m + ∞ X i = m +1 p − p i ! = s m , x m + ∞ X i = m +1 x i p i ! = ( s m , x ) . Using Lemma 3.4 (1), we have v m = s m or v m = x . If v m = x , by Lemma 3.4 (2’), x is not anendpoint of a gap, a contradiction. So, v m = s m . We have v ∈ ( s, t ) = s m +1 + ∞ X i = m +2 p − p i , t m +1 − ∞ X i = m +2 p − p i ! = (cid:18) s m +1 + 1 p m +1 , t m +1 − p m +1 (cid:19) = (cid:18) s m +1 + 1 p m +1 , s m +1 + 3 p m +1 − p m +1 (cid:19) = (cid:18) s m +1 + 1 p m +1 , s m +1 + 2 p m +1 (cid:19) . Using again Lemma 3.4 (1), we have v m +1 = s m +1 + 1 = p − r − l − v m +1 = s m +1 + 2 = p − r − l . Since ( S 2) does not hold, by (3.1), we obtain | R | > , and consequently { p − r − l − , p − r − l } ⊂ R .Thus, v m +1 ∈ R , a contradiction.Thus, ( s, t ) ⊂ ( x − ε, x ) \ ( A − B ) p , which finishes the proof of ( C C C 1) and Remark 5.( C 2) If conditions ( S 1) and ( S 3) do not hold, then every gap in ( A − B ) p is accumulated on theright by infinitely many gaps and proper components of ( A − B ) p .Now, we will prove the last condition ( C C 3) If ( S ∗ ) holds, but condition ( S 2) does not hold, then every gap in ( A − B ) p has an adjacentinterval (contained in ( A − B ) p ) on the right.Let x be the right endpoint of a gap in ( A − B ) p and ( x i ) ∈ ( A − B ) N be such that x = P ∞ i =1 x i p i .By Lemma 3.4 (2), there is n ∈ N such that x i = − p + 1 for i > n . Let y i = x i for i ≤ n,y i = 0 for i > n. Put y = P ∞ i =1 y i p i . We will show that [ x, y ] ⊂ ( A − B ) p . Let w ∈ [ x, y ]. Since w ∈ [ x, y ] = " y − ∞ X i = n +1 p − p i , y = (cid:20) y − p n , y (cid:21) , there is q ∈ [ − p n , 0] such that w = y + q . By Observation 3.3 (v), there is a sequence ( w i ) ∞ i = n +1 ∈h− p +1 , i N such that P ∞ i = n +1 w i p i = q , and so y + P ∞ i = n +1 w i p i = w . Since ( S ∗ ) holds, by (3.1), we have L = ∅ . Therefore, h− p + 1 , i ⊂ A − B , and so w i ∈ A − B for i > n . For i ≤ n put w i = y i ∈ A − B .We found a sequence ( w i ) ∈ ( A − B ) N such that w = P ∞ i =1 w i p i . Thus, w ∈ ( A − B ) p , which finishesthe proof of ( C S ∗ ) holds, but ( S 2) does not hold. Then ( S 3) also doesnot hold and ( A − B ) p is not an interval, by (1), so it has a gap. Hence the assumptions of ( C 1) and( C 3) are satisfied. Therefore, by ( C A − B ) p is accumulated on the left by infinitelymany gaps and proper components of ( A − B ) p , and by ( C A − B ) p is an L-Cantorval, which finishes the proof of (3).Since minus L-Cantorval is an R-Cantorval, by Remark 5, (4) follows from (3). HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 17 Now, we prove (5). Assume that ( S ∗ ), ( S ∗ ), ( S 3) do not hold and at least one of ( S 2) or ( S S 2) does not hold, then, by ( C A − B ) p is accumulated on theleft by infinitely many gaps and proper intervals contained in ( A − B ) p . If ( S 1) also does not hold,then, from ( C 2) we infer that every gap in ( A − B ) p is accumulated on the right by infinitely manygaps and intervals, and thus we get the assertion.Assume that ( S 1) holds, but ( S 2) does not hold. The other case again easily follows from Remark5 and the fact that minus M-Cantorval is an M-Cantorval. First, we will show that − ∈ A − B or − p + 2 ∈ A − B . If − / ∈ A − B , then − ∈ L , and hence r = l = 1. Since ( S 2) does not hold, wehave l + r + l < p , and thus l < p − 2. Because l ≥ 1, we have p > 3. From the fact that ( S S ∗ ) does not, it follows that l + r = p − 1. We have l + r − p − − ≥ − p + 2 . The fact that ( S ∗ ) does not hold and − ∈ L together with (3 . 1) gives us that L = {− } . So, − p + 2 ∈ A − B . Thus, we proved that − ∈ A − B or p − ∈ A − B .We will assume that − ∈ A − B . If p − ∈ A − B , then the proof is similar, with small difference,which we will point out.Let x be the right endpoint of a gap in ( A − B ) p and ( x i ) ∈ ( A − B ) N be such that x = P ∞ i =1 x i p i .Then, by Lemma 3.4 (2), there is n ∈ N such that x i = − p + 1 for i > n . Let ε > m > n besuch that p m < ε . We will find intervals [ y, z ] ⊂ ( x, x + ε ) ∩ ( A − B ) p and ( s, t ) ⊂ ( x, x + ε ) \ ( A − B ) p .Define y, z, s, t in the following way: y i = z i = s i = t i = x i for i ≤ m,y m +1 = − , z m +1 = 0 , s m +1 = t m +1 = l + r − p − ,y m +2 = z m +2 = 0 , s m +2 = p − r − l − , t m +2 = s m +2 + 3 = p − r − l + 1 ,y i = z i = 0 , s i = p − , t i = − p + 1 for i > m + 1and put y = P ∞ i =1 y i p i , z = P ∞ i =1 z i p i , t = P ∞ i =1 t i p i , s = P ∞ i =1 s i p i . We will show that y, z, s, t ∈ ( x, x + ε ).Of course, y, z, s, t are greater than x . We have y < z = x + ∞ X i = m +1 p − p i = x + 1 p m < x + ε and also t − s = 3 p m +2 − ∞ X i = m +3 p − p i = 1 p m +2 > , so s < t . Moreover, since ( S ∗ ) does not hold, by (3.1), l + r − p ∈ L , and in consequence l + r − p ≤ , and thus t = z m + l + r − p − p m +1 + p − r − l + 1 p m +2 − ∞ X i = m +3 p − p i ≤ z + − p m +1 + p − r − l p m +2 < z + − p m +1 + pp m +2 = z. Hence s < t < z < x + ε , which ends the proof that y, z, s, t ∈ ( x, x + ε ). We will show that [ y, z ] ⊂ ( A − B ) p . Let w ∈ [ y, z ]. Then w ∈ [ y, z ] = (cid:20) z m − p m +1 , z m (cid:21) = [ y m +1 , z m +1 ] . Since y m +1 = − ∈ A − B, z m +1 = 0 ∈ A − B and y i = z i = x i ∈ A − B for i ≤ m , the point w is ( m + 1)-bi-obtainable (if − / ∈ A − B it suffices to change y m +1 = p − , z m +1 = p − S 3) does not hold, by (3.2), we have R ∩ ( p + L ) = ∅ . By Lemma 3.4 (4), w is ( i )-bi-obtainable for i > m + 1, so, by Lemma 3.4 (3), w ∈ ( A − B ) p , and thus [ y, z ] ⊂ ( A − B ) p ∩ ( x, x + ε ) . Now, we will show that ( s, t ) ∩ ( A − B ) p = ∅ . Let v ∈ ( s, t ). Assume on the contrary that thereexists a sequence ( v i ) ∈ ( A − B ) N such that v = P ∞ i =1 v i p i . Since ( S 2) does not hold, by (3.1), we have p − r − l − ∈ R , and so p − r − l − ≥ 0. Therefore, s = s m + l + r − p − p m +1 + p − r − l − p m +2 + ∞ X i = m +3 p − p i ≥ s m + l + r − p − p m +1 + − p m +2 + 1 p m +2 > s m − pp m +1 = s m − p m and t = s m + l + r − p − p m +1 + p − r − l + 1 p m +2 − ∞ X i = m +3 p − p i < s m + l + r − p − p m +1 + pp m +2 = s m + l + r − pp m +1 ≤ s m , because l + r − p ≤ 0. Hence v ∈ (cid:18) s m − p m , s m (cid:19) = x m − ∞ X i = m +1 p − p i , s m ! = x m + ∞ X i = m +1 x i p i , s m ! = ( x, s m ) . Thus, using Lemma 3.4 (1), we obtain v m = s m or v m = x , but the second case is impossible (byLemma 3.4 (2’)). Hence v m = s m . We also have s = s m +1 + p − r − l − p m +2 + ∞ X i = m +3 p − p i ≥ s m +1 + − p m +2 + 1 p m +2 = s m +1 and t = s m +1 + p − r − l + 1 p m +2 − ∞ X i = m +3 p − p i < s m +1 + pp m +2 = s m +1 + 1 p m +1 , and therefore v ∈ (cid:18) s m +1 , s m +1 + 1 p m +1 (cid:19) . Thus, by Lemma 3.4 (1), v m +1 = s m +1 or v m +1 = s m +1 + 1 and since v m = s m , we have v m +1 = s m +1 or v m +1 = s m +1 + 1. However, s m +1 + 1 = l + r − p / ∈ A − B, so v m +1 = s m +1 . Since v ∈ ( s, t ) = s m +2 + ∞ X i = m +3 p − p i , s m +1 + s m +2 + 3 p m +2 − ∞ X i = m +3 p − p i ! = (cid:18) s m +2 + 1 p m +2 , s m +2 + 2 p m +2 (cid:19) , HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 19 we have, by Lemma 3.4 (1), v m +2 = s m +2 + 1 = p − r − l − v m +2 = s m +2 + 2 = p − r − l , but since ( S 2) does not hold, we have { p − r − l − , p − r − l } ∩ ( A − B ) = ∅ , a contradiction.Thus, ( s, t ) ⊂ ( x, x + ε ) \ ( A − B ) p . Finally, we obtain (5). (cid:3) Corollary 3.8. Let l, r, p ∈ N , p > , l + r < p . Then (1) C ( l, r, p ) − C ( l, r, p ) = [ − , if and only if l + r ≥ p or l + 2 r ≥ p ;(2) C ( l, r, p ) − C ( l, r, p ) is a Cantor set if and only if l + 2 r ≤ p ;(3) C ( l, r, p ) − C ( l, r, p ) is an M-Cantorval if and only if l + r < p and l + 2 r < p and l + 2 r > p. Proof. Putting l in the place of l and l , and r in the place of r and r , in the conditions fromTheorem 3.7, we receive the assertion. (cid:3) Example 6. Let r = 1, l = 1, r = 1, l = 2, p = 4. We will show that C ( l , r , p ) − C ( l , r , p ) =[ − , l + r < p, l + r < p . Moreover, l + l + r ≥ p and l + l + r ≥ p , andconsequently conditions ( S 1) and ( S 2) are satisfied. So, C ( l , r , p ) − C ( l , r , p ) = [ − , l + 2 r ≤ p and 2 l + r ≥ p , thus, by Corollary 3.8, C ( l , r , p ) − C ( l , r , p ) = [ − , C ( l , r , p ) − C ( l , r , p ) is a Cantor set. Example 7. Let r = 2, l = 3, r = 3, l = 1, p = 7. We will show that C ( l , r , p ) − C ( l , r , p )is an L-Cantorval and, by symmetry, C ( l , r , p ) − C ( l , r , p ) is an R-Cantorval. We have l + r p , so ( S ∗ ) holds and l + r + l < p , r + l + r < p , therefore( S 2) does not hold. In consequence, C ( l , r , p ) − C ( l , r , p ) = {− , − , − , − , − , − , , , , , } is an L-Cantorval, and C ( l , r , p ) − C ( l , r , p ) = {− , − , − , − , , , , , , , } is an R-Cantorval. At the same time, 2 l + r ≥ p and 2 r + l ≥ p , thus, by Corollary 3.8, C ( l , r , p ) − C ( l , r , p ) = C ( l , r , p ) − C ( l , r , p ) = [ − , . Let us introduce the notion of a symmetric S-Cantor set. Observe that C ( l, r, p ) is symmetric withrespect to if and only if l = r . Then the set C ( l, p ) := C ( l, l, p ) is called a symmetric S-Cantor set. Corollary 3.9. Let l , l , p ∈ N , p > , l < p, l < p . Then (1) C ( l , p ) − C ( l , p ) = [ − , if and only if l + l ≥ p or l + 2 l ≥ p ; (2) C ( l p ) − C ( l , p ) is a Cantor set if and only if l + 2 l ≤ p ;(3) C ( l , p ) − C ( l , p ) is an M-Cantorval if and only if l + l < p and l + 2 l < p and l + 2 l > p. Proof. Putting l in the place of r , and l in the place of r in Theorem 3.7, we obtain the assertion. (cid:3) Using the above corollary, we can receive a result similar to that obtained by Kraft in [11] (althoughwith additional possibility). Corollary 3.10. Let l, p ∈ N , p > , l < p . Then (1) C ( l, p ) − C ( l, p ) = [ − , if and only if lp ≥ 13 ;(2) C ( l, p ) − C ( l, p ) is a Cantor set if and only if lp ≤ 14 ;(3) C ( l, p ) − C ( l, p ) is an M-Cantorval if and only if lp ∈ (cid:18) , (cid:19) . Example 8. Let l = 2, l = 1, p = 5. Then 2 l + l ≥ p , so C ( l , p ) − C ( l , p ) = [ − , l p ≥ and l p < , therefore C ( l , p ) − C ( l , p ) = [ − , C ( l , p ) − C ( l , p ) is a Cantor set. Example 9. Let l = 1 , p = 3. Observe that the set C = C ( l, p ) is the classical Cantor ternary set.By Corollary 3.10 we get the known result C − C = [ − , Example 10. Let l = 2, p = 7. Then lp ∈ ( , ), and therefore C ( l, p ) − C ( l, p ) = {− , − , − , − , , , , , } is an M-Cantorval. Remark 11. The classical Cantor set is often defined as { , } , that is, the set of all numbers in[0 , 1] that can be written in the ternary system using only zeros and twos. Above examples showthat Theorem 3.7 gives us new examples of Cantorvals and Cantor sets that can be described in thesimilar manner. For example, the set {− , − , − , − , , , , , } from Example 10, which is anM-Cantorval, can be described as the set of all numbers in [ − , 1] which can be written in septenarysystem without using − , − , Acknowledgement. The author would like to thank Tomasz Filipczak for many fruitful conversa-tions during the preparation of the paper. HE ALGEBRAIC DIFFERENCE OF CENTRAL CANTOR SETS AND SELF-SIMILAR CANTOR SETS 21 References [1] R. Anisca, C. Chlebovec, On the structure of arithmetic sum of Cantor sets with constant ratios of dissection ,Nonlinearity (2009), 2127–2140.[2] R. Anisca, C. Chlebovec, M. Ilie, The structure of arithmetic sums of affine Cantor sets , Real Anal. Exchange (2011/2012), 324–332.[3] R. Anisca, M. Ilie, A technique of studying sums of central Cantor sets , Canad. Math. Bull. (2001), 12–18.[4] M. Balcerzak, T. Filipczak, P. Nowakowski, Families of symmetric Cantor sets from the category and measureviewpoints , Georgian Math. J. (2019), 545–553.[5] T. Banakh, A. Bartoszewicz, M. Filipczak, E. Szymonik, Topological and measure properties of some self-similarsets , Topol. Methods Nonlinear Anal. (2015), 1013–1028.[6] D. Damanik, A. Gorodetski, B. Solomyak, Absolutely continuous convolutions of singular measures and an appli-cation to the square Fibonacci Hamiltonian , Duke Math. J. (2015) 1603—1640.[7] T. Filipczak, P. Nowakowski, Conditions for the difference set of a central Cantor set to be a Cantorval ,arXiv:2003.04214.[8] M. Hall, On the sum and product of continued fractions , Ann. Math. (1947), 966–993.[9] B. Hunt, I. Kan, J. Yorke, Intercection of thick Cantor sets , Trans. Amer. Math. Soc. (1993), 869–888.[10] R. L. Kraft, Random intersections of thick Cantor sets , Trans. Amer. Math. Soc. (2000), 1315–1328.[11] R. L. Kraft, What’s the difference between Cantor sets? , Amer. Math. Monthly (1994), 640–650.[12] A. Kumar, M. Rani, R. Chugh, New 5-adic Cantor sets and fractal string , Springerplus 2(1):654 (2013).[13] P. Mendes, F. Oliveira, On the topological structure of the arithmetic sum of two Cantor sets , Nonlinearity (1994),329–343.[14] F. Prus-Wi´sniowski, F. Tulone, The arithmetic decomposition of central Cantor sets , J. Math. Anal. Appl. (2018), 26–31.[15] S. Newhouse, The abundance of wild hyperbolic sets and nonsmooth stable sets for diffeomorphisms , Inst. Hautes´Etudes Sci. Publ. Math. (1979), 101—151.[16] J. Palis, F. Takens, Hyperbolicity and Sensitive Chaotic Dynamics at Homoclinic Bifurcations , Cambridge: Cam-bridge University Press (1993).[17] M. Repick´y, Sets of points of symmetric continuity , Arch. Math. Logic (215), 803–824.[18] A. Sannami, An example of a regular Cantor set whose difference set is a Cantor set with positive measure , HokkaidoMath. J. (1992), 7–24.[19] Y. Takahashi, Products of two Cantor sets , Nonlinearity (2017), 2114–2137.[20] Y. Takahashi, Quantum and spectral properties of the Labyrinth model , J. Math. Phys. (2016), 063506.[21] Y. Takahashi, Sums of two self-similar Cantor sets , J. Math. Anal. Appl. (2019), 613–626.[22] Y. Zeng, Self-similar subsets of a class of Cantor sets , J. Math. Anal. Appl. (2016), 57–69. Institute of Mathematics, L´od´z University of Technology, ul. W´olcza´nska 215, 93-005 L´od´z, PolandInstitute of Mathematics, Czech Academy of Sciences, ˇZitn´a 25, 115 67 Prague 1, Czech Republic Email address ::