solve, sample, docstring in discrete