# 2023 Day 20: Pulse Propagation

**URL:** <https://forum.ada-lang.io/t/2023-day-20-pulse-propagation/606>\
**Category:** Advent of Code\
**Tags:** spoilers\
**Created:** [December 20, 2023, 5:46pm UTC](https://forum.ada-lang.io/t/2023-day-20-pulse-propagation/606 "2023-12-20T17:46:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cantanima](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/cantanima/32/121_2.png) [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Post date:** [December 20, 2023, 5:46pm UTC](https://forum.ada-lang.io/t/2023-day-20-pulse-propagation/606/1 "2023-12-20T17:46:34Z")

</div>

I usually look at the general leaderboard for each problem to get an impression of how difficult the “experts” find it. It surprises me that [the general leaderboard for day 20](https://adventofcode.com/2023/leaderboard/day/20) suggests that this has been the hardest problem so far: nearly 49 minutes for the first 100 participants to complete it! The only one that came close to this relative difficulty was day 10, with 36 minutes before the first 100 participants completed it.

Day 20 didn’t seem that complicated to me. So long as you read the problem carefully, and I do mean _carefully_, part 1 is possibly the most straightforward problem yet. The only thing that makes part 2 challenging is that the answer is a “ludicrous size” number, so you don’t want to wait around for it. But the technique to make it work has already been used with other problems: look for the module that activates `rx`, then look for the modules that activate _it_. They broadcast the correct pulse at a regular period _already from the beginning_, and it’s not at all hard to work out whether those modules need to broadcast `Low` or `High` in order to activate `rx`’s source, so compute the lcm of those periods and you’re done.
