DSECL-ZC416 – Mathematical Foundations for Data Science

Assignment Task

Answer all the questions

Q1) Implementing Gaussian Elimination Method

(i) Find the approximate time your computer takes for a single addition by adding first 106 positive integers using a for loop and dividing the time taken by 106. Similarly find the approximate time taken for a single multiplication and division. Report the result obtained in the form of a table.

(ii) Write a function to implement Gauss elimination with and without pivoting. Also write the code to count the number of additions, multiplications and divisions performed during Gaussian elimination. Ensure that the Gauss elimination performs 5S arithmetic which necessitates 5S arithmetic rounding for every addition, multiplication and division performed in the algorithm. If this is not implemented correctly, the rest of the answers will be considered invalid. Note that this is not same as simple 5 digit rounding at the end of the computation. Do not hardwire 5S arithmetic in the code and use dS instead. The code can then be run with various values of d.

(iii) Generate random matrices of size n × n where n = 100, 200, . . . , 1000.

Also generate a random b ? Rn for each case. Each number must be of the form m.dddd (Example : 4.5444) which means it has 5 Significant digits in total.

(iv) Perform Gaussian Elimination with and without pivoting for each of the 10 cases above. Report the number of additions, divisions and multiplications for each case in the form of a table. No need to write matrices.

(v) Using the time calculated in the first step and using the theoretical operation count (total time for an operation = number of operations × time for one operation), generate the approximate time taken for Gaussian elimination with and without pivoting for the 10 cases. Present this data in a tabular form. Assuming T1(n) is the time calculated for an n×n matrix, plot a graphs of log(T1(n)) vs log(n) and fit a straight line to the observed curve and report the slope of the lines.

Q2) Implementing Gauss Seidel and Gauss Jacobi Methods

(i) Write a function to check whether a given square matrix is diagonally dominant or not. If not, the function should indicate if the matrix can be made diagonally dominant by interchanging the rows?

(ii) Write a function to generate Gauss Seidel iteration for a given square matrix. The function should also return the values of 1, ? and Frobenius norms of the iteration matrix. Generate a random 4 × 4 matrix.

Report the iteration matrix and its norm values returned by the function along with the input matrix.

(iii) Repeat part (ii) for the Gauss Jacobi iteration.

(iv) Write a function that perform Gauss Seidel iterations. Generate a random 4 × 4 matrix A and a suitable random vector b ? R4 and report the results of passing this matrix to the functions written above.

Write down the first ten iterates of Gauss Seidel algorithm. Does it converge? Generate a plot of ?xk+1 ? xk?2 for the first 100 iterations.

Take a screenshot and paste it in the assignment document.

(v) Repeat part (iv) for the Gauss Jacobi method.

This DSECL-ZC416 – IT Assignment has been solved by our IT experts at Schooling Best. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

GET HELP WITH YOUR HOMEWORK PAPERS @ 25% OFF

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Write My Paper Button

WeCreativez WhatsApp Support
We are here to answer your questions. Ask us anything!
👋 Hi, how can I help?
Scroll to Top