From 1c6cab27d0a63c30f1bf9e78084f3206d384f5e6 Mon Sep 17 00:00:00 2001 From: encse Date: Mon, 23 Dec 2024 10:43:13 +0100 Subject: [PATCH] 2024/23 --- 2024/Day23/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2024/Day23/README.md b/2024/Day23/README.md index 4dec57ca..dbb20908 100644 --- a/2024/Day23/README.md +++ b/2024/Day23/README.md @@ -7,4 +7,4 @@ _Visit the website for the full story and [full puzzle](https://adventofcode.com We tackled a graph algorithm problem today, where we had to find maximal cliques in an undirected graph. The literature provides [efficient algorithms](https://en.wikipedia.org/wiki/Bron%E2%80%93Kerbosch_algorithm) for this problem, but our graph is not too large, so we can use a straightforward "poor man's" strategy as well. -I started by creating _seed_ components containing nodes that start with '_t_'. Then, I proceeded to _grow_ these components by adding a single node to them in all possible ways. First, I identify the neighbors of each _t_ node, followed by the triples which is required to solve Part 1. In Part 2, this process is continued until a single maximal component remains. \ No newline at end of file +I started with the _seed_ components, that is single element components for each node that starts with '_t_'. Then, I proceeded to _grow_ these components by adding a single node to them in all possible ways. I can put this in a loop, to get components with size 2, 3, 4, etc. _Part 1_ asks for the number of components that have 3 nodes. _Part 2_ asks for the one that cannot be grown anymore. \ No newline at end of file