Flow optimization in the pentose-phosphate reaction network. Only a small part of the chemical space is shown. We allow influx of water and ribulose-5-phosphate to generate glucose-6-phosphate as output. Phosphate is produced as waste product. An optimal solution is shown in black, using 6 ribulose-5-phosphate molecules to produce 5 glucose-6-phosphate molecules. The values of the flow f(·) is indicated for each hyperedge (black square), e.g., f(a) = 1, f(b) = 1, f(c) = 2, f(d) = 2, f(e) = 2. At each node (except the unlabelled input and output nodes) the influx and outflux is balanced. For example, at node x (glycerol-3-phosphate), we have f(d) + f(e) = 4 = f(a) + f(b) + f(c).