Updated favorites in readme

This commit is contained in:
Stefan Müller 2024-07-03 20:42:40 +02:00
parent ba4195af82
commit c84d3e6a2d
1 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ I also added tests for the full puzzle data once I found the solution, but these
## My Favorites
While I think all the puzzles were a lot of fun, some of them became my favorites, marked with a star :star:, because I enjoyed the puzzle itself or was particularly content with my solution algorithm.
While I think all the puzzles were a lot of fun, some of them became my favorites, marked with a star :star:, because I enjoyed the puzzle itself or was particularly content with my solution algorithm. These are [day 9](#day-9-mirage-maintenance), [day 18](#day-18-lavaduct-lagoon), and [day 24](#day-24-never-tell-me-the-odds).
## Solutions
@ -78,9 +78,9 @@ Again a puzzle where I had to read in all of the data before starting the algori
Part 2 was a bit sneaky. This is the first puzzle where the result is outside the 32-bit unsigned integer range. And it is solvable only because each starting node leads into a loop with one of the target nodes, where the length of the loop is a multiple of the length of the sequence of instructions. With this knowledge, one can stop traversing the network once each target node has been reached and calculate the result directly.
### Day 9: Mirage Maintenance :star:
### Day 9: Mirage Maintenance
:mag_right: Puzzle: <https://adventofcode.com/2023/day/9>, :white_check_mark: Solver: [`UMirageMaintenance.pas`](solvers/UMirageMaintenance.pas)
:star: :mag_right: Puzzle: <https://adventofcode.com/2023/day/9>, :white_check_mark: Solver: [`UMirageMaintenance.pas`](solvers/UMirageMaintenance.pas)
This one I enjoyed the most so far. The process that is described in the puzzle, constructing a series of differences from the previous series, and then reverting the process to extend the series, is equivalent to finding a polynomial with maximum degree of *n - 1*, where the original series are *n* equidistant values of the polynomial.
@ -176,9 +176,9 @@ For part 1, if a brick lands on a single supporting brick, that brick below cann
For part 2, given a starting brick, the algorithm makes use of the tracked vertical connections to find a group of bricks supported by it, such that all supports of the bricks in the group are also in the group. This group of bricks would fall if the starting brick was disintegrated, so its size is counted for each possible starting brick.
### Day 24: Never Tell Me the Odds :star:
### Day 24: Never Tell Me the Odds
:mag_right: Puzzle: <https://adventofcode.com/2023/day/24>, :white_check_mark: Solver: [`UNeverTellMeTheOdds.pas`](solvers/UNeverTellMeTheOdds.pas)
:star: :mag_right: Puzzle: <https://adventofcode.com/2023/day/24>, :white_check_mark: Solver: [`UNeverTellMeTheOdds.pas`](solvers/UNeverTellMeTheOdds.pas)
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 shortcuts for this particular problem, for example assuming the existence of a unique solution. However, this involved excessive manual pre-calculations, arbitrary length integer arithmetic, and a root finder for integer polynomials, all implemented by myself without additional third-party libraries.