Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Can It Be Written In Base X With Only 1s And 0s

by Limbic~Region (Chancellor)
on Jun 16, 2015 at 11:27 UTC ( [id://1130587]=note: print w/replies, xml ) Need Help??


in reply to Re: Can It Be Written In Base X With Only 1s And 0s
in thread Can It Be Written In Base X With Only 1s And 0s

BrowserUk,
Yes, I noticed a pattern right away but no way to get to it. Starting from the fact that regardless of what base the number is written in, they must all follow:
10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111
Essentially what you get is the powerset of the sum of base X from 0 to the left most significant digit. Unfortunately, I can't think of way to benefit from this without memoization.

Cheers - L~R

Replies are listed 'Best First'.
Re^3: Can It Be Written In Base X With Only 1s And 0s
by BrowserUk (Patriarch) on Jun 16, 2015 at 12:11 UTC
    I can't think of way to benefit from this without memoization.

    It means that you can generate the list of compliant numbers rather than searching for them. See gen() in Re: Can It Be Written In Base X With Only 1s And 0s. Cuts the search space by 99%.

    If you combine that with my hypothesis that the numbers in the series will be sums of distinct powers of their consitutents and that cuts the search space by another 99%.

    That makes looking for candidates in all N power series very fast. I've searched upto (3/4/5/6)^25, in about half an hour. (Assuming that the next number will be sums of distinct powers.)

    Then the problem becomes the memory required to store the possible candidates from 3/4/5 whilst testing the 6^* range; which means getting selective about what you store and creative about how you store it.

    Of course it could be that my hypothisis is wrong which means going back and looking at all the sums of multiple power combinations; and that's 1000s of times slower.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
      BrowserUk,
      I think you misinterpreted why I was creating this function in the first place. While I was inspired by the video, I am not attempting to use this function to try and find another number after 82000. This was mostly an interesting diversion - something I could give my employees to see what they came up with.

      I have given thought to how I would go about finding the next number in the sequence. What I would do is look for a pattern in the gaps between a couple of the bases. In other words, attempt to uncover a Least Common Multiple and then search for a base 6 that fits before testing further. I haven't tried it yet - given that I know how large these numbers are, I would need more time than I am currently willing to commit to making sure I haven't made a mistake.

      Cheers - L~R

        Once I'd written the script that confirmed 82000 from 3/4/5 it was simply a case of changing an input parameter to 6 and a limit to 11, and shoving int the background at low priority to see if it found anything else that would confirm my hypothesis.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
        In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1130587]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-20 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found