算法合集之《半平面交的新算法及其实用价值》.ppt
《算法合集之《半平面交的新算法及其实用价值》.ppt》由会员分享,可在线阅读,更多相关《算法合集之《半平面交的新算法及其实用价值》.ppt(48页珍藏版)》请在三一办公上搜索。
1、9/14/2023,Zeyuan Zhu,1,All great ideas are controversial,or have been at one time.伟大的理论都是有争议的,或者至少曾经是有争议的。Gilbert Seldes(1893-1970)U.S.theater,film,and radio critic.,理论的争议,9/14/2023,Zeyuan Zhu,2,A wise man will make more opportunities than he finds.聪明人总是制造更多的机会,而不是去等待寻找。Francis Bacon(1561-1626)Engli
2、sh philosopher,statesman,and lawyer.,制造机会,9/14/2023,Zeyuan Zhu,3,After the leaves have fallen,we return to a plain sense of things.It is as if we had come to an end of the imagination.叶落时分,我们回到一切的本来面目,这样就与创造与幻想的终点不远了。Wallace Stevens(1879-1955)U.S.poet,忘记过去,揭开本来面目,9/14/2023,Zeyuan Zhu,4,Hello,Ladies
3、and Gentlemen.女士们先生们大家好Bonjour,Mesdames et Messieurs.Witajcie,Panie i Panowie.Hallo,Damen und Herren.Buna ziua,Doamenelor si Domnilor.Ciao,signore e signori.,Zeyuan Zhu,Grade 12,Nanjing Foreign Language School,Jiangsu,China.朱泽园,高三,南京市外国语学校,江苏,中国,9/14/2023,Zeyuan Zhu,5,New algorithm for Half-plane In
4、tersection and its Practical Value Thesis for Chinese Team Selecting Contest 2006 半平面交的新算法及其实用价值 中国代表队2006年选拔赛论文,Zeyuan Zhu,Grade 12,Nanjing Foreign Language School,Jiangsu,China.朱泽园,高三,南京市外国语学校,江苏,中国,9/14/2023,Zeyuan Zhu,6,Project Overview 全文总揽,Aim:Present a new O(nlogn)algorithm for half-plane int
5、ersection(abbr.HPI),which is one of the most heatedly discussed problems in computer science;emphasize its advantages in practical application,and to some extent,reduce the complexity to O(n).However,the new algorithm will be extraordinarily easy to be implemented.,主旨:半平面的交是当今学术界热烈讨论的问题之一,本文将介绍一个全新的
6、O(nlogn)半平面交算法,强调它在实际运用中的价值,并且在某种程度上将复杂度下降至O(n)线性。最重要的是,我将介绍的算法非常便于实现.,9/14/2023,Zeyuan Zhu,7,Project Overview 全文总揽,1 introduces what Half-Plane Intersection(HPI)is.什么是半平面交.2 prepares a convex polygon intersection(CPI).凸多边形交预备知识.3 briefly discuss a common solution for HPI D&C.简要介绍旧D&C算法.4 my new alg
7、orithm S&I emerges detailedly.揭开我的新算法S&I神秘面纱.5 conclusion and discussion on further practical use.总结和实际运用.,9/14/2023,Zeyuan Zhu,8,1.Statement of the Problem-问题概述,9/14/2023,Zeyuan Zhu,9,1.Statement of the Problem,A line in plane is usually represented as ax+by=c.Similarly,its inequality form ax+by()c
8、 represents a half-plane(also named h-plane for short)as one side of this line.,3x-2y=1,x+2y1,众所周知,直线常用ax+by=c表示,类似地半平面以ax+by()c为定义。,9/14/2023,Zeyuan Zhu,10,1.Statement of the Problem,Given n half-planes,aix+biyci(1in),you are to determine the set of all points that satisfying all the n inequations.
9、给定n个形如aix+biyci的半平面,找到所有满足它们的点所组成的点集,9/14/2023,Zeyuan Zhu,11,1.Statement of the Problem,Feasible region forms a shape of convex hull possibly unbounded.Add four h-planes forming a rectangle,to make the intersection area finite.合并后区域形如凸多边形,可能无界此时增加4个半平面保证面积有限,9/14/2023,Zeyuan Zhu,12,1.Statement of th
10、e Problem,Each h-plane builds up at most one side of the convex polygon.Hence,The convex region will be bounded by at most n edges.每个半平面最多形成相交区域的一条边,因此相交区域不超过n条边。,6 h-planespentagon,9 h-planespentagon,9/14/2023,Zeyuan Zhu,13,1.Statement of the Problem,Pay attention that intersection sometimes yields
11、 a line,a ray,a line-segment,a point or an empty region.注意相交后的区域,有可能是一个直线、射线、线段或者点,当然也可能是空集。,line,ray,line-segment,point,empty set,9/14/2023,Zeyuan Zhu,14,2.Convex Polygon Intersection CPI凸多边形交预备知识,9/14/2023,Zeyuan Zhu,15,2.Convex Polygon Intersection,Intersecting two convex polygons A and B into a
12、single one.We will sketch out an efficient way,named plane sweep method.,求两个凸多边形A和B的交(一个新凸多边形)。我们描绘一个平面扫描法。,Polygon A,Polygon B,9/14/2023,Zeyuan Zhu,16,2.Convex Polygon Intersection,Main idea:Regard intersections of edges as cutting points,and break boundaries of A and B,into outer edges and inner e
13、dges.Segments of inner edges establish ties to each other,and form a polygon.(in bold),主要思想:以两凸边形边的交点为分界点,将边分为内、外两种。内边互相连接,成为所求多边形(图中粗线条),Polygon A,Polygon B,9/14/2023,Zeyuan Zhu,17,2.Convex Polygon Intersection,Suppose there is a vertical sweep line,performing left-to-right sweep.At anytime,there a
14、re at most four intersections from sweep line to either given polygon.,假设有一个垂直的扫描线,从左向右扫描任何时刻,扫描线和两个多边形最多4个交点,Polygon A,Polygon B,Bu,Au,Bl,Al,Sweep line,9/14/2023,Zeyuan Zhu,18,2.Convex Polygon Intersection,the lower one between Au and Bu,and the upper one between Al and Bl,form an interval of the c
15、urrent inner region the red segment in bold.,Au、Bu中靠下的,和Al、Bl中靠上的,组成了当前多边形的内部区域,Polygon A,Polygon B,Bu,Au,Bl,Al,Sweep line,9/14/2023,Zeyuan Zhu,19,2.Convex Polygon Intersection,Let us call the x-coordinates to be swept x-events.Obviously,the sweep line may not go through all the x-event with rationa
16、l coordinates!,我们称被扫描线扫描到的x坐标叫做x事件。当然,我们不能扫描所有有理数!,Bu,Au,Bl,Al,9/14/2023,Zeyuan Zhu,20,2.Convex Polygon Intersection,Call the edges where Au,Al,Bu and Bl are:e1,e2,e3 and e4 respectively.Next x-event should be chosen among four endpoints of e1,e2,e3 and e4,and four potential intersections:e1e3,e1e4,
17、e2e3 and e2e4.,称Au,Al,Bu,Bl所在的边叫做e1,e2,e3,e4下一个x事件将在这四条边的端点,以及两两交点中选出,Bu,Au,Bl,Al,O(n),9/14/2023,Zeyuan Zhu,21,3.Common solution:Divide-and-Conquer Algorithm D&C通常的分治解法,9/14/2023,Zeyuan Zhu,22,3.Divide-and-Conquer Algorithm,Divide:Partition the n h-planes into two sets of size n/2.Conquer:Compute fe
18、asible region recursively of both two subsets.Combine:Compute intersection of two convex region,by CPI2分:将n个半平面分成两个n/2的集合.治:对两子集合递归求解半平面交.合:将前一步算出来的两个交(凸多边形)利用第2章的CPI求解.,9/14/2023,Zeyuan Zhu,23,3.Divide-and-Conquer Algorithm,The total time complexity of the solution can be calculated via recursive e
19、quation.总时间复杂度可以用递归分析法.,9/14/2023,Zeyuan Zhu,24,4.My New Solution:Sort-and-Incremental Algorithm S&I我自创的排序增量算法,9/14/2023,Zeyuan Zhu,25,4.Sort-and-Incremental Algorithm,Definition of h-planes polar angle:for h-plane like x-yconstant,we define its polar angle to.半平面的极角定义:比如x-y常数的半平面,定义它的极角为.,9/14/2023
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 半平面交的新算法及其实用价值 算法 平面 及其 实用 价值

链接地址:https://www.31ppt.com/p-6012037.html