Answered step by step
Verified Expert Solution
Link Copied!

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 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions