subject

Suppose you are given two coordinates in n-dimensional space, p = (p1, p2, pn), and q = (q1, q2, qn). the golden distance d between p, and q is defined as d(p, q) = pn i=1(pi −qi) 4 . let pσ be formed by permuting the elements of p, and let qπ be formed by permuting the elements of q. for example, if p = (1, 2, 3) and q = (1, 3, 5), then one possible way to form the permutations could be pσ = (2, 1, 3) and qπ = (5, 3, 1). the golden distance, d(pσ , qπ ), of these two points would be (2 − 5)4 + (1 − 3)4 + (3 − 1)4 = 113. (a) design a greedy algorithm that chooses the permutations for pσ and qπ that maximizes their golden distance, d(pσ , qπ ). analyze the time complexity of your algorithm. (b) prove the correctness of your algorithm. (hint: you may use the following fact without proof (d − a) 4 + (c − b) 4 ≥ (b − a) 4 + (d − c) 4 for any numbers a, b, c, d such that a ≤ c

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:20, kimmmmmmy333
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
image
Computers and Technology, 23.06.2019 00:10, witerose701
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
image
Computers and Technology, 23.06.2019 04:31, Remba
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, sawyerfauver
The computers in the sales department did not have enough data storage capacity to contain all the information the department needed to store, and it was taking a long time for team members to access the data they needed. to fix the problem, the technician installed new, larger hard drives on all the computers.
Answers: 1
You know the right answer?
Suppose you are given two coordinates in n-dimensional space, p = (p1, p2, pn), and q = (q1, q2, q...

Questions in other subjects: