For two $k$-partitions $X,Y\in k^\omega$ of $\omega$
(seen as functions $\omega\rightarrow k$),
we say $X,Y$ are *almost disjoint*
iff $X^{-1}(i)\cap Y^{-1}(i)$ is finite
for all $i<k$. 


Question: Does there exist a set 
$Q\subseteq 3^\omega\times (2^\omega)^r$
such that: 


1. for every $X\in 3^\omega$, there exists $Y\in (2^\omega)^r$ such
that $(X,Y)\in Q$;
2. for every $(X^0,Y^0),(X^1,Y^1)\in Q$, if $X^0,X^1$ are almost
disjoint, then $ Y^0\_s,Y^1\_s$ are almost disjoint for some $s<r$.


If $r=1$, then obviously $Q$ does not exist since every three $2$-partitions, there are two of them not almost disjoint and there are three $3$-partitions that are mutually almost disjoint. If we replace $3^\omega$ by $2^\omega$ then such $Q$ obviously exist. It seems, by Cohen forcing, $Q$ (if exist) cannot be $\Sigma\_1^1$. Could it be $\Pi\_1^1$?



Complexity of a combinatorial constraint
The answer is yes for $r=3$. Take an ultrafilter $\mathcal{U}$ on $\omega$. Define a function $f \colon 3^\omega \rightarrow 3$ such that $f(X):=i$ iff $X^{-1}(i) \in \mathcal{U}$. Note that if $X\_1$ and $X\_2$ are almost disjoint, then $f(X\_1) \neq f(X\_2)$.


Let $Q:=\{(X,Y) \in 3^\omega \times (2^\omega)^3 \colon \,\, f(X)=i \Rightarrow Y\_i=(\emptyset,\omega) \land f(X)\neq i \Rightarrow Y\_i=(\omega, \emptyset)\}$.


Unfortunately, this $Q$ cannot be $\Pi\_1^1$ as Jonathan pointed out.


