gen_problems function

Generate test problems