Alex had started the competition by figuring out just the ingredients that worked with the given 3 ingredients and figuring out which ones he had.
Then, he went through each one of those ingredients to see if any of them could work as a main ingredient, or even work with each other at all. He also had to compare them with the rest of the ingredients he had.
It had taken him a while before he realized that doing so was going to take too much time. With over 20 thousand ingredients, trying to match each and every ingredient wasn't going to work at all.
He would have to look at things in sets and groups. That was when he recognized the fact that most of the ingredients that worked with the 3 initial ingredients had water energy in them.