day20: whelp.
This commit is contained in:
@@ -15,10 +15,10 @@ we will take snapshot of state, String() repr of all executors should be enough,
|
||||
and save amount of signals sent so far
|
||||
* also, i suppose i'd want to have entry points for fiddling with single executors to be test cases.
|
||||
* modules to implement
|
||||
** TODO Broadcast
|
||||
** TODO Flip-Flop
|
||||
** TODO Conjunction
|
||||
** TODO Button
|
||||
** DONE Broadcast
|
||||
** DONE Flip-Flop
|
||||
** DONE Conjunction
|
||||
** DONE Button
|
||||
* i guess each module could test if string is it's a representation of this type
|
||||
and would be able to parse it? into it's own struct?
|
||||
well, those are just functions, since only methods are associated, so ok
|
||||
@@ -35,3 +35,35 @@ go test sunshine.industries/aoc2023/day20 -v -run TestParseFlipFlop
|
||||
#+end_src
|
||||
* yikes. if i don't know the 'inputs' to the conjunction, don't know how to check for 'all high'
|
||||
let's add registering after the map is read.
|
||||
* well. for part 2 brute force doesn't work.
|
||||
how could i examine inputs to the 'rx' to see when it will receive 'low'?
|
||||
|
||||
i suppose inputs could be on prime cycles, which would align to all required values only on a very big step?
|
||||
|
||||
let's do some kind of visualiztion?
|
||||
|
||||
how would i do graphql or mermaidjs?
|
||||
|
||||
flowchard in mermaid should be it
|
||||
|
||||
go run . > day20/my-mermaid.mmd
|
||||
* so, looking at the thingy.
|
||||
rx is produced by &th
|
||||
which has inputs of
|
||||
11:&xn -> th
|
||||
14:&qn -> th
|
||||
16:&xf -> th
|
||||
32:&zl -> th
|
||||
|
||||
|
||||
for rx to receive a low pulse.
|
||||
&th should receive High Pulse, while all other inputs alse remembered as high.
|
||||
|
||||
this is not too easy.
|
||||
but first let's check if loops over
|
||||
- xn
|
||||
- qn
|
||||
- xh
|
||||
- zl
|
||||
|
||||
are manageable.
|
||||
|
||||
Reference in New Issue
Block a user