Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

QBUS1040

Tutorial 7

Semester 2, 2022

Exercise 1:  Block matrix notation

Consider the block matrix

A =  lB(I)T 0

 

B

0

0

 

0(0)   BBT 

where B is 10 × 5. What are the dimensions of the five zero matrices and the identity matrix in the definition of A? What are the dimensions of A?

Exercise 2:  Interpolation of rational functions

A rational function of degree two has the form

c1 + c2 t + c3 t2

f(t) =

where c1 ,c2 ,c3 ,d1 ,d2  are coefficients. Consider the interpolation conditions

f(ti ) = yi ,        i = 1, . . . ,K,

where ti  and yi  are given numbers. Express the interpolation conditions as a set of linear equations in the vector of coefficients θ = (c1 ,c2 ,c3 ,d1 ,d2 ), as Aθ = b. Give A and b and their dimensions.

Exercise 3:  Required nutrients

We consider a set of n basic foods (such as rice, beans, apples) and a set of m nutrients or components (such as protein, fat, sugar, vitamin C). Food j has a cost given by cj   (say, in dollars per gram), and contains an amount Nij  of nutrient i (per gram).  (The nutrients are given in some appropriate units, which can depend on the particular nutrient.)  A daily diet is represented by an n-vector d, with di  the daily intake (in grams) of food i. Express the condition that a diet d contains the total nutrient amounts given by the m-vector ndes , and has a total cost B (the budget) as a set of linear equations in the variables d1 , ...,dn .  (The entries of d must be non-negative, but we ignore this issue here.)

Exercise 4:  QR factorization using Gram-Schmidt algorithm:  Code it up!

Perform QR factorization on a random matrix A with Gram-Schmidt algorithm using Python. Verify that QT Q = I and R is upper triangular with positive diagonal entries.  Simulate a larger random matrix A and time your QR factorization.