Dimensional Reduction for Equations Involving Discrete and Continuous Variables