Унарна система числення

Унарна система числення — це бієктивна система числення із базисом-1. Це найпростіша система числення для представлення дійсних чисел:[1] для того, щоб в ній представити число N, довільно вибраний символ, який використовується як 1 повторюється N разів.[2] Наприклад, числа 1, 2, 3, 4, 5, … будуть виглядати в такій системі як показано нижче[3]

1, 11, 111, 1111, 11111, …

Ці числа не слід плутати із репюнітами, які також задаються у вигляді послідовностей одиниць але мають свою звичайне десяткову числову інтерпретацію.

Застосування

Унарні числа використовуються в деяких алгоритмах стиснення даних, таких як код Голомба.[4] Це поняття також є основою для аксіом Пеано, що формалізують арифметику в рамках математичної логіки.[5] Форма унарної нотації, яка називається кодування Черча використовується для представлення чисел в Лямбда-численні.[6]

Примітки

  1. Hodges, Andrew (2009). One to Nine: The Inner Life of Numbers. Anchor Canada. с. 14. ISBN 9780385672665. «The simplest way to write the natural numbers is by the unary notation».
  2. Davis, Martin; Sigal, Ron; Weyuker, Elaine J. (1994). Computability, Complexity, and Languages: Fundamentals of Theoretical Computer Science. Computer Science and Scientific Computing (вид. 2nd). Academic Press. с. 117. ISBN 9780122063824. «the base 1 (or unary) representation of the number x is simply a string of ones of length x».
  3. Hext, Jan (1990). Programming Structures: Machines and programs. Programming Structures 1. Prentice Hall. с. 33. ISBN 9780724809400..
  4. Golomb, S.W. (1966). Run-length encodings. IEEE Transactions on Information Theory. IT-12 (3): 399–401. doi:10.1109/TIT.1966.1053907..
  5. Magaud, Nicolas; Bertot, Yves (2002). Changing data structures in type theory: a study of natural numbers. Types for proofs and programs (Durham, 2000). Lecture Notes in Comput. Sci. 2277. Springer, Berlin. с. 181–196. MR 2044538. doi:10.1007/3-540-45842-5_12..
  6. Jansen, Jan Martin (2013). Programming in the λ-calculus: from Church to Scott and back. The Beauty of Functional Code: Essays Dedicated to Rinus Plasmeijer on the Occasion of His 61st Birthday. Lecture Notes in Computer Science 8106. Springer-Verlag. с. 168–180. doi:10.1007/978-3-642-40355-2_12..
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.