In mathematics, a dyadic rational or binary rational is a number that can be expressed as a fraction whose denominator is a power of two. For example, 1/2, 3/2, and 3/8 are dyadic rationals, but 1/3 is not. These numbers are important in computer science because they are the only ones with finite binary representations. Dyadic rationals also have applications in weights and measures, musical time signatures, and early mathematics education. They can accurately approximate any real number.
Dyadic rationals in the interval from 0 to 1
The sum, difference, or product of any two dyadic rational numbers is another dyadic rational number, given by a simple formula. However, division of one dyadic rational number by another does not always produce a dyadic rational result. Mathematically, this means that the dyadic rational numbers form a ring, lying between the ring of integers and the field of rational numbers. This ring may be denoted .
Kitchen weights measuring dyadic fractions of a pound from 2 lb down to 1/64 lb (1/4 oz)
Many traditional systems of weights and measures are based on the idea of repeated halving, which produces dyadic rationals when measuring fractional amounts of units. The inch is customarily subdivided in dyadic rationals rather than using a decimal subdivision. The customary divisions of the gallon into half-gallons, quarts, pints, and cups are also dyadic. The ancient Egyptians used dyadic rationals in measurement, with denominators up to 64. Similarly, systems of weights from the Indus Valley civilisation are for the most part based on repeated halving; anthropologist Heather M.-L. Miller writes that "halving is a relatively simple operation with beam balances, which is likely why so many weight systems of this time period used binary systems".
Dyadic rationals are central to computer science as a type of fractional number that many computers can manipulate directly. In particular, as a data type used by computers, floating-point numbers are often defined as integers multiplied by positive or negative powers of two. The numbers that can be represented precisely in a floating-point format, such as the IEEE floating-point datatypes, are called its representable numbers. For most floating-point representations, the representable numbers are a subset of the dyadic rationals. The same is true for fixed-point datatypes, which also use powers of two implicitly in the majority of cases. Because of the simplicity of computing with dyadic rationals, they are also used for exact real computing using interval arithmetic, and are central to some theoretical models of computable numbers.
Generating a random variable from random bits, in a fixed amount of time, is possible only when the variable has finitely many outcomes whose probabilities are all dyadic rational numbers. For random variables whose probabilities are not dyadic, it is necessary either to approximate their probabilities by dyadic rationals, or to use a random generation process whose time is itself random and unbounded.
Time signatures in Western musical notation traditionally are written in a form resembling fractions (for example: 2 2, 4 4, or 6 8), although the horizontal line of the musical staff that separates the top and bottom number is usually omitted when writing the signature separately from its staff. As fractions they are generally dyadic, although non-dyadic time signatures have also been used. The numeric value of the signature, interpreted as a fraction, describes the length of a measure as a fraction of a whole note. Its numerator describes the number of beats per measure, and the denominator describes the length of each beat.
In mathematics educationEdit
In theories of childhood development of the concept of a fraction based on the work of Jean Piaget, fractional numbers arising from halving and repeated halving are among the earliest forms of fractions to develop. This stage of development of the concept of fractions has been called "algorithmic halving". Addition and subtraction of these numbers can be performed in steps that only involve doubling, halving, adding, and subtracting integers. In contrast, addition and subtraction of more general fractions involves integer multiplication and factorization to reach a common denominator. Therefore, dyadic fractions can be easier for students to calculate with than more general fractions.
However, the result of dividing one dyadic rational by another is not necessarily a dyadic rational. For instance, 1 and 3 are both dyadic rational numbers, but 1/3 is not.
Dyadic rational approximations to the square root of 2 (), found by rounding to the nearest smaller integer multiple of for The height of the pink region above each approximation is its error.
Real numbers with no unusually-accurate dyadic rational approximations. The red circles surround numbers that are approximated within error by . For numbers in the fractal Cantor set outside the circles, all dyadic rational approximations have larger errors.
Every integer, and every half-integer, is a dyadic rational. They both meet the definition of being an integer divided by a power of two: every integer is an integer divided by one (the zeroth power of two), and every half-integer is an integer divided by two.
Every real number can be arbitrarily closely approximated by dyadic rationals. In particular, for a real number , consider the dyadic rationals of the form , where can be any integer and denotes the floor function that rounds its argument down to an integer. These numbers approximate from below to within an error of , which can be made arbitrarily small by choosing to be arbitrarily large. For a fractal subset of the real numbers, this error bound is within a constant factor of optimal: for these numbers, there is no approximation with error smaller than a constant times . The existence of accurate dyadic approximations can be expressed by saying that the set of all dyadic rationals is dense in the real line. More strongly, this set is uniformly dense, in the sense that the dyadic rationals with denominator are uniformly spaced on the real line.
The dyadic rationals are precisely those numbers possessing finite binary expansions. Their binary expansions are not unique; there is one finite and one infinite representation of each dyadic rational other than 0 (ignoring terminal 0s). For example, 0.112 = 0.10111...2, giving two different representations for 3/4. The dyadic rationals are the only numbers whose binary expansions are not unique.
In advanced mathematicsEdit
Because they are closed under addition, subtraction, and multiplication, but not division, the dyadic rationals are a ring but not a field. The ring of dyadic rationals may be denoted , meaning that it can be generated by evaluating polynomials with integer coefficients, at the argument 1/2. As a ring, the dyadic rationals are a subring of the rational numbers, and an overring of the integers. Algebraically, this ring is the localization of the integers with respect to the set of powers of two.
As well as forming a subring of the real numbers, the dyadic rational numbers form a subring of the 2-adic numbers, a system of numbers that can be defined from binary representations that are finite to the right of the binary point but may extend infinitely far to the left. The 2-adic numbers include all rational numbers, not just the dyadic rationals. Embedding the dyadic rationals into the 2-adic numbers does not change the arithmetic of the dyadic rationals, but it gives them a different topological structure than they have as a subring of the real numbers. As they do in the reals, the dyadic rationals form a dense subset of the 2-adic numbers, and are the set of 2-adic numbers with finite binary expansions. Every 2-adic number can be decomposed into the sum of a 2-adic integer and a dyadic rational; in this sense, the dyadic rationals can represent the fractional parts of 2-adic numbers, but this decomposition is not unique.
The dyadic rationals play a key role in the analysis of Daubechies wavelets, as the set of points where the scaling function of these wavelets is non-smooth. Similarly, the dyadic rationals parameterize the discontinuities in the boundary between stable and unstable points in the parameter space of the Hénon map.
In reverse mathematics, one way of constructing the real numbers is to represent them as functions from unary numbers to dyadic rationals, where the value of one of these functions for the argument is a dyadic rational with denominator that approximates the given real number. Defining real numbers in this way allows many of the basic results of mathematical analysis to be proven within a restricted theory of second-order arithmetic called "feasible analysis" (BTFA).
The surreal numbers are generated by an iterated construction principle which starts by generating all finite dyadic rationals, and then goes on to create new and strange kinds of infinite, infinitesimal and other numbers. This number system is foundational to combinatorial game theory, and dyadic rationals arise naturally in this theory as the set of values of certain combinatorial games.
The usual proof of Urysohn's lemma utilizes the dyadic fractions for constructing the separating function from the lemma.
^Rudman, Peter S. (2009), How Mathematics Happened: The First 50,000 Years, Prometheus Books, p. 148, ISBN 978-1-61592-176-8
^Barnes, John (2016), Nice Numbers, Springer International Publishing, doi:10.1007/978-3-319-46831-0, ISBN 978-3-319-46830-3, Note that binary measures (2, 4, 8, 16) are very common indeed. This is particularly obvious with volumes.
^Miller, Heather M.-L. (2013), "Weighty matters: evidence for unity and regional diversity from the Indus civilization weights", in Abraham, Shinu Anna; Gullapalli, Praveena; Raczek, Teresa P.; Rizvi, Uzma Z. (eds.), Connections and Complexity: New Approaches to the Archaeology of South Asia, Left Coast Press, pp. 161–177, doi:10.4324/9781315431857, ISBN 978-1-59874-686-0; see in particular p. 166
^ abcdefgKo, Ker-I (1991), Complexity Theory of Real Functions, Progress in Theoretical Computer Science, Boston, Massachusetts: Birkhäuser Boston, Inc., pp. 41–43, doi:10.1007/978-1-4684-6802-1, ISBN 0-8176-3586-6, MR 1137517, S2CID 11758381
^Zheng, Xizhong; Rettinger, Robert (2004), "Weak computability and representation of reals", Mathematical Logic Quarterly, 50 (4–5): 431–442, doi:10.1002/malq.200310110, MR 2090389, S2CID 15815720
^Ambos-Spies, Klaus; Zheng, Xizhong (2019), "On the differences and sums of strongly computably enumerable real numbers", in Manea, Florin; Martin, Barnaby; Paulusma, Daniël; Primiero, Giuseppe (eds.), Computing with Foresight and Industry: 15th Conference on Computability in Europe, CiE 2019, Durham, UK, July 15–19, 2019, Proceedings, Lecture Notes in Computer Science, vol. 11558, Cham: Springer, pp. 310–322, doi:10.1007/978-3-030-22996-2_27, MR 3981892, S2CID 195795492
^ abLibbey, Theodore (2006), "Time signature", The NPR Listener's Encyclopedia of Classical Music, Workman Publishing, p. 873, ISBN 978-0-7611-2072-8
^Yanakiev, Ivan K. (2020), "Mathematical devices in aid of music theory, composition, and performance", in Bozhikova, Milena (ed.), Music between Ontology and Ideology, Cambridge Scholars Publishing, pp. 35–62, ISBN 978-1-5275-4758-2; see in particular p. 37.
^Wells, David Graham (2015), Motivating Mathematics: Engaging Teachers And Engaged Students, World Scientific, pp. 32–33, ISBN 978-1-78326-755-2
^ abUiterwijk, Jos W. H. M.; Barton, Michael (2015), "New results for Domineering from combinatorial game theory endgame databases", Theoretical Computer Science, 592: 72–86, arXiv:1506.03949, doi:10.1016/j.tcs.2015.05.017, MR 3367582, S2CID 5899577
^Equivalent formulas to these, written in the language of the Coq interactive theorem prover, are given by Krebbers, Robbert; Spitters, Bas (2013), "Type classes for efficient exact real arithmetic in Coq", Logical Methods in Computer Science, 9 (1): 1:01, 27, arXiv:1106.3448, doi:10.2168/LMCS-9(1:1)2013, MR 3029087, S2CID 218627153
^O'Connor, Russell (2007), "A monadic, functional implementation of real numbers", Mathematical Structures in Computer Science, 17 (1): 129–159, doi:10.1017/S0960129506005871, MR 2311089, S2CID 221168970
^ abSabin, Malcolm (2010), Analysis and Design of Univariate Subdivision Schemes, Geometry and Computing, vol. 6, Springer, p. 51, ISBN 9783642136481
^More precisely, for small positive values of , the set of real numbers that have no approximation with error smaller than a constant times forms a Cantor set whose Hausdorff dimension, as a function of , goes to one as approaches zero. The illustration shows this set for .
^Kac, Mark (1959), Statistical Independence in Probability, Analysis and Number Theory, Carus Mathematical Monographs, vol. 12, New York: John Wiley & Sons for the Mathematical Association of America, pp. 2–3, MR 0110114
^ abPollen, David (1992), "Daubechies' scaling function on [0,3]", Wavelets, Wavelet Analysis and Its Applications, vol. 2, Boston, Massachusetts: Academic Press, pp. 3–13, MR 1161245
^Bajnok, Béla (2013), An Invitation to Abstract Mathematics, Undergraduate Texts in Mathematics, New York: Springer, p. 186, doi:10.1007/978-1-4614-6636-9, ISBN 978-1-4614-6635-2
^In the notation of Estes and Ohm for rings that are both subrings of and overrings of , the dyadic rationals are the ring . See section 7 of Estes, Dennis; Ohm, Jack (1967), "Stable range in commutative rings" (PDF), Journal of Algebra, 7 (3): 343–362, doi:10.1016/0021-8693(67)90075-0, MR 0217052
^Lucyshyn-Wright, Rory B. B. (2018), "Convex spaces, affine spaces, and commutants for algebraic theories", Applied Categorical Structures, 26 (2): 369–400, arXiv:1603.03351, doi:10.1007/s10485-017-9496-9, MR 3770912, S2CID 3743682
^ abManners, Freddie (2015), "A solution to the pyjama problem", Inventiones Mathematicae, 202 (1): 239–270, arXiv:1305.1514, Bibcode:2015InMat.202..239M, doi:10.1007/s00222-014-0571-7, MR 3402799, S2CID 119148680; see section 6.2.1, "A model case: ", pp. 255–257.
^ abde Cornulier, Yves; Guyot, Luc; Pitsch, Wolfgang (2007), "On the isolated points in the space of groups" (PDF), Journal of Algebra, 307 (1): 254–277, arXiv:math/0511714, doi:10.1016/j.jalgebra.2006.02.012, MR 2278053, S2CID 11566447
^Bhattacharjee, Meenaxi; Macpherson, Dugald; Möller, Rögnvaldur G.; Neumann, Peter M. (1997), "Rational numbers", Notes on Infinite Permutation Groups, Texts and Readings in Mathematics, vol. 12, Berlin: Springer-Verlag, pp. 77–86, doi:10.1007/978-93-80250-91-5_9, ISBN 81-85931-13-5, MR 1632579
^Fernandes, António M.; Ferreira, Fernando (2005), "Basic applications of weak König's lemma in feasible analysis" (PDF), Reverse Mathematics 2001, Lecture Notes in Logic, vol. 21, La Jolla, California: Association for Symbolic Logic, pp. 175–188, MR 2185433