Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #123: When will Rabbits Rule the World?

danrh
13 - Pulsar

I hate to be Johnny Raincloud, but while I got to the provided date, I wonder if it might actually be 7 months sooner ...

 

Spoiler
The difference is when a rabbit starts reproducing ( > 4 months or >= 4 months).  Reading through the problem, it sounds like >= 4 months ...
image.png

Please correct me if I'm wrong.  I'd appreciate every extra day I can get.

mmongeon
8 - Asteroid

 

@patrick_digan

 

Ha ha, yeah, I know, it looks neat and tidy on the outside but there's a hidden jackhammer in the Formula tool! :)

mmongeon
8 - Asteroid

@danrh

 

I had the same kind of problem, I had to interpret the assignment as if female rabbits start reproducing at 4 months but give birth the next month, so (> 4) and not (>= 4).

This is how I was able to get the right month, but I was still a little off on the exact population number, so there may be more to it than that.

ggruccio
ACE Emeritus
ACE Emeritus

@danrh and @mmongeon

 

Glad you guys spoke up! 

 

This had me puzzled a bit as well.  I solved it by interpreting it as though the comparison took place at the beginning of the month and any babies that were born during the month could not be counted until the start of the next month....which may be another way to get to the solution you both got to...

mmongeon
8 - Asteroid

Here's a second solution.

 

 

Spoiler
"Look Ma, no Iterative Macros!"   
Getting creative... putting the male and female rabbit population in a single column so I can calculate and store the 2 values with a single Multi-Row Formula tool.
Capture 123 2.JPG
Ukashi
8 - Asteroid

Hi @patrick_digan 

 

you have me puzzeled, you mentioned 41 iteration but how with that number of iteration you end up on date 2022-08-02 shouldn't that date mean something like 48 iterations (it is 4 years from starting date) , or alternatively with 41 iteration shouldn't you end around 2022-01-02?

Ukashi
8 - Asteroid

Hello, 

 

That is a fun challenge :) 

 

I was struggling a bit with my results bit thanks to @danrh I got back on track becouse I was afraid that bunnycalypse will come 7 month earlier :)

 

Spoiler
image.png
patrick_digan
17 - Castor
17 - Castor

@Ukashi good catch. I did land on 48 iterations for my final version. The 41 iterations was when I let the bunnies reproduce a month earlier. I changed it to match the solution provided.

Ukashi
8 - Asteroid

Thanks for that @patrick_digan - I've paid attention as I've come across the same thing and initially could not find where the problem is :) 

PhilipMannering
16 - Nebula
16 - Nebula

I'm baking my noodle over this one. Couldn't get the right month. Like @Ukashi it takes my macro between 41 and 42 iterations which works out as 2022-01-22. 

 

Had to keep all rows to keep track of the age of the bunny (as they will give birth and die at different times).

 

Spoiler
Challenge 123 - Capture.PNGChallenge 123 - CaptureM.PNG