{VERSION 5 0 "SUN SPARC SOLARIS" "5.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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 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 } {CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 1 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 O utput" 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 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Maple Plot" 0 13 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0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 267 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 256 "" 0 "" {TEXT 256 11 "Math 2280-1" }}{PARA 260 "" 0 "" {TEXT -1 47 "Applying the logistic model to U.S. populations" }} {PARA 257 "" 0 "" {TEXT -1 16 "January 20, 2006" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 80 "The logistic equation for population change which we have just \+ been studying is:" }}{PARA 261 "" 0 "" {XPPEDIT 18 0 "dP/dt = kP*(M-P) ;" "6#/*&%#dPG\"\"\"%#dtG!\"\"*&%#kPGF&,&%\"MGF&%\"PGF(F&" }{TEXT -1 1 "." }}{PARA 265 "" 1 "" {TEXT -1 104 "Following the text and its equ ation numbering at page 88, we can write the same differential equatio n as" }}{PARA 262 "" 0 "" {XPPEDIT 18 0 "dP/dt = a*P+b*P^2;" "6#/*&%#d PG\"\"\"%#dtG!\"\",&*&%\"aGF&%\"PGF&F&*&%\"bGF&*$F,\"\"#F&F&" }{TEXT -1 33 " (1)" }}{PARA 263 "" 1 "" {TEXT -1 5 "with " }{XPPEDIT 18 0 "a = k*M;" "6#/%\"aG*&%\"kG\"\"\"%\"MGF'" }{TEXT -1 6 " and " }{XPPEDIT 18 0 "b = -k;" "6#/%\"bG,$%\"kG!\"\"" } {TEXT -1 925 ". In our model the parameters k,M,a,b are related to as sumptions about birth and death rates. Suppose you have a real popula tion and want to pick parameters a and b to make a good model. One wa y would be to try to estimate fertility and morbidity rates based on b irth and death data, but that could get quite complicated. For exampl e, if you want to develop an accurate model of world population growth based on this sort of analysis you would probably need to collect dat a from different regions of our planet and develop different parameter s for different societies, solve the problem in each part of the globe and then add your results together. A more simple-minded approach i s to see if existing population data is consistent with a logistic mo del, for appropriate choices of a and b. The book explains a good way \+ to do this on pages 88-90, in the context of modeling U.S. populations over the past two centuries." }}{PARA 0 "" 0 "" {TEXT -1 69 " If \+ you divide the logistic DE, equation (1) above, by P, you get" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 264 "" 0 "" {XPPEDIT 18 0 "[1/P] *[dP/dt] = a+b*P;" "6#/*&7#*&\"\"\"F'%\"PG!\"\"F'7#*&%#dPGF'%#dtGF)F', &%\"aGF'*&%\"bGF'F(F'F'" }{TEXT -1 27 " (2)" }} {PARA 266 "" 1 "" {TEXT -1 133 "If you have multi-year population data you can get good estimates for the left side of (2) by using differen ce quotients to estimate " }{XPPEDIT 18 0 "dP/dt;" "6#*&%#dPG\"\"\"%#d tG!\"\"" }{TEXT -1 39 ". Dividing by P gives an estimate for " } {XPPEDIT 18 0 "[1/P]*[dP/dt];" "6#*&7#*&\"\"\"F&%\"PG!\"\"F&7#*&%#dPGF &%#dtGF(F&" }{TEXT -1 105 ". Carrying this computation out for severa l different times yields a collection of points approximating " } {XPPEDIT 18 0 "[P, [1/P]*[dP/dt]];" "6#7$%\"PG*&7#*&\"\"\"F(F$!\"\"F(7 #*&%#dPGF(%#dtGF)F(" }{TEXT -1 272 ". If these points seem to lie app roximately along a line, then (2) will be a good model for the populat ion problem, and you can estimate the parameters \"a\" and \"b\" by ge tting the vertical axis-intercept and slope of the line which best fit s the point data, respectively. " }}{PARA 0 "" 0 "" {TEXT -1 86 " \+ For example, looking at the USA data in Figure 2.1.8 on page 90, we ca n estimate " }{XPPEDIT 18 0 "dP/dt" "6#*&%#dPG\"\"\"%#dtG!\"\"" } {TEXT -1 421 " in 1800 in a \"centered\" way by taking the difference (P(1810)-P(1790))/20 (in units of people/year). Centered differenc es as in (3) page 86, generally give more accurate estimates for the \+ derivative than the one-sided differences used in the limit definition . This is shown geometrically in Figure 2.1.7, page 89. Finally we w ould divide our centered estimate for dP/dt in 1800 by P(1800) to get \+ an estimate for " }{XPPEDIT 18 0 "[1/P]*[dP/dt]" "6#*&7#*&\"\"\"F&%\" PG!\"\"F&7#*&%#dPGF&%#dtGF(F&" }{TEXT -1 33 " in 1800, for the USA pop ulation:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 295 "P1:=5.308;\n #population i n 1800, in millions.\n #Remember you can do multiline commands\n #by holding down the shift key when you hit return\n #or enter.\nP1prime :=(7.240-3.929)/20;\n #estimate for dP/dt in 1800, in millions of\n \+ #people per year, see top right entry in \n #Figure 2.1.8 page 90" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#P1G$\"%3`!\"$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%(P1primeG$\"+++]b;!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "P1primeoverP1:=P1prime/P1;\n #estimate for (1/P)*(d P/dt) in 1800;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%.P1primeoverP1G$\" +nr()=J!#6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "point1:=[P1,P 1primeoverP1];\n #the left-most point on the graph of Figure 2.1.9" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'point1G7$$\"%3`!\"$$\"+nr()=J!#6 " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 145 "We can automate this process. We are still using the ta ble 2.1.8 on page 90. You should verify how these numbers were extract ed from the tables." }}{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 unprotected\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 380 "pops:=matrix(21,2,[[1790,3.9],[1800,5.3] ,[1810,7.2],\n [1820,9.6],[1830,12.9],[1840,17.1],\n [1850 ,23.2],[1860,31.4],[1870,38.6],\n [1880,50.2],[1890,63.0],[1900, 76.2],\n [1910,92.2],[1920,106.0],[1930,123.2],\n [1940,13 2.2],[1950,151.3],[1960,179.3],\n [1970,203.3],[1980,225.6],[199 0,248.7]]);\n #matrix of populations \n " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#>%%popsG-%'matrixG6#777$\"%!z\"$\"#R!\"\"7$\"%+=$\"#`F-7$\"%5=$\"#sF -7$\"%?=$\"#'*F-7$\"%I=$\"$H\"F-7$\"%S=$\"$r\"F-7$\"%]=$\"$K#F-7$\"%g= $\"$9$F-7$\"%q=$\"$'QF-7$\"%!)=$\"$-&F-7$\"%!*=$\"$I'F-7$\"%+>$\"$i(F- 7$\"%5>$\"$A*F-7$\"%?>$\"%g5F-7$\"%I>$\"%K7F-7$\"%S>$\"%A8F-7$\"%]>$\" %8:F-7$\"%g>$\"%$z\"F-7$\"%q>$\"%L?F-7$\"%!)>$\"%cAF-7$\"%!*>$\"%([#F- " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "for i from 1 to 11 do\n lspoints[i]:=[pops[i+1,2],\n (pops[i+2,2]-pops[i,2])/(20*pops[i+1,2] )];\nod;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\"\"7$$\"#`!\"\"$\"+Zv?8J!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\"#7$$\"#s!\"\"$\"+666')H!# 6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\"$7$$\"#'*!\"\" $\"+++voH!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\"%7$ $\"$H\"!\"\"$\"+Wn(p!H!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspoi ntsG6#\"\"&7$$\"$r\"!\"\"$\"+1fp6I!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\"'7$$\"$K#!\"\"$\"+_l*=3$!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\"(7$$\"$9$!\"\"$\"++$HAX#!#6" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\")7$$\"$'Q!\"\"$\"+g JBNC!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6#\"\"*7$$\"$- &!\"\"$\"+%))y-V#!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%)lspointsG6 #\"#57$$\"$I'!\"\"$\"+k?\\j?!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&% )lspointsG6#\"#67$$\"$i(!\"\"$\"+)\\5g\">!#6" }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 333 "We will follow investig ation A and find the least squares line fit to this data, in order to \+ extract values for \"a\" and \"b\" in equation (2). We remember how t o do this from the Math 2270 chapter on orthogonality, which included \+ the method of least squares as a special subtopic....You could look at class notes from last semester, " }}{PARA 267 "" 0 "" {TEXT -1 55 "ht tp://www.math.utah.edu/~korevaar/2270fall05/oct21.pdf" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "A:=matrix(11,2);\nB:=vector(11);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG-%&arrayG6%;\"\"\"\"#6;F)\"\"#7 \"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"BG-%&arrayG6$;\"\"\"\"#67\" " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "for i from 1 to 11 do\n A[i,1]:=lspoints[i][1]:\nA[i,2]:=1:\nB[i]:=lspoints[i][2]:\nod:\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "evalm(A);evalm(B);\n #check work" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'matrixG6#7-7$$\"#`!\"\"\" \"\"7$$\"#sF*F+7$$\"#'*F*F+7$$\"$H\"F*F+7$$\"$r\"F*F+7$$\"$K#F*F+7$$\" $9$F*F+7$$\"$'QF*F+7$$\"$-&F*F+7$$\"$I'F*F+7$$\"$i(F*F+" }}{PARA 12 " " 1 "" {XPPMATH 20 "6#-%'vectorG6#7-$\"+Zv?8J!#6$\"+666')HF)$\"+++voHF )$\"+Wn(p!HF)$\"+1fp6IF)$\"+_l*=3$F)$\"++$HAX#F)$\"+gJBNCF)$\"+%))y-V# F)$\"+k?\\j?F)$\"+)\\5g\">F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "linsolve(transpose(A)&*(A),transpose(A)&*B);\n #least squares s olution\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'vectorG6#7$$!++o8%p\"! #8$\"+R_5&=$!#6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "a:=.3185 105239e-1;\n #intercept\nb:=-.1694136800e-3;\n #slope" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aG$\"+R_5&=$!#6" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG$!++o8%p\"!#8" }}}{PARA 0 "" 0 "" {TEXT -1 31 "No w we can create figure 2.1.9:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "with(plots): #load the plott ing package" }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 240 "pict1:=pointplot(\{seq(\n lspoints[i],i=1..11 )\}): \n #a plot of the points,\n #with output suppressed. Make sure\n #to end this command with a colon! If you use a\n #semic olon you get a huge mess when you have\n #a lot of points " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "line:=plot(a+b*P,P=0..100, c olor=black): #same warning here\n #about using a colon vs semicolon " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 156 "display(\{pict1,line\} , title=\"Figure 2.1.9\"); \n #now use a semicolon, and\n #get \+ a picture containing the line and the \n #three points we computed. " }}{PARA 13 "" 1 "" {GLPLOT2D 279 176 176 {PLOTDATA 2 "6'-%'POINTSG6 -7$$\"$'Q!\"\"$\"+gJBNC!#67$$\"$i(F)$\"+)\\5g\">F,7$$\"#`F)$\"+Zv?8JF, 7$$\"$9$F)$\"++$HAX#F,7$$\"#sF)$\"+666')HF,7$$\"#'*F)$\"+++voHF,7$$\"$ H\"F)$\"+Wn(p!HF,7$$\"$r\"F)$\"+1fp6IF,7$$\"$K#F)$\"+_l*=3$F,7$$\"$-&F )$\"+%))y-V#F,7$$\"$I'F)$\"+k?\\j?F,-%'CURVESG6$7S7$$\"\"!F_o$\"3B+++R _5&=$!#>7$$\"3ymmm;arz@!#<$\"32x4*z(y<[JFbo7$$\"3eLL$e9ui2%Ffo$\"39_li yv/;JFbo7$$\"3*omm;z_\"4iFfo$\"3.[\")e'p8*zIFbo7$$\"3OommT&phN)Ffo$\"3 yLUs&HSN/$Fbo7$$\"3KLLe*=)H\\5!#;$\"3-]`Gr(Rt+$Fbo7$$\"3imm\"z/3uC\"F[ q$\"3O@39^sxtHFbo7$$\"3.++DJ$RDX\"F[q$\"3d)>[b?D!RHFbo7$$\"3vmm\"zR'ok ;F[q$\"3a$*HG!f%3.HFbo7$$\"39++D1J:w=F[q$\"3ocn-P#fs'GFbo7$$\"3oLLL3En $4#F[q$\"3m^qqd%3/$GFbo7$$\"3,nm;/RE&G#F[q$\"3)z&RAr-&zz#Fbo7$$\"3_+++ D.&4]#F[q$\"3DaX%4/59w#Fbo7$$\"32+++vB_Zs#Fbo7$$\"3W++ +v'Hi#HF[q$\"3,YIB,>O*o#Fbo7$$\"3%pm;z*ev:JF[q$\"3@LANmNDdEFbo7$$\"3)R LL$347TLF[q$\"3[2Vf]O2>EFbo7$$\"3KLLLLY.KNF[q$\"3h\\&zQDIne#Fbo7$$\"3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's use the \"a\" and \"b\" which we found with the least squares \+ fit, use the population in 1900 for our initial condition, and see how the logistic model works when we try to extend it to the 1900's:" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "with(DEtools): #load the DE package" }}{PARA 7 "" 1 "" {TEXT -1 45 "Warning, the name adjoint has been redefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "deqtn1 :=diff(x(t),t)=a*x(t) + b*x(t)^2;\n #logistic eqtn with our parame ters" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'deqtn1G/-%%diffG6$-%\"xG6#% \"tGF,,&*&$\"+R_5&=$!#6\"\"\"F)F2F2*&$\"++o8%p\"!#8F2)F)\"\"#F2!\"\"" }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "P:=dsolve(\{deqtn1,x(0)=76.21\},x(t));\n #take 1900 as t= 0 and solve the initial value\n #problem " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"PG/-%\"xG6#%\"tG,$*&\"+R_5&=$\"\"\",&\")o8%p\"F-*&# \"-s$e.S*=\"%@wF--%$expG6#,$*(\"+R_5&=$F-\"-+++++5!\"\"F)F-F;F-F-F;F- " }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 123 "f:=s->evalf(subs(t=s,rhs(P))); #extract the right-ha nd side\n #from the above expression to make your solution functi on" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fGf*6#%\"sG6\"6$%)operatorG% &arrowGF(-%&evalfG6#-%%subsG6$/%\"tG9$-%$rhsG6#%\"PGF(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "f(s); #check that those weird su bs and rhs commands really work\n " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,$*&$\"+R_5&=$\"\"!\"\"\",&$\")o8%p\"F'F(*&$\"+gGC&[#!\"#F(-%$expG6 #,$*&$\"+R_5&=$!#6F(%\"sGF(!\"\"F(F(F9F(" }}}{PARA 259 "" 1 "" {TEXT -1 105 " We can see how the model works by plotting actual populati ons against predicted ones, for the 1900's." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "actual:=pointplot (\{seq([pops[i,1],pops[i,2]],i=1..21)\}):\nmodel:=plot(f(s-1900),s=179 0..2000,color=black):\ndisplay(\{actual,model\});" }}{PARA 13 "" 1 "" {GLPLOT2D 400 300 300 {PLOTDATA 2 "6&-%'POINTSG677$$\"%!z\"\"\"!$\"#R! \"\"7$$\"%+=F)$\"#`F,7$$\"%5=F)$\"#sF,7$$\"%!)=F)$\"$-&F,7$$\"%+>F)$\" $i(F,7$$\"%5>F)$\"$A*F,7$$\"%?>F)$\"%g5F,7$$\"%I>F)$\"%K7F,7$$\"%S>F)$ \"%A8F,7$$\"%]>F)$\"%8:F,7$$\"%g>F)$\"%$z\"F,7$$\"%q>F)$\"%L?F,7$$\"%! )>F)$\"%cAF,7$$\"%!*>F)$\"%([#F,7$$\"%!*=F)$\"$I'F,7$$\"%?=F)$\"#'*F,7 $$\"%S=F)$\"$r\"F,7$$\"%]=F)$\"$K#F,7$$\"%g=F)$\"$9$F,7$$\"%q=F)$\"$'Q F,7$$\"%I=F)$\"$H\"F,-%'CURVESG6$7S7$F'$\"3\"Q-!4rzkyP!#<7$$\"3-+]P-ud %z\"!#9$\"3xvdMiK*zN%Fbr7$$\"3+]iqv,c)z\"Ffr$\"3wa-bLC'>$\\Fbr7$$\"34+ D'3ARI!=Ffr$\"3&G\"RJL8WlcFbr7$$\"3%**\\Pg&za2=Ffr$\"3?s;mqz15lFbr7$$ \"3'*\\7)>EN?\"=Ffr$\"3\\4L#*yYbquFbr7$$\"3-]i+pb>;=Ffr$\"3(Qw+)Q7J\"[ )Fbr7$$\"3\"*\\i&fK.0#=Ffr$\"35,v81')\\k'*Fbr7$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