How many diagonals does p contain in total

Assignment Help Computer Engineering
Reference no: EM133217287

Question: A convex polygon is a polygon where every interior angle is less than 180 degrees. A museum is in the shape of a convex polygon with n vertices. The museum is patrolled by guards. The Directory of Security at the museum has the following rules to ensure the most safety in as time-economical a way as possible:

(a) Each guard traverses a path in the shape of a triangle; each vertex of such a triangle must a vertex of the polygon.

(b) A guard can survey all the points inside his or her triangle and only these points; we say that these points are covered by the guard.

(c) Every point inside the museum must be covered by some guard.

(d) The triangles traversed by any pair of guards do not overlap in their interiors, although they may share a common edge

Each guard can be specified by the triangle he/she patrols. We call a set of triangles that satisfy these rules legal. Above are four figures that illustrate the problem. The museum is the polygon ABCDEFG. Each coloured (shaded) triangle corresponds to a guard and the guard will traverse the perimeter of his or her triangle.

• The top two figures show a set of triangles that are legal, since they satisfy the constraints laid down by the Directory of Security. In the top left figure, the guards traverse the boundaries of triangles AFG (blue), ABF (green), BEF (pale red), BDE (light red), and BCD (brown). In the top right figure, the guards traverse ABG (blue), BCG (green), CDG (brown), DFG (light red), and DEF (pale red).

• The bottom two figures show a set of triangles that do not satisfy these constraints: in the figure on the bottom left, part of the museum is not covered by any guard (the unshaded triangle BEF) while in the figure on the bottom right, the pink triangle (AEF) and the green triangle (BEF) intersect (not that the part of the green triangle in the image is covered by the pink triangle). Given these constraints, the cost incurred by a guard is the length of the perimeter of the triangle the guard traverses. The total cost of a set of triangles is the sum of the length of their perimeters. Our goal is to find a legal set of triangles such that the total cost of the triangles is as small as possible. Given the x- and y-coordinates of the vertices of the art gallery and the ordering of these vertices along the boundary of the art gallery, devise an algorithm whose running time is polynomial in n to solve this problem. Note that we are not trying to minimise the number of guards; we want to minimise the total lengths of the routes patrolled by the guards. You may assume that the length of any line segment is the Euclidean distance between the end-points of the line segment and that this length can be computed in constant time. Since this problem is quite difficult, let us split up into two more digestible pieces. Let the museum be a convex polygon P with n vertices p0, p1, . . . pn-1 ordered consecutively in counter-clockwise order

around P. Except for pn-1p0, which is an edge of the polygon, a line segment pipj is a diagonal if pi and pj are not adjacent vertices, i.e., |i - j| 6= 1. Since P is convex, every point of a diagonal (other than its end-points) lies in the interior of p. Clearly, in any legal set of triangles, every triangle edge is either an edge of P or a diagonal of P. For each of the questions below, you must provide a proof for your answer. Some of the proofs may be short, especially for parts (i) and (iii).

(i) How many diagonals does P contain in total?

(ii) How many diagonals does any legal set of triangles contain?

(iii) Given a legal set of triangles, express the total cost of these triangles in terms of the perimeter of P and the lengths of those edges of the triangles that are diagonals of P.

(iv) To start formulating the dynamic programming recursion, consider the edge p0pn-1. This edge must be part of some triangle T in the optimal solution. Think about where the third vertex in T can be. Since the optimal solution contains a legal set of triangles, the edges of the other triangles in the optimal solution cannot intersect the edges of T. Use this fact to derive a recursion to compute the optimal solution. State and prove the running time of the resulting algorithm.

Reference no: EM133217287

Questions Cloud

Identify which fields from your facts : Identify which fields from your facts/dimensions are required to answer each of the business questions listed above - giving a brief justification for choosing
Produce an er model for the given scenario : Produce an ER Model for the following scenario (presented in Step 1 below) and business need, for the Pythagoras Math Academy. Reference the attached video
Draw an access control matrix : DSCI 519 University of Southern California - Draw an access control matrix that encodes the BLP rules for the given access classes.
Describe how blockchain technology makes your application : Describe how blockchain technology makes your application possible and more valuable than existing offerings. c. Describe what value your blockchain app provide
How many diagonals does p contain in total : How many diagonals does P contain in total - express the total cost of these triangles in terms of the perimeter of P and the lengths of those edges
What about the various annotations that could be used : What about the various annotations that could be used? Thoroughly explain all of the annotations, color, composition, and other various components
Report to a potential investor : As an aspiring international marketer, you decided to explore the possibility of exporting gold bullion (Maple Leafs) from Canada to India. You will research th
How a company leadership can change dynamics of corporations : Zappos is a study of corporate culture and how a company's Leadership can change the dynamics of a corporations.
Determine the appropriate fixes by testing your hypotheses : IT 202 Southern New Hampshire University, Determine the appropriate fixes by testing your hypotheses. You will also want to account for possible ramifications

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd