AoC 2016 Day 17: Md5 Maze

Source: Two Steps Forward

Part 1: Create a 4x4 grid of rooms with doors Up, Down, Left, and Right from each location. To determine if a door is currently open:

  • Calculate MD5(salt + sequence) where sequence is a string containing any combination of UDLR depending on how you got to this room
  • The first four hex values represent the doors Up, Down, Left, and Right respectively: bcdef means open; anything else is closed

Find the shortest path from (0, 0) to (3, 3).


AoC 2016 Day 16: Dragon Data

Source: Dragon Checksum

Part 1: Generate noise using a modified dragon curve:

  • Start with data a
  • Create a copy of the data b, reverse and invert it (0 <-> 1)
  • Create the string a0b

Repeat until you have enough data, truncate at the end if needed.

From this string calculate a checksum as follows:

  • xor each pair of bits, concatenate the results
  • If the resulting string has an even length, repeat; if it’s odd, stop

Calculate the checksum of a given initial state expanded to 272 bits.


AoC 2016 Day 14: Bad One Time Pads

Source: One-Time Pad

Part 1: Calculate a series of MD5 hashes (the same as Day 5). A hash is considered valid if it contains a triple (three characters in a row) and somewhere in the next 1000 hashes there is a quintuple of that same character.

What index produces the 64th key?


AoC 2016 Day 12: Assembunny

Source: Leonardo’s Monorail

Part 1: Create a virtual machine that has four registers (a, b, c, and d) and can process the following instructions:

  • cpy x y - copies x into y (x can be an integer or a register)
  • inc x - increases register x by one
  • dec x - decreases register x by one
  • jnz x y - jumps over y instructions if x is not zero (x can be an integer or a register)

What is the final value in register a?


AoC 2016 Day 11: Radiation Avoider

Source: Radioisotope Thermoelectric Generators

Part 1: Input will be a list of the following form:

  • The first floor contains a hydrogen-compatible microchip and a lithium-compatible microchip.
  • The second floor contains a hydrogen generator.
  • The third floor contains a lithium generator.
  • The fourth floor contains nothing relevant.

You have an elevator that can move exactly 1 or 2 items. You can only leave a microchip on a floor with a non-matching generator if a matching generator is also present.

Move all items to the top (4th) floor.


AoC 2016 Day 10: Bot Simulator

Source: Balance Bots

Part 1: Create a sorting machine using input of the following form:

  • value X goes to bot A - an input to bot A
  • bot A gives low to (bot|output) B and high to (bot|output) C - a sorter that takes two inputs and sends them to the specified bots or output channels

Find the bot that compares the values 17 and 61.


AoC 2016 Day 8: Tiny Screen Simulator

Source: Two-Factor Authentication

Part 1: Implement a 50x6 pixel screen with the following commands:

  • rect AxB turn on a rectangle of pixels in the top left corner
  • rotate row y=A by B rotates row A right by B pixels
  • rotate column x=A by B rotates column A down by B pixels

After a given sequence of commands, how many pixels are on?