DAT600: Algorithm Theory - Greedy Algorithms - Dynamic Programming - Engineering Assignment Help

Download Solution Order New Solution
Internal Code: 1ABGEI

Engineering Assignment Help

Task: 1 Finding the majority  Let E = {e1, e2, ..., en} be a sequence of integers. We say that an integer ei forms a majority in E if it appears more than ceil(n/2) times in E. For instance, the integer 3 is a majority in sequence E = {2, 3, 3, 2, 3, 3}, whereas the sequence E = {6, 3, 2, 7, 3, 1} has no majority. It can be proved that if ei ? ej and E has value em as majority, then sequence E – {ei , ej} also has em as majority. a) Present a greedy algorithm to decide whether E has a majority. b) Explain why we can or can’t use Dynamic programming to solve this problem. Task: 2  Maria is taking her algorithms exam. On the exam paper, the professor has clearly assigned points to each problem; the professor assigns points to the problems depending on the difficulty of the problem. Being a clever student (just like all the students who take Reggie’s famous course on Algorithms), Maria’s opinion of the difficulty of each problem differs from the professor’s. However, as an expert on greedy algorithms, Maria decides to apply a greedy algorithm to assign her own points to the problems; for each problem, she estimates how much time it will take her to solve the problem. Maria’s goal is to maximize the points she will receive given that:
  • {p1, p2, ..., pn} are the number of points assigned by the professor to each of the n problems, where ?pi =100%.
  • {t1, t2, ..., tn} are Maria’s estimates of the time required to do each problem, where ?ti need not be equal to T, T is the total time available for taking the exam, and
  • It is possible to get partial points, if a problem is solved partially.
Describe a greedy algorithm that Maria could use to maximize her points. Task:3 Optimal Base station placement Consider a straight road (a long line segment with an eastern endpoint and a western endpoint) with houses scattered very sparsely along it. We want to place cell phone base stations at certain points along the road, so that every house is within eight kilometers of one of the base stations. Give an efficient algorithm to solve this problem using as few base stations as possible. Task: 4 Finding the largest set Given a set positive real numbers X = {x1 ? x2 ? ...? xn}, there can be many subsets of X of unit-length closed intervals. E.g. if X = {1, 1.25, 1.25, 1.5, 2, 2.5, 2.75, 3, 4, 5, 7.5, 10}, there are five unit-length closed intervals: X1 = {1, 1.25, 1.25, 1.5, 2}, X2 = {1.5, 2, 2.5}, X3 = {2, 2.5, 2.75, 3}, X4 = {3, 4}, and X5 = {4, 5}. In other words, a unit-length closed interval includes xm and all its successors xi such that (xm ? xi ? xm+1). In the above example, the largest unit-length closed interval is X1 as it contains five elements. Using greedy algorithm, determine the largest set of unit-length closed interval; analyze the time complexity.
This DAT600: Algorithm Theory Assignment has been solved by our Engineering experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.