{VERSION 6 0 "SUN SPARC SOLARIS" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {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 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 " " 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "Restart;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%(RestartG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}{PARA 7 "" 1 "" {TEXT -1 80 "Warning , the protected names norm and trace have been redefined and unprotect ed\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "F\366r in m\366nstermatri sens radantal, M, och kolumnantal, N." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "M:=6 \n;\nN:=6;\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# >%\"MG\"\"'" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"NG\"\"'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "F\366r in m\366nstermatrisens levande ce ller som ettor och resten som nollor. Ettorna m\345ste omges av en ram med enbart nollor." }}{PARA 0 "" 0 "" {TEXT -1 117 "Andra g\345ngen d etta segment exekveras (och i forts\344ttningen) flyttas bortkommenter ingstecknet till satsen A:=linalg..." }}{PARA 0 "" 0 "" {TEXT -1 97 "D etta segment samt de tv\345 f\366ljande exekveras lika m\345nga g\345n ger som antalet generationer i cykeln." }}{PARA 0 "" 0 "" {TEXT -1 78 "P\345 s\345 s\344tt skapas rekursivt \366verg\345ngsmatrisen f\366r e n cykel, dvs cykelmatrisen." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "A:=linalg[matrix](M,M,[0,0, 0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0]); \n #A:=evalm(B);\n \n\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AGK%'m atrixG6#7(7(\"\"!F*F*F*F*F*7(F*F*\"\"\"F*F*F*7(F*F*F*F,F*F*7(F*F,F,F,F *F*F)F)Q(pprint06\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 111 "I n\344st a sekvens bildas m\366nstermatrisen B f\366r n\344sta generation sam t \366verg\345ngsmatrisen W mellan generationerna." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2300 "\n \nB:=matrix(M,N,0):\np:=0:\nq:=0:\np:= 0:s:=0:\nv:=0:\n \nG:=matrix(M,N,0):\nH:=matrix(M,N,0):\nJ:=matrix(M,N ,0):\na1:=matrix(M,N,0):\na2:=matrix(M,N,0):\nb1:=matrix(M,N,0):\nb2:= matrix(M,N,0):\nc1:=matrix(M,N,0):\nc2:=matrix(M,N,0):\n \nfor i from \+ 2 to M-1 do\nfor j from 2 to N-1 do\nif (A[i,j]>0) then q:=q+1;H[i,j]: =q;fi;\n\nv:=v+A[i-1,j-1];if (A[i-1,j-1]>0) then s:=s+1;a1[i,j]:=i-1;a 2[i,j]:=j-1;fi; \nv:=v+A[i-1,j];if (A[i-1,j]>0)then s:=s+1;if (s=1) th en a1[i,j]:=i-1;a2[i,j]:=j;fi;if (s=2) then b1[i,j]:=i-1;b2[i,j]:=j;fi ;fi;\nv:=v+A[i-1,j+1]; if (A[i-1,j+1]>0)then s:=s+1;if (s=1) then a1[i ,j]:=i-1;a2[i,j]:=j+1;fi;if (s=2) then b1[i,j]:=i-1;b2[i,j]:=j+1;fi;if (s=3)then c1[i,j]:=i-1;c2[i,j]:=j+1;fi;fi;\nv:=v+A[i,j-1]; if (A[i,j- 1]>0)then s:=s+1;if (s=1) then a1[i,j]:=i;a2[i,j]:=j-1;fi;if (s=2) the n b1[i,j]:=i;b2[i,j]:=j-1;fi;if (s=3) then c1[i,j]:=i;c2[i,j]:=j-1;fi; fi;\nv:=v+A[i,j+1];if (A[i,j+1]>0)then s:=s+1;if (s=1) then a1[i,j]:=i ;a2[i,j]:=j+1;fi;if (s=2) then b1[i,j]:=i;b2[i,j]:=j+1;fi;if (s=3) the n c1[i,j]:=i;c2[i,j]:=j+1;fi;fi;\nv:=v+A[i+1,j-1];if (A[i+1,j-1]>0) th en s:=s+1;if (s=1) then a1[i,j]:=i+1;a2[i,j]:=j-1;fi;if (s=2)then b1[i ,j]:=i+1;b2[i,j]:=j-1;fi;if (s=3) then c1[i,j]:=i+1;c2[i,j]:=j-1;fi;fi ;\nv:=v+A[i+1,j];if (A[i+1,j]>0) then s:=s+1;if (s=1) then a1[i,j]:=i+ 1;a2[i,j]:=j;fi;if (s=2)then b1[i,j]:=i+1;b2[i,j]:=j;fi;if (s=3)then c 1[i,j]:=i+1;c2[i,j]:=j;fi;fi;\nv:=v+A[i+1,j+1];if (A[i+1,j+1]>0) then \+ s:=s+1;if (s=1) then a1[i,j]:=i+1;a2[i,j]:=j+1;fi;if (s=2)then b1[i,j] :=i+1;b2[i,j]:=j+1;fi;if (s=3)then c1[i,j]:=i+1;c2[i,j]:=j+1;fi;fi;\n \nif (s=3 and A[i,j]=0) then B[i,j]:=v/3;J[i,j]:=1;fi;\nif (s=3 and A[ i,j]<>0) then B[i,j]:=A[i,j];J[i,j]:=2;fi;\nif (s=2 and A[i,j]<>0) the n B[i,j]:=A[i,j];J[i,j]:=2;fi;\nif (A[i,j]<>0 or s<>3) then a1[i,j]:=0 :a2[i,j]:=0:b1[i,j]:=0:b2[i,j]:=0:c1[i,j]:=0:c2[i,j]:=0;fi;\nif (s>3) \+ then B[i,j]:=0;fi;\nif (s=2 and A[i,j]=0) then B[i,j]:=0;fi;\nif (s<2) then B[i,j]:=0;fi;\nif B[i,j]<>0 then p:=p+1;G[i,j]:=p; fi;\nv:=0;s:= 0;\nod\nod;\n print(B);\nW:=matrix(p,q,0):\nfor i from 2 to M-1 do\nfo r j from 2 to N-1 do\nif (G[i,j]>0 and H[i,j]>0) then W[G[i,j],H[i,j]] :=1;fi;\nif (J[i,j]=1) then W[G[i,j],H[a1[i,j],a2[i,j]]]:=1/3;W[G[i,j] ,H[b1[i,j],b2[i,j]]]:=1/3;W[G[i,j],H[c1[i,j],c2[i,j]]]:=1/3;fi;\nif(J[ i,j]=2) then W[G[i,j],H[i,j]]:=1;fi;\nod\nod;\nprint(W);\np:=0:q:=0:\n \n\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#K%'matrixG6#7(7(\"\"!F(F(F(F( F(F'7(F(\"\"\"F(F*F(F(7(F(F(F*F*F(F(7(F(F(F*F(F(F(F'Q(pprint16\"" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#K%'matrixG6#7'7'#\"\"\"\"\"$\"\"!F(F(F +7'F+F)F+F+F+7'F+F+F+F)F+7'F+F+F+F+F)7'F+F+F(F(F(Q(pprint26\"" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 97 "I n\344sta segment multipkiceras e n \366verg\345ngsmatris med den tidigare produkten av \366verg\345ngsm atriser." }}{PARA 0 "" 0 "" {TEXT -1 42 "P\345 s\345 s\344tt skapas cy kelmatrisen rekursivt." }}{PARA 0 "" 0 "" {TEXT -1 69 "Detta segment e xekveras i en f\366ljd tillsammans med de tv\345 f\366reg\345ende." }} {PARA 0 "" 0 "" {TEXT -1 52 "Antalet exekveringar=antalet generatoione r i cykeln " }}{PARA 0 "" 0 "" {TEXT -1 96 "OBS Andra g\345ngen segmen tet exekveras (och i forts\344ttningen) s\344tts ett bortkommentering stecken #" }}{PARA 0 "" 0 "" {TEXT -1 35 "framf\366r f\366rsta satsen \+ w2:=evalm(W);" }}{PARA 0 "" 0 "" {TEXT -1 54 "# framf\366r andra och t redje satserna tas ist\344llet bort." }}{PARA 0 "" 0 "" {TEXT -1 83 "S lutprodukten, den fullst\344ndiga cykelmatrisen \344r W1 efter fullt a ntal exekveringar." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 " \nw2 :=evalm(W); \n#w1:=evalm(W);\n#w2:=evalm(w1&*w2);\nW1:=w2: \n \n\n\n\n " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#w2GK%'matrixG6#7'7'#\"\"\"\"\"$ \"\"!F*F*F-7'F-F+F-F-F-7'F-F-F-F+F-7'F-F-F-F-F+7'F-F-F*F*F*Q(pprint36 \"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "with(LinearAlgebra): " }}{PARA 7 "" 1 "" {TEXT -1 64 "Warning, the assigned name GramSchmid t now has a global binding\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "Z2:=submatrix(W1,[2,3,4,5,1],[2,3,4,5,1]);\n \nID:=IdentityMatr ix(6);" }{TEXT -1 27 "Fordrar with(LinearAlgebra)" }{MPLTEXT 1 0 209 " \n#Z3:=evalm(W2-Id);\n#Z3[6,6]:=1;Z3[2,2]:=1;Z3[5,5]:=1; \n#print(Z3) ;\n#T:=evalm(transpose(W1));\n#V:=[eigenvects(w2-Id)]; \n#T:=evalm(tra nspose(W2));\n#V1:=[eigenvects(T)];\n#U1:=evalm(inverse(W1));\n#de:=de t(W1);\n\n" }}{PAGEBK }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%#Z2GK%'matrixG6#7'7'\"\"\"\"\"!F+F+F+7'F+F+F*F+F+7' F+F+F+F*F+7'F+#F*\"\"$F/F/F+7'F+F/F/F+F/Q(pprint56\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#IDG-%'RTABLEG6%\"(GEG\"-%'MATRIXG6#7(7(\"\"\"\"\" !F/F/F/F/7(F/F.F/F/F/F/7(F/F/F.F/F/F/7(F/F/F/F.F/F/7(F/F/F/F/F.F/7(F/F /F/F/F/F.%'MatrixG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " } {TEXT -1 46 "Egenvektorn f\366r egenv\344rdet \344r h\344r: (0,1,1,3,6 )" }}}}{MARK "11 0 0" 44 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }{RTABLE_HANDLES 1282628 }{RTABLE M7R0 I4RTABLE_SAVE/1282628X,%)anythingG6#%)identityG6"[gl!""!!!#!"'"'F' }