I have a four-bit input pattern. I have 16 distinct 12-bit output patterns. Many of these output patterns have a bits which are set in 2 or 4 of patterns.
If I (arbitrarily) assign each pattern to a four-bit number, I can use various online Karnaugh map tools to generate logic circuits.
This arbitrary assignment of patterns to four-bit numbers adds unnecessary constraints to the problem.
Is there a way of solving this, to give the best pattern<->number assignments, other than by brute-forcing all 16! orderings?
(Where "best" is the pattern<->number assignment which requires least logic to decode the four-bit input one of the 12 bit output patterns.)
Update:
Here are the bit patterns I want to decode a 4-bit numbers to:
0 0 0 1 0 0 0 0 1 0 0 0
0 1 0 1 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 1 0 0 0 0 0 1
0 0 0 0 1 0 0 0 0 1 0 0
0 1 0 0 1 0 0 0 0 1 0 0
1 0 1 0 1 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0 0 1 0 0
0 0 0 0 0 1 0 0 0 0 1 0
1 0 0 0 0 1 0 0 0 0 1 0
0 0 0 0 0 1 1 0 0 0 1 0
0 0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 0 1 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 1 1 0 0 0 0
0 0 0 0 0 0 1 1 0 0 0 0
It does not matter which four-bit number decodes to which 12-bit pattern, provided there is a one-to-one relationship.
What are the fewest logic gates which will do the job?
While solving the above may be marginally useful, it is the general solution that I am looking for.