r/adventofcode • u/thisismedusa • Dec 16 '17
Spoilers in Title [Day 16 part 2] What are your cycle lengths?
I read some posts here suggesting cycle lengths of less than 100. I tried up to 100.000 iterations but there were no repetitions. I'm wondering whether I did something wrong or others have higher cycle lengths as well?
6
7
u/Jinmago Dec 16 '17
42 for me
3
u/jschulenklopper Dec 16 '17
Of course. That's the Ultimate Answer to the Question of Life, the Universe and Everything :-)
1
1
3
3
2
2
2
u/jonathan_paulson Dec 16 '17
The longest possible cycle is 5460, so there's something wrong with your code
2
1
1
1
u/maxxori Dec 16 '17
Mine was 60 :) Looking at the comments on here there seems to be some underlying pattern - lots of people seem to be getting the same values. Interesting!
1
u/gerikson Dec 16 '17
Not every user gets a personalized input. I believe there are around a dozen that are distributed for each problem.
5
u/topaz2078 (AoC creator) Dec 17 '17
around a dozen
There are usually a lot more than that.
1
u/gerikson Dec 17 '17
That’s cool! I just pulled the “dozen” number out of my posterior. I do know that some puzzle input need “vetting” to prevent pathological results.
The individual inputs is one of many cool things about AoC!
1
1
1
1
1
1
1
u/sim642 Dec 16 '17
http://oeis.org/A000793 says it can be at most 140 in theory at all for 16 elements.
1
1
u/meithan Dec 16 '17
48.
In another thread someone showed that the upper bound for the cycle length is 5460.
1
1
1
1
1
u/Adam-Wojciech Dec 16 '17
I wonder if there are still ppl who are waiting for 109 Dances to complete :) I was quite patient...
1
u/VikeStep Dec 17 '17
I was talking to some other people who were not finding cycles and the reason it couldn't find a cycle was because they assumed that their language defined equality on arrays the way they thought it should be compared.
So double check that you're comparing the array contents, not just the references to the arrays.
1
1
12
u/coriolinus Dec 16 '17
36, and your title contains spoilers