Here's a better non-heuristic approach. Store your optimal configurations in reverse. ie mapping each attribute to the configurations it appears in. eg (unrelated to your your example)
X1 : C1 C4 C5 C99999
X2 : C1 C2
X3 : C1
X4 : C1 C2
...
XN : C100 C200 C300
Now, you make an array of length Z
to store how many matches you found. You iterate through ALPHA, and for each attribute you go through the associated configurations. For each configuration, you add one to the corresponding position in your array.
Finally, you run through the array and select the configuration with the largest count. You could keep a running maximum instead if you like, but that would only be more efficient if you expected to do fewer than Z comparisons in total (number of elements in ALPHA multiplied by the average number of associated configurations).
This will find the best match, and ought to be about 50 times faster than your naive solution.