0% found this document useful (0 votes)
41 views15 pages

Chapter2

Uploaded by

MD Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
41 views15 pages

Chapter2

Uploaded by

MD Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 15
Monle Carlo Methoo! | Leneises L Delermine fea ob ineequlor_diquns. | ‘Henes Fe froo ob imegulan Joon l f.# fiz Preah squae 1 fo be eonnidarod “Rondo number bekaeen (0-1) ML= Binks cailhin ehope N= Tole) nandam polls Son all caren we all conidr 9x9 em% regulon shape Lo : | Jrom Rondom’ nimbor ble. __. | Bi=0:9ex9= 8-64 M- 049X9=3-78 X90 =0-UXD= 639 Yo= 010x9=0'9 | 29> 008x9 =0.97 3 =O: 30xg= 29 Recording to banie molhomarteal, equation I Sea= x (9X9) = 29-07om2 hoa of squone= 2x9 = 81em2 1702024 Abid Ahammed Z P Abid Ahammed ——= Cowierng the rahe cb pals Shag ilo senge acho Sain Cane 18 JSineas A 20 x81 = 89-4em? Moin onea= 95 -d7em? ~. Didfenonee = (24 ~ 95-07) = 7-338 Cose 28 JSInea » f\= xa) - 9936 em@ ‘Coleulaked anaa= 25:07 em? : ~- Difenanee = (996-88: 07) em = 4.09em2 ~ Cave 33 Pheoo' A= xa- 96.925 om? DiSJenonee = (06-325 - 25:07) em™ = 1-055 em Decaroey grows licker wilh neon points oo 9: Galegnals by Nonle Canto i) Solutions ToT ]- Sade oO 9° : & ad (¥1, “4 (The exoel value ob oknal) : ¥ 5 Hene the limi! is bokseen {-0-1) = The ratio $ the shaded anaa.} to so <= the oneal of roclongele ABCD is 0 NbN ' 2 1: 5A L< : “

