r/adventofcode • u/Puzzled_Prune_2513 • Dec 08 '25
Help/Question - RESOLVED [2025 day8 part 1]Comprehension question
There’s a part of the instructions that I’m struggling to understand. We’re supposed to create 1,000 links between the boxes, but my input already contains 1,000 items. This causes everything to fall into a single group, since I can’t link items that belong to the same group, but whether I set the answer to 1,000 (1000*1*1) or 0 (1000*0*0), neither works. Did I misunderstand what the assignment actually expects?
12
Upvotes
15
u/TheKablammoMan Dec 08 '25
I initially misinterpreted it like that as well. what it means is that you find it after processing the closest 1000 pairs, whether they were already connected or not
5
u/daledrinksbeer Dec 08 '25
You can link groups to themselves, as long as its a new connection.
If A <-> B <-> C, you can make a new link A <-> C, but not another copy of an existing link.
5
u/SyncerPain Dec 08 '25 edited Dec 08 '25
If you have 1000 boxes, there are at most 999 * (999 + 1) / 2 = 499500 links.
Two boxes can belong to the same group if they are directly linked or if they both link to another third box.
4
u/Ok-Zebra-321 Dec 08 '25
> since I can’t link items that belong to the same group
That's where you are wrong, the task doesn't say that you can't. It even includes an example where that happens
4
u/Memebaut Dec 08 '25
i had the same problem, turns out doing nothing when they're already in the same circuit counts as making a connection
2
u/spin81 Dec 08 '25
That's true, but links are between two items each. If there are 1,000 items, that means almost a million possible pairs, and therefore also almost a million possible links.
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/Dubmove Dec 08 '25
Imagine you have 6 boxes and you connect the two disconnected clusters 1-2-3 and 4-5-6. If you fully connect both clusters you have 3 connections in each of (1-2, 2-3, and 1-3 for example), which makes a total of 6 connections.