Geometric methods in discrete optimization