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

QBUS1040

Tutorial 1

Semester 2, 2022

Exercise 1:  Homework submission details

Explore the Gradescope platform and read the submission guidelines on Canvas. Register for Data- Camp using your university email address for Homework 1.

Exercise 2:  Python installation

Please make sure you have the Python Anaconda distribution installed on your machine by the end of this tutorial.

Exercise 3:  Vector equations

For each of the equations below, determine which of the following three options holds: The equation is true; the equation is false; or, the equation contains bad notation or doesn’t make sense.

(a)  「(l)  = (1, 2, 1).

(b)  「(l)  = [1, 2, 1].

(c)  (1, (2, 1)) = ((1, 2), 1).

Exercise 4:  Vector notation

Which of the following expressions uses correct notation?  When the expression does make sense, give its length. In the following a and b are 10-vectors, and c is a 20-vector.

(a) a + b − c3:12 .

(b)  (a,b,c3:13 ).

(c) 2a + c.

(d)  (a,1) + (c1 ,b). (e)  ((a,b),a).        (f)  [a b] + 4c.       (g)  [  ]b(a) + 4c.

Exercise 5:  Vector inner product

Find xT y for the following data:

(a) x = ( − 1.2, 0.0, 3.7, − 7.2), y = (4, 3, 2, 1)

(b) x = (1, 2, 3, . . . , 9), y = (9, 8, 7, . . . , 1)

Exercise 6:  Python timing test

Determine how much time it takes for your computer to compute the inner product of two vectors of length  108   (100 million),  and use this to estimate  (very crudely) how many Gflops/sec your computer can carry out. The following code generates two (random) vectors of length 108 , and times the evaluation of the inner product.  (You might run it a few times; the first time might be a bit slower.)

import  numpy  as  np

import  time

a  =  np .random .rand(10**8)

b  =  np .random .rand(10**8)

start  =  time .time()

c  =  np .inner(a,b)

end  =  time .time()

print(end  -  start)

How long would it take a person to carry this out, assuming the person can carry out a floating point operation every 10 seconds for 8 hours each day?