1. An apparatus for solving a stochastic problem, comprising: a configurable circuit comprising a processing unit to produce samples from a probability distribution related to the stochastic problem; a controller to configure the processing unit by providing information about the stochastic problem to the processing unit and to cause the processing unit to produce the samples; at least one memory storing information regarding a plurality of stochastic problems, wherein the controller exercises a control to reconfigure the processing unit by providing information about a first stochastic problem of the plurality of stochastic problems to the processing unit at a first time and to provide information about a second stochastic problem of the plurality of stochastic problems at a second time; and wherein the controller is further adapted to: provide information regarding a first stochastic problem to the processing unit at a first time; make a selection of a next stochastic problem, and provide information regarding the next stochastic problem to the processing unit at a second time; and wherein the controller is further adapted to provide a predetermined number of values to the processing unit and, when a number of other stochastic problems upon which the first stochastic problem depends is less than the predetermined number, the controller performs a masking operation which indicates to the processing unit that fewer than the predetermined number of values are being provided.