算法设计与分析算法设计与分析 (13).ppt

上传人:刘静 文档编号:83299014 上传时间:2023-03-30 格式:PPT 页数:23 大小:544.50KB
返回 下载 相关 举报
算法设计与分析算法设计与分析 (13).ppt_第1页
第1页 / 共23页
算法设计与分析算法设计与分析 (13).ppt_第2页
第2页 / 共23页
点击查看更多>>
资源描述

《算法设计与分析算法设计与分析 (13).ppt》由会员分享,可在线阅读,更多相关《算法设计与分析算法设计与分析 (13).ppt(23页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、1Chapter 12Local SearchSlides by Kevin Wayne.Copyright 2005 Pearson-Addison Wesley.All rights reserved.2Coping With NP-HardnessQ.Suppose I need to solve an NP-hard problem.What should I do?A.Theory says youre unlikely to find poly-time algorithm.Must sacrifice one of three desired features.nSolve pr

2、oblem to optimality.nSolve problem in polynomial time.nSolve arbitrary instances of the problem.12.1 Landscape of an Optimization Problem4Gradient Descent:Vertex CoverVERTEX-COVER.Given a graph G=(V,E),find a subset of nodes S of minimal cardinality such that for each u-v in E,either u or v(or both)

3、are in S.Neighbor relation.S S if S can be obtained from S by adding or deleting a single node.Each vertex cover S has at most n neighbors.Gradient descent.Start with S=V.If there is a neighbor S that is a vertex cover and has lower cardinality,replace S with S.Remark.Algorithm terminates after at m

4、ost n steps since each update decreases the size of the cover by one.5Gradient Descent:Vertex CoverLocal optimum.No neighbor is strictly better.optimum=center node onlylocal optimum=all other nodesoptimum=all nodes on left sidelocal optimum=all nodes on right sideoptimum=even nodeslocal optimum=omit

5、 every third node6Local SearchLocal search.Algorithm that explores the space of possible solutions in sequential fashion,moving from a current solution to a nearby one.Neighbor relation.Let S S be a neighbor relation for the problem.Gradient descent.Let S denote current solution.If there is a neighb

6、or S of S with strictly lower cost,replace S with the neighbor whose cost is as small as possible.Otherwise,terminate the algorithm.A funnelA jagged funnel12.4 Maximum Cut8Maximum CutMaximum cut.Given an undirected graph G=(V,E)with positive integer edge weights we,find a node partition(A,B)such tha

7、t the total weight of edges crossing the cut is maximized.Toy application.nn activities,m people.nEach person wants to participate in two of the activities.nSchedule each activity in the morning or afternoon to maximize number of people that can enjoy both activities.Real applications.Circuit layout

8、,statistical physics.9Maximum CutSingle-flip neighborhood.Given a partition(A,B),move one node from A to B,or one from B to A if it improves the solution.Greedy algorithm.10Maximum Cut:Local Search AnalysisTheorem.Let(A,B)be a locally optimal partition and let(A*,B*)be optimal partition.Then w(A,B)e

9、 we w(A*,B*).Pf.nLocal optimality implies that for all u A:Adding up all these inequalities yields:nSimilarlynNow,each edge counted onceweights are nonnegative11Maximum Cut:Big Improvement FlipsLocal search.Within a factor of 2 for MAX-CUT,but not poly-time!Big-improvement-flip algorithm.Only choose

10、 a node which,when flipped,increases the cut value by at least Claim.Upon termination,big-improvement-flip algorithm returns a cut(A,B)with(2+)w(A,B)w(A*,B*).Pf idea.Add to each inequality in original proof.Claim.Big-improvement-flip algorithm terminates after O(-1 n log W)flips,where W=e we.nEach f

11、lip improves cut value by at least a factor of(1+/n).nAfter n/iterations the cut value improves by a factor of 2.nCut value can be doubled at most log W times.if x 1,(1+1/x)x 212Maximum Cut:ContextTheorem.Sahni-Gonzales 1976 There exists a-approximation algorithm for MAX-CUT.Theorem.Goemans-Williams

12、on 1995 There exists an 0.878567-approximation algorithm for MAX-CUT.Theorem.Hstad 1997 Unless P=NP,no 16/17 approximation algorithm for MAX-CUT.0.94117612.7 Nash Equilibria14Multicast RoutingMulticast routing.Given a directed graph G=(V,E)with edge costsce 0,a source node s,and k agents located at

13、terminal nodes t1,tk.Agent j must construct a path Pj from node s to its terminal tj.Fair share.If x agents use edge e,they each pay ce/x.outer2outermiddle41 pays5+15/2+1middle41outermiddlemiddleouter82 pays85/2+15+1st1vt24811515Nash EquilibriumBest response dynamics.Each agent is continually prepar

14、ed to improve its solution in response to changes made by other agents.Nash equilibrium.Solution where no agent has an incentive to switch.Fundamental question.When do Nash equilibria exist?Ex:nTwo agents start with outer paths.nAgent 1 has no incentive to switch paths(since 4 5+1).nOnce this happen

15、s,agent 1 prefers middlepath(since 4 5/2+1).nBoth agents using middle path is a Nashequilibrium.st1vt24581116Nash Equilibrium and Local SearchLocal search algorithm.Each agent is continually prepared to improve its solution in response to changes made by other agents.Analogies.nNash equilibrium:loca

16、l optimum.nBest response dynamics:local search algorithm.nUnilateral move by single agent:local neighborhood.Contrast.Best-response dynamics need not terminate since no single objective function is being optimized.17Socially OptimumSocial optimum.Minimizes total cost to all agent.Observation.In gene

17、ral,there can be many Nash equilibria.Even when its unique,it does not necessarily equal the social optimum.st1vt235511Social optimum=7Unique Nash equilibrium=8 stk1+Social optimum=1+Nash equilibrium A=1+Nash equilibrium B=kk agents18Price of StabilityPrice of stability.Ratio of best Nash equilibriu

18、m to social optimum.Fundamental question.What is price of stability?Ex:Price of stability=(log k).Social optimum.Everyone takes bottom paths.Unique Nash equilibrium.Everyone takes top paths.Price of stability.H(k)/(1+).st2t3tkt1.11/21/31/kt00001+1+1/2+1/k19Finding a Nash EquilibriumTheorem.The follo

19、wing algorithm terminates with a Nash equilibrium.Pf.Consider a set of paths P1,Pk.nLet xe denote the number of paths that use edge e.nLet(P1,Pk)=eE ce H(xe)be a potential function.nSince there are only finitely many sets of paths,it suffices to show that strictly decreases in each step.H(0)=0,20Fin

20、ding a Nash EquilibriumPf.(continued)nConsider agent j switching from path Pj to path Pj.nAgent j switches becausen increases by n decreases by nThus,net change in is negative.21Bounding the Price of StabilityClaim.Let C(P1,Pk)denote the total cost of selecting paths P1,Pk.For any set of paths P1,Pk

21、,we havePf.Let xe denote the number of paths containing edge e.nLet E+denote set of edges that belong to at least one of the paths.22Bounding the Price of StabilityTheorem.There is a Nash equilibrium for which the total cost to all agents exceeds that of the social optimum by at most a factor of H(k

22、).Pf.nLet(P1*,Pk*)denote set of socially optimal paths.nRun best-response dynamics algorithm starting from P*.nSince is monotone decreasing (P1,Pk)(P1*,Pk*).previous claimapplied to Pprevious claimapplied to P*23SummaryExistence.Nash equilibria always exist for k-agent multicast routing with fair sharing.Price of stability.Best Nash equilibrium is never more than a factor of H(k)worse than the social optimum.Fundamental open problem.Find any Nash equilibria in poly-time.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 大学资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