General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2023 Day 8 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 8 of the Advent of Code - https://adventofcode.com/2023/day/8

26 REPLIES 26
FrederikE
13 - Pulsar
Spoiler
 
Screenshot 2023-12-08 222850.png

Screenshot 2023-12-08 222802.png

The last part of part. 2 I didnt do in Alteryx, but inserted the numbers into a LCD Calculator 😅

 What a challenge... 

Qiu
21 - Polaris
21 - Polaris

With the hint from @Mukai

Spoiler
AOC2023-Day08-A.pngAOC2023-Day08-B.pngAOC2023-Day08-C.png
phottovy
13 - Pulsar
13 - Pulsar

Full transparency, I needed a little help from reddit to understand how to solve part 2 without having my macro run for days:

 

Spoiler
08.png

For part 2, I was able to reuse a macro I built for Weekly Challenge 275-Greatest-Common-Denominator to calculate the LCM (this is the part reddit helped me understand)
Yoshiro_Fujimori
15 - Aurora

My solution. Macro over macro over macro...

Not sure if there is a better way, but at least I got the answer!

 

Spoiler
Main Workflow
AoC08_main.png

 

 

Laurap1228
11 - Bolide

I cheated a bit on this one and did the last bit of part 2 manually using this LCM site.

Spoiler
AOC8.PNG
JarrodT
Alteryx
Alteryx

Had to think through this one and analyze the input data to find patterns. 

Spoiler
image.png
Gem
9 - Comet

@Laurap1228 Oop, thanks for the hint! As I was brute forcing my way through the problem, I ended up trying the LCM tool and it worked 😱 

Spoiler
Day 8 Workflow.JPG

 

SeanAdams
17 - Castor
17 - Castor

There is a trick to day 8 - read below.

 

Spoiler
The trick is that there are cycles in the data.
For example - the first source may cycle every 2 rounds; the second may every 3rd.
So what you need to do is use your P1 solution to independantly check the cycle time for each of the starting points and then find when they will coincide.

To figure out when they coincide - find the least common multiple.
- Do a prime factorize on each cycle time
- then find the numbers that includes all the combinations of Primes 


AkimasaKajitani
17 - Castor
17 - Castor

My solution.

 

Spoiler
It took me a while to realize that Part 2 required mathematical tricks.

AoC_2023_08_12.png
Part 1 macro : 
AoC_2023_08_06.png



Part 2 macro :
AoC_2023_08_09.png




LCM macro : At the past Weekly challenge, we made the GCD macro. At that time, I made LCM macro using that GCM macro. I used this macro for this AoC.

AoC_2023_08_10.png

AoC_2023_08_11.png

 

Pang_Hee_Choy
12 - Quasar
Spoiler
part1: skips
part2: get LCM from online website... forget to remove comma, and waste lot of time for that...
built LCM macro afterward.
modified part1 macro to remove one macro file/
Labels