In this paper, the authors deal with a stochastic resource allocation model. Suppose that they have resource Xn at time n, and allocate AnÅ+1Xn out of Xn for production and (1-AnÅ+1)Xn for consumption at time n, where AnÅ+1 is the proportion of the resource that is allocated for production at time n. Then utility UnÅ+1f((1-AnÅ+1)Xn) is obtained and resource XnÅ+1=RnÅ+1g(AnÅ+1Xn) is occurred at time n+1, where UnÅ+1 and RnÅ+1 are random parameters, f is the utility function, and g is the production function that is an extension of g(x)=x. The authors are interested in the way of allocation that maximizes the sum of the expected utilities. They show necessary and sufficient conditions for an allocation to be optimal in this model. The sufficient condition is obtained via the technique of dynamic programming. Although the necessary condition is shown by means of the similar way used in an earlier paper, the sigma additive set function is substituted for the measure as the utility function that the authors treat in this paper takes more generally a real value. The necessary and sufficient conditions are represented via a martingale: the supremum of the conditional expected utilities forms a supermartingale if they arbitrarily allocate the resource, however it is necessary and sufficient for an allocation to be optimal that the supremum is a martingale. Furthermore, the authors have obtained an optimal allocation in the resource allocation model with a logarithmic utility function and a nonlinear production function g(x)=xp(p>0), utilizing the sufficient condition for an allocation to be optimal obtained above. [In Japanese.]