Everybody needs a bit of help, here are 32

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 3635 Views - Last Post: 16 January 2013 - 06:44 AM

#16 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Everybody needs a bit of help, here are 32

Posted 14 January 2013 - 09:15 PM

Perhaps one could leverage the fact that the first two exchange numbers (the second set of 3 numbers) are never 0 or 1.
Was This Post Helpful? 0
  • +
  • -

#17 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3531
  • View blog
  • Posts: 10,934
  • Joined: 05-May 12

Re: Everybody needs a bit of help, here are 32

Posted 16 January 2013 - 06:44 AM

Almost there, but I'm one bit over.

Numbers that comply with the NANPA (http://en.wikipedia.org/wiki/North_American_Numbering_Plan) should fit in 33 bits with my scheme:

NXx-Nxx-xxxx

N can only be 2-9
X can only be 0-8
x can be 0-9

If you take away the two N's, which only require 3 bits each. (eg. N-2 and then convert to bits) That leaves 26 bits of the 32 bits available. If you treat the remaining Xx-xx-xxxx as a single 8 digit number: Xxxxxxxx, then 89999999 is 27 bits.

There's got to be a trick somewhere to save an extra bit because of the special cases where some digits sequences are not allowed.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2