RSS
 

Advent Of Code: Day 7

08 Dec 2015
CTF: Advent Of Code
Link to challenge: http://adventofcode.com
Date Completed: 07 December 2015

Challenge

Solution

Wow this one was fun! I decided to use Z3Py, a theorem prover module for python. My solution essentially parses each command using regexp and adds the various boolean rules to a solver object. Finally, the theorem solver checks all possible values and prints out the results of every ‘wire’. Determining the answer is then very simple. To solve part 2 I simply changed the value of b in my input.txt to the answer from part a and reran the script.

 

 
No Comments

Posted in Advent Of Code

 

Leave a Reply