ENCYCLOPEDIA 4U .com



Encyclopedia Home Page

Google
  Web Encyclopedia4u.com

 

Unary numeral system

The unary numeral system represents natural numbers by stringing together multiple instances of an arbitrarily-chosen symbol; in order to represent a number N, the chosen symbol is repeated N times. For example, if we choose the symbol X, the number 5 is represented as XXXXX. The number of symbols is thus in one-to-one correspondence with the number to be represented. Counting on one's fingers is effectively a unary system. Unary may also be considered the base-1 numeral system, with the exception that the unary digit represents the number 1 instead of 0, unlike numeral systems of other bases, where digits typically range from 0 to the base minus one.

Compared to positional numeral systems, the unary system is inconvenient and is not used in practice for large calculations. It would be cumbersome, for instance, to calculate 500 + 700 in the unary system. It occurs in some problem descriptions in theoretical computer science (e.g. some P-Complete problems), where it is used to "artificially" decrease the run-time or space requirements of a problem. For instance, the problem of integer factorization is suspected to require more than polynomial run-time if the input is given in binary, but it only needs linear runtime if the input is presented in unary.





Content on this web site is provided for informational purposes only. We accept no responsibility for any loss, injury or inconvenience sustained by any person resulting from information published on this site. We encourage you to verify any critical information with the relevant authorities.



Copyright © 2005 Par Web Solutions All Rights reserved.
| Privacy

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Unary numeral system".