ternary is slightly more efficient than binary

lets say you’re trying to encode a number, eg. n = 1000, the number of digits needed to encode it in an arbitrary base b is log(n)/log(b) (the base b logarithm of n)

The amount of space necessary to encode that number given that base is b * number of digits

Therefore, the amount of space to encode a given number of an arbitrary base is b * log(n)/log(b), and since log(n) is a constant, you can sort of pretend it doesn’t exist

So if you minimize b / log(b), you get b = e. But you can’t really have non-integer bases.

However, b/log(3) < b/log(2) so ternary is more efficient because it’s closer to e

Advertisements

About antimatter15

I am literally an upside down penguin. No, I'm not a gas mask, which I have been told this profile pic looks like in low resolutions (or squinting). But I have one. Or at least I'd like to pretend I do so you don't chloroform me. In truth, I only have eye protection, because apparently hackers can make your PC explode. Literally. Cool right? Well, that's why I have these safety googles within an arm's length - Well, for that or if I need to peel an orange.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s