Is this solution accidentally using Jacobi method instead of....

  • Thread starter Thread starter s3a
  • Start date Start date
  • Tags Tags
    Jacobi Method
Click For Summary
The discussion centers on whether a provided solution is using the Jacobi method instead of the Gauss-Seidel method, as requested. It is established that the Gauss-Seidel method updates variables using the most recent values from the current iteration, while the Jacobi method relies solely on values from the previous iteration. The user believes the solution in the PDF is applying the Jacobi method, as it updates variables based on prior iteration values. However, another participant insists that the second video demonstrates the Gauss-Seidel method, highlighting that it uses updated values. Ultimately, the user seeks confirmation on the method used in the PDF solution.
s3a
Messages
828
Reaction score
8

Homework Statement


The problem is attached.

Homework Equations


Isolating each x_i.

The Attempt at a Solution


I watched this video for the Jacobi method.:


I also watched this video for the Gauss-Seidel method.:


At least based on the videos mentioned above, it seems that the difference between the Gauss-Seidel method and the Jacobi method is that the Gauss-Seidel method always computes the the latest x_i, by using already-computed values from the current iteration, if available, unlike the Jacobi method which seems to just use values from the previous iteration, even if values from the current iteration are available.

So, am I correct in thinking that the solution is using the Jacobi method, despite the question asking for the Gauss-Seidel method to be used?

Any input would be greatly appreciated!
 

Attachments

Physics news on Phys.org
s3a said:

Homework Statement


The problem is attached.

Homework Equations


Isolating each x_i.

The Attempt at a Solution


I watched this video for the Jacobi method.:


I also watched this video for the Gauss-Seidel method.:


At least based on the videos mentioned above, it seems that the difference between the Gauss-Seidel method and the Jacobi method is that the Gauss-Seidel method always computes the the latest x_i, by using already-computed values from the current iteration, if available, unlike the Jacobi method which seems to just use values from the previous iteration, even if values from the current iteration are available.

So, am I correct in thinking that the solution is using the Jacobi method, despite the question asking for the Gauss-Seidel method to be used?

Any input would be greatly appreciated!


I will not watch the videos, but judging from the first frame in the second video, it is using Gauss-Seidel, not Jacobi. You can tell that by looking at the calculation of the updated ##x_2##, which does use the newly-updated value of ##x_1##, not the old value of ##x_1##. I don't know what the first video is doing, because I refuse to watch it. (The standard PF policy is for you to type everything out, not to upload videos, etc, although sometimes you may find a helper who is willing to look at updated material---diagrams excepted, of course.)
 
Sorry; it's just that viewing uploaded PDFs is not something I see as inconvenient, so I tend to forget that not everyone feels the same.

Also, the videos were uploaded as background information; I wasn't expecting anyone to watch them in full (unless desired).

It looks better in the PDF file, but here's the problem statement and its solution, typed out.:
Problem statement:
Carry out the first three iterations of the solution of the following system of equations using the GaussSeidel iterative method. For the first guess of the solution, take the value of all the unknowns to be zero.
##8 x_1 + 2x_2 + 3x_3 = 51##
##2x_1 + 5x_2 + x_3 = 23##
##-3x_1 + x_2 + 6x_3 = 20##

Solution:
The essence of the Gauss-Seidel iterative method is given by x_1 = 1/a_(ii) [b_i - SIGMA j = 1, j != 1 to j = n of a_(ij) x_j], i = 1, 2, . . ., n

