第一道题可以用模拟退火法做数值计算 http://blog.csdn.net/snowy_smile/article/details/50131317