The flavor problem and discrete symmetries