3 ms·
Link to last year's Day 19: https://adventofcode.com/2020/day/19 https://adventofcode.com/2020/day/19 I didn't read it in depth, but it feels like you could bu
by tyingq 5y ago
Link to last year's Day 19: https://adventofcode.com/2020/day/19 https://adventofcode.com/2020/day/19
I didn't read it in depth, but it feels like you could build regexes on the fly to solve it. Perhaps I missed something crucial.
Edit: Ahh, day 13: https://adventofcode.com/2020/day/13 https://adventofcode.com/2020/day/13
- CastFX 5y agoI loved day 19 because I managed to use some Automata theory I studied at uni. Something like, I cannot simply use a regex because it's a context-free grammar. Then I learned about recursive regexes and how they could be used to parse a cfg. Aaah fascinating, really.
- Jtsummers 5y agoPart 2 complicated it, but yes. I just built regexes on the fly for Part 1. I wonder if they mean Day 13. The underlying math is based on the Chinese Remainder Theorem, but it is solvable without knowing it (or, in my case, "knowing" it, once I saw others mention it it came back but my math degree was a long time ago). A solution could be discovered incrementally without knowing the math by trying to optimize the naive version.
- bussierem 5y agoI did mean Day 13, thank you -- I updated my post accordingly. Sorry about the confusion!
- bussierem 5y agoApologies, I updated my post. It was Day 13 where this happened. Not sure why I stopped at Day 19, tbh.
- ZiiS 5y agoDay 13 you really needed to know of Chinese remainder theorem; I would say this was probably the only day in the last couple of years so dependent on non-trivial maths. I would still recommend AoC though.
- justinsaccount 5y agoyep, that's what I did. simply converted the input into a regex and matched it. part 2 had to add a little special casing but ultimately not that difficult.