Cmputatinal mdeling techniques Lecture 3: Mdeling change (2) Mdeling using prprtinality Mdeling using gemetric similarity In Petre Department f IT, Ab Akademi http://www.users.ab.fi/ipetre/cmpmd/ http://users.ab.fi/ipetre/cmpmd/ 1
Cntent f the lecture Mdeling change with systems f difference equatins: three examples Mdeling using prprtinality Mdeling using gemetric similarity http://users.ab.fi/ipetre/cmpmd/ 2
MODELING CHANGE WITH SYSTEMS OF DIFFERENCE EQUATIONS http://users.ab.fi/ipetre/cmpmd/ 3
Mdeling with systems f difference equatins Example: car rental cmpany; ne ffice in Tampa, the ther in Orland Travelers may rent a car frm either ffice and drp it at either ne Data shws that 40% f thse wh rent in Orland, return it in Tampa, 30% f thse wh rent in Tampa, return it in Orland The questin is whether the car distributin will eventually becme unbalanced and cars will have t be mved (empty) frm ne place t the ther extra cst Prblem: build a mdel fr hw the number f cars in the tw ffices varies O n =number f cars in Orland after n time units T n =number f cars in Tampa after n time units O n+1 =0.6O n +0.3T n T n+1 =0.4O n +0.7T n Equilibrium values (O,T): O=0.6O+0.3T T=0.4O+0.7T Slutin: O=0.75 T Nte that O n +T n = O n+1 +T n+1, fr all n S, O+T=O 0 +T 0 Final slutin: (3/7(O 0 +T 0 ), 4/7(O 0 +T 0 )) Girdan et al. A first curse in mathematical mdeling. (3 rd editin) Fig. 1.22, page 36 http://users.ab.fi/ipetre/cmpmd/ 4
8000 7000 6000 Example (cntinued) Cars 5000 4000 3000 2000 O(n) T(n) Example O n+1 =0.6O n +0.3T n T n+1 =0.4O n +0.7T n Ttal number f cars: 7000 1000 0 6000 5000 0 5 10 15 Time units (3000,4000) equilibrium 4000 Start with varius initial distributins f the cars between Orland and Tampa Test the numerical evlutin Cars 3000 2000 1000 0 0 5 10 15 Time units O(n) T(n) 6000 Cnclusin: after abut 7 time units, we apprach the equilibrium value (3000,4000) It suggests an asympttically stable equilibrium Cars 5000 4000 3000 2000 1000 O(n) T(n) Girdan et al. A first curse in mathematical mdeling. (3 rd editin) Fig. 1.23, page 37 0 0 5 10 15 Time units 5
Example: battle f Trafalgar Trafalgar, 1805: French and Spanish naval frces under Naplen against British naval frces under Admiral Nelsn French and Spanish: 33 ships British: 27 ships Scenari I: straight-n battle 35 30 25 Mdel fr battle utcme: during an encunter, each side has a lss equal t 5% f the number f ships f the enemy Ships 20 15 10 5 B(n) F(n) Scenari I: Straight-n series f cnfrntatins B n+1 =B n -0.05F n F n+1 =F n -0.05B n 0 0 5 10 15 20 25 Number f encunters http://users.ab.fi/ipetre/cmpmd/ 6
Example (cntinued) Recall the mdel: French and Spanish: 33 ships British: 27 ships During an encunter, each side has a lss equal t 5% f the number f ships f the enemy Girdan et al. A first curse in mathematical mdeling. (3 rd editin) Fig. 1.25, page 39 Scenari II: divide-and-cnquer Naplen s ships were arranged in three grups Strategy Engage frce A with 13 British ships Engage frce B with all available ships Engage frce C with all available ships http://users.ab.fi/ipetre/cmpmd/ 7
Example (cntinued) Scenari II: divide and cnquer Battle A Battle A: engage French frce A (3 ships) with 13 British ships 14 12 10 Outcme f battle A: French frce A reduced frm 3 t 0.4385 8 Ships 6 4 2 B(n) F(n) French frce B, C left intact: 17, 13, resp. did nt engage 0 0 1 2 3 4 5 Number f encunters British frce: frm 13 ships engaged in the battle, 12.5935 remaining 14 did nt engage http://users.ab.fi/ipetre/cmpmd/ 8
Example (cntinued) Scenari II: divide and cnquer Battle B 30 Battle B: engage French frce B (17 ships) with all available British ships (26.5935) Ships 25 20 15 B(n) Outcme f battle B: French frce A: 0.4385 did nt engage 10 5 F(n) French frce B, reduced frm 17 t 0.1260 0 0 5 10 15 20 Number f encunters French frce C intact: 13 did nt engage British frce: Frm 26.5935, reduced t 20.0704 http://users.ab.fi/ipetre/cmpmd/ 9
Example (cntinued) Scenari II: divide and cnquer Battle C 25 Battle C: engage French frce B (13 ships) with all available British ships (20.0704) Ships 20 15 10 B(n) F(n) Outcme f battle C: French frce A: 0.4385 did nt engage 5 0 0 5 10 15 20 Number f encunters French frce B: 0.126 did nt engage French frce C: frm 13, reduced t 0.3111 British frce: Frm 20.0704, reduced t 15.0101 http://users.ab.fi/ipetre/cmpmd/ 10
Mdeling exercise Anther strategy fr defeating a superir frce is thrugh better technlgy Frmulate a mdel where the British frces have better weapnry and as a result, each encunter results in A lss fr the French-Spanish fleet f 10% f the number f British ships A lss fr the British ships f 5% f the number f French-Spanish ships Assume that French-Spanish start with 33 ships, British start with 27 ships http://users.ab.fi/ipetre/cmpmd/ 11
Mdeling exercise Anther strategy fr defeating a superir frce is thrugh better technlgy Frmulate a mdel where the British frces have better weapnry and as a result, each encunter results in A lss fr the French-Spanish fleet f 15% f the number f British ships A lss fr the British ships f 5% f the number f French-Spanish ships Assume that French-Spanish start with 33 ships, British start with 27 ships Result B n+1 =B n -0.05F n F n+1 =F n -0.15B n B 0 =27, F 0 =33 http://users.ab.fi/ipetre/cmpmd/ 12
Example: cmpetitive hunter mdel Tw species, say wls and hawks c-exist in a habitat: O, H In the absence f the ther species, each species exhibits uncnstrained grwth, prprtinal t its current level: O n+1 -O n =k 1 O n, H n+1 -H n =k 2 H n, where k 1,k 2 >0 The effect f each species is t diminish the grwth f the ther Mdel it here as prprtinal t the number f pssible encunters between the tw species: O n+1 -O n =k 1 O n - k 3 O n H n ; H n+1 -H n =k 2 H n - k 4 O n H n ; k 1,k 2,k 3,k 4 >0 Mdel: O n+1 =(1+k 1 )O n - k 3 O n H n ; H n+1 =(1+k 2 )H n - k 4 O n H n http://users.ab.fi/ipetre/cmpmd/ 13
Example (cntinued) Mdel: O n+1 =(1+k 1 )O n - k 3 O n H n ; H n+1 =(1+k 2 )H n - k 4 O n H n Questin: what are the equilibrium pints (O,H)? O=(1+k 1 )O- k 3 OH; H=(1+k 2 )H- k 4 OH i.e. O(k 1 k 3 H)=0; H(k 2 - k 4 O)=0 i.e., (O,H)=(0,0) r (O,H)=(k 2 /k 4, k 1 /k 3 ) Numerical simulatin fr k 1 =0.2, k 2 =0.3, k 3 =0.001, k 4 =0.002 Equilibrium pints: (0,0) and (150, 200) http://users.ab.fi/ipetre/cmpmd/ 14
Initial value: (150,200) 250 200 Individuals 150 100 50 0 0 5 10 15 O(n) H(n) This suggests an unstable equilibrium pint; sensitivity t initial cnditins Time units Initial value: (151,199) 500 400 Initial value: (149,201) 1000 800 Individuals 300 200 100 O(n) H(n) Individuals 600 400 200 O(n) H(n) 0 0 10 20 30 0 0 10 20 30 Time units Time units http://users.ab.fi/ipetre/cmpmd/ 15
Mdeling exercise Sptted wl s primary fd surce is mice Here is an eclgical mdel fr the ppulatins f wls and mice: M n+1 =1.2 M n -0.001 O n M n O n+1 =0.7 O n +0.002 O n M n Explain the significance f every term and cnstant in the mdel http://users.ab.fi/ipetre/cmpmd/ 16
MODELING USING PROPORTIONALITY AND GEOMETRIC SIMILARITY http://users.ab.fi/ipetre/cmpmd/ 17
Mdeling using prprtinality y is prprtinal t x, dented y~x, if y=kx, fr sme k>0 Girdan et al. A first curse in mathematical mdeling. (3 rd editin) Fig. 2.8, 2.9, page 66 y~x 2 if y=k 1 x 2, fr sme cnstant k 1 >0 In this case, x~y 1/2 y~ln(x) if y=k 2 ln(x), fr sme cnstant k 2 >0 y~e x if y=k 3 e x, fr sme cnstant k 3 >0 Nte: If z~y and y~x, then z~x http://users.ab.fi/ipetre/cmpmd/ 18
Mdeling using gemetric similarity Tw bjects are said t be gemetrically similar if there is a net-ne crrespndence between the pints f the bjects such that the rati f distances between crrespnding pints is the same fr all pairs f pints Example: tw bxes l/l =w/w =h/h =k, with k>0 Rati f their vlumes: V/V =(lwh)/(l w h )=k 3 Rati f their surface areas: S/S =(2lh+2wh+2wl)/(2l h +2w h +2w l ) =k 2 In ther wrds: S/S =l 2 /l 2, V/V =l 3 /l 3 Girdan et al. A first curse in mathematical mdeling. (3 rd editin) Fig. 2.18, page 76 http://users.ab.fi/ipetre/cmpmd/ 19
Example Example: Bass fishing derby Prblem: predict the weight f a fish in terms f sme easily measurable dimensins Slutin: assume gemetric similarity V~l 3 ; W~V Cnclusin: W~l 3 Calculate the prprtinality cnstant based n just ne fish Girdan et al. A first curse in mathematical mdeling. (3 rd editin) Fig. 2.19-2.21, pages 79-81 Verify the mdel: http://users.ab.fi/ipetre/cmpmd/ 20
The rule abve des nt reward catching a fat fish Changes in the mdel Assume that the majrity f the weight cmes frm the main bdy, withut head and tail Length f the main bdy (effective length): l eff The main bdy has a varying crss-sectinal area. Cnsider the average crss-sectinal area: A avg Mdel: W~V~ A avg l eff Hw d we measure/estimate the effective length and the average crss-sectinal area Answer: Mdel it thrugh gemetric similarity! Assume l eff ~l Measure the circumference f the fish at its widest pint: the girth g Assume A avg ~g 2 Final mdel: W~lg 2 Test the mdel: W=0.0187 lg 2 Example (cntinued) Girdan et al. A first curse in mathematical mdeling. (3 rd editin) Fig. 2.22, pages 82 http://users.ab.fi/ipetre/cmpmd/ 21
Learning bjectives fr lectures 2-3 Understand the cncept f mdeling the change in a discrete dynamical systems Able t write a linear and an affine mdel with difference equatins fr a simple real-life phenmenna Understand the diverse behavir that a linear dynamical system mdel can have Understand the ntin f equilibrium pint Understand the different types f stability f equilibrium pints Ability t write multi-variable mdels as systems f difference equatins Understand the basic paradigm f mdeling prprtinality Understand the basic paradigm f mdeling gemetric similarity http://users.ab.fi/ipetre/cmpmd/ 22