An inequality for sums of binary digits, with application to Takagi functions
aa r X i v : . [ m a t h . C A ] F e b An inequality for sums of binary digits, withapplication to Takagi functions
Pieter C. AllaartUniversity of North Texas ∗ November 7, 2018
Abstract
Let φ ( x ) = 2 inf {| x − n | : n ∈ Z } , and define for α > f α ( x ) = ∞ X j =0 αj φ (2 j x ) . Tabor and Tabor [
J. Math. Anal. Appl. (2009), 729–737] recently provedthe inequality f α (cid:18) x + y (cid:19) ≤ f α ( x ) + f α ( y )2 + | x − y | α , for α ∈ [1 , f α at dyadic rationalpoints, it is shown in this paper that the above inequality can be reduced toa simple inequality for weighted sums of binary digits. That inequality, whichseems of independent interest, is used to give an alternative proof of the resultof Tabor and Tabor, which captures the essential structure of f α . AMS 2000 subject classification : 26A27 (primary); 26A51 (secondary)
Key words and phrases : Takagi function, Approximate convexity, Digitalsum inequality. ∗ Address: Department of Mathematics, University of North Texas, 1155 Union Circle Introduction
Let φ ( x ) = 2 inf {| x − n | : n ∈ Z } be the so-called “tent-map,” and define for α > f α ( x ) = ∞ X j =0 αj φ (2 j x ) . (1)Observe that f is two times Takagi’s continuous nowhere differentiable function;see [7]. For 0 < α <
1, the graph of f α is a fractal whose Hausdorff dimensionwas calculated by Ledrappier [4]. For α >
1, the function f α is Lipschitz and hencedifferentiable almost everywhere. The special case α = 2 gives the only smoothfunction in this family, as f ( x ) = 4 x (1 − x ).This paper concerns the following inequality, proved recently by Tabor and Tabor[6]. Theorem 1. (Tabor and Tabor [6, Corollary 2.1]) . For every ≤ α ≤ and for all x, y ∈ [0 , , f α (cid:18) x + y (cid:19) ≤ f α ( x ) + f α ( y )2 + | x − y | α . (2)This inequality plays an important role in the study of approximate convexity ofcontinuous functions, where f α occurs naturally in a best possible upper bound; see[6]. For the case α = 1, the inequality had previously been proved by Boros [2]. Notethat for α = 2, (2) holds with equality for all x and y in [0 , f α . The aim of this note is to show how (2) canbe reduced to a simple inequality concerning weighted sums of binary digits, therebyproviding a simpler proof for the inequality (2) that emphasizes the basic structureof f α .We need the following notation. For a nonnegative integer n and a real number p , write n in binary as n = P ∞ j =0 j ε j with ε j ∈ { , } , and define s p ( n ) = ∞ X j =0 pj ε j . (3)Let S p ( n ) = n − X m =0 s p ( m ) . It turns out that (2) is equivalent to the simple inequality S p ( m + l ) + S p ( m − l ) − S p ( m ) ≤ l p +1 , (4)2or 0 ≤ p ≤ ≤ l ≤ m . This inequality, which seems to be of independentinterest, is proved in Section 2; there we also specify the cases when equality holds in(4). Note that when p = 0, S p ( n ) is the number of 1’s needed to express the numbers0 , . . . , n − S ( m + l ) − S ( m ) − [ S ( m ) − S ( m − l )] ≤ l, it follows that for any list of 2 l consecutive positive integers m − l, . . . , m + l − m, . . . , m + l −
1) is at most l more than the number of 1’s required to write thefirst half (the numbers m − l, . . . , m − S has been well studied inthe literature; see, for instance, Trollope [8] for a precise expression and asymptotics.When p = 1, S p ( n ) is simply the sum of the first n − l and m . It seems that for0 < p < p = 0 the author hasnot been able to find a reference.The key to showing that (2) reduces to (4) is the following formula for the valuesof f α at dyadic rational points. Proposition 2.
For n = 0 , , . . . and m = 0 , , . . . , n , f α (cid:16) m n (cid:17) = m − X k =0 n − X i =0 ( − ε i ( k ) ( n − i − α + i , (5) where ε i ( k ) ∈ { , } is determined by P n − i =0 i ε i ( k ) = k . For α = 1, this formula simplifies to a well-known expression for the Takagifunction; see, for instance, Kr¨uppel [3, eq. (2.4)]. The formula in its general formabove does not seem to have been published before, and could be useful for studyinga variety of other properties of the functions f α , including their level sets and finerdifferentiability structure. For the Takagi function (i.e. f ), the level sets wereconsidered for instance by Maddock [5], and a description of the set of points x with f ′ ( x ) = ± ∞ was given by Allaart and Kawamura [1]. In these papers, explicitexpressions such as (5) above played an important role.Proposition 2 is proved in Section 3. It is then used, together with (4), to give ashort proof of Theorem 1. This section gives a proof of the inequality (4), and specifies in which cases equalityholds. 3 heorem 3.
Let ≤ p ≤ . Then (4) holds for all m ≥ and ≤ l ≤ m . Moreover,if l ≥ and k is the integer such that k − < l ≤ k , then equality holds in (4) if andonly if one of the following holds:(i) p = 1 ; or(ii) < p < , l = 2 k , and m ≡ l mod 2 k +1 ; or(iii) p = 0 , and either m ≡ l mod 2 k +1 or m ≡ − l mod 2 k +1 .Proof. Part 1: Inequality.
Fix p ∈ [0 , m, l ) := S p ( m + l ) + S p ( m − l ) − S p ( m ) . Note that the inequality is trivially satisfied when l = 0. The proof proceeds byinduction on l . First, let l = 1, and note that in this case,∆( m,
1) = s p ( m ) − s p ( m − . Consider two cases regarding the parity of m . If m is odd, then ε ( m −
1) = 0 and ε ( m ) = 1, while ε j ( m −
1) = ε j ( m ) for all j ≥
1. Hence, ∆( m,
1) = 1.Assume then that m is even. In this case, there is j ≥ ε j ( m −
1) = 1 and ε j ( m ) = 0 for 0 ≤ j < j , ε j ( m −
1) = 0 and ε j ( m ) = 1 , and ε j ( m −
1) = ε j ( m ) for all j > j . Thus, ∆( m,
1) = 2 j p − j − X j =0 jp . (6)If p = 0, it follows immediately that ∆( m, <
1. If 0 < p ≤
1, we may put λ = 2 p and obtain that∆( m, − λ j − − λ j − λ − λ j − λ − λ − ≤ . (7)Thus, (4) holds for l = 1 and all m ≥
1. In fact, if l = 1 and p <
1, it is clear from(6) and (7) that equality obtains in (4) if and only if m is odd.Next, let n ≥
2, and assume that ∆( m, l ) ≤ l p +1 for all l < n and all m . For easeof notation, putΣ( t, u ) := u − X r = t s p ( r ) = S p ( u ) − S p ( t ) , t, u ∈ IN , t < u. − n (cid:27) Σ( m − n, m + n − k ) m + n − k Σ( m + n − k , m ) m Σ( m, m − n + 2 k ) m − n + 2 k (cid:27) Σ( m − n + 2 k , m + n )Figure 1: The induction step in the proof of (4) illustrated for m = 47 and n = 5.Let k be the integer such that 2 k − < n ≤ k . The idea is to write∆( m, n ) = Σ( m − n + 2 k , m + n ) − Σ( m − n, m + n − k )+ Σ( m, m − n + 2 k ) − Σ( m + n − k , m ) . (See Figure 1, which also illustrates the next few steps of the induction argument.)Since the list m, . . . , m − n + 2 k − k − n elements and 2 k − n < n , theinduction hypothesis implies thatΣ( m, m − n + 2 k ) − Σ( m + n − k , m ) = ∆( m, k − n ) ≤ (2 k − n ) p +1 . (8)On the other hand, for r = 0 , , . . . , n − k −
1, the numbers m − n + r and m − n +2 k + r have their k least significant binary digits in common (see the boxes in Figure 1),and so s p ( m − n + 2 k + r ) − s p ( m − n + r ) = 2 kp { s p ( t + 1) − s p ( t ) } , (9)where t is the greatest integer in ( m − n + r ) / k ; this follows because the terms for j = 0 , . . . , k − m = 47 and n = 5, so k = 3, and t = 5 for both r = 0 and r = 1.) By (9) and the fact that (4) holds for the case l = 1,Σ( m − n + 2 k , m + n ) − Σ( m − n, m + n − k ) ≤ (2 n − k ) · kp , (10)with strict inequality when p < t is odd. Combining (8) and (10), we obtain∆( m, n ) ≤ (2 n − k ) · kp + (2 k − n ) p +1 = 2 k ( p +1) (cid:20) (cid:16) n k (cid:17) − (cid:16) − n k (cid:17) p +1 (cid:21) . x = n/ k . Then 1 / < x ≤
1, and it will follow that ∆( m, n ) ≤ n p +1 providedthat 2 x − − x ) p +1 ≤ x p +1 . (11)But this last inequality follows since the function g p ( x ) := 2 x − − x ) p +1 − x p +1 (12)is convex on [1 / ,
1] for p ∈ [0 , g p (1 /
2) = g p (1) = 0. This concludes theinductive proof of the inequality (4).(It is worth noting that (11) was used also by Tabor and Tabor [6] in their proofof (2).) Part 2: Equality.
We now turn to the question of equality. It was noted inthe introduction that if p = 1, then s p ( n ) = n , and so ∆( m, l ) = l for all l and m .Suppose 0 < p <
1. If l = 2 k and m ≡ l mod 2 k +1 , then∆( m, l ) = l · kp = l p +1 . On the other hand, if l = 2 k but m l mod 2 k +1 , then strict inequality obtains in(10) in the induction step, as the greatest integer in ( m − l + r ) / k is odd for at leastone r . Finally, if l < k , then with x = l/ k we have strict inequality in (11), sincethe function g p defined in (12) is strictly convex on [1 / ,
1] when 0 < p < p = 0 is the most involved. We will show inductively that ∆( m, l ) = l if and only if m ≡ ± l mod 2 k +1 . Note that this equivalence holds for the case l = 1by the remark following (7).Let n ≥
2, and assume that whenever l < n and j is the integer such that2 j − < l ≤ j , the equivalence m ≡ ± l mod 2 j +1 ⇐⇒ ∆( m, l ) = l holds. Let k be the integer such that 2 k − < n ≤ k , and put l := 2 k − n. Observe that l < k − < n .Suppose m ≡ ± n mod 2 k +1 . Then either the binary representation of m − n endsin k zeros, or that of m + n − k ones. In both cases, ε k ( m − n + 2 k + r ) = 1 and ε k ( m − n + r ) = 0 , for 0 ≤ r < n − k , (13)so Σ( m − n + 2 k , m + n ) − Σ( m − n, m + n − k ) = 2 n − k = n − l. (14)6f l = 0 the two middle groups vanish, so ∆( m, n ) = n − l = n . Assume then that l >
0. Let j be the integer such that 2 j − < l ≤ j . Since l < k − , we have j < k . If m ≡ n mod 2 k +1 , then m + l ≡ k mod 2 k +1 and hence m + l ≡ j +1 . Similarly,if m ≡ − n mod 2 k +1 , then m − l ≡ j +1 . Thus, by the induction hypothesis,Σ( m + n − k , m ) − Σ( m, m − n + 2 k ) = ∆( m, l ) = l. Combining this with (14) yields ∆( m, n ) = n .Conversely, suppose ∆( m, n ) = n . Then equality must hold in both (8) and (10),so in particular, s ( m − n + 2 k + r ) − s ( m − n + r ) = 1 , for 0 ≤ r < n − k . This implies (13). If n = 2 k , it follows immediately that m ≡ n mod 2 k +1 . Otherwise, l >
0, and we let j be the integer such that 2 j − < l ≤ j . Since∆( m, l ) = Σ( m, m + l ) − Σ( m − l, m ) = l, the induction hypothesis implies that m ≡ ± l mod 2 j +1 . If m ≡ l mod 2 j +1 , thenthe binary expansion of m − l ends in j + 1 zeros. The set A := { m − l, . . . , m + l − } contains 2 l ≤ j +1 numbers, so ε i ( · ) is constant on A for each i > j . In particular, ε k ( · ) is constant on A , since k > j . The same conclusion results if m ≡ − l mod 2 j +1 ,as then the binary expansion of m + l − j + 1 ones.Suppose the common value of ε k ( · ) on A is 0. Since A contains the numbers m − n + r where r = 2 n − k , . . . , k −
1, we obtain by (13) that ε k ( m − n + r ) = 0 for r =0 , . . . , k −
1, and so m − n ≡ k +1 . On the other hand, suppose the commonvalue of ε k ( · ) on A is 1. Then by (13), ε k ( m − n + r ) = 1 for r = 2 n − k , . . . , n − r ′ = 2 n − r ), ε k ( m + n − r ′ ) = 1 for r ′ = 1 , . . . , k . But thisimplies m + n ≡ k +1 . In either case, m ≡ ± n mod 2 k +1 , as desired. Thus,the proof is complete. This section gives a proof of Proposition 2, and shows how the expression given inthe proposition can be used, in conjunction with the inequality (4), to give a morestraightforward proof of the theorem of Tabor and Tabor.
Proof of Proposition 2.
Since φ vanishes at integer points, the definition (1) of f α f α (cid:18) j n (cid:19) = n − X m =0 αm φ (cid:18) j n − m (cid:19) , (15) f α (cid:18) j + 12 n (cid:19) = n − X m =0 αm φ (cid:18) j + 12 n − m (cid:19) , (16)and f α (cid:18) j + 12 n +1 (cid:19) = n X m =0 αm φ (cid:18) j + 12 n +1 − m (cid:19) . Since φ is linear on each interval [ j/ , ( j + 1) /
2] with j ∈ Z , φ (cid:18) j + 12 n +1 − m (cid:19) = 12 (cid:26) φ (cid:18) j n − m (cid:19) + φ (cid:18) j + 12 n − m (cid:19)(cid:27) . Noting also that φ (cid:0) (2 j + 1) / (cid:1) = 1 for all j ∈ Z , we thus obtain f α (cid:18) j + 12 n +1 (cid:19) = 12 (cid:26) f α (cid:18) j n (cid:19) + f α (cid:18) j + 12 n (cid:19)(cid:27) + 12 αn , (17)for n = 0 , , . . . , and j = 0 , , . . . , n −
1. From this, it follows that f α (cid:18) k + 12 n +1 (cid:19) − f α (cid:18) k n +1 (cid:19) = 12 (cid:26) f α (cid:18) j + 12 n (cid:19) − f α (cid:18) j n (cid:19)(cid:27) + ( − k αn , (18)where j = [ k/
2] is the greatest integer in k/
2. This last equation follows easily from(17) by considering separately the cases k = 2 j and k = 2 j + 1. A straightforwardinduction argument using (18) yields f α (cid:18) k + 12 n +1 (cid:19) − f α (cid:18) k n +1 (cid:19) = n X i =0 ( − ε i ( n − i ) α + i , where k = P ni =0 i ε i . Replacing n with n − k = 0 , . . . , m − f α (0) = 0. Proof of Theorem 1.
Since f α is continuous, it suffices to prove (2) for dyadic rationalpoints x and y . Thus, we may assume that there exist nonnegative integers n, m and l such that x = ( m − l ) / n and y = ( m + l ) / n . It is to be shown that∆ ( n )2 ( m, l ) := f α (cid:16) m n (cid:17) − (cid:26) f α (cid:18) m − l n (cid:19) + f α (cid:18) m + l n (cid:19)(cid:27) ≤ (cid:18) l n (cid:19) α . ( n )2 ( m, l ) = n − X i =0 ( n − i − α + i m − X k =0 ( − ε i ( k ) − m − l − X k =0 ( − ε i ( k ) − m + l − X k =0 ( − ε i ( k ) ! = 12 ( n − α n − X i =0 ( α − i − m − X k = m − l ( − ε i ( k ) − m + l − X k = m ( − ε i ( k ) ! . Since ( − ε = 1 − ε for ε ∈ { , } , we can write2 ( n − α ∆ ( n )2 ( m, l ) = n − X i =0 ( α − i l X r =1 { ε i ( m + r − − ε i ( m − r ) } = l X r =1 { s α − ( m + r − − s α − ( m − r ) } = S α − ( m + l ) + S α − ( m − l ) − S α − ( m ) . Thus, by Theorem 3, ∆ ( n )2 ( m, l ) ≤ l α ( n − α = (cid:18) l n (cid:19) α , as required.In fact, it is not difficult to use Theorem 3 to determine for which dyadic points x and y equality holds in (2). It was already remarked in the introduction that equalityholds for all x and y in [0 ,
1] when α = 2. Corollary 4. (i) If < α < , then equality holds in (2) for dyadic rationals x and y in [0 , if and only if there exist integers j and r such that x = j/ r and | x − y | = 1 / r .(ii) If α = 1 , then equality holds in (2) for dyadic rationals x and y in [0 , ifand only if there exist integers j and r such that either x = j/ r or y = j/ r , and | x − y | ≤ / r .Proof. The proof of Theorem 1 shows that for x = ( m − l ) / n and y = ( m + l ) / n ,equality holds in (2) if and only if equality holds in (4) with p = α − < α <
2. If x = j/ r and y = ( j + 1) / r , then equality holds in (2) by(17). Conversely, if x and y are dyadic rationals in [0 ,
1] with x < y which attainequality in (2), then we can write x = ( m − l ) / n and y = ( m + l ) / n for integers l, m and n , and it follows from Theorem 3 (with 0 < p <
1) that there exist integers k and j such that l = 2 k , and m = (2 j + 1)2 k . But then, putting r = n − k −
1, weget x = j/ r and y = ( j + 1) / r . 9ii) Let α = 1, and suppose first that x = j/ r and y is dyadic rational with x < y ≤ ( j + 1) / r . Replacing r with a greater integer if necessary, we may assumethat 1 / r +1 < y − x ≤ / r . Write y − x = l/ s , where l, s ∈ Z . Now put n = s + 1, k = s − r = n − r −
1, and m = l + 2 k +1 j . Then 2 k − < l ≤ k , m ≡ l mod 2 k +1 , x = ( m − l ) / n , and y = ( m + l ) / n . So by Theorem 3 (with p = 0), x and y satisfy(2) with equality. The case ( j − / r ≤ y < x follows similarly.Conversely, let x and y be dyadic rationals in [0 ,
1] with x < y which attainequality in (2). Then we can write x = ( m − l ) / n and y = ( m + l ) / n for integers l, m and n . Theorem 3 implies that m ≡ ± l mod 2 k +1 , so there is j ∈ Z such thateither m = l +2 k +1 j or m = − l +2 k +1 j , where k is the integer such that 2 k − < l ≤ k .Suppose m = l + 2 k +1 j , and put r = n − k −
1. Then x = j/ r and y = x + 2 l/ n ,so y is a dyadic rational with y ≤ x + 1 / r , since 2 l/ n ≤ k +1 / n = 1 / r . Thecase m = − l + 2 k +1 j is similar, leading to y = j/ r and x = y − l/ n , so again | y − x | ≤ / r .Note that by continuity of f , it follows from statement (ii) in the Corollary thatfor α = 1, equality holds in (2) whenever x = j/ r and y is any real number with | x − y | ≤ / r . This is not surprising, considering the self-affine structure of f .However, it seems difficult to determine whether equality can hold in (2) when x and y are both nondyadic. Acknowledgment
The author wishes to thank two anonymous referees for a careful reading of themanuscript and for several suggestions which improved the presentation of the paper.
References [1]
P. C. Allaart and
K. Kawamura , The improper infinite derivatives of Takagi’s nowhere-differentiable function,
J. Math. Anal. Appl. (2010), no. 2, 656–665.[2]
Z. Boros , An inequality for the Takagi function.
Math. Inequal. Appl. (2008), no. 4, 757–765.[3] M. Kr¨uppel , On the extrema and the improper derivatives of Takagi’s continuous nowheredifferentiable function,
Rostock. Math. Kolloq. (2007), 41–59.[4] F. Ledrappier , On the dimension of some graphs,
Contemp. Math. (1992), 285–293.[5]
Z. Maddock , Level sets of the Takagi function: Hausdorff dimension,
Monatsh. Math. (2010), no. 2, 167–186.[6]
J. Tabor and
J. Tabor , Takagi functions and approximate midconvexity.
J. Math. Anal. Appl. (2009), no. 2, 729–737. T. Takagi , A simple example of the continuous function without derivative,
Phys.-Math. Soc.Japan (1903), 176-177. The Collected Papers of Teiji Takagi , S. Kuroda, Ed., Iwanami (1973),5–6.[8]
J. R. Trollope , An explicit expression for binary digital sums,
Math. Mag. (1968), 21-25.(1968), 21-25.