2 noe yo | a SF | 995/62 E " Jag jaa | 48 | 8105 43 ) 2] 0 ° 3 00 | oo 93) 3 a | 7 | 43.95 ‘0d 9 ‘40 789 Hd 3 3 3 iy 45. | 785 048) 43 | °8F |159-3 0%, | 90 | a0 | 149-8 633 1702024 Abid | 99 | 99 | J |S BIS | | 2 ot G0 | 105 fad 3 40 | 4 | Gy [OTR ward wey 4 | | 47 96 [4675 es| 54 12 | 38) 83 | Ges 075 ba 64 13 | | a} ae | o-40| 7 fod GA 14 | | g on “odd "Here the 2% hax random “genmnaled 9. 910° 50 can ‘ils opted 4 lo be 0-1. For X= 01 (Rardam) Z| | a 9-175 (Rood) E — eco a0 27h ig le 8 “approximale «due i c-'blus) “Intenvat = = fox-f) oy-L) C\) don i in nonge L.4001); eG) X= tx inkaval: S Ox: append @ ~ | “= math. qn U-2#x) — 2%: append (@) —_p- plo (ax09)9¢-' blac’) hy) byt] [mv -L) mytd 1702024 Abid Ahammed_ | Fox in range GNA) ye random uni forum (004) a random: unidorm (QJ) if Ode malh-sqnl U-29) hit+=J hx append (0: ha append (a) else: mx append ie) my- append la) “oskpi= hibeauar “print (est pl) 5: Random walk Problem. I 95 %,057% fonaands backaonds tell » night reaspeelively covering 75245, G60 em |__Directn | Sel | Sonn | Beword [oa [O88 04 | 0 | Bokeaond le 89 ot 0:28 0-95 | ‘The prablen amotialed ath those 407%JO7° y | | PY i A wie : | ~~ Random Nom | ~ Diwelon | Losilicn | F Rendon | D _ | fara EE ce R [elo] 3 R188) 63 | R 42) 63 | o F fe] 5) 4 8 4D lo F 6) 45 4 5 [S00 TH |e R 9 F 42) 63 © | ; 12-] 15 F 4:2} 3.05 38 L © | 15 7 F 40/79 Ee a 8 6] 105) F 42) 9.55 EI | 3 Ro jaa} 405) 3 F 2} 9.3 ll | 2 F ¢ (los) <9) L 93 pe : . Cl18) § R 93 a a 6/955} 3 | E 1005 jj i pF fe [ea] 3 | F 108 | 4.09 | | B 100! S|] 7 R19 4.05) § R te q@i¢ |B BASF | E Beiaes | 2 14.95, F | 4 x 18° 4-05 3 F tees st! | 2 i [slag 3 | Gli 4 Re em ee Rg les ; | 2 po 2 5-85} 6 R a3 CO] |} 3 F HES} og | jag i 4 B £27.05]; 7 L 193 oO Q R 412 16g i E | B 13 163 E 1305 mS 3 5 24/63} 4 a 138 re) + Relea! 5 TR 189/43 95 Mocs | 5o distance travelled 13-05 in Y gyig 2 66 in /X axis. 1 CBoalieg Pablens Slcbenag ——————— 1= 9002x &% = 8002y QNN | % ) ANN, 3 [a Rw RN S Pondl 93 | U5 | -94) 72 HW 19 @5 15 45 8 7 -9:09 | - --43 -199 | 4 “136 56) [oe | ify 02 to 248 039 | 95 -1-05 -595 15¢ -3.90 |-950 | 71-04 | -312 Mo s 07) ~S2 > a '-078 |-390 068 | 104 490-18 -39 -002 |-19 |-047 |-J4! ; Ls 580 J48 3239 0°40 |-900 |-075 -999 WH -94 190 4.02 30¢ "OGG |-330 |-0-49 -182 HN -g7 185-99 -@9 | 241) 705 | b9) |) 363 NN 95-495 ‘93-979 (007 | 85 |-008 94 yp --03 -15 -30) -303 O88 95-156 | -468 SY -19 -585 -415 45 008 | IS 149 447 Ny -.63 -340 --O1 -@3 AO 29/119 |- 357 N98 19553 ag Ot) | 9D |-1-86 -558 yf 7 88 14 qa Oi | 80 [1-91 | 303 NL 555 1G 4 7082 '|-410 1075 995 90 Joo Sy 351 09 | 910-150-450 MN -185 199 “18 35 cea S17. 5 950 (29 | &F 1049 | ae [4-49 -432 4 -1.00 -500 30 909 -091 | -105 | loa | 195 H=-5d -905 52 56 BRILTRIIGTRA2Srzgrztse Numbor ob hit= 20 Number ob miss = 20 “Yo ob danke =90 | "TRondom Varichles | ON (U=50 77= 65) O~N (4-100 102= 100) DAN (AL=150) 2? = 15D) Roi] x [avo] y [aia] 2 | xo | -0'46]20:110:09} 129 |0:59|238'5| 199.) 1:05 19.3 /0'56| 156 067) 49:5) 1399 ~015 |49.3/002] 98 |O'4 90-5 | 138 0-81 |-9.¢513:10/410 0'5) 996-5) 407-39 lL [os 56 [153 /399:5/ 579 099 |aaes 033) 63-051] 94.5 | 21-¢5 0°45 | 20:75} 0°40} 140 097 1099 | 160-45 10i5|1995| 99.4 9.44 }108-6/0°38 | 138 (8-9nt nal By Monte Galo 5 B Taf rdce-S Finds» | = (2078. 159.05 Raho of Bed shoded aat=My | NS “le \\ Here % Ranger nrondom number 90-50) n> 7 @ ‘ond 3 (0-1) W d¢22 then count ths number in range. SL. A ‘ | 2024 Abid Ahammed —TRendon | %)~ Sandon) SP ‘Numba | 0% | “Nonfen ton | 8 go | O22 ‘S| 498 106s; oO | 95 25 18 95.9 | 1563) 0 18 48 o 00 (583) | 45 49 80 co gg | | 95 D9 05 700 | [563] 2 0 Os) vA 1078 [j9¢8 | @ 48 48 6G 994 |No0o | 3 43 43 ‘Jo 140 hog] 4 40 40 | % [1004 long | 4 A. | 49 42 | 588 0383) 5 38 y | 28 78 109-2 154 81 | 5 $8) 33 | 88 nga asea) 5 94 24 Ol ee a 4) aq | 09 | 13:89 | g \ 4 | 7 | 25 | | 54 sce by Ie (xox) 183.95 SO a4 PUD ahd dM 12 13 4 at 1702024 Abid Ahammed ies o (| Hou ely iy CuStob_| Renken do | 1900 10 an 4400 35 39 ae 1600 “30 65 36-68) 1800 35 80 66-20 | ao00 | JO 10 91 00 | Delaytime | Frcbdbi si Cun-Shob | Bo ee Da | 4 08 08 13 | 6 06 0-9 +9 6 | ow | 30 | 9% RD le Closk RD. tia] 20 Ble Clck RD Deby RD life Clock RD Delo 95 400 1400 9 65 1600 1600 5 & “9000 200 7 6 gn 1800 320 8 eo 9000 %00 0 § 9g} 1800 3600 0 6 3G 1400 4600 0 8 30 1400 5000 5 6 Gg 1600 S400 € 6 14 1400 coo § ¢ | 6 1800 800 € ¢ ge sB00 72002 4 2 1800 1600 94 39 3600 8100 5 6 30 1400 BF 45 1600 9400 9 4 99 1400 9800 8 4 ¢9 1909 oo 4 “gh 1800 mop 7 ¢ 4 14004900 2 4 3} e900 oe ‘go 1300 13000 8 4 49 1600 1600 8 S 4 jo09 a 97 900 1500 7 ¢ '40 1600 144900 0 8 GG 1800 19000 BG “GD S600 16600 4G 65 300 6000 8 51 1609 'S000 8 8 30 440 19000 9 ¢ 62 1e0y 17800 2 4 gp 16000 3 ¢ Bi 1600 19000 5 ¢ [99 1800 19600 4 ¢ 2000 18600 8 ¢ $0 18002400 6 ¢ |J5 4400 000 4 (3¢ 3600 90900 3 4 79 1900 2320 7 ¢ |10 1800 29500 g 4 M1 1600 91800 9 ¢ “iol Deby $860 vee? 100 23600 0 al Bite. ~ Daley Fea cedoban= 60880678 = 936 Cosl ob beoning = 89x14 = 966 Tolal downtime = 9¢¢+936 = 1202 Cos! of dowmhme = sngaxg - 6010 | | Cos! o€ ropainmenl = 1260 1900x 42 = 543-76 | At Rolaidbiliy rcblem Srognam import math aliS 494 RDI 6D: import random LiJe- life+ 1300 “import matplollib-pyplel-an pit | el) eax R0s<74: ‘n=100000 LJe- lifer 1400 ‘Deley=0 ald 75.843 Bfezo Lille - life +4500 lr 4 in runge'LtM eld 85d | coun! +45 Result = count fp x 100 | Print LRonul)

You might also like