I have the following problem. Imagine there is a set $P=\{p_1,p_2,p_3\} \subset \mathbb Z $ and I want to describe how it changes in time.
Informally, the rule is simple: At every time-step, subtract 1 from the largest element of the set.
This is fairly easy to achieve with a numerical algorithm like: $P_{t+1}=P_t-(p_{i,t}=max(P_t)) \; \forall i \subset P_t$ if we assume $TRUE=1$
However, is there any way to describe $P$ as function of time and initial conditions analytically?
Or, in a more general way, is there way to solve a recursion with maximum-of-set functions on it?
In your case you can easily write it down:
W.l.o.g. assume $p_1\leq p_2 \leq p_3$. Then setting $P_0 := P$ we get:
$$P_t = \begin{cases}\{p_1,p_2,p_3-t\} & t < p_3-p_2 \\ \{p_1,p_3-t\} & p_3-p_2 \leq t < p_3-p_1 \\ \{p_3-t\} & else&\end{cases}$$
But generally it is going to be more difficult to find an explicit form of a more general sequence involving $\max$.