JuliaLinearAlgebra / MatrixDepot.jl

An Extensible Test Matrix Collection for Julia
http://matrixdepotjl.readthedocs.org/
Other
75 stars 22 forks source link

Request: Rosser's matrix #1

Closed jiahao closed 9 years ago

jiahao commented 9 years ago

Rosser's matrix is a classic challenge problem for eigenvalue algorithms. Would be interesting to provide more general test matrices from a similar construction, see Appendix A of [1] and, e.g., David Gross's blog post on the topic. The most general case would use Sylvester's method for constructing orthogonal matrices [2] to mix up the matrices of interest; however, it may be simpler to forego staying in the integer field and simply apply a random arbitrary rotation matrix Q = qrfact!(randn(n,n))[:Q].

References:

  1. Rosser, Lanczos, Hestenes and Karush, J. Res. Natl. Bur. Stand. 47 (1951), 291-297. archive.org
  2. Sylvester, Phil. Mag. 34 (1867), 461. hathitrust
weijianzhg commented 9 years ago

Thanks Jiahao, that's a great idea. I will implement this matrix very soon.

weijianzhg commented 9 years ago

I have implemented this matrix. The test matrix used in the paper can be generated as

matrixdepot("rosser", 8, 2, 1).

matrixdepot("rosser", n) generate similar test matrices, but n needs to be a power of 2. I used Sylvester's method for constructing orthogonal matrices P. Strictly speaking, P are not orthogonal matrices but matrices have the property P' * P = alpha * eye(n), where alpha is a scalar. For matrixdepot("rosser", n, 2, 1), where n>2, we have P'* P = 10 * eye(n).