3

There is no format more popular in the world than the representation of Integers: 32-bit and 64-bit strings are used by basically every single computer in existence and there's no practical reason to change that. But I'm curious to know what kind of different, creative representations integers and natural numbers could have.

Are there different ways to represent ints and natural numbers, with interesting mathematical and computational properties (for example, maybe one representation on which "div" is faster than "add"; or things like that)?

MaiaVictor
  • 1,217
  • somewhat relevant question:http://math.stackexchange.com/questions/446664/what-is-the-most-efficient-numerical-base-system – NoChance Feb 03 '16 at 21:06
  • To make division and multiplication fast, take logarithms. – Dan Brumleve Feb 03 '16 at 21:06
  • No because the entropy of an integet is captured precisely by its binary bits, so it's impossible to be more efficient in representing it. Moreover, the hardware that handles them is built of transistors that are basically binary switches. So other low level representation requires either emulated or completely different hardware. You can maybe try to think about the cpu architecture that perform arithmetic on integers, see if you can be clever. Keep in mind, Intel has been thinking about this for decades. – darksky Feb 03 '16 at 21:10
  • You might find the Zeckendorf Representation cool if you like Fibonacci numbers. Not sure if they're useful, but it's a nice concept –  Feb 03 '16 at 21:15
  • 1
    @NoChance yep, but please mind I'm not talking about "base system"-like representations (i.e., sum of powers of a base), but more like alternative, lesser know representations, perhaps using trees and other interesting data structures. – MaiaVictor Feb 03 '16 at 21:19
  • The Hereditary Representation represents numbers as a tree. – Oscar Cunningham Feb 03 '16 at 21:21
  • 1
    Something like that is what I'm interested, @vrugtehagel - now imagine someone could prove that Zeckendorf representation has faster asymptotics for some kind of integer operation (say, square root, hypothenuse, anything). That'd be the cool thing I'm looking for. – MaiaVictor Feb 03 '16 at 21:38

0 Answers0