Congratulations, you managed to successfully identify and out the pony with the sight deficiency. I hope you're very proud of yourself. Seriously, you're lucky you didn't have to do that in public.
Anyway, Big Blue, satisfied that you have both the logic and two perfectly functional pairs of eyes, has a job for you: the sort that mostly requires manual labour, more to the pity.
He had recently been chosen by the Wonderbolts to help build a commemorative tower back at the Academy, showcasing the colours of all current members of the Wonderbolts on every floor. Being colour blind, naturally Big Blue can do little to assemble the tower himself, and so it falls to you to build it in his stead, at least by proxy. He does, however, ask that you be discreet about it: he has his own reasons for hiding his colour blindness, which you reckon would make for some hilarious misunderstandings, if the writer of the life that was his story was any good at comedy. You suspect they probably aren't.
Anyway, he then goes on to inform you that he's working with a builder who, after a very recent foray into necromancy, time-travel and a dash of magic, came to be cursed with a rather unusual deficiency: she cannot actually say any words other than numbers, and until she can visit some sort of cursebreaker, she's stuck with this curse for the remainder of the project, since Celestia forbid, she insists on seeing the project through to the end.
However, Big Blue realises that there is a workaround to this curse: all you have to do is ask how many of the floors are in the right colour after assembling the tower, and use her answer as your guide. So with the problem explained in one go, he then offers to fly you to the building site, and to hide you out of sight in a small and cramped section of the grounds to guide Blue's hooves.
You soon realise that you may have to cancel any lunch plans you have for the day, as in the event of the worst case scenario, you might be there for a good long time: Big Blue and his crew first have to build the tower, then ask the builder if they got the order correct, and if the answer is no, they'll have to disassemble it and build it again from scratch, and that could take hours. But what, exactly, is the worst case scenario here?
since we are considering worst case scenario, that means going through every combination available which equals to 24 tries
Worst case?
we get 0 right, then 1 then 2,then all 4, no matter what its 4 trys
Since we're imagining worse case logical scenario, we will have to ask the builder a maximum of 6 times.
Her first answer will be 0, 1, 2, or 4. If it's four, great! We're done. But worst case scenario, it's not four.
Let's say her first answer is 2. The means out of the 24 possible combinations, only 6 could be correct. Of these six combinations, e pick one and ask again She can answer 0, 1, or 4. Is she answers 4, we're done. If she answers 0, there is only one combination that can then be possible and we don't need to consult her a third time.If she answers 1, this leaves 4 possibilities where asking her will result in a 4, 0, or 1. Again, if her reply is 0 or 4, we will not need to consult her. If it's 1, we'll have to build again from the remaining 2 combinations and ask one last time. Either way, after her fourth answer, we know the exact order, whether our current build is correct or not.
Now let's say her first answer is 0. This reduces our pool to 9. For our second build, her response will only be 0, 2, or 4. 0 or 2 will reduce the pool down to 4 possibilities. In those pools, the third build will get answer of 4, 0, or other (it's not the same for the 2 pools). If it's 0 or 4, we know the exact build. If it's a different number, the pools are reduce to 2, meaning we need to do one more build, and depending on whether she answers 4 or 0, we know the correct outcome.
However, the worse case scenario can occur if her first answer is 1. This reduces our pool to 8. We select a build, and, if the response is not four, each build after this only eliminates 1 possibility. If her second response is 0, this means there are 3 possibilities and we need to only 2 more times at most. Once will eliminate a possibility, leaving us with only 2 after, which will need a confirmation.
Unfortunately, if her second response is 1, this narrows our choices to 4. Each possibility will either net us a 4 or a 0, with zero only eliminating 1 possibility each time. The first zero narrows it to three, the second to 2, and then we need to ask one last time between 2 choices.
So most you'll have to consult the builder is 5 times to know the correct order. Keep in mind, you don't need an answer of four in some cases to know what the correct order is. Since we will have to confirm the final is correct, we will have to ask one last time giving a maximum possible of 6. I hope you're ready for the long haul.
I worked this out on a spreadsheet. If you care to look, you can see it at https://docs.google.com/spreadsheets/d/1JcrFRA2RoZv8TM15YGUO-RLBwhLO5hExkD4C-GKMtIE/edit?usp=sharing Ignore the link if you don't want a spoiler for this.
9293763
You only go through 24 tries if you don't use any of the information the builder gives you.
9293871
While this sounds right i need to ask
Now the problem comes about halfway when you say other the only numbers that show up at all is 0,1,2 or 4 since thats how many choices we deal with, so how does this play out?
9294667
Depending on which pool you get, her answer will be one of 4, 2, or 0 or 4, 1, or 0. In either case, an answer of 4 or 0 gives us the exact build. If it's not one of those, you will have to decide between 2 remaining builds. I used other since the process would be the same. Perhaps I simplified a bit much. Then again, it felt like my explanation was a bit long winded to start.
This is obviously not the real answer, but it's a practical one.
Assuming it takes 1 hour to build the structure, it should take only 2 hours.
While they are building it the first time around, we make a list of all 24 combinations of color order.
If we are lucky, the 1st time is correct and it only took one hour.
If not, we show the builder the list and he points to the right one.
Structure goes up, and it only took us 2 hours.
Once again, this is not the right answer. Just common sense here.
9293871
Ok so this got me on the right track hopefully
lets say we try abcd and get 1 right,out of the 24 combos in total, none get eliminated
Then i try bcad and get 1 right
Next try will be dabc, witch gets a 0
Then cdab gets 1
Then adcb gets 2
The solution is then acdb in 5 trys
9302296
If none get eliminated, we are ignoring the information the builder gives us, and that wouldn't do. After all, we can at the very least eliminate ABCD
When we build our pool of remaining combos, we should be using ones that share the matching number of traits with our guesses. For your example, when the builder responds with 1, we should keep any combos that match exactly one of the criteria:
First color is A
Second color is B
Third color is C
Fourth color is D
So if our first guess is ABCD, ACDB would be acceptable since it only matches on the A. However, ABDC would be useless since it has 2 matches. Likewise, DCBA is out since it has 0 matches.
Remember, our job isn't to get the tower built correctly. That task belongs to that pecan muffin muncher. Our task is to find the worse case scenario and determine the number of times we need to consult the builder.
I updated the link so comments could be posted (thought I did that the first time!) but here it is again if you want a look. Spreadsheet link