Different classes of on-line algorithms are developed and analyzed for
the solution of {0, 1} and relaxed stochastic knapsack problems, in w
hich both profit and size coefficients are random variables. In partic
ular, a linear time on-line algorithm is proposed for which the expect
ed difference between the optimum and the approximate solution value i
s O(log(3/2) n). An Omega(1) lower bound on the expected difference be
tween the optimum and the solution found by any on-line algorithm is a
lso shown to hold.