麻省理工学院:《算法导论》(英文版) Lecture 12 Prof erik demaine

Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 12 Prof erik demaine
Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 12 Prof. Erik Demaine

Computational geometry Algorithms for solving geometric problems in 2D and higher Fundamental objects: o point line segment Ine Basic structures point set polygon c 2001 by erik D. Demaine Introduction to Agorithms Day 21 L12.2
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.2 Computational geometry Algorithms for solving “geometric problems” in 2D and higher. Fundamental objects: point line segment line Basic structures: point set polygon

Computational geometry Algorithms for solving geometric problems in 2D and higher Fundamental objects: o point line segment Ine Basic structures triangulation convex hull c 2001 by erik D. Demaine Introduction to Agorithms Day 21 L12.3
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.3 Computational geometry Algorithms for solving “geometric problems” in 2D and higher. Fundamental objects: point line segment line Basic structures: triangulation convex hull

Orthogonal range searching Input: n points in d dimensions E. g. representing a database of n records each with d numeric fields Query: Axis-aligned box (in 2D, a rectangle Report on the points inside the box Are there any points? How many are there? List the points c 2001 by erik D. Demaine Introduction to Algorithms Day 21 L12. 4
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.4 Orthogonal range searching Input: n points in d dimensions • E.g., representing a database of n records each with d numeric fields Query: Axis-aligned box (in 2D, a rectangle) • Report on the points inside the box: • Are there any points? • How many are there? • List the points

Orthogonal range searching Input: n points in d dimensions Query: Axis-aligned box (in 2D, a rectangle) Report on the points inside the box Goal: Preprocess points into a data structure to support fast queries Primary goal: Static data structure In id. we will also obtain a ynamic data structure supporting insert and delete c 2001 by erik D. Demaine Introduction to Agorithms Day 21 L12.5
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.5 Orthogonal range searching Input: n points in d dimensions Query: Axis-aligned box (in 2D, a rectangle) • Report on the points inside the box Goal: Preprocess points into a data structure to support fast queries • Primary goal: Static data structure • In 1D, we will also obtain a dynamic data structure supporting insert and delete

ID range searching In ld. the query is an interval First solution using ideas we know Interval trees Represent each point x by the interval [x,x Obtain a dynamic structure that can list k answers in a query in O(k Ig n) time c 2001 by erik D. Demaine Introduction to Ago orns Day 21 L12.6
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.6 1D range searching In 1D, the query is an interval: First solution using ideas we know: • Interval trees • Represent each point x by the interval [x, x]. • Obtain a dynamic structure that can list k answers in a query in O(k lg n) time

ID range searching In ld. the query is an interval Second solution using ideas we know Sort the points and store them in an array Solve query by binary search on endpoints Obtain a static structure that can list k answers in a query in O(k + Ig n)time Goal: obtain a dynamic structure that can list k answers in a query in O(k+lg n)time c 2001 by erik D. Demaine Introduction to Agorithms Day 21 L12.7
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.7 1D range searching In 1D, the query is an interval: Second solution using ideas we know: • Sort the points and store them in an array • Solve query by binary search on endpoints. • Obtain a static structure that can list k answers in a query in O(k + lg n) time. Goal: Obtain a dynamic structure that can list k answers in a query in O(k + lg n) time

ID range searching In ld. the query is an interval New solution that extends to higher dimensions Balanced binary search tree New organization principle Store points in the leaves of the tree Internal nodes store copies of the leaves to satisfy binary search property Node x stores in key the maximum key of any leaf in the left subtree ofx c 2001 by erik D. Demaine Introduction to Algorithms Day 21 L12. 8
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.8 1D range searching In 1D, the query is an interval: New solution that extends to higher dimensions: • Balanced binary search tree • New organization principle: Store points in the leaves of the tree. • Internal nodes store copies of the leaves to satisfy binary search property: • Node x stores in key[x] the maximum key of any leaf in the left subtree of x

Example of a lD range tree 43 681214 261354142 5961 c 2001 by erik D. Demaine Introduction to Algorithms Day 21 L12.9
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.9 Example of a 1D range tree 11 66 88 1212 1414 1717 2626 3535 4141 4242 4343 5959 6161

Example of a lD range tree 42 14 35 43 2)17(26)(41)43(59 681214 261354142 5961 c 2001 by erik D. Demaine Introduction to Algorithms Dav2112.10
© 2001 by Erik D. Demaine Introduction to Algorithms Day 21 L12.10 Example of a 1D range tree 11 1212 66 88 1212 1414 1717 2626 3535 4141 4242 4343 5959 6161 66 2626 4141 5959 11 1414 3535 4343 88 4242 1717 xx ≤ x > x
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 麻省理工学院:《算法导论》(英文版) Lecture 11 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 10 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 9 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 8 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 7 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 6 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版)Lecture 5 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版)Lecture 4 Prof. charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 3 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 2 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture Prof. Charles E. Leiserson.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)实验二 波形输入与仿真实现.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)综合、设计性实验指导书.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)封面.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)附录GW48EDA系统使用说明.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)实验一 可编程ASIC使用初步.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)实验五 A/D采样电路设计.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)实验四 只读存储器设计.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)实验三 序列信号发生器与序列信号检测器的设计.pdf
- 桂林电子科技大学:《可编程ASIC原理》课程教学资源(实验指导书)实验六 数字电压表设计.pdf
- 麻省理工学院:《算法导论》(英文版)Lecture 13 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 14 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 15 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 16 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版)Lecture 17 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 18 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 19 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 20 Prof erik demaine.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 21 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 22 Prof charles e. leiserson.pdf
- 麻省理工学院:《算法导论》(英文版) Lecture 23 Prof charles e. leiserson.pdf
- 《计算机三级网络技术》第一章 计算机基础知识.doc
- 《计算机三级网络技术》第七章 电子商务和电子政务.doc
- 《计算机三级网络技术》第三章 局域网基础.doc
- 《计算机三级网络技术》第二章 网络基本概念.doc
- 《计算机三级网络技术》第五章 因特网基础.doc
- 《计算机三级网络技术》第八章 网络技术展望.doc
- 《计算机三级网络技术》第六章 网络安全技术.doc
- 《计算机三级网络技术》第四章 网络操作系统.doc
- 吉林师范大学:《VBA》课程电子教案(PPT教学课件)目录.ppt