First Iteration:
Starting with [x_1^(0) x_2^(0) x_3^(0) = [0 0 0], x_1^(1) = [51 - 2(0) - 3(0)]/8 = 6.375, x_2^(1) = [23 - 2(0) - 0]/5 = 4.6, and x_3^(1) = [20 + 3(0) - 0]/6 = 3.3333.

Second Iteration:
x_1^(0) = [51 - 2(4.6) - 3(3.3333)]/8 = 3.9750, x_2^(2) = [23 - 2(6.375) - 3.3333]/5 = 6.9167, and x_3^(2 -- in the PDF this is a 1, instead of a 2, but I think that it's a mistake) = [20 + 3(6.375) - 4.6]/6 = 5.7542.

Third Iteration:
x_1^(3) = [51 - 2(6.9167) - 3(5.7542)]/8 = 2.488, x_2^(3-- in the PDF this is a 2, instead of a 3, but I think that it's a mistake) = [23 - 2(3.9750) - 5.7542]/5 = 1.8592, and x_3^(3 -- in the PDF this is a 1, instead of a 3, but I think that it's a mistake) = [20 + 3(3.9750) - 6.9167]/6 = 4.1681.

So, am I correct in thinking that the solution of the problem statement in the PDF (not a problem from a video -- the videos were just background information) is using the Jacobi method, despite the question asking for the Gauss-Seidel method to be used?
 
s3a said:
Sorry; it's just that viewing uploaded PDFs is not something I see as inconvenient, so I tend to forget that not everyone feels the same.

Also, the videos were uploaded as background information; I wasn't expecting anyone to watch them in full (unless desired).

It looks better in the PDF file, but here's the problem statement and its solution, typed out.:
Problem statement:
Carry out the first three iterations of the solution of the following system of equations using the GaussSeidel iterative method. For the first guess of the solution, take the value of all the unknowns to be zero.
##8 x_1 + 2x_2 + 3x_3 = 51##
##2x_1 + 5x_2 + x_3 = 23##
##-3x_1 + x_2 + 6x_3 = 20##

Solution:
The essence of the Gauss-Seidel iterative method is given by x_1 = 1/a_(ii) [b_i - SIGMA j = 1, j != 1 to j = n of a_(ij) x_j], i = 1, 2, . . ., n

First Iteration:
Starting with [x_1^(0) x_2^(0) x_3^(0) = [0 0 0], x_1^(1) = [51 - 2(0) - 3(0)]/8 = 6.375, x_2^(1) = [23 - 2(0) - 0]/5 = 4.6, and x_3^(1) = [20 + 3(0) - 0]/6 = 3.3333.

Second Iteration:
x_1^(0) = [51 - 2(4.6) - 3(3.3333)]/8 = 3.9750, x_2^(2) = [23 - 2(6.375) - 3.3333]/5 = 6.9167, and x_3^(2 -- in the PDF this is a 1, instead of a 2, but I think that it's a mistake) = [20 + 3(6.375) - 4.6]/6 = 5.7542.

Third Iteration:
x_1^(3) = [51 - 2(6.9167) - 3(5.7542)]/8 = 2.488, x_2^(3-- in the PDF this is a 2, instead of a 3, but I think that it's a mistake) = [23 - 2(3.9750) - 5.7542]/5 = 1.8592, and x_3^(3 -- in the PDF this is a 1, instead of a 3, but I think that it's a mistake) = [20 + 3(3.9750) - 6.9167]/6 = 4.1681.

So, am I correct in thinking that the solution of the problem statement in the PDF (not a problem from a video -- the videos were just background information) is using the Jacobi method, despite the question asking for the Gauss-Seidel method to be used?

If that is what he/she does in the first video then yes, indeed, that is the Jacobi method.

However, as I stated clearly already, the second video looks to me like it really is using the Gauss-Seidel method, exactly as advertised. Go back and read my previous response for the reasons. Perhaps the terminology "first frame in the second video" confused you. I meant the second video, but only the beginning picture that appears on the screen almost as an icon. It can be seen without watching the video, but later frames require watching it.
 
  • Like
Likes s3a
Actually, I understood what you had said about the video; I just wanted to be sure that I wasn't overlooking something in the PDF, while thinking that I understood something I haven't understood (and if I was, it'd be a learning opportunity).

Anyways, thanks for confirming that I was right about the PDF accidentally using the Jacobi method instead of the Gauss-Seidel method. :)
 
s3a said:
Actually, I understood what you had said about the video; I just wanted to be sure that I wasn't overlooking something in the PDF, while thinking that I understood something I haven't understood (and if I was, it'd be a learning opportunity).

Anyways, thanks for confirming that I was right about the PDF accidentally using the Jacobi method instead of the Gauss-Seidel method. :)

No, I never said that; you are mis-quoting me! The second video shows the Gauss-Seidel method. I suspect that the first video shows the Jacobi method, if indeed what you wrote before came from the first video.

Let me repeat it one more (and very last) time: the second video shows that he/she is updating the value of ##x_2## by using the already-updated value of ##x_1##. That is how Gauss-Seidel works. It is not what we do in Jacobi.
 
The problem statement and solution I typed is not from any of the two videos; it's from the PDF file. Basically, completely ignore the videos; imagine that I hadn't even mentioned them in this thread.

So, the PDF file's solution is using the Jacobi method, instead of the Gauss-Seidel method, right?
 
s3a said:
The problem statement and solution I typed is not from any of the two videos; it's from the PDF file. Basically, completely ignore the videos; imagine that I hadn't even mentioned them in this thread.

So, the PDF file's solution is using the Jacobi method, instead of the Gauss-Seidel method, right?
You tell me. Is it doing "Jacobi" updating, or "Gauss-Seidel" updating?
 
I believe it's doing Jacobi updating, because, for example, ##x_3## of the current iteration is using the values ##x_1## and ##x_2## of the previous iteration, rather than the ones just-recently computed in the same/current iteration.

So, I'm correct, right?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
5K
Replies
5
Views
6K
Replies
1
Views
2K
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K