The greedy strategy means locking the trait as soon as it has a color that is needed. opt strategy may reroll purple SS atk if encountered early on.

Let $c$ denote the remaining currency, $o$ and $p$ denote the number of remaining orange and purple traits to get, $r$ the remaining traits rolled but not checked, and $P_{greedy}(c,o,p,r)$ and $P_{opt}(c,o,p,r)$ denote the chance of obtaining $o$ orange and $p$ purple traits with $c$ currency using the greedy and opt strategies, respectively.

$m_{op}$ is the price of a roll, defined by the game as:

$m_{op}=5×(6−o−p)$

$α$ and $β$ are the probability of SS Atk and specific color. They are defined by the game as:

$α=0.0756%×91 β=51 =0.000084=0.2 $

$P_{greedy}(c,o,p,r)$ can be calculated recursively as: