IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Potentially sparse? I don't think so...
Perhaps in that big gap from 1_000_000_000 up. But there are about 300 million people in the USA, most of whom have a social security number (and others have been handed out), so social security numbers are mostly filled.

An optimal solution for the "sparse social security number" problem is going to use far too much memory when you have a mostly filled data space. Heck, 300 million pointers will take 1.2 GB on a 32-bit machine. Scott's solution is an extremely good trade-off that will be hard to beat on any significant criteria, let alone all of them combined.

Incidentally one thing to watch for in Scott's solutions, I believe that social security numbers can start with 0.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New I took the ones that start with 0 into account.
125M is approximately 1,000,000,000 / 8.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New I was referring to the step where you...
convert the string to long. Hand-rolled functions will be OK, but some library functions may take a leading 0 to indicate that the number is in octal, which generally won't do what you want it to.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Ah, gotcha. Good point.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New For various values of "sparse"
its only 1/3 populated and the gaps are uneven. Furthermore, SSN numbers are not issued sequentially. The first three digits have geographic significance.

Furthermore, people die in random order.





"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."     --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."     --George W. Bush
New Unless you have a lot of knowledge...
that isn't boiling down to anything that gives you a big win. Not when 300 million pointers takes that much space.

The knowledge that it is "gap-y" could provide a space win, but only at some performance cost. You'd have to store the data in carefully compressed form and then decompress before using. For instance you could have a table that maps every 64K block of social security numbers to a block of data, which has Scott's format stored using a standard kind of compression. To lookup a social security number you have to decompress the appropriate block then look up your social security number.

Well filled-in stretches and gaps should both compress well. However now every lookup involves decompressing a block of data rather than just a bitmap. This can only be recommended as a win if the data is seriously uneven and 128 MB of RAM simply can't be done.

Given the cost of RAM, I'd go with Scott's solution.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Re: social security numbers can start with 0
Yep, mine does! But, there are other non-zero digits as well. :)
Alex

In politics, what begins in fear usually ends in folly. -- Samuel Taylor Coleridge, poet (1772-1834)
     Finding decent programmers - (tuberculosis) - (56)
         well.. - (deSitter)
         Not surprising. - (admin) - (35)
             Don't agree - (tuberculosis) - (34)
                 Hire Jake - (deSitter)
                 Re: Don't agree - (admin) - (22)
                     Oh yeah - we want one scripting language - (tuberculosis) - (21)
                         Please don't ask the one about the manhole covers. :-/ - (Another Scott) - (1)
                             Otherwise known as... - (admin)
                         Shell scripting isn't the same thing at all. - (admin) - (9)
                             I said it was rhetorical - (tuberculosis) - (1)
                                 Don't you mean, "rederickal"? - (admin)
                             Admin, I'd like a copy of the CD or the ISO. -NT - (folkert) - (6)
                                 I'll throw a copy up on my site. - (admin) - (5)
                                     I wonder if that CD would be good as a VMWare image - (tonytib)
                                     When ever. Its a *NOT* short term thing. -NT - (folkert)
                                     Re: I'll throw a copy up on my site. - (admin) - (2)
                                         Interesting. - (folkert) - (1)
                                             Enjoy. -NT - (admin)
                         Potentially sparse? I don't think so... - (ben_tilly) - (6)
                             I took the ones that start with 0 into account. - (admin) - (2)
                                 I was referring to the step where you... - (ben_tilly) - (1)
                                     Ah, gotcha. Good point. -NT - (admin)
                             For various values of "sparse" - (tuberculosis) - (1)
                                 Unless you have a lot of knowledge... - (ben_tilly)
                             Re: social security numbers can start with 0 - (a6l6e6x)
                         Re: Oh yeah - we want one scripting language - (ubernostrum) - (1)
                             IRLRPD. (new thread) - (Another Scott)
                 NEED to be fixed or MAY need to be fixed? - (ben_tilly) - (1)
                     MAY - (tuberculosis)
                 you dont sell fish anymore, who cares if its fresh? - (daemon)
                 Reversing words is trickier than chars - (Arkadiy) - (6)
                     read the post above yours :-) - (daemon)
                     You're missing an obvious and good solution - (tuberculosis) - (4)
                         ohhh - (Arkadiy)
                         An obvious but NOT necessarily good solution - (ben_tilly) - (2)
                             It gives the results I expect - (tuberculosis) - (1)
                                 I was assuming... - (ben_tilly)
         Well it helps if you learn to spell it - (ben_tilly) - (10)
             I think you'd pass - (tuberculosis) - (9)
                 RemoveSpaces - (Arkadiy)
                 I might pass at that... - (ben_tilly) - (7)
                     Wife's-pathology interviews? >:-) -NT - (Another Scott) - (3)
                         Yes, she'll be a pathological expert -NT - (ben_tilly) - (2)
                             wow! goatrope her into a trip east - (daemon) - (1)
                                 That's up to her - (ben_tilly)
                     If you do decide to come here - (tuberculosis) - (2)
                         Get yourself enough iwetheyers in your dept... - (FuManChu) - (1)
                             Imagine what PARC might have done - (tuberculosis)
         I can answer all those questions. - (jake123) - (3)
             When can you get here? - (tuberculosis) - (2)
                 YEAH! -NT - (deSitter)
                 Ooh yeah - IWETHEY-West, here we come! -NT - (inthane-chan)
         I could take a stab... - (Arkadiy)
         Almost contradictory requests - (tablizer) - (1)
             Not true - (broomberg)
         There seems to be a problem in CS education - (ubernostrum)

Halfway between the gutter and the stars.
230 ms