I have two partial orders s_1 and s_2 of natural numbers. How to compute the possible permutations of the numbers of the two sets following the partial orders. We suppose that the two orders are compatible.
For example:
s_1=(1, 2, 4)
s_2=(2,3)
In this example, we search the number of permutations of the numbers from 1, 2, 3 and 4 following the orders in s_1 and s_2.
I would appreciate any suggestions for the general case.
Supposing the partial orderings are compatible, you can split them into binary relations. Your example would become:
You can write an algorithm to traverse all legal orderings from this information. A simple approach would be to recursively search through the available choices of the partially ordered set. Here is an example pseudocode:
Recursive Search For All Legal Permutations Subject to Partial Ordering
The input Poset for your case would be a 3x2 array:
with POPerms 2x4 output array: