Module day10

Module day10 

Source
Expand description

ยงFactory

Functionsยง

configure_joltages ๐Ÿ”’
Convert the buttons and joltages to equations, then use Gaussian Elimination to reduce the dimensioanlity of the problem to only the free variables.
configure_lights ๐Ÿ”’
Check all patterns with one set bit, then pattern with two sets bits and so on, until we find a match.
next_same_bits ๐Ÿ”’
Find the next highest integer with the same number of one bits as the previous integer, for example 1011 => 1110.
parse
Each machine can be processed independently, parallelizing the work over multiple threads.
parse_machine ๐Ÿ”’
Convert light patterns and buttons to bitmasks to speed up part one.
part1
part2
recurse ๐Ÿ”’

Type Aliasesยง

Input ๐Ÿ”’
Machine ๐Ÿ”’