Stochastic dominance on unidimensional grids: theory and applications