Random Jacobi Java Applet - Andrew Trusty (gtg877q)
Enter the values you wish to use in the text fields according to their labels. Some working values are used by default.

Selecting the sorting checkbox will toggle sorting in the algorithm on or off and requires Running the Jacobi Algorithm again to see the results as does any change to the Stop Value.

Changes to the Display Precision and Matrix Size will take effect when Generating a new Random Symmetric Matrix.

By selecting an area of the graph with your mouse the graph will zoom in to the selected area, to restore the original view Run the Jacobi Algorithm again.
The JAR archive of the source and class files are available here RandomJacobi.jar, it includes the JAMA Package and the Java 2D Graph Package classes.

The source of the applet alone is available here, RandomJacobi.java, it requires the JAMA Package and the Java 2D Graph Package classes to compile.
Questions & Answers

How does the actual data compare with the theoretical bound?
A. For 5x5 matrices the actual data stays relatively close under the theoretical bound for the first step or two but then progressively descends steeper than the theoretical bound with each step until it has reached the diagnolized form at which point the theoretical bound hovers near where the actual data was in its 4th to 6th step. For each increase in matrix size the actual data hovers longer close to the theoretical bound but eventually always breaks away in a progressively steeper descent.

Q. What happens if you simply do not bother with the sorting step, but just "sweep through" the upper right entries in a systematic fashion?
A. Without the sorting step the resulting data follows closer to the theoretical bound for more of the beginning steps. For some matrices the results even break the theoretical bound going above it for a few steps. The rate of descent of this data is also differs from that of the sorting data in that the non-sorting data is characterized by smooth periods of almost level descent followed by great leaps toward the diagnolized form which repeat until it reaches the diagnolized form whereas the sorting data shows a smooth constantly increasing descent. The non-sorting algorithm also takes more steps to reach the diagnolized form, ranging anywhere from 5-11 extra steps for a given matrix. For larger matrices the effects worsen with much longer periods spent above the theoretical bound.

Q. What do you conclude about the importance of sorting versus its expense?
A. Sorting is an important part of the Jacobi Algorithm that allows it to choose a better step for each iteration than a systematic method. The cost of sorting inside the algorithm is small as in a symmetric matrix only the off-diagnol elements on either the uppper or lower triangular area need to be searched for the largest element which eliminates over half the elements in a given matrix. Sorting keeps the algorithm performing approximately 25% fewer steps than the systematic approach.