At each step, the reactants are sampled from the auxiliary distribution π t (x t ) defined on B t × B t following the procedure described above. After calculating the predicted products P i = r(x i t ) using the single-step reaction model and predicted properties Y i = h•r(x i t ), and calculating the importance weights, resampling is performed to determine the survival or death of x i t . Because the solution space for each t is restricted to the support of two reactants B t × B t , no combinatorial explosion occurs. Additionally, as t increases, the network topology that can be represented by B t increases monotonically. In principle, if t approaches infinity under the use of a proper proposal distribution, then B t can represent any network topology. We call this method the Bayesian sequential stacking algorithm, which describes the process of constructing a reaction network by recurrently stacking single-step reactions.