Write in R programming. Given a set of Cartesian coordinates of 20 points (60, 200), (180, 200), (80, 180), (140, 180),
Posted: Sat Nov 27, 2021 2:16 pm
Write in R programming.
Given a set of Cartesian coordinates of 20 points (60,
200), (180, 200), (80, 180), (140, 180), (20, 160), (100, 160),
(200, 160), (140, 140), (40, 120), (100, 120), (180, 100), (60,
80), (120, 80), (180, 60), (20, 40), (100, 40), (200, 40), (20,
20), (60, 20), and (160, 20). Henry is designing a round trip tour
using a greedy rule. Henry needs to start his trip from one point,
and visit the next nearest point, and come back to the starting
point. Whenever there is a tie, Henry needs to break the tie
using a random rule.
Write a R program to help Henry to design
such round trip and report the corresponding distance of the round
trip.
REQUIREMENT:
- Use distance formula equation, ALL POINTS
NEED TO BE USED.
- Write in .r file
Given a set of Cartesian coordinates of 20 points (60,
200), (180, 200), (80, 180), (140, 180), (20, 160), (100, 160),
(200, 160), (140, 140), (40, 120), (100, 120), (180, 100), (60,
80), (120, 80), (180, 60), (20, 40), (100, 40), (200, 40), (20,
20), (60, 20), and (160, 20). Henry is designing a round trip tour
using a greedy rule. Henry needs to start his trip from one point,
and visit the next nearest point, and come back to the starting
point. Whenever there is a tie, Henry needs to break the tie
using a random rule.
Write a R program to help Henry to design
such round trip and report the corresponding distance of the round
trip.
REQUIREMENT:
- Use distance formula equation, ALL POINTS
NEED TO BE USED.
- Write in .r file