We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Weekly Challenge

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

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback

Challenge #270: Pony Permutations

AYXAcademy
Alteryx
Alteryx

A solution to last week's challenge can be found hereSource: https://en.wikipedia.org/wiki/Belmont_StakesSource: https://en.wikipedia.org/wiki/Belmont_Stakes

 

This week's challenge was submitted by @mst3k  - Thank you for your submission!

 

Later this week, the Belmont Stakes will be held in New York. If you are unfamiliar, this is a famous horse race which serves as the third race in the Triple Crown (the Kentucky Derby and Preakness are the other two legs). While there will not be a triple crown winner this year (since different horses won the previous two legs), we can still have some fun analyzing some race possibilities!

 

A race is being held between 4 horses. Create an output of every possible combination of race finishes. No horse should be able to finish in more than 1 place, but be warned there are two *different* mustangs named Sally in this race!
Extra Credit: If there are 5 horses instead of 4, how many possible outcomes are there? Can that number be generalized if there are n number of horses?

patrick_digan
16 - Nebula
16 - Nebula

@estherb47 Does this bring back nightmares of Born to Solve Nashville?

Spoiler
patrick_digan_0-1622552982939.png

 

AkimasaKajitani
14 - Magnetar

My solution.

 

Spoiler
AkimasaKajitani_0-1622553803146.png

Macro:

AkimasaKajitani_1-1622553823806.png

 

PhilipMannering
14 - Magnetar
14 - Magnetar

My solution attached,

 

Spoiler
PhilipMannering_0-1622553952784.png

For 5 horses there would be 5! = 120 ways of arranging them.

 

The cheat dynamic solution

Spoiler
PhilipMannering_0-1622562501973.png

 

patrick_digan
16 - Nebula
16 - Nebula

And to solve the advanced part/make it more dynamic without macros, we can simulate enough horse races to get all the possible outcomes

Spoiler
patrick_digan_0-1622554272201.png

 


 

DeanWest
8 - Asteroid

Off to the races! 🐎

 

Spoiler
challenge_270_solution_DeanWest-snippet.jpg

 

AngelosPachis
15 - Aurora

Append fields tool to the rescue for this week's challenge!

 

Spoiler
AngelosPachis_4-1622556368793.png

 


 

RolandSchubert
15 - Aurora
15 - Aurora

My solution

 

Spoiler
270.jpg
ellen-wiegand
Alteryx
Alteryx

fun fact: race horse names cannot be reused until 5 years after the horse has stopped racing or breeding

 

Spoiler
ellen-wiegand_0-1622558229261.png

 

I believe the number of solutions for this problem is just a simple factorial? So it should generalize to any number of starters. 

Toons
12 - Quasar

My solution :

 

Spoiler
Toons_0-1622558303955.png