From 33e7b6427621ed7f3339144f8d2624d39e12c027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Mon, 27 May 2024 03:10:14 +0200 Subject: [PATCH] Added puzzle commentary for day 24 --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25fd6e0..324a450 100644 --- a/README.md +++ b/README.md @@ -126,9 +126,15 @@ Here I calculate how a beam traverses through the grid until it is reflected out Once this was solved for one starting beam in part 1, I just iterated over all possible starting beams to find the maximum for part 2. +## Day 24: Never Tell Me the Odds + + + +While I found part 1 quite trivial, part 2 left me with the feeling that my approach might be mad. Eventually, I managed to find the ray hitting all other rays by solving the general equation system for three known and one unknown rays with some minor shortcuts for this particular problem, since here we can assume to have a unique solution. However, this involved excessive manual pre-calculations, arbitrary length integer arithmetic, and a root finder for general polynomials, all implemented by myself without additional third-party libraries. + ## License -Copyright (C) 2023 Stefan Müller +Copyright (C) 2023-2024 Stefan Müller This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.