Thread: Wonka Factory Password

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,787
    I had some time free this afternoon so I thought I'd give this another shot. Given john.c's example input, for 1 <= t < =10000 nothing repeats and I can't see a pattern except that "offset" is linear, but offset growing linearly is not surprising given the input and not helpful. For the less general case, where the pattern does enter a cycle (but the cycle may have a period > 1) , I've amended my solution and it works... but for the more general case where it seems unlikely that the pattern will hit a cycle quite quickly it doesn't work. I have a gut feeling that john.c's input will not repeat/cycle but cannot prove it. The graph for the input john suggested to try is below. It's possible there is a pattern there for the passcode, but what it is... I have no idea. So, for now I'm going to admit defeat. I'd really love to know more about this. Maybe one day

    Graph for
    Code:
    initial state: #........#
    36
    1152
    ....#
    #....
    0
    Wonka Factory Password-capture-jpg

    oops... ignore the blue line... that's just t (i.e. same as the x-axis). Didn't mean to add that to the graph

    I do find it interesting that the passcode repeats (there probably is a pattern there but I cannot recognise it)

    First few passcodes (for that example above)
    Code:
    9, 18, 18, 27, 18, 27, 36, 27, 18, 36, 36, 54, 36, 45, 72, 27, 18, 36, 36, 54, 36, 54, 72, 54, 36, 72, 72, 108, 72, 81, 144, 27, 18
    Last edited by Hodor; 12-31-2019 at 11:42 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 06-29-2014, 02:08 AM
  2. Replies: 2
    Last Post: 01-07-2009, 10:35 AM
  3. Question about the Factory pattern.
    By h3ro in forum C++ Programming
    Replies: 14
    Last Post: 11-27-2008, 04:55 PM
  4. Factory Functions HOWTO
    By GuardianDevil in forum Windows Programming
    Replies: 1
    Last Post: 05-01-2004, 01:41 PM
  5. Abstract Factory in C++
    By agrsaurabh in forum C++ Programming
    Replies: 1
    Last Post: 10-06-2003, 02:16 PM

Tags for this Thread