Chapter 2 ( GENERALIZED ) CONVEXITY AND DISCRETE OPTIMIZATION