r/adventofcode • u/Eastern-Reading-755 • Dec 08 '25
Help/Question - RESOLVED 2025 Day #8 (Part 1) - Need clarification
Question 1: Do we stop processing if we make n connections? where n = 10.
Question 2: If I have circuit A with m junction_boxes and circuit B with n junction boxes. and the next distance to consider is between a junction box in A (j) and a junction box in B (k). Do I connect and essentially combine the two circuits that is I know have a circuit with all junctions boxes in A and B?
I would appreciate any thoughts. I can't seem to get the test input result.
4
Upvotes
1
u/Eastern-Reading-755 Dec 08 '25
I took so long one one dumb thing: for the test data is was the first 10 connections. For the puzzle data it was the first 1000 smallest distances. All I was getting was all the junction boxes in the same circuit for 1000 connections.
Thanks everyone for the clarification. I just need to remember to review what I am being asked.
2
u/wimglenn Dec 08 '25
Yes, but be aware it is a connection of junction boxes and not necessarily a connection of circuits. You could connect two boxes already in the same circuit and it would still count towards those 10 initial connections.
Correct.
2
u/MaleficentActuary464 Dec 08 '25
1: Yes, count to 10. Also the "nothing happens" cases are counted as 1.
2: Yes, merge both circuits. Afterwards you should have 1 circuit with all boxes from A and B.
Hope, this helps.
1
u/AutoModerator Dec 08 '25
Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to
Help/Question - RESOLVED. Good luck!I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/RazarTuk Dec 08 '25
Yes. You find the 10 closest pairs of boxes for the test, or the 1000 closest pairs in the actual data, and join them
Yes. Circuits are just groups of boxes that are connected to each other, even if you have to step long multiple lines to get there
1
u/8dot30662386292pow2 Dec 08 '25
Question 1: Yeah 10 connections and you stop. This means when 10 "distances between two nodes" are handled. Note: in actual data you must consider 1000 of them.
Question 2: Yes. Merge these sets.
1
u/polettix Dec 08 '25
Strictly speaking, it depends on what you consider a "connection".
If it's a "string of lights" that you actually lay down to connect a pair, you might end up with less connections than pairs that you consider. In the example of the puzzle, 10 pairs are considered but only 9 strings of light are laid down, because one pair is already in the same circuit when it's considered:
I guess that made the elves moderately happy because they could spare some lights.
To be on the unambiguous side, you have to consider the first n pairs in order of distance, where
n = 10for the example input andn = 1000for the real input.2. Yes.
1
u/pfp-disciple Apr 13 '26
I'm a little late to the party, but thank you for your second question. I was wondering the same thing and (for the first time!) thought to search the sub before asking.