Saturday, November 21, 2009

Well

I have a new reality to adapt to, lack of sleep - I work 2 jobs now, 11pm-7am, then my old job where there is a promise to pay but intermittent pay from 8 to 1230.. got paid last Friday for two weeks there, which made a whole lot of difference when you are in an income to bills is almost even pinch, anything above normal income makes a huge difference. Otherwise I never get out of debt. Of course I'm always on the lookout on how to cut cost too, to break that income to expense ratio into something with more freedom, and part of the reason for currently having such a pinch is the promise later there'd be more freedom. Or the illusion of a promise. Anyway, the first few days at my new job I was still thinking about this stuff, microcontrollers, but mostly off my mind lately, for practical reasons. I have to sort of let my mind be blank and not wander off on the deep end and mess up at work hard. Instead I've become a farmville addict on facebook, to take me into the next year if everything goes right, and once I pick up and get all used to the job, I can start pondering things off on the deeper end again. I haven't written here for a while.. the following are gonna be just jotted down notes of what I remember thinking, without full explanation. Lack of full explanation also means you don't know something well, because you don't know something thoroughly until you can teach it or explain it to death. So I'm not learning as well as I could either. So I was gonna write that of course the factoradic is not more terse than the positional arabic/indian. For any selected base, you might as well go all the way up to the base in each placeholder and not stop halfway there, and if you're past the base, the diff notations are equivalent - hex vs binary, hex digits being a summary of 4 binary, one can go arbitrarily high on the base if ultimately it has to be hardware represented in binary, a high base is equivalent to binary. But this gets one thinking on the right path of how to find more terse ways. Terser notation, even if the mechanics are very complicated - such as mechanics of addition of positional is more complicated than tally, but still well worth it. Mechanics and sofistication are cheap, storage is expensive. Look at life - complexity and sophistication is cheap, food and energy is expensive, and even something very complex, such as a shark, might die from simple lack of food. So for numbers, we can look at how notation evolved over time - simple additive tally stick, then special symbols such as roman numerals, for multiples of tally sticks, then raising to the power positional system where the special multiple is understood in the position and extensible to infinity, the power being multiple multiples. That is, multiplication comes about from repeated addition of the same thing, 2+2+2+2+2 we call it 2x5, raising to power comes about from repeated multiplication of the same thing, 2x2x2x2x2=2^5, so the next logical step would be 2^2^2^2^2=2something5, repeated raising to the power of the same thing. It's a way to succinctly represent very large numbers. But that in itself is not enough. Just as floating point representation has many holes in it, but very succinct for very large numbers, n^n^n has holes in it, lacking granularity, and representation of each integer in between the gaps. Basically we need a representation that can do an n and n+1 easily no matter how large the numbers. The arabic/indian positional system is great, because the sum of geometric progression, for example 9x10^0+9x10^1+9x10^2+9x10^3=10^4-1, has a neat formula for the next introduced expansion in notation requiring one further symbol being the sum of all the other symbols -1, so adding the one clears all the others and expands the notation. Same with factoradic, 5!-1=4x4!+3x3!+2x2!+1x1!+0x0!. Basically all the other notation digits get reset to 0 as the new expansion symbol is introduced into the notation. Of course there are other number systems, such as the roman, which are not positional (or weakly so). In roman the symbols are just piled on, each new expansion requiring inventing a new symbol, and the notation is not terser than the positional, except for numbers very close to the invented symbol. That nonuniformity may be an advantage in certain situations. I've come across over some posts by Golovchenko, where multiplying by every single constant up to 8 is optimized.. still have to read through it, can't find the page right now. Basically if you have a number very close to say 2^2^2^2...^2, then it can be represented more tersely and possibly with fewer cpu cycles. But complexity in execution is not at stake here, if we can find a more efficient way of storing numbers in a minimum amount of space and representation, that takes precedence, but for equal storage density, of course lower complexity or fewer operations is better, even if it only happens in special cases.
So is there a full granularity integer representation between the geometric series representation, with no holes of granularity, and between the speed of n^n type representation that's too fast, and loses granularity per bit? Finding such a thing would be a nice leap forward. Even the maya had a positional system with mixed bases.