Timeline for A good schema to represent integer numbers from 0 to infinity, assuming you have infinite linear binary storage?
Current License: CC BY-SA 3.0
28 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 17, 2012 at 3:07 | history | edited | Dmitri Shuralyov | CC BY-SA 3.0 |
deleted 1061 characters in body
|
Jan 17, 2012 at 3:06 | answer | added | Dmitri Shuralyov | timeline score: 2 | |
Jan 17, 2012 at 1:05 | comment | added | Hardwareguy | Can you use the BigInteger (or equivalent library) in your programming language? | |
Jan 16, 2012 at 20:28 | history | tweeted | twitter.com/#!/StackProgrammer/status/159009201459441664 | ||
Jan 16, 2012 at 20:13 | history | edited | Dmitri Shuralyov | CC BY-SA 3.0 |
deleted 12 characters in body
|
Jan 16, 2012 at 20:00 | vote | accept | Dmitri Shuralyov | ||
Jan 16, 2012 at 20:00 | vote | accept | Dmitri Shuralyov | ||
Jan 16, 2012 at 20:00 | |||||
Jan 16, 2012 at 20:00 | vote | accept | Dmitri Shuralyov | ||
Jan 16, 2012 at 20:00 | |||||
Jan 16, 2012 at 19:58 | history | edited | Dmitri Shuralyov | CC BY-SA 3.0 |
added 1061 characters in body
|
Jan 16, 2012 at 19:55 | answer | added | Briguy37 | timeline score: 4 | |
Jan 16, 2012 at 19:47 | comment | added | Dmitri Shuralyov | Thank you to everyone for their constructive and insightful comments/answers above and below. You guys have given me a lot to think about. | |
Jan 16, 2012 at 18:52 | comment | added | Alex ten Brink | Assuming you generate 128 bit numbers sequentially: if we upper-bound the computation capacity of all computers by giving every human a petaflop-computer, then it would take 9 million years before these numbers run out. If on the other hand every human would randomly generate 600 million 128 bit numbers, there's a 50% chance they generate 1 duplicate. Is that good enough for you? (en.wikipedia.org/wiki/Universally_unique_identifier) If not, using 256 bits multiplies both these figures by 2^128=3.4*10^38, which is more than the square of the age of the universe in seconds. | |
Jan 16, 2012 at 18:28 | answer | added | user281377 | timeline score: 4 | |
Jan 16, 2012 at 17:18 | comment | added | Random832 | The ideas in RFC 2550, which provides a lexicographical-ordered ASCII representation for arbitrarily large positive integers, may be adaptable to this. Ultimately it breaks down to a unary segment which encodes the length of a base-26 segment which encodes the length of a base-10 segment - the latter two bases being more to do with the ASCII representation than anything fundamental to the scheme. | |
Jan 16, 2012 at 16:53 | comment | added | user16764 | And how long would it take on a 128-bit machine? | |
Jan 16, 2012 at 16:53 | comment | added | TheLQ | Look at this project, they calculated pi to 5 trillion digits and required entire hard drive (something like 50 TB of raw storage) to store the data. gizmodo.com/5606273/… Oh and apparently they've also gone to 10 trillion digits numberworld.org/misc_runs/pi-10t/details.html | |
Jan 16, 2012 at 16:50 | comment | added | Dmitri Shuralyov | Yes, my math is right. I meant each of the 6 million people is consuming 1 million UUIDs per second, so divide your answer by another 6 million. link | |
Jan 16, 2012 at 16:47 | comment | added | user16764 | Are you sure your math is right? In Python, (math.pow(2, 64) - 1) / (3600 * 24 * 1000000) gives 213503982.33460128 days to use up the integers at the given rate. That's a lot more than one month. Also, if you are indeed thinking about a real world use case for this then you should mention it in your question. | |
Jan 16, 2012 at 16:41 | answer | added | retracile | timeline score: 13 | |
Jan 16, 2012 at 16:39 | comment | added | Dmitri Shuralyov | I suppose I'm fine with a system that'll last millions of years even when a very large number of UUIDs are consumed each second. After all, I'm thinking about this with a real-world use scenario in mind. | |
Jan 16, 2012 at 16:36 | comment | added | Dmitri Shuralyov | @user16764, do you mean a single 64-bit integer variable? That certainly won't work: if 6 million people are consuming 1 million UUIDs per second, it will barely last more than a month. | |
Jan 16, 2012 at 16:32 | answer | added | Paul Tomblin | timeline score: 3 | |
Jan 16, 2012 at 16:29 | history | edited | Dmitri Shuralyov | CC BY-SA 3.0 |
edited title
|
Jan 16, 2012 at 16:29 | comment | added | user16764 | Do you want something that can scale infinitely (as in your opening), or for millions of years (as in your closing)? The two requirements are (obviously) completely different. Twos complement on a 64-bit machine will scale for millions of years. | |
Jan 16, 2012 at 16:22 | answer | added | mikera | timeline score: 2 | |
Jan 16, 2012 at 16:19 | answer | added | ccoakley | timeline score: 3 | |
Jan 16, 2012 at 16:19 | answer | added | Matěj Zábský | timeline score: 10 | |
Jan 16, 2012 at 16:00 | history | asked | Dmitri Shuralyov | CC BY-SA 3.0 |