Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want these code to converted in PYTHON. it just a conversion don't make an excuse 1 question policy if u don't want to answer

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

I want these code to converted in PYTHON. it just a conversion don't make an excuse 1 question policy if u don't want to answer please leave my question will refunded.

Question 24: Write a C++ program to solve the following linear system using the Doolittle's method. For simplification, specify the linear system within the program. 1.7x1 + 2.3x2 1.5x3 2.35 1.1x1 + 1.6x2 1.9x3 -0.94 2.7% 2.2x2 + 1.5x3 2.70 #include using namespace std; #define n 3 int main() { char quit ; int i, j,s; double a[n][n] = {{1.7, 2.3, -1.5}, {1.1, 1.6, -1.9}, {2.7, -2.2, 1.5}}; double b[n] = {2.35, -0.94, 2.7}; // right-hand side constant vector double x[n]; double u[n][n], [n][n],y[n], sum ; - // 11 Processing Section // Formation of L and U as factors of A, i.e., A=LU for(i=0;i=0; i--) { sum = 0.0 for(j=i+1; j> quit; return 0; Remark: Replace the lines 9 and 10 in the solution of Question 24 with the following code segment to receive che linear system at the execution time (instead of fixing in the code). 1/-- Input Section cout> a[i]; cout> b[i]: Question 27: Write a C++ program to solve the following linear system using the Crout's method. For simplification, specify the linear system within the program, 1.7%. + 2.3x 1.5x, = 2.35 1.1x, + 1.6%; 1.9x, = -0.94 2.7%, 2.2%, + 1.5x, = 2.70 #include using namespace std; #define n 3 // number of unknowns int main() { char quit; int i, j,s double a[n][n] = {{1.7, 2.3, -1.5), (1.1, 1.6, -1.9}, {2.7, -2.2, 1.5}} ; double b[n) - {2.35, -0.94, 2.7); // right hand side constant vector double x[n]; double u[n][n], [n][n], [n], sum Processing Section // Formation of Land U as factors of A, i.e., A=LU for(i=0;i=0; i--) { sum = 0.0 ; for(j=i+1; j> quit; return 0; } Remark: Replace the lines 9 and 10 in the solution of Question 27 with the following code segment to receive the linear system at the execution time (instead of fixing in the code). Input Section cout> a[0]: cout> b[i]; Problem 14. solve the following linear system AX - using the Cholesky's method. 1.7%, - 1.1%, + 2.7x2 - 7.39 -1.1x+ 1.6X3 1.9x3 - -3.36 2.7*. - 1.94, + 4.5x; - 12.03 The required solution vector is given by, x-(1.0999, 2.1, 2.9) Question 30: Write a C++ program to solve the following positive definite linear system using the Cholesky's method. For simplification, specify the linear system within the program. 1.7*: - -1.1% + 2.7%. - 1.14 + 2.7x3 - 1.6x, - 1.9x2 - -3.36 1.94, + 4.5x, - 12.03 #include #include using namespace std; #definen 3 Il number of unknowns Int main() 1 char quit Int!..k double an] - ((1.7.-1.1, 2.7).(-1.1, 1.6 -1.93. (2.7.-1.9.4.53 double b[n) - 17.39, -3.36, 12.03); // right hand side constant vector double xn! double nin). Yn). sum: //--................... Processing Section - // Formation of Land U as factors of A. I... A-LU for ( 0;len; I++ ) for (1-0:1++) 100] -0.0: COTO) - sart atoo)): for (1-1::-) 010) -as)[0]/ICO): for(i=1;i // Forward substitution phase for solving LY-B ( - )) YO) - b[0] / 0) for (-1; In: I++ ) { sum - 0.0 ; for (1-0-1-1; ++) sum-sum + 100 Yll: y[I] - ( i] - sum ) / ION : } // Back Substitution Phase for solving LT X=Y (* = [y: - Eyes: 1,2]) x[n-1] = y[n-1] /[[n-1][n-1]; for(i=n-2; i>=0; i--) { sum = 0.0 ; for(j=i+1; j> quit: return 0; } Question 24: Write a C++ program to solve the following linear system using the Doolittle's method. For simplification, specify the linear system within the program. 1.7x1 + 2.3x2 1.5x3 2.35 1.1x1 + 1.6x2 1.9x3 -0.94 2.7% 2.2x2 + 1.5x3 2.70 #include using namespace std; #define n 3 int main() { char quit ; int i, j,s; double a[n][n] = {{1.7, 2.3, -1.5}, {1.1, 1.6, -1.9}, {2.7, -2.2, 1.5}}; double b[n] = {2.35, -0.94, 2.7}; // right-hand side constant vector double x[n]; double u[n][n], [n][n],y[n], sum ; - // 11 Processing Section // Formation of L and U as factors of A, i.e., A=LU for(i=0;i=0; i--) { sum = 0.0 for(j=i+1; j> quit; return 0; Remark: Replace the lines 9 and 10 in the solution of Question 24 with the following code segment to receive che linear system at the execution time (instead of fixing in the code). 1/-- Input Section cout> a[i]; cout> b[i]: Question 27: Write a C++ program to solve the following linear system using the Crout's method. For simplification, specify the linear system within the program, 1.7%. + 2.3x 1.5x, = 2.35 1.1x, + 1.6%; 1.9x, = -0.94 2.7%, 2.2%, + 1.5x, = 2.70 #include using namespace std; #define n 3 // number of unknowns int main() { char quit; int i, j,s double a[n][n] = {{1.7, 2.3, -1.5), (1.1, 1.6, -1.9}, {2.7, -2.2, 1.5}} ; double b[n) - {2.35, -0.94, 2.7); // right hand side constant vector double x[n]; double u[n][n], [n][n], [n], sum Processing Section // Formation of Land U as factors of A, i.e., A=LU for(i=0;i=0; i--) { sum = 0.0 ; for(j=i+1; j> quit; return 0; } Remark: Replace the lines 9 and 10 in the solution of Question 27 with the following code segment to receive the linear system at the execution time (instead of fixing in the code). Input Section cout> a[0]: cout> b[i]; Problem 14. solve the following linear system AX - using the Cholesky's method. 1.7%, - 1.1%, + 2.7x2 - 7.39 -1.1x+ 1.6X3 1.9x3 - -3.36 2.7*. - 1.94, + 4.5x; - 12.03 The required solution vector is given by, x-(1.0999, 2.1, 2.9) Question 30: Write a C++ program to solve the following positive definite linear system using the Cholesky's method. For simplification, specify the linear system within the program. 1.7*: - -1.1% + 2.7%. - 1.14 + 2.7x3 - 1.6x, - 1.9x2 - -3.36 1.94, + 4.5x, - 12.03 #include #include using namespace std; #definen 3 Il number of unknowns Int main() 1 char quit Int!..k double an] - ((1.7.-1.1, 2.7).(-1.1, 1.6 -1.93. (2.7.-1.9.4.53 double b[n) - 17.39, -3.36, 12.03); // right hand side constant vector double xn! double nin). Yn). sum: //--................... Processing Section - // Formation of Land U as factors of A. I... A-LU for ( 0;len; I++ ) for (1-0:1++) 100] -0.0: COTO) - sart atoo)): for (1-1::-) 010) -as)[0]/ICO): for(i=1;i // Forward substitution phase for solving LY-B ( - )) YO) - b[0] / 0) for (-1; In: I++ ) { sum - 0.0 ; for (1-0-1-1; ++) sum-sum + 100 Yll: y[I] - ( i] - sum ) / ION : } // Back Substitution Phase for solving LT X=Y (* = [y: - Eyes: 1,2]) x[n-1] = y[n-1] /[[n-1][n-1]; for(i=n-2; i>=0; i--) { sum = 0.0 ; for(j=i+1; j> quit: return 0; }<><><><><><><><><><><><>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago