Geometry combinatorics and algorithms
Prüfungsfragen
Prüfungsfragen
-
- 1 / 119
-
Flashcards
Consider k convex polygons P1, . . . Pk, for some constant k 2 N, where each polygon is given as a list of its vertices in counterclockwise orientation. Show how to construct the convex hull
of P1 [...[Pk in O(n) time, where n = ki=1ni and ni is the number of vertices of Pi, for 1 i k.
Construct lower and upper convex hull. start by lexicographically smallest for lower, for each polygon order them in a queue as they appear (counterclockwise) starting from lexicographically smalles vertex. Check for all Pi first in Queue which line is lowest. For this Pi, also check 2nd vertex in queue, add lower tangent vertex to lower convex hull. Discard all points with smaller x coordinate and continue until you reach overall lexicographically largest vertex. Upper analog. Runtime: O(kn) but since k is constant O(n)
(a) What is the bisector of a line l and a point p∈R2 \l, that is, the set of all points x∈R2 with||x−p||=min_{r∈l}||x−r||?
(b) For two distinct points p,p0 in R2, what is the region that contains all points whose distance to p is exactly twice their distance to p0?
a) a paraboloid
b) a circle around p0, crossing the line between p and p0 at 1/3 of the distance and being centered at a point on that line but 1/3 after the point p0.
Consider the Delaunay triangulation T for a set P ⊂ R2 of n ⩾ 3 points in general position. Prove or disprove:
(a) Every edge of T intersects its dual Voronoi edge.
(b) Every vertex of VD(P) is contained in its dual Delaunay triangle.
a) not true. Counterexample: consider triangle pi,pj,pk pretty shallow and symmetric and let pk be the middle point. Then there is only one voronoi vertex, that lies "over" the triangle so pipj passes through VP(k) and thus not through its "own" edge.
b) not true, one triangle can contain multiple points and another none. See picture
Prove: A star-shaped polygon, given as a sequence of n greater or equal than 3 vertices and a star-point, can be triangulated in O(n) time.
Start by connecting all n vertices to the star point. Then walk around the boundary, whenever there is a convex point, flip the line connecting it to the star point within its quadrilateral.
For O(n): make a list (or queue) of convex vertices. Whenever you flip ad edge to v: remove v from list and check if its 2 neighbors are now convex.
What is the Voronoi diagram of a set of points in R2? Give a precise definition and explain/prove the basic properties: convexity of cells, why is it a subdivision of the plane?, Lemma 8.6, Lemma 8.8.
subdivision of the plane into voronoi cells= set of closests points to p. divides plane because every point is closest to some point. (If to multiple its on edge/vertex. Convex, since intersection of halfspaces. Vertex incident to (at least) three cells, edge vertex is endpoint of at least 3 edges (both proven by convexity) center of circle through (at least) 3 points: v incident to VP(1),...VP(k). Then p1,...pk simultaneously closest to v. (distance to v is the same for all)
What is the correspondence between the Voronoi diagram and the Delaunay triangulation for a set of points in R2? Prove duality (Theorem 8.9) and explain where general position is needed.
Dual graph of voronoi graph (where we hoose pis as representatives of the faces) is delauney triangulation (if general position) Otherwise, there is some convex polygons that need to be triangulated, but every triangulation will be Delaunay.
proof. vertices are trivially the same. Edge of dual of voronoi: pipj if cells unbounded: on boundary and thus also in del. triangulation, else there exists a cyckle pipjpk and thus pipj is an edge of del.t. For the other direction, every edge of the del. triangulation is on some circumcircle centered at v and thus the edges pipjpk are all in the dual graph.
How to construct the Voronoi diagram of a set of points in R2? Describe an O(n log n) time algorithm, for instance, via Delaunay triangulation.
Construct delauney triangulation in O(nlogn) and transfer it to voronoi cells in O(n) (find midpoints of all circles of triangles) and connect two adjacent ones if triangles were adjacent.
What is the Post-Office Problem and how can it be solved optimally? De-scribe the problem and a solution using linear space, O(n log n) preprocessing, and O(log n) query time.
Post office: in a town, what is the closest post-office for a person at point q? (inside convex hull of P)
Solve: Do Voronoi dagram. (As graph) and then use Kirkpatricks hirachy to determine what triangle q lies in: construct sequence of triangulations T0,..,Th s.t. T0 is initial triangulation, Th is a single triangle. And start looking for q starting in Th going back down. In each step remove at least 1/18 vertices of degree at most 8 (greedy: remove vertex and delete v plus neighbors from those that can possibly be removed (of degree at most 8)) We have that the vertices of degree at most 8 are at least n/2. ( by splitting vertices into set of greater and less or equal than 8 degree)
How does Kirkpatrick’s hierarchical data structure for planar point location work exactly? Describe how to build it and how the search works, and prove the runtime bounds. In particular, you should be able to state and prove Lemma 8.22 and Theorem 8.17.
Runtime: In every step at least ni/18 vertices are removed. so we get that \(n_i\leq (\frac{17}{18})n_{i-1}\leq...\leq (\frac{17}{18})^{i}n\) as the time cost for removing vertices. and in total building the hirarchy thus costs \(\sum_{i\in \mathbb{N}}(\frac{17}{18})^{i}\leq18n\). Number of levels: log_{18/17}n. In total: 3ch=3 8 log_{18/17}n<292 logn.
The standard projective duality transform is
• incidence preserving: p ∈ l ⇐⇒ l∗ ∈ p∗ and
• order preserving: p is above l ⇐⇒ l∗ is above p∗.
\(p=(a,b), l: y=cx+d \\p\in l \iff b=ca+d \iff -d=ac-b \iff l^*=(c,-d)\in p^*:y=ax-b\)
for above, replace= by <.
Let F be a family of vertical line segments such that for each three of them, there exists a line that intersects all three. Show that there exists a line which intersects all line segments in F.
We can translate it to its dual. A vertical segment Si is a segment between (xi,y1(i)) and (xi,y2(i)) (w.l.o.g secong y larger). A non-vertical line f:y=mx+b intersects this iff y1(i)<=mxi+b<=y2(i) iff y1(i)+mxi<=b<=y2(i)+mx Not seeing all lines as points (m,-b), every segment gives us a subspace of R^2 shaped like a ribon (two parallel lines and everything in between is valid.). Denote this by Ri. Now, we cann apply Hellys theorem, stating, that if any 3 sets have non-empty intersection, then the whole set also has non-empty intersection.
The X + Y sorting problem is the following: given two sets X and Y of ndistinctnumberseach,sortthesetX+Y={x+y:x∈X, y∈Y}. Itisanopen problem whether this can be done in o(n2 log n) time.
Prove that X + Y sorting reduces (in O(n) time) to the problem of sorting the
2n lines pq by slope, for all pairs {p,q} from a set of 2n points.
We construct the follwoing 2n points: For x in X point (0,-x) and for y in Y: (1,y).
Then the slope for two points from x or y is (-)infinity and thus not relevant and the slope from a point in X and one in Y is (y-(-x))/(1-0)=y+x. So sorting the slopes of these lines is exactly sorting X+Y. runtime: construct 2n points: O(n). (We take the slopes of any pair, but that is part of the slopes problem)
Show that the following variation of 3-Sum—call it 3-Sum◦—is 3-Sum- hard: Given a set S of n integers, are there three (distinct) elements of S that sum up to zero?
A problem X is 3-Sum-hard if every 3-Sum instance of size n reduces to solving a constant number of X instances of size O(n), within O(n2−ε) reduction time for some constant ε > 0.
Triple the set S and then find 3 "distinct" numbers. (This enables triples with multiple appearances to be valid) (Or faster: only triple if there is a 0, otherwise only double, cause 3 times something non-zero makes no sense)
The goal of this exercise is to develop a data structure for halfspace range counting.
(a) Given a set P ⊂ R2 of n points in general position, show that it is possible to partition this set by two lines such that each region contains at most ⌈n/4 ⌉ points.
(b) Design a data structure of size O(n) that can be constructed in time O(n log n) and allows you, for any halfspace h, to output the number of points |P ∩ h| of P contained in this halfspace h in time O(n^α), for some 0 < α < 1.
a) Divide points randomly into 2 sets, find line bisecting both by ham sandwich, then "recolor" them according to what side of the line they lie on and again find a bisecting line.
b) We divide the plane into 4 sections. We know there is an algorithm finding a ham sandwich cut in O(n). (Or eq. finding two lines) So doing this requirsively for all quaters and constructing a tree, where a child means its one of the parents quaters needs \(O(n)+O(n/4)+(n/8),...+O(n/2^k)=O(nlogn)\) time.
That tree is of size O(n). Every node contains the number of vertices (size) of its region and information on where it lies. To determine the number of vertices contained in h, notice, that one of 4 quarters is always either fully contained in h or not contained at all. So we only need to continue the paths on 3 of 4 children, and thus get a runime of 3T(n/4)+O(1) per step and thus in total an \(O(n^{log_43})\) query.
Show that λ1(n) = n and λ2(n) = 2n − 1.
lambda_1(n): There can be no subsequence of length 3. Meaning no symbols a...b...a. But if a sequence is longer than n, by pigeonhole, one element must appear at least twice. And since it can not appear in consecutive positions, there must be some element in between.
lamda_2(n): No sequence of the form abab. Induction: clear for n=1. Fix some element a. Then a sequence is of the for S0aS1a...aSk where Si is a part of the sequence not containing a and S0 and Sk are possibly empty. Then all Sis must be disjoint. And by the induction hypothesis we have |Si|<=(#symbol in Si) -1. Then the total length is \(|S0|+\sum_{i=1}^k|Si|+1\leq 2(T0-1)+2(\sum_{i=1}^kTi-1+1)=2n-1\) where Ti is the number of different elements in Si.
Show that every (n, 2)-Davenport-Schinzel sequence can be realized as the lower envelope of n parabolas.
For every parabola, we get a first and a last appearance. This is an Interval Ix for parabola x. Then these Intervals (considered as open intervals) are either disjoint (x can only appear before y) or contained in one another. E.g Ix inside Iy. But then y is a wider parabola und thus we can only have the sequence y....yx...x...y....y.
Let P ⊂ R4 be a finite set of points in general position and let P be the polytope defined by the convex hull of P. Show that f3 ⩾ f0.
The vertex edge graph is 4-connected so \(2f_1 \geq 4f_0\) and every every facet has at most 4 ridges and each ridget is incident to 2 facets. Thus \(2 f_3 \geq f_2.\) Plugging this into Euler Oncaree formula yields the desired.
Characterize all polytopes in R3 that are both simple and simplicial.
Only 3-simplex. deg(v)=3 for all v. Thus 2|E|=3|V|. Simplicial implies, that every facet is a triangle. Thus 2|F|=3|E| and the underlying graph is max planar. Thus |E|=3|V|-6. Only possible with |E|=6 and |V|=4
Alternative: Start at some vertex v and connect it to 3 vertices xyz. since every face is a triangle, they must be pairwise connected.
What is a polytope? Give a definition and provide a few examples.
Polytope: conv hull of finite point set, intersection of finitely many halfspaces, bounded.
How can one construct an arrangement of lines in R2? Describe the incremental algorithm and prove that its time complexity is quadratic in the number of lines (incl. statement and proof of the Zone Theorem).
Graph in DCEL: insert new line li: start on left of bounding box: find leftmost face, that intersects l. Split face and update everything accordingly. add a vertex at intersection with the next line, continue in that fashion until rightmost face is reached.
Only faces that intersect li are relevant. So called zone: set of cells that intersect li. Thm: there are <10n lines in all cells of L. proof. Assume li is horizontal (else rotate everything) We only consider left bounding faces and show <5n: consider the rightmost intersection point p, where r in L intersects something. R is rightmost cell of L without r. We want to consider what happens, when inserting r: It intersects R at most at 2 points, splitting 2 left bound edges and maybe being left bounding itself. So by induction 5(n-1)+3<5n leftbounding edges. If multiple edges intersect at the same point p, they can additionally split rs edges, so we get 5 new leftbound edges.
How can one test whether there are three collinear points in a set of n given points in R2? Describe an O(n2) time algorithm.
Dualize: (a,b) is a line y:ax-b 3 points are colinear iff the 3 corr. lines intersect. (compute intersection of two lines and store in a hash table, if already there, return true, else false)
How can one compute the minimum area triangle spanned by three out of n given points in R2? Describe an O(n2) time algorithm.
fix two points pq. Then equivalent to finding r closest to line through p and q. Dualize: find closest point l* to p* intersect q* that has the same x-coord and lies on some r*. Then r is the solution. Do this for every pair, incrementally update when inserting new lines then no additional costs.
What is a ham sandwich cut? Does it always exist? How to compute it? State and prove the theorem about the existence of a ham sandwich cut in R2 and describe an O(n2) algorithm to compute it and sketch the O(n log n) algorithm by Edelsbrunner and Waupotitsch.
Line splitting two distinct sets at the same time, such that each side of the line has half of each set. Always exists. proof (and O(n^2) algo): Dualize the points. Then consider the median-level line of both (consisits of line segments and all slopes are distinct so they intersect in at least one point) This point corresponds to a line seperating both sets. O(nlogn): recursive algo, input: (L1,L2,k1,k2,(x1,x2)) With two sets of lines, two k-levels and interval. take mu at line with median slope, seperate plane into 4 quarter by line parallel to mu and one line x=j where j ist the median x-coordinate of all intersection points. If j is in the interval, we can update the interval to (x1,j) or (j,x2) and also dircard one quater of the lines, where the intersection points lie in the resp quater (We pair a big slope with a small slope line)
What is the endpoint visibility graph for a set of disjoint line segments in the plane and how can it be constructed? Give the definition and explain the relation to shortest paths. Describe the O(n2) algorithm by Welzl, including a proof of Theorem 9.14.
Given n disjoint line segments, we connect p and q if they are on the same segment or if pq intersect with the whole set is {p,q} (they see each other)
Constructing: Sweep from vertically down to vertically up.We only need to consider directions parallel to some pq . for p store s(p) segment p sees. if slope of pq is parallel to current direction an s(p) =pq add edge pg. If q is obscured by s(p) no change, if q endpoint of s(p) add pq and s(p):=s(q) if q is endpoint of s that now obscures s(p) change s(p) to s and add pq. We have n^2 events and need sorting thus n^2 log n, to get rid of logn: pq has larger slope than pr iff p* intersect q* has greater x coord than p* intersect r*, can be sorted in linear time usng breast first search
Is there a subquadratic algorithm for General Position? Explain the term 3-Sum hard and its implications and give the reduction from 3-Sum to General Position.
No subquadratic algo, it is known, that quadratic time is required for 3-sum problem. General position: No 3 points colinear: Is equivalent to: are there three points such that their sum is 0? : lift all points tp (p,p^3) 3 of them a,a^3 b,b^3 c,c^3 are colinear iff slope through any pair (a,b),(b,c) is the same iff a+b+c=0
Which problems are known to be 3-Sum-hard? List at least three problems (other than 3-Sum) and briefly sketch the corresponding reductions.
colinearity, minimum area triangle (gen. of general position), GeomBase: given points on lines y=0,y=1,y=2 is there a line passing through 3 of them? 3 sum with distinct points
Algo: sort numbers, i=1,..n j=i+1,k=n, j++ if <0 k++ if >0
What is an (n,s) Davenport-Schinzel sequence and how does it relate to the lower envelope of real-valued continuous functions? Give the precise definitions and some examples. Explain in particular how to apply the machinery to line segments.
sequence of alphabet with n elements, such that so s+2 alternating subsequence. every such sequence can be modeled by lower envelope sequence for n continuous functions. If these functions are line segments, we have 0 in the sequence if no segment is defined here.
What is the value of λs(n), for 1 ⩽ s ⩽ 3? Derive the precise value for s ∈ {1, 2} and prove an O(n log n) upper bound for λ3(n).
1: no seqeunce aba (happens as soon as an element appears twice. 2nd 2n-1. 3: ababab: consider element with least appearances a: a...bab...a can not appear_> del as plus at most 2 more and apply indcution
What is the combinatorial complexity of the lower envelope of a set of n lines/parabolas/line segments?
lines can intersect at most once: n^2 changes. paraboles: one containes in another: 2 changes per pair of line. Line segments: endpoints (4) plus intersection =5
What is a face of a polytope? What is a vertex, an edge, a ridge, a facet?
Give precise definitions!
Face of polytope: Polytope intersected with supporting hyperplane (there is a hyperplane s.t. the face is in hyperplane and P in h+) , dim=k: k-face: vertices: o-faces, edges 1-faces facets: n-1-faces, ridges n-2-faces.
Can you characterize vertex-edge graphs of 3-dimensional polytopes? Explain Steinitz’ Theorem.
3 dim polytope iff 3-connected planar graph
What is a hypercube? What is a simplex? Define these polytope and explain what their faces are.
hypercube: -1<=xi<=1. vertices: some 1 some -1. Simplex convex hull of n affinely independent vertices. Faces: lower dimensional hypercubes/simplices
How many k-faces can a d-dimensional polytope with n vertices have? Prove a nontrivial upper bound.
n over k+1, since every face is a polytope itself.
How connected is the graph of a polytope? State and prove Balinski’s theorem.
d dimensional polytope is d connected. prove: fix some set S of size d-1 and fix some v0. Consider hyperplane through S and v0. Then points are either above ans thus connected to max face or below and connected to min face, v0 connects both, max/min faces are polytopes themselves, so by induction connected
How many facets can a 4-dimensional polytope with n vertices have? Prove a lower bound of Ω(n2).
consider 2 skew symmetric lines, perturb points on in slightly, then ever pair of two adjacent points of each line is delaauney and thus facet.
What is a regular triangulation? Give the definition and show that not all triangulations are regular.
Triangulation regular if it can be obtained by projecting the lower convex hull of a lifting of P to r d+1. Non-regular: 2 triangles in each other.
What is the secondary polytope? Describe the construction and explain its connection to the flip graph of regular triangulations.
secondary polytope: convex hull of GKZ vectors of all triangulations. vertices one to one to regular triangulations, edges are flips. so 1-skeleton is flip graph of regulat triangulations. a flip takes a triangulated convex d+2 dim subset of P and replaces it by unique other triangulation.
Let P ⊂ R2 be a set of n points in general position (with the origin).
What does sum_i=0^n−3 2^i h_i count?
number of embracing set (every embr. set contains triangle and points below)
Show that a simplicial d-dimensional polytope P with d + 2 vertices
has always k(d+2−k) facets, for some 2⩽k⩽d.
dualize: polytope in d+2-d-1=1 dimension: line. Then an embracing set (=facet in primal) is a set that contains a point from the left and one from the right of 0. Assume k points on the left. Then d+2-k on the right. k can not be one, sinceotherwise d+1 vertices are on one side and we thus have d+1 facets on d+2 points which is not possible.