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

  Hat is the reason for using the reverse polish convention

Give two different ways of implementing a generic data structure in C++. What is the reason for using the reverse Polish convention for calculators?

  Write a client-server program

Write a client-server program. The server has the following properties: It wait for requests at port 12345. It will create a thread to serve one incoming request

  Testing assignment - research on smart homes

IT355 Software Quality Documentation and Testing Assignment - Research on Smart Homes. Introduction to Smart Homes with at least one citation to academic source

  How will you remove blank lines from a file using grep

How will you remove blank lines from a file using grep and sed? (A blank line may contain either nothing or only whitespace characters.)

  Write a java sorting application with two classes

Your JavaSort Class, as a minimum must contain sorting methods for BubbleSort, InsertionSort, ShellSort, MergeSort, and Quicksort.

  How would you write a piece of code that throws

How would you write a piece of code that throws a RuntimeException with the message "An incorrect parameter was given"?

  What is different between previous generation

Topic: what is different between previous generation (3G mobile network,4G mobile network) Discuss what value add 5G will provide to businesses..

  Display the left justified output on two seven segment

Display the left justified output on two seven segment displays, connected to the PORTC and PORTD of PIC 18.

  Change asynchronous-clear to a synchronous-clear circuit

Change the asynchronous-clear circuit to a synchronous-clear circuit in the register of Figure. The modified register will have a parallel-load capability and a synchronous-clear capability.

  Who is to say what can and cannot be posted on the web

There are concerns about Web content at levels. Parents want to protect their children from pornography. Who is to say what can and cannot be posted on the Web?

  What is a possible downside of making such a choice

The mainframe currently only connects to terminals, but management wants to be able to access it from  desktop. You run a token ring network. The mainframe manufacturer supports Ethernet, but not token ring. maintain an outline of possible solutio..

  How much mathematics is necessary to be a meteorologist

In general, meteorological models are based on the time-dependent equations of what fields? How much mathematics is necessary to be a meteorologist?

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