Question: Due Date: June 6 2 3 : 5 9 , 2 0 2 4 Exercise 1 . Least Squares and QR Factorization ( 1 0

Due Date: June 623:59,2024
Exercise 1. Least Squares and QR Factorization (100 pts)
Bob is a city planner working on building a highway that connects 4 cities. Since there are no empty spaces between buildings in each city, the highway should not go through the cities. Instead, it should pass near the cities as much as possible. The coordinates of the cities are given as follows: (-2,3),(0,1),(3,0),(5,2)
You are expected to implement the codes of the following questions in Python. You should show each question's calculations using the numpy library. The matrices, equation calculations, and all of the important numerical values should be clearly demonstrated in the code and printed. Remember to plot all four roads you have designed separately. Those of you who do not comply with these requirements will not be able to get full points. You should absolutely show each step you have performed in your code.
a. Use the least squares method to find a straight road that ean be built according to the requirement given above. (20pts)
b. Use the least squares method to find a road with a single curve that can be built according to the requirement given above. (25 pts)
c. Calculate the root mean squared error for both roads you have designed in the previous steps. (20pts)
d. Use the classical Gram-Schmidt method to find the QR factorization so that we can improve the design of these roads in such a way that the roads become even closer to the cities. For the straight road, use reduced QR factorization. For the curved road, use the full QR factorization. (35 pts)
1
 Due Date: June 623:59,2024 Exercise 1. Least Squares and QR Factorization

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!