电子科技大学研究生算法设计与分析拟考题及答案评分细则(3).pdfVIP

  • 1
  • 0
  • 约6.63千字
  • 约 6页
  • 2026-02-27 发布于河南
  • 举报

电子科技大学研究生算法设计与分析拟考题及答案评分细则(3).pdf

电子科技大学研究生算法设计与分析拟考题及答案评分细则

(3)

一、PleaseanswerTorFforeachofthefollowingstatements

toindicatewhetherthestatementistrueorfalse

1.Theknapsackproblemcanbesolvedinpolynomialtime

byusingdynamicprogramming.

(F)

2.SomeproblemsinNPcanbesolvedinpolynomialtime.

(T)

3.ToshowaproblemisNP-hard,wecanreduceittoawell-

knownNP-Completeproblem.

(F)

4.Inanundirectedgraph,thevalueofthemaximumflow

betweentwoverticesisequivalenttothevalueoftheminimum

cutbetweenthem.(T)

5..(F)

二、Arrangethefollowingfunctionsinascendingasymptotic

orderofgrowthrate:

,,,,.

参考答案:f2,f3,f1,f4,f5

三、Pleaseanswerthefollowingquestions:

(a)Whatarethemainstepsofdesigningadynamic

programmingalgorithm?

参考答案:1.定义子问题;2根据子问题建立递归关系式;3用自

底而上的方式求解(建立储存表)。

(b)WhatarethemainstepsofprovingtheNP-Completeness

ofaproblem?

参考答案:1.证明该问题属于NP;2.选一个已知的NPC问题B;

3.将问题B归约到该问题上。

四、TheTravelingsalesmanproblem(TSP)isdefinedas

follows:Givenagraph,thetaskistofind

ashortestpossibleroutethatvisitseachvertexexactlyonce

andreturnstotheoriginvertex.

Fig.1

ForthegraphshowninFig.1,

(a)findasolutiontoTSP((therouteisstartingfromAand

backtoA);

(b)findalongestdirectedcyclethatcontainsvertexA.

参考答案:|

(a)A-D-C-B-A35+12+30+20=97

(b)A-C-B-D-A42+30+34+35=141

五、DesignanalgorithmforthefollowingInterval

Schedulingproblem:Therearenjobseachofwhichhasastarting

timesandafinishingtimef.Twojobsarecompatibleiftheydont

overlap.Thegoaloftheproblemistofindamaximumsetof

mutuallycompatiblejobs.

参考答案及评分标准:

将所有工作(Interval)按其完成时间的先后进行排序;

在排好序的序列中

文档评论(0)

1亿VIP精品文档

相关文档