9 ms·
Negative Base
- rprospero 8y agoI think that's the first time I've ever seen someone use INTERCAL code to try and explain a concept.
- ainar-g 8y agoFor those wondering, please do read the Wiki article[1]. It's amazing. [1] https://en.wikipedia.org/wiki/INTERCAL https://en.wikipedia.org/wiki/INTERCAL
- dvfjsdhgfv 8y agoCan anyone provide some examples of practical applications of this?
- empath75 8y agoI can’t imagine there ever would be.
- gota 8y agoWell, the number of digits tell you the sign of the number, right? It could save a sign bit I think the ideal wikipedia page for this kind of thing has a 'Properties' section from which to start thinking about this
- vinceguidry 8y agoI don't think anyone ever imagined a use for imaginary numbers either, but those turned out to be quite useful for reducing dimensionality. Towards the bottom of the article it states that Donald Knuth proposed imaginary base numerical systems. So this may eventually find a use, likely with higher-dimensional math.
- ainar-g 8y agoIt will be really funny if there is some bit of new, undiscovered physics, that went undiscovered for so long just because it's best described using some esoteric maths like complex base numbers. Highly unlikely, but fun to think about.
- deleted 8y ago[deleted]
- throwaway37585 8y agoAre there any examples where the representation of a number matters in physics?
- jfoutz 8y agoI recall some effort in moving from imperial measurement to metric. Reality itself does not care, but the math sure gets easier if you carefully select units. Actually, another neat example is analog vs digital computation. your models can get very different answers. I recall some Mandelbrot guy talking about that.
- retzkek 8y agoSee Gaussian (cgs) units for an example, compare Coulomb's law in cgs and SI: https://en.wikipedia.org/wiki/Gaussian_units#Unit_of_charge https://en.wikipedia.org/wiki/Gaussian_units#Unit_of_charge
- roywiggins 8y agoImaginary numbers were useful as soon as they were invented. They are algebraically closed, unlike the real numbers, and are required for the fundamental theorem of algebra. https://en.m.wikipedia.org/wiki/Fundamental_theorem_of_algebra https://en.m.wikipedia.org/wiki/Fundamental_theorem_of_algeb... The first use of negative roots was to find the (real) roots of certain polynomials. They were considered a mathemathical hack: useful, but specious on their own. And then it turned out that if you take them on their own terms, they're fantastically useful.
- fwdpropaganda 8y agoSo in your mind people are just coming up with these things for no reason, is that it?
- empath75 8y agoIt’s fun and interesting to figure out. There are lots of ways to represent numbers but they don’t change the thing they represent.
- JadeNB 8y ago> There are lots of ways to represent numbers but they don’t change the thing they represent. Different representations of the same thing are not useless; one might make an argument (which I can only back up off the top of my head with mathematical examples, but I suspect that there are also many in the physical sciences) that they are at the root of much progress. The canonical example is to try to do positive-integer arithmetic with Arabic versus Roman numerals; they represent exactly the same thing, but I'll bet you can compute 16 ⨉ 17, but not XVI ⨉ XXIII (without converting), in your head.
- scentoni 8y agoXVI ⨉ XXIII = XVI ⨉ (XVI + I) = (XVI ⨉ XVI) + XVI = CCLVI + XVI = CCLXXII
- JadeNB 8y agoI didn't say that it wasn't computeable, only that I bet you couldn't do it in your head. Note that your calculation for some reason (EDIT: ah, maybe because my Arabic-numeral problem has 16 ⨉ 17?) replaces XXIII = 23 by XVII = 17, and then black-boxes the calculation XVI ⨉ XVI = CCLVI (which I at least wouldn't know without converting).
- jjaredsimpson 8y agoI agree. You can use the same algorithm for computing both. But Arabic has better constants. Because it's a discrete convolution instead of grouping and aggregating. 1 6 1 1 6 7 7 42 1, 6+7, 42 = 100 + 130 + 42 = 272 Same process in Roman X V I X C L X X C L X I X V I I X V I I X V I CC LL(=C) XXXXX(=L) VVV(=XV) III = CCCLXVIII = 16*23=368 This supports the arguments that Arabic numbers really are better suited for things like multiplying. They don't have the property that multiplication is convolution, so you can't even do things like truncate your computation to get an approximation. There's probably a way to formalize this with an entropy argument: that roman numerals are inefficient encoding. Because given some n-length string of numerals, firstly many are invalid encodings, and secondly among the valid numerals there isn't a uniform distribution from strings to integers. Something like that.
- wawhal 8y agoScience need not necessarily have any practical use. That’s why it is called Science. Science, the way I define it is: Study for the sake of it.
- Tepix 8y ago- Riddles. - Obfuscation. - Storing signed numbers in unsigned fields (nah, not really).
- pmarreck 8y ago“An intellectual is a person who has discovered something more interesting than sex.” ― Aldous Huxley
- JdeBP 8y agoI remember when negative zero was labelled a hoax. (-: * https://en.wikipedia.org/w/index.php?title=-0&diff=25603603&oldid=25529350 https://en.wikipedia.org/w/index.php?title=-0&diff=25603603&... * https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/-0 https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletio...
- pmarreck 8y agoBest way to represent nil, in my opinion ;) Although it smells like a design flaw (which negabinary conveniently doesn't have)
- Sharlin 8y agoSee also balanced ternary [1]. [1] https://en.wikipedia.org/wiki/Balanced_ternary https://en.wikipedia.org/wiki/Balanced_ternary
- philbarr 8y agoWhich you can use to solve the puzzle: "You have 12 coins that all look exactly the same. One is counterfeit and is either heavier or lighter than the other 11. With a balance beam scale, isolate the counterfeit coin in three moves." Any uses for Negative-base systems?
- catpolice 8y agoHoo, that's one of my favorite puzzles - there was a version of it on Brooklyn Nine-Nine with no solution given, which ruined my sleep that night. I have a theory that it's actually a little harder for programmers than for other technically inclined people because the instinct to treat it as a kind of binary search problem is really hard to shake.
- TrinaryWorksToo 8y agoIs it not a binary search problem?
- msoucy 8y agoWhen I was part of an organization in college, part of the onboarding process was that each applicant had to have a conversation and (possibly) do a "quest" for each member. My standing quest was that I would write the first 12 or so numbers in negabinary on my whiteboard, and have them determine the next few numbers and explain what they meant. I had people sitting outside my room for hours trying to figure it out. A few did do it, and normally had some expletives for me afterward.
- macintux 8y agoI bet they were frustrated. I was thinking of the various puzzles online trying to understand a sequence of numbers when I read about this, and realizing there's no way I'd ever have come up with the answer on my own.
- bhrgunatha 8y agoLooking at the table is bad enough, but I imagine most people looking would think "Aaah binary" and convert to decimal: 1, 6, 7, 4, 5, 26, 27, 24, 25, 30, 31, 28... That's cruel :)
- msoucy 8y agoI probably got a little too much sadistic pleasure out of it, yes... However, I was always willing to answer nontrivial questions, and even convert numbers to/from negabinary to help them. (The program used the Schroeppel2 implementation, to prevent them from getting too much of a clue if they somehow managed to find its source code)
- soVeryTired 8y agoLooking at the sequence of negabinary representations, I could imagine (with the benefit of hindsight) that it wouldn't be too hard to guess the next numbers in the sequence. You'd just need to make a few observations: the rightmost digit always flips from 1 to 0. The second digit from the right reads one twice, then zero twice, etc. When you increase the length of the sequence, add two leading ones. I'm not sure those would be enough, but just inspecting the digit-wise patterns would get you pretty far. Correctly interpreting the sequence is far harder!
- dumbfoundded 8y agoTaken one step further, could you have irrational bases? i^1 = i i^2 = -1 i^3 = -i i^4 = 1
- pmarreck 8y agohttps://en.wikipedia.org/wiki/Complex-base_system https://en.wikipedia.org/wiki/Complex-base_system
- dumbfoundded 8y agothank you!
- joker3 8y agoHow do you divide by numbers other than -2?