Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Due Date: June 6 2 3 : 5 9 , 2 0 2 4 Exercise 1 . Least Squares and QR Factorization ( 1 0
Due Date: June :
Exercise Least Squares and QR Factorization pts
Bob is a city planner working on building a highway that connects 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:
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.
b Use the least squares method to find a road with a single curve that can be built according to the requirement given above. pts
c Calculate the root mean squared error for both roads you have designed in the previous steps.
d Use the classical GramSchmidt method to find the 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 factorization. For the curved road, use the full QR factorization. pts
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started