cancel
Showing results for
Did you mean:
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.

## Challenge #123: When will Rabbits Rule the World?

Alteryx Certified Partner

Great question. Wasn't an easy solution but got there eventually.

Here is my solution

Workflow:

Spoiler

Macro:

Spoiler
Meteoroid

This solution doesn't account for the point at which the rabbits born in month 2, 3, 4, 5, etc become 4 months old, meaning they can now give birth every month, only the original population, so it assumes all Rabbits "age>3" can all give birth when there should be a delay for every new litter.

Meteoroid

Hi there,

I worked this one out in excel first as I'm very new to alteryx (see attached) and it looks to me like your solution may be incorrect.  Can you point out where your solution does the following:

- removes the females born in the preceding three months from the previous month's total rabbit population as they are too young to procreate, before calculating the number of males and females that are born in the current month and adding the number onto the previous month's rabbit population for the new total

- subtracts the number of rabbits that die (born in the -24)each month as part of the total rabbit population calculation before feeding into the above

I'm very new to alteryx and I'd love to understand where these elements are in your file.

Many thanks

Meteoroid

My Solution.  So, I took a different approach and decided to do this without using macros. Let me know what you think.

Alteryx Certified Partner

You had my curiousity, but now you have my attention: why do those conversion errors happen? The field type is set to int64, but the Multi-Row uses a float. However, those values should fit in a float, so: are these floating-point errors? @JoeM?

Aurora

@Tim_Palmer I've modified your spreadsheet to match the provided solution. It's just a difference of opinion on the timing of births and deaths.

Aurora

@Beastmode314 Impressive that you got that close with some generate rows tools!

Meteoroid

I see, thanks for this.  So they missed the part in the brackets: (Alive months 0-23, die on the start of the 24th month).

As each month is dated the 2nd, by the time the 24th month comes round some rabbits should have died on the 1st day of the month..

Meteoroid

I think I've found the issue: I have some Dead Rabbits reproducing.  I'll revise my solution...

Aurora

@Beastmode314 wrote:

I have some Dead Rabbits reproducing.

the horror!