Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1 . Least Squares and QR Factorization pts ) Bob is a city planner working on building a highway that connects 4 cities. Since

Exercise 1. Least Squares and QR Factorization
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 can 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. (25pts)
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)
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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions