Hi, I am having an issue trying to generate this kind of truthtable:
every letter indicates a specific device that it can have 2 or more states, and every device can have just one state active (not two or more active states at the same time):
In this example we have the device a with 2 states and the device b with 3 states, I want to write a script giving just this informations and generate a matrix like this: (with just one and zeros, obviously without a_0 a_1 b_0 b_1 b_2)
a_0 a_1 b_0 b_1 b_2 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 1
As you can see every device has only one active state in every combination, I need to generalize this process to an arbitrary number of devices everyone with an arbitrary number of states, and generating all possible combinations with the retrictions that i described above. Thank you very much for your help.
Best Answer