Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5799

Teaching and learning resources • Re: Advent of Code 2024

$
0
0
At the expense of more RAM one could create the key lists in parallel and then do a parallel merge in pairs. That might make an efficient GPU algorithm. On the other hand it seems reasonable to move on to puzzle 23 before Easter arrives.
Day 23? It was not that long ago, and yet I do not remember what it was all about, nor how I solved it. The only thing for sure (that I can see from the code), is that there are no trillions :D , and no memoizing involved

Code:

> (time2 (lambda () (day23 "input.txt")))1156"bx,cx,dr,dx,is,jg,km,kt,li,lt,nh,uf,um"#<time-duration 1.658640864>
I see that your maximum complete subgraph consists of 13 vertices. Assuming your network also has valence 13 would imply that subgraph is disconnected from the rest of the network. I wonder how those historians connect to the Internet during the LAN party.
It seems I was not counting edges correctly and a complete subgraph on 13 vertices is only regular 12 valence graph. Thus, it is not disconnected from the rest of the network. In particular, there is one extra connection from each historian that could connect to the Internet. On the other hand, this also means looking for a disconnected subgraph on 13 vertices isn't going to find the LAN party.

Statistics: Posted by ejolson — Wed Apr 02, 2025 2:01 am



Viewing all articles
Browse latest Browse all 5799

Trending Articles