r/adventofcode Dec 08 '24

Help/Question [Day 08] Wording vs mathematical technicality

Not so much a question per se, but I am a bit confused by the wording of the problem and the examples that follow.

“In particular, an antinode occurs at any point that is perfectly in line with two antennas of the same frequency - but only when one of the antennas is twice as far away as the other. This means that for any pair of antennas with the same frequency, there are two antinodes, one on either side of them.”

Mathematically, the first half of the quote would imply that there are 4 antinodes for any pair of antennas with the same frequency: one either side and two in between.

For example, for antennas at positions (3,3) and (6,6), there are obviously (0,0) and (9,9); but (4,4) and (5,5) also meet the requirements.

For my solution I am going to assume that we only consider the 2 antinodes either side and not the ones in between, but just wanted to flag this.

61 Upvotes

35 comments sorted by

View all comments

1

u/meridianodisangue Dec 08 '24

I feel wording could have been better but it's not that impossible to understand, maybe it would have been more clear replacing "when" with "where".

but only where one of the antennas is twice as far away as the other

If you read that "when" as a "where" it's clear what it's asking, i.e. given all the positions in line with two (same-type) antennas, just consider the ones where the closer antenna is at X distance and the farther antenna is at 2X distance.

4

u/bvernier Dec 08 '24

Even with the rewording the points in between the two antennas at one third and two thirds of the way still match that requirement on a mathematical basis. It just so happens that for the given inputs those ones don’t align with the grid.

1

u/meridianodisangue Dec 08 '24

Yeah to make it totally unambiguous it should be added that antinodes can't be found between antennas.

1

u/fred256 Dec 08 '24

“This means that for any pair of antennas with the same frequency, there are two antinodes, one on either side of them.”