Model Selection by Linear Programming