{VERSION 3 0 "IBM INTEL LINUX" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }} {SECT 0 {SECT 1 {PARA 3 "" 0 "" {TEXT -1 55 "Computing the Perron Eige nvector of a Reciprocal Matrix" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "with(linalg):\nDigits:=3;\n " }{TEXT -1 471 "For the following reciprocal matrix M, we find the Pe rron eigenvalue and eigenvector V. The procedure is to start with som e vector X = (1,1,. . . ,1) and compute M^kX. If M were consistent, t hen the other n-1 eigenvalues will be zero. Thus, even if M is not ex actly consistent, we anticipate that M^kX ~ lambda^k cV for some cons tant c. Thus, normalizing M^kX we can recover the normalized Perron \+ eigenvector V. Comparing M^\{k+1\} and M^k we can recover lambda. \+ \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 351 "M:=matrix([[1, 5, 3, 7, 6, 6 , 1/3, 1.0/4],\n [1/5, 1, 1/3, 5, 3, 3, 1/5, 1/7],\n \+ [1/3, 3, 1, 6, 3, 4, 1/2, 1/5],\n [1/7, 1/5, 1/6, 1, 1/3, 1/ 4, 1/7, 1/8],\n [1/6, 1/3, 1/3, 3, 1, 1/2, 1/5, 1/6],\n \+ [1/6, 1/3, 1/4, 4, 2, 1, 1/5, 1/6],\n [3, 5, 2, 7, 5, 5, \+ 1, 1/2],\n [4, 7, 5, 8, 6, 6, 2, 1]]); \n" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 48 "Loop to compute MX and then normalize the output" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "MainEigenvect := \+ proc(n)\nlocal i,k,X,Y,Z,sum;\nX:=vector([1,1,1,1,1,1,1,1]);\nY:=evalm (X/8);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 153 "for k from 1 to n\ndo\n \+ X:=evalm(M&*Y):\n sum:=0;\n for i from 1 to 8\n do \n sum := su m+X[i];\n od;\n Y:=evalm(X/sum);\nod;\nRETURN(sum, evalm(Y));\nend; \n" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 19 "Do the computation." }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "MainEigenvect(4);\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "3" 0 } {VIEWOPTS 1 1 0 3 2 1804 }