I used a semi-manual approach where I checked the result of each full-adder separately (looking at the output of adding combinations of 2^i and 2^(i+1)). Tough on a small laptop screen.
I used a semi-manual approach where I checked the result of each full-adder separately (looking at the output of adding combinations of 2^i and 2^(i+1)). Tough on a small laptop screen.
For instance: "An exact algorithm for the maximum clique problem." Randy Carraghan, Panos M.
Pardalos. Operations Research Letters vol. 9,(6), doesn't even have the algorithm in pseudo-code. Just an example.
For instance: "An exact algorithm for the maximum clique problem." Randy Carraghan, Panos M.
Pardalos. Operations Research Letters vol. 9,(6), doesn't even have the algorithm in pseudo-code. Just an example.
Spent half of my day reading articles about max-clique, knowing that it is NP-hard, then realized (again!) that a brute force solution may be enough.
Spent half of my day reading articles about max-clique, knowing that it is NP-hard, then realized (again!) that a brute force solution may be enough.
It had to happen. Spent two hours thinking that cheats had to be completely inside walls.
It had to happen. Spent two hours thinking that cheats had to be completely inside walls.
I chose a solution based on Finite State Automaton, counting the number of accepting runs for part 2 (on the associated DFA).
I chose a solution based on Finite State Automaton, counting the number of accepting runs for part 2 (on the associated DFA).
I thought that I will be clever and try a dichotomous search for part 2. But the brute force solution was less than a second.
I thought that I will be clever and try a dichotomous search for part 2. But the brute force solution was less than a second.
A nice tribute to well-known shortest path problems ... with a twist. I worked in reverse, starting from the end point and maintaining a work list of nodes to process.
A nice tribute to well-known shortest path problems ... with a twist. I worked in reverse, starting from the end point and maintaining a work list of nodes to process.
My trick was to find images with at least 5 clusters of 6 robots consecutively aligned (why not 4 and 8, lucky guess).
My trick was to find images with at least 5 clusters of 6 robots consecutively aligned (why not 4 and 8, lucky guess).
#golang #smtlib
Decided to use an SMT solver (z3) for finding the solution to these linear optimization problems. Golang text/template and os/exec were quite useful.
#golang #smtlib
Decided to use an SMT solver (z3) for finding the solution to these linear optimization problems. Golang text/template and os/exec were quite useful.
It was not difficult to find that counting corners is easier than counting sides. But, side with me, it was not easy to count all the corner cases right !
It was not difficult to find that counting corners is easier than counting sides. But, side with me, it was not easy to count all the corner cases right !
Started with a poor man's linked list, not relying on the fact that the order of the stones do not matter. I anticipated a vicious part two, silly of me.
Started with a poor man's linked list, not relying on the fact that the order of the stones do not matter. I anticipated a vicious part two, silly of me.
I thought I would use Go for my first participation to AoC, just to learn the ropes. Now at day 10, it was the occasion to use go's 'unique' package for the first time (go.dev/blog/unique). Cool !
I thought I would use Go for my first participation to AoC, just to learn the ropes. Now at day 10, it was the occasion to use go's 'unique' package for the first time (go.dev/blog/unique). Cool !