Constrain ordering such that there is always a choice left

27 Views Asked by At

Given some sets $X_1, \cdots, X_n$ I want to define some ordering < of these sets such that if I select an element in $X_i$ it can not be selected in any future $ X_i < X$ but for any $X_i<\cdots<X_k$ there will always be an element left to be selected in X_k. In my cases, it is garuanted that such an ordering is possible.

Example 1:
A = {1,2,3}, B = {1,2}, C = {1}
A < B < C is not valid, if I select 1 in A then C will become empty
C < B < A is valid - I have to select 1 in C, 2 in B and finally 3 in A, this is the only valid ordering

Example 2:
A = {1,2,3}, B = {1,2,3}, C = {1,2,3}
Any ordering is valid

Example 3:
A = {1,2}, B = {2}
A < B is not valid, if I select 2 in A, C will become empty
B < A is valid, I can only select 2 in B, so I can always select 1 in A

Example 4:
A = {1,2}, B = {3,4}
Any ordering is valid

I am looking for a preferably short expression to express this property.
I.e $\forall X_k, X_k \not\subseteq (\bigcup_{j\in [1,k-1]} X_j)$ would be a valid model but fails on example 2

UPDATE: I am currently working with this expression however it is not in closed form. It feels like a closed form should exist but I can not find it. Let $g: [1,n] \mapsto X$ be a bijective function ordering the sets $X_1,\dots,X_n$ $\forall_{k \in [1,n]} \forall x_1 \in g(1) \forall x_2 \in g(2) \setminus \{x_1\} \dots \forall x_{k-1} \in g(k-1) \setminus\{x_1,x_2,\dots,x_{k-2}\} \exists x_k \in g(k): x_k\neq x_1 \land x_k~\neq~x_2 \land \dots \land x_k \neq x_{k-1} $

1

There are 1 best solutions below

0
On

The following is not closed in the sense of "all in one", but perhaps sufficiently formal:

Let $U=\bigcup_{k=1}^nX_k$ and for $\sigma\in S_n$ and $0\le k\le n$, define $$F_{\sigma,k}:=\{\,f\colon [1,k]\to U\mid f\text{ injective}, \forall i\in[1,k]\colon f(i)\in X_{\sigma i} \,\}.$$ For $0\le i\le j\le n$, we have the restriction mapping $$ \begin{align}\operatorname{res}_i^j\colon F_{\sigma,j}&\to F_{\sigma,i}\\ f&\mapsto f|_{[1,i]} \end{align}$$ With this notation, $\sigma$ induces a valid ordering iff all restriction mappings $\operatorname{res}^k_{k-1}$, $1\le k\le n$ are onto.