+61-413 786 465

info@mywordsolution.com

## Programming

 C/C++ Java DOT NET Python Assembly C Sharp Perl COBOL Visual Basic CAD/CAM Object Oriented Programming Asp.NET PHP JSP Shell Scripting Java Script Ajax CSS/HTML Joomla Wordpress Megento Photoshop DBMS PL-SQL Oracle MS-SQL MS-ACCESS My-SQL SYBASE FOXPRO Excel Programming Language Mobile Applications

problem1)

prepare a C function to solve the system of linear equations A x = y where A is an N by N matrix in the format of pointer-to-pointers and y is a vector in the format of a pointer. The function should return a pointer to the answer vector x . Your function should have the prototype:
double *Gaussian(double **,double *, int).
The function should implement the Gaussian Elimination Algorithm with Partial Pivoting.
Test your function on the system: problem2)

Amend your Gaussian elimination function to solve for multiple right hand sides (Simultaneous systems of equations). The prototype should be
double **GaussianS(double **,double **,int,int)
where the fourth argument is the number of right hand side vectors. What is x ?

problem3) prepare a C function with prototype: double **Inverse(double **,int) to find the inverse of a matrix. Find the inverse of matrix A.

problem4)

Speed in scientific computing is measured in megaflops, gigaflops, teraflops and petaflops. A megaflop is 106 floating point arithmetic operations (+, -, *, /) in one second What are a gigaflop, a teraflop and a petaflop? To determine the real megaflop rate of a given algorithm on a given computer you must first determine theoretically the total number of Floating point arithmetic operations the algorithm takes and then divide that by 106 times the total time taken to run the algorithm. Determine the speed of your matrix inverse function by timing how long it takes to invert a random matrix (you should use the function given in lecture to generate a random square matrix) of size N, where N takes the integer values:
i. 2 < =N < =50, (~50 values)
ii. N = {55, 60, 65, … 200} (~30 values in increments of 5)
iii. N = {225, 250, 275, … 1000} (~30 value in increments of 25)
iv. N = {1200, 1400, …,2000} (~10 values in increments of 200)
Plot Megaflops vs. ln2(N). {You may use Excel, Maple or any plotting package.}

problem5)

Loop order, the exact form of the pointer and index arithmetic and the compiler and option flags set at compile time all can influence the speed of that a code runs. Experiment with improving your code’s running speed for the N=1000 Matrix Inverse case by trying variations of these. Rerun all of the cases from Section 4 using your new faster code. Insert OpenMP #pragma instructions. By what factor is your ‘best’ code faster than the ‘naive’ code your first wrote? The Intel MKL Library contains special routines to do common Numerical Linear Algebra tasks. It implements a Library called LAPACK efficiently. If you use the appropriate Intel MKL Lapack routines, how much does this speed up your code?
Time your fastest possible matrix inverse function. If you know that the right hand side of a set of simultaneous equations take the form of an identity matrix, what steps can to take to exploit this fact to reduce the total number of operations you must perform to find out the matrix inverse. Can you quantify the savings for a general N by N Inverse. Can you see these savings in reduced execution times? Produce timings for the set of matrix sizes used in Sections 4 above. Plot the results for running your fastest matrix inverter on one of the PCs in rooms 414 & 410 on one graph. If you have access to any other computer, include the speed curves for those machines on your graph as well. Can you describe the shapes of the curve?

problem6) The real discrete cosine transform (DCT) represents the data xi at N+1 discrete points as the sum of N+1 cosine functions of amplitude yj: This relation may be thought of as a matrix linear equation: CN y’ = x , where x and y’ are vectors of size N+1 such that x = [ x0, x1, …,xN-1 , xN ] and y’ = [ ½ y0, y1,… ,yN-1 ,½ yN ], (or x = CN’ y ) {Note the notational convention to distinguish normal vectors x and vectors with their first and last entries halved: y’ } and CN is an N+1 by N+1 matrix whose i+1, j+1 th element is cos(ijπ/N). CN’ has entries of ½ down its first column and entries of (½ , -½, ½, -½, ….) down its last column. Solve the linear system CN’ y = x , when x = (0, 1, 2, 3, 4, 5, … , N) for N = 64, 256 & 1024. Not counting the time it takes to generate the CN’ matrix, how long does your code take for each of these three systems? How accurate are your answers?

Programming Language, Programming

• Category:- Programming Language
• Reference No.:- M9354

Have any Question?

## Related Questions in Programming Language

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

### Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

### Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

### Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

### Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

### Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

### Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

### Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

### 1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

• 13,132 Experts

## Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

### Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

### Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

### Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of \$ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

### Compute the present value of an 1150 payment made in ten

Compute the present value of an \$1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

### Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of \$ 699 per year for 19 years, given a discount rate of 6 percent per annum. As