L0 Constraint Optimization, Homogeneity Fusion, and Mediation Analyses