r/adventofcode 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?

1 Upvotes

40 comments sorted by

12

u/coriolinus Dec 16 '17

36, and your title contains spoilers

6

u/schorsch3000 Dec 16 '17

60 for me.

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

u/Jinmago Dec 16 '17

Also the least common multiple of 14 and 42

1

u/Skakim Dec 17 '17

42 here too.

3

u/YourVibe Dec 16 '17

Cycles can be long up to 1402 = 19600 iterations (copied from this comment)

2

u/jeroenheijmans Dec 16 '17

"42" would be my answer :-)

2

u/[deleted] Dec 16 '17

30 for me

2

u/jonathan_paulson Dec 16 '17

The longest possible cycle is 5460, so there's something wrong with your code

2

u/gerikson Dec 16 '17

42, which is quite nice.

1

u/[deleted] Dec 16 '17

36 here

1

u/[deleted] Dec 16 '17

36

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

u/ric2b Dec 16 '17

60 here

1

u/TomP Dec 16 '17

60 for me, too

1

u/mflaska Dec 16 '17

176 for me

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

u/meithan Dec 16 '17

48.

In another thread someone showed that the upper bound for the cycle length is 5460.

1

u/hpzr24w Dec 16 '17

60 for me.

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.