Question: Must be written in 'C' using pthreads!!! For this lab, you will write a pthreads program that will do the modified Gaussian elimination discussed in
Must be written in 'C' using pthreads!!! For this lab, you will write a pthreads program that will do the modified Gaussian elimination discussed in class to solve a system of equations. The threads should each do a column of the coefficient matrix each time through the algorithm (except one should do the B array, unless you make the B array part of the coefficient matrix, of course). Main should determine the divisor for the ith row for round i of the algorithm. Main should also determine the multipliers for every row for round i. This means all threads should wait for main to determine the divisor for row i and the multipliers for the other rows before they calculate the new values for their column. Main should then wait for all threads to finish calculations before determining the new divisor and multipliers. NOTE: While threads need to wait for main, and main needs to wait for the threads, the threads should not be waiting on each other to do their job. NOTE 2: The program should only create threads one time. NOTE 3: No bigger than 10 equations and 10 unknowns. And I will assure you that there will be a solution. Sample run (I have the program output in regular font and the user input in bold italic font so you can tell which is which. Your program, of course, cannot do that): input the number of items 3 input the A array 2 -3 1 7 9 -3 6 7 2 input the B array -22 14 91 The X values are: -4.000000 11.000000 19.000000
example of gaussian elimination
To perform row reduction on a matrix, one uses a sequence of elementary row operations to modify the matrix until the lower left-hand corner of the matrix is filled with zeros, as much as possible. There are three types of elementary row operations: 1) Swapping two rows,
2) Multiplying a row by a non-zero number,
3) Adding a multiple of one row to another row. Using these operations, a matrix can always be transformed into an upper triangular matrix, and in fact one that is in row echelon form. Once all of the leading coefficients (the left-most non-zero entry in each row) are 1, and every column containing a leading coefficient has zeros elsewhere, the matrix is said to be in reduced row echelon form.
This final form is unique; in other words, it is independent of the sequence of row operations used. For example, in the following sequence of row operations (where multiple elementary operations might be done at each step), the third and fourth matrices are the ones in row echelon form, and the final matrix is the unique reduced row echelon form.

-2 -3 311 535 340 210 010 100 980 120 320 100 988 122 322 100 915 115 311 113
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
