(Md. Tahsin Amin) PDF

Download as pdf
Download as pdf
You are on page 1of 20
Patuakhali Science and Technology University Faculty of Computer Science & Engineering Assignment on ‘Monte Carlo Method Exercise Course Code: CIT 323 Course Title: Simulation and Modeling. Submitted to Md Mahbubur Rahman Assistant Professor Department of Computer Science and Information Technology Faculty of Computer Science & Engineering Submitted by. Ma. Tahsin Amin ID: 1802054 Reg No: 08464 Level-3 Semster-2 Session: 2018-19 Tage N10 404 Monke Ganlo Method eee he Delermine Area irregular tgure Here, fe Anew gf enegular tyune one Aa rsa Gf Saqunr tobe A N consi me Panto within Shope Ne Total jrandom prints. Random number betieen (0-1), for all cares We el omsidere 9x9 can regular Shope. From fandom mumbere tole ay = 096%4 = 84 Gyr 042K 42 B78 ay > OF) x42 634 Yo = 040 ¥4F= O49 0.63 £9 = 024 oe te Soa ge cat matte modteod equation: 1g 2 Acendins to Wesic fren = 1d 2 25+ 07 com” 2 1 fren BF TIME = qxq = 8™ Poge soi02— Consiclent "g re ako Ef points falling indy range hich b 20 95 Jo Case tl? 20 prow, A= woe * sete ns = 25 o7em> Difference * (3:4 - ae = 433 Cue 2) Arex eos ee i x8) " cadet ated prow = 2B a prfjenne Pee 25-07) oF Anew, A 7 eee oe Diff arene 2 4 Fb” ” ? . 1 255 am* pa gen ith incneasre ponk: Pogo No.0 dntegrals vy Monte Gale © Solution? |e J nde ° ’ anfersel) a] panes ira nad of me Shadeo! a tachseer D+ oe ag naclange 3 Hone, me Mot, laren T tp le ABCD b M Kr M eae 4 « walion g 3 inl Ie fad } % Rad x Randi y umber | pg gy | Namben 1@ ” AL 0.4 0.54 057 6 | L t OF On 0.18 4 2 6 0.6 0.90 0490 1 2 6 0-6 OF6 0-76 ZL y 6 OF 0.49 04D 3 5 Z Od OFF 0.4F 3 ii Oke 5 : 18 [: 6 0-18 o-1 4 z 2 0-2 08 0.8 4 — foe f0,04 yn batuecn 0-10 and Yto O-t ghas random raising 2. D a5 Which b quit he rack vale GD _Soldation = Soludation Given a fodx 5 ses on A dar J G wl,” fe] . 9089 267 ‘alt pre oxo vale J es senoion aie is ae RD x pix? oe ee M fi n re - : ‘ 94.5 a | 6 ; a +18 20o 4S 0 D 23 a ve 00 we 7 5 ao} 3 > 2 2 4.95 : 4 * er] gy 7 at 4D 499 Wl Jed 447 i 45 g 5 qe4F a 13 alos 1-3 A 5 ; 20 Xo 7 152 oss) 3 4 2 4a 5315 t 24 0 i a oF V5 at 44 +b6 a7 7 44 aa BTA ea 05-5 10 ee “2b net | 7 ea BS 15.99 7 wu 185 As 7G Bb $95 = “40 er] ay Fo Ba3-}—y 13 an TS Poge Wore Hene Me a has random gow gouroted 175d rd fey te oped to ve o-d fon a Od @eenclom) ye 5 ono) bl (4) y (17574) = 4499 w goa 267 Anich b pear te Ie aprox mote value - Hone, Sven traf non). aD Anoa 6 ome = 4 2 r - ar for equation” ate £4 x 47° eas we've pore oj Rondem nua out gr, 2 in range (oD grr we » he ove a> WN wil Foe appraoeh and got volute Fy prea ordre Te cunve page 80.06 2 to Ly iNjout | PI Ro ee |M lout var | a5 | gat | ok | page | cB | ead | Ae “7 Lay | ager | me | 199 val | 4440 | SKK mo |a | var] ae | os | .qu | (9368 | ont +56 | wy | 8346] IK a ot +9570 TK 52 | oe | +8542 | IN” 95° 45 12D out 75) | go | -go02 | IK 84 +51 5yeb Se ee Go ale oe ae ot | sD | yy | bay] ae | 8% | ey | 8248 | tae 50 [igs | 8160] ye | 88 | ge Ble | pee + | +2) 9967] oe 4 »59 | +7208 IM: fore 20 points = i e432 367 tage N° fe Wee drm A | Mieme | aevonl ae | 4 [ost | of | as fan | 62d yd my Tat Pegor] a | 58 | ge | 894 | uke 20 Tey [aaa [I fay [esq | 9288] ae 58 | wy | 8b] yer 4@ [37 | +8773 | par eater esta 51 | 4e | 86021 yy | yo | 862) [o06 [aa | mBE I 8 [M4] ye | 92] gy | 9757 | coe : : | ul a] ye [ao bore brs] | 150 | 86 | 84601 a 56 | a9} ape IN 8 | mt | Mel [0G [ge PSE pe I i aT Ke 7? | al | HID | os] Th ++ 7g 60D. Iw | OF | 4b |, 68] pul Ths 44 | 9917 IN [:27 | ot | 4570 | “I> loop > 295 | 4d 312d out i aad 5 1474 | O51 TK 34 |. 2 5) 578] he 7 27 | .9599 TH 34 | LB ‘04 IN “51 Tole a +8009 > | 6 fom aa ae 2b | 98 | -7o% tf ea I [at ear = ae 8216 | Fat We | 9440 | TKO : it 8 15 | £288 -|— pat fage no; 08 | Fon Ao prinls , A= 21 yy > 3J0 40 A. Py value dulenming pragrans : “import math impont rand | impont anal Ubi » pypot ™ pll- tandem. beed Y) Nz 3000 Ml = plt: pt (Lo401" 0,6), to Ord Ay 8] ez ble) interval 2 1/J000 peels, 083 fos i” ong @ qe ix inderval and (en 4001); rage Noro? Random Numbert 0,41,2, 5 oe Le 5, br F O05 a7 Page No: ID ik psion pet Post Lado | Deetien aly Nu a 4 ai ele | & B ob | 6? F oe] 4 z we | 63 F 6 jae] 4 o ae | oF a2 [i far] 2 F 4r [63 L 7; 1307] 0 F 42 | 105 B yor] 7 F 42 | 78 gz noe 3051 FE yr | B35 * L 6 [48 2 L 36 | 93 FE 76 [25> 4 ee ar 143 Fe 6 |ad 5 £ 4D | 10.677 F 6 | Ho! 4 FE Br 10.8 c 6 [405] 3 B 4d | 1005 a oF [48] 4 BR 4g | 1005 L 4Ae 6 R Be | Tes Ryo [yer] g F 54 [D0 RB bb 14.8 J F SY 10-8 Foy Jab] oo F 54 [se ‘Lo fie [STO Rg 0 | 12.3 F wr [b>] 5 zB bs] 12-3 £ -o-|4 a SG L 66 | 123 FE [reles | 9 F 60 | 12-5 Pa a ee F bo | 13.05 a e] es |e? 7 r go | 138 £ ze fo | be a lat - Pee 5 ze 66 1305 bp distance travolled 970? pumas and 66 in ™ ants g. Bomboong Probems gimnulation4 j = 5002% enn | a | NN] ¥ pwn | x | 2aW] ResudE vib [58 |-007-|-b = . ww [ad |-9 u 129 [a9 | pst | wr ~ - 40h | -52 oot | y Qa 4 R 29 w lt law | [ow | 6% [av] av . 4 n i H Mi a | ya 4 [104 Laur wt HV 8 | 6b oor [AD 4? pr ae ae hw [yp lane | eso bya ji — 019 | 495 i - : Tass ; [0-66 r ot — Oe Le 200 [OH or | aq baa - ) se 7 3 [909 | 5 ayy [A ® [90 bap : 245 AY | 49 | 049 of 25 [006] ay 203 3 $ & T \ A < t 2 T zy El 3 oF ob | 56 wa s L 5 \ Ly Ry =" | -¥4 Page NO, Ih - ; iF : ine wale fe fo fe ew fe fw 294 | as Lvl? | ost ao | nS 3°? | 4s] oles |S] cst boo | yr fom fart im [ow wo [3 | o>] sda | 29% |e 48) ar Lo | 4 | 05 | oF) wir] oo | od far [o°!] AV] ‘pe |e aca eer eee |e oe (eee ee eee yi Loe? | | ora | 57 | py 5 [oso |. [MT], 49 DAD | yd | 4p: m [210 | -500 “30 | 9 | oP [10 06h 15] y | 92 | ges [-5% | ast _ ood fs jiag [A | om | -66 | 340 | oot [43a [ey — : = 20 Numoan of MH typ 2D Numpert of m oz 2 » ge A sinine Poge Nod aan (AF 50, 7+ Randrm Yreabe ¢ o*> 65) (Ae 100, o*: 10) yn > e aware (Me 15, as 150) 1 garb. fRN2 | Y | PKS | 2 ary | © -0.46 | 201 | 5.09 | 199 | 059 | 2385 | 294 0-57 105 |-183 | o.56 | 156 |-o47 | 49° | ize | 278 Tous 40-3 |_p.02 | O8 o4d | ones 138 Obs —0o.8 [22-65] o.10 | 120 | O54 | 2269 | 4on3s_| 149 dd | 1-9 joy | 54 | 153 | o79.5 a O01 -099 |b )-o33 | g7 |-037| ous | 91.05 | o0g oF 20.15 | oo | 140 0.27 | 1095 | 1b IS 146 244 |-W&s “O38 38 | os |rexs [oa4 | op3- Fagen: | 4 B+ Beaning Problem eee Ss gO 1 Hy) tumulodive Fandom digit Hours frsbability Ene othy aaa “a 1200 +10 O10 o4-10 1400 +25 OOF W-3F bod ro) Oe Bb- oo )00 125 0-90 beE- 50 2006 “10 4400 3)- 0b Dolay time Provabibty Commulalive Random dagit Probapity 5] oo 02 i 6 6.6 0. a 4-9 gS oul 1-0 0 foge MOIS Simulation Eff Reliability Probiem- Trasenk Tiley Beoning 1 Bearing 2 maint Eas AD fife cacen | &D |e] RD |e feloe| RD | Peleg | RD|ALY ote] AD | pelog |_ 87 [1800] 1c 4] 6 [42/10 [ise [ 2 4 38 |W} wo) | b a7 |walaae|> [6 [eo |e lael ze] & lor|unlae| 5 | 6 39 [Ba[500| 9] 6 |e [reo] > | 4 [oq famol 21 9 | 4 Aaj eo 1F |G [20 |welue} alc [ar ules | o | 4 2) |!40} 300 | 3 4 6 [48 3 4 4o hem g46D| 9° 4 44 jr |e? Vo tA | a |e 4L~) 91 6 | ag |oaoto, 5b ea) 11400 4 Ble wie] g Tg alte —* Bt [lal 3.02) 1 & | g lu? Wer] e | 6 ahs : : 13,967] 2° |g aq [Pemisee) g | | 48 Jos had] 4 | CT 52 Iymlisr®| = |e oe [|teter] sy [ao [wm teary a a5 b@ a7 | 2 - 43 foooiiace]3 | 6 [xt jyo lem $4 L | 47 lilies 1 a mo afm fea a |e [opel ee tol deley= 64 aed Sane ee . { “otal dolay> 70 Fetal degre 5 = F4D cast 4 vet on we) 7 ws G do: apt HOF = 9985 5 4690 ust Ff nepainmon = (@tK00) X To = 308433 133. fool est = 9778 5 pl « e ae ca ye ky” a wy lef v my v eS vp re ee ote fie” fo" Rs 100 I860-. lgod oo 1ged 5 & 1b 1800 (oo | or | 320d | 3 1) [bed lbod 260 ha 486d z a bo 140 oo | 740 | G200 7 12 | 140 12 to | 120 | F400 5 Z 130 god 200 : ° | eo [ae || A 1400 1eep a & Har | 1086] Z 1h0d 130d 14 The ra lee Z 16 100 1390 | np (3,665 |—, : 2600 200 | 4 | ier a ; [ — u 1om | yesd | 200] we |ieecd 4; [2 boo ' ie Mo [7 I - 4 | 19eoB |e a Yor | 900° |e/ am | ne — eae 6 3 Total dled = & ye foge M018 9, Reisthy, Premern Pree inmporth ome import random 1 aynportl % and pol ib ee? ay plt o nz 100 ood pelay 6 Lupe © fort im range (el; n> gpy= random nandird (0 100) goiy = random reandiint CO » Pee eee elf qe 4 128i glee lige 107? apes HF eee abt cence: ebit gage RDse 3 aye = HE 4 hike = gape 12° let 252 ppl dah List . ayer wer lee ater wget 17 Lap 79.6 ean ip 3 KODE difee btet 13? te at dele 2 AUS TF Alia gag erg 4: per IO uk 4 eeris H include Zmalh> int mand { inf t= 10) int 15 dovv ‘l= 0: foe le reas C44 int a> 0) db yd 2 rs (979) peg) 300 ant vende = yond OT if crandom 77° Le randem aot yet } elsif Crandon p25 be qandem 28) } noe J else | atte ) dobule St = batt (are? Or) 5 gett By double ans = jaiel [10 carob paint (ans); l

You might also like