- Data Structures & Algorithms
- 112102-112105
- Algorithm
- Design & Analysis of Algorithms Jan 2014
- 1-TimeComplexity
- amortized.pdf
- 0305-Paper-1 (Eng)
- Algo-3.1
- An Efficient Algorithm for 3D Rectangular Box Packing
- Complexité des algorithmes
- dmchap5
- algorithmresearch-131118184139-phpapp02
- AlgorithmAnalysis1.ppt
- 16_SortingSearching.ppt
- TR2005-556
- triangle inequality theorem lesson plan
- solutii_seniori
- 04. on the Computational Power of DNA - Aldo Arturo Reyna Gómez
- ex_8a.pdf
- Lmt Sample Items
- Trac Ng Hiem
- Weekly_Exam3.pdf
- Similar_triangles.pdf
- 73045
- AIMCAT_0912
- opgave
- Geometry for beginners
- TCS Latest Placement Paper Questions With Solutions -2014 (18)
- Ch3
- 4
- arduino-mega-2560-sch.pdf
- sample3_1
- 08malloc
- Gps
- ULTRA LOW JITER CLOCK
- Click PLC Communication
- L9-1
- pc817
- Linux Commands
- mtechbroucher2011
- Reliance Tax Saver _ELSS_ Fund Jan 2011
- C__Xilinx_doc_usenglish_de_libs_d4_16e
- Arduino Guide
- Sri Chanakya Niti Shastra
- Http Ugcnetonline.in ChallanForm
- Doc 2551
- Gps

**As a first step go to the third page and read the section: Advice on how to do
**

the home work.

1. Let S be a set of n points in the plane sorted with respect to their ycoordinate from bottom to top. Give an algorithm that computes the

convex hull of S in O(n) time. Argue its time complexity. [10 points]

2. You are given two x-monotone polygonal chains P and Q. Prove that

the number of times P and Q can intersect is O(n), where n is the total

number of vertices of P and Q, see Figure 1(a). [10 points]

3. Let ` be a line in the plane and let p be a point. The orthogonal projection

of p onto ` is the point q on ` such that the line segment (p, q) is orthogonal

to `, as shown in Fig. 1(b).

(a) Given a convex polygon P and a point q within P prove that q has

an orthogonal projection onto the perimeter of P . [6 points]

(b) What if P is not convex? Prove or disprove the statement. [4 points]

P

p

q

Q

`

(a)

(b)

**Figure 1: (a) Two x-monotone paths P and Q. (b) Illustrating the orthogonal
**

projection q of p onto `.

**4. Let R be a set of n red segments in the plane and let B be a set of m
**

blue segments in the plane. Design an algorithm that counts the number

of intersections between the segments in R and the segments in B. Prove

the running time, space requirement and correctness of your algorithm.

For full points the algorithm should use O((n + m) log(n + m)) time and

O(n + m) space. [10 points]

1

Define the fatness of S to be the largest Euclidean distance between two points in S. [2 points] (b) Consider the edge e connecting the highest point in H1 with the highest point in H2 . Describe an efficient algorithm for determining the fatness of S. Prove the running time. Determine in O(n + m) expected time if there exists a line ` such that all the cats are on one side of ` and all the dogs are on the other side of `. For full points the algorithm should use O((n + m) log(n + m)) time and O(n + m) space. Suppose you are given a set S of n points in the plane. [2 points] (d) Give a correct implementation of step 4. H. Step 4: From H1 and H2 compute the convex hull H of the entire point set. Will the edge e be an edge in H? Prove your answer. Step 1: Sort the points in S by increasing x-coordinate. Step 3: Recursively compute the convex hull of the right half of the point set. The resulting convex hull is denoted H2 . Step 2: Recursively compute the convex hull of the left half of the point set. Design an algorithm that finds the smallest area ∆(s. What is the running time of the algorithm? Prove your time bound. Prove the running time. p) the triangle defined by s as its base and p as its opposite corner. [4 points] 6. For full points the algorithm should use O(n log n) time and O(n) space. space requirement and correctness of your algorithm. Recall that the area of a triangle is 21 × base × height. (a) Assume that step 4 can be implemented in time O(n). of the entire set? Prove your answer. For a segment s ∈ S and a point p ∈ P denote by ∆(s. [10 points] 8. Let S be a set of n vertical segments and let P be a set of m points in the plane.5. Let C be a set of n cats and let D be a set of m dogs modelled as points in the plane. Prove the correctness and the running time of your algorithm. Can any of these points be in the convex hull. that runs in O(n) time. p) for all s ∈ S and p ∈ P . [10 points] 2 . The resulting convex hull is denoted H1 . Prove the time complexity and the correctness of your algorithm. [2 points] (c) Consider the points clockwise along H1 between the highest point of H1 to the lowest point of H1 . space requirement and correctness of your algorithm. [10 points] 7. Consider the following algorithm to compute the convex hull of a set S of n points in the plane.

then you also have to explain your code and your ideas. scientific papers. the algorithms does not have to be given as (pseudo-)code. then we will give you marks only for ”your worst answer”. • When giving answers to questions. and after that you might want to develop and elaborate on details. the internet.. hashing does not guarantee anything in the worst case. • If you do give (pseudo-)code. the more points we can give you. • It might help you (and us) if you briefly describe your general idea. we always would like you to prove/ explain/motivate your answers. Hence... and as it is typical for an algorithms course. 3 . If you give multiple answers. as this indicates how well you understood the question. we cannot give you points for it. we always ask about worst-case analysis. • Unless otherwise stated. • Some of the questions are very easy (with the help of the lecture notes or book). • If you use further resources (books. worst case running times etc. the faster your algorithm.) to formulate your answers. (for example. • When giving an algorithm as an answer. You can use the material presented in the lecture or book (without proving it). If we don’t see/understand your general idea. You do not need to write more than necessary (see comment above).Advice on how to do the home work • Be careful with giving multiple or alternative answers. we are interested in the most efficient algorithms. then add references to your sources. • As done in the lecture. in general).

- Data Structures & AlgorithmsUploaded byDharshana Muthtettugoda
- 112102-112105Uploaded byDevraj Tomar
- AlgorithmUploaded byAstrit Krasniqi
- Design & Analysis of Algorithms Jan 2014Uploaded byPrasad C M
- 1-TimeComplexityUploaded byPravesh Humane
- amortized.pdfUploaded bySubhajit Bhattacharyya
- 0305-Paper-1 (Eng)Uploaded byPuneetKumarRajput
- Algo-3.1Uploaded bykarthik
- An Efficient Algorithm for 3D Rectangular Box PackingUploaded byAli Davut
- Complexité des algorithmesUploaded byb385319
- dmchap5Uploaded byDao Dacullo
- algorithmresearch-131118184139-phpapp02Uploaded bySrinivas Acharya
- AlgorithmAnalysis1.pptUploaded byNuwan Dhanushka
- 16_SortingSearching.pptUploaded bypavan
- TR2005-556Uploaded byambush_143
- triangle inequality theorem lesson planUploaded byapi-219434647
- solutii_senioriUploaded bymacoveilaurentiu
- 04. on the Computational Power of DNA - Aldo Arturo Reyna GómezUploaded byAldo Reyna
- ex_8a.pdfUploaded byRovina Narayan
- Lmt Sample ItemsUploaded byushuaia7745
- Trac Ng HiemUploaded bylinhden07
- Weekly_Exam3.pdfUploaded byKarumon Utsumi
- Similar_triangles.pdfUploaded byChai Usajai Usajai
- 73045Uploaded bykhodaei
- AIMCAT_0912Uploaded byVenkatesh Nenavath
- opgaveUploaded byChristian Alsaybar
- Geometry for beginnersUploaded byGlenPalmer
- TCS Latest Placement Paper Questions With Solutions -2014 (18)Uploaded byVeeraPavanVasireddi
- Ch3Uploaded byapi-3815042
- 4Uploaded byiitforum

- arduino-mega-2560-sch.pdfUploaded byHemesh Jain Surana
- sample3_1Uploaded byHemesh Jain Surana
- 08mallocUploaded byHemesh Jain Surana
- GpsUploaded byHemesh Jain Surana
- ULTRA LOW JITER CLOCKUploaded byHemesh Jain Surana
- Click PLC CommunicationUploaded byHemesh Jain Surana
- L9-1Uploaded byHemesh Jain Surana
- pc817Uploaded byHemesh Jain Surana
- Linux CommandsUploaded byHemesh Jain Surana
- mtechbroucher2011Uploaded byHemesh Jain Surana
- Reliance Tax Saver _ELSS_ Fund Jan 2011Uploaded byHemesh Jain Surana
- C__Xilinx_doc_usenglish_de_libs_d4_16eUploaded byHemesh Jain Surana
- Arduino GuideUploaded byHemesh Jain Surana
- Sri Chanakya Niti ShastraUploaded byHemesh Jain Surana
- Http Ugcnetonline.in ChallanFormUploaded byHemesh Jain Surana
- Doc 2551Uploaded byHemesh Jain Surana
- GpsUploaded byHemesh Jain Surana