《计算模型与算法技术教学课件》5-Decrease-and-Conquer.pptVIP

  • 34
  • 0
  • 约2.57万字
  • 约 95页
  • 2016-09-20 发布于浙江
  • 举报

《计算模型与算法技术教学课件》5-Decrease-and-Conquer.ppt

* * * * * * * 将硬币分组两组,每组2N个,放到天平上称重; 将较重的一组平分成两组,每组N个,放到天平上称重,如果同重,则假币在另外一组,且假币较轻,反则,假币较重; 根据“三分法”减治求解。 * Click to edit company slogan . * * Try to get the students involved in coming up with these: Brute Force: an= a*a*a*a*...*a n Divide and conquer: an= an/2 * an/2 (more accurately, an= a?n/2? * a ?n/2│) Decrease by one: an= an-1* a (one hopes a student will ask what is the difference with brute force here: there is none in the resulting algorithm, of course, but you can arrive at it in two

文档评论(0)

1亿VIP精品文档

相关文档