0% found this document useful (0 votes)
9 views

DM Unit 3 Solution

practical of object oriented program

Uploaded by

sanketzombade282
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
9 views

DM Unit 3 Solution

practical of object oriented program

Uploaded by

sanketzombade282
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 20
How many bit staings of length 8 bits can be cons 84 rtaucted pie will wihew Start with 1) 0& end \with °Oo' ? => | S0)- Heae, the length of Staing ib Fixed = 8. IcobetJi- TR the bit. staing Stack woth 4s i.e. The fiat brh among the S_ bits 5 Axed and see Ide ia db 50, we have Seven »_ place.’ “whee we can hove_O 001: Bae So, SO eat with ‘1’ ade, — 4 : Alea is ya GL 5 | ok Staings Stock with +. cet s | coce 24:- EF 2 ik iy th 7 lie The lost hoo bits of | eet and the they O_ando. i ove neo pcs where wecon have 0081. "Be kes ordi 00, ie oe 226 nee an [cose 3} Bik strings Olatting with 4 and ending: ait O00. fe Thoee postions ate Teed. and Ave_pobtions on _|hove any value between Oar Ls ae ‘5 Now le Aisi Eat saith ‘4 and_ending — ______ | ewith_00_a22, oe es ee Bs 1AoB) : Peet © scanned with OKEN Scanner _|+hera_05 0. Single. Une |G, coe_no have + people 4- anearge._. “| Ge We can. Oude ete units ‘h foll owing 1) By Tielusion- Exclusion Paineiple, AuB= 1AIFIB) — 1Aoa} AB) = 128+ 64-32 IA 0B) =160 Herre, the numbea of sbaings of length 8 that will eithea. Staet with 1 o@ onal cast, OO ace 160. Q 4 [In hao man iy way. can 6 Boys and 2. Gils be senting _|tna on Such 1) 2 Gials cae Seating icles i} 2 Gials aze not™ ing togethea. Leo) OV Tt pumbea_of OF-Boys one! Gi (n) = 2. Gials cae seat yetheas. 2 Gials ae. seating - ethea,, we can consider Ausnbee_of ways, 5x = 5040 — : Roveae bave rs git a5 a sing! e unit: lb. can a among ~themee|ves ckhee. mi, Qumbea_of. any SEES Be 6 Giels and 2.6 St. b00 gies dae neal? a4 x2 = S040. XZ is = 10,ORO« © scanned with OKEN Scanner 1] 2Gials aae rot Seating toyelree. Total _nurnbea of ways to ~Aeeange & people C6 Gials and_2. Boys) coithac~ an conditions, =O = 2xdx 6x 5x4 Ox2%) = 40,520 HTheae ae 10,080 cays of ceaang ernents whee two ___|gi@ls ade seati 09 ce _ [Bubstaacting thin value faorn_the above value we get, | 0,920 = 10, 020-2 50,240. —_______ Thee _aze 20, 240. ways ot 2 ils Cae not Seating — aeoaaaee togethes— Te a ec —_ §3].| How_ma y_bit Steings can be foamed. of length 10 bits caich_comtains as “pat least fous L's | iit ack most _-fout Ls - coe 5o\ni- ee bi atiting OF length 10 be 410. positions wh ich_con ithe 0 oad at any position — ee Ho find. ¢ 10 bits Staing containing i [i] ot least tue. ; eee TWe mous acld_all the bit Sidings comainn fous. Us: i i Total_rumbea_of 10 bik Sidings ace, hs OD: fet oes » ¥ Hee) eal aaa ere oeera a & 6 Ba C 8 i J F e i & \ \ S| | | cE toa = = to = 45 = 120 eS pig © scanned with OKEN Scanner BUS bit Staings. can be-foarmed. of engi 10 bits _|cohich have oP least Rua 45: iipak le mat Rue tio. 4 _|To find nurobea of bit ateings having at met Rua 15, we Find_noof bit Siang st wikh. 0.142, 3, ____]and_4 ones. oti yt Gari ae 4 Hu Osonessde! ui) quis cia apbary fy Loms=!0 Ue 7 iv D2 ones = 1OxF = 45° ao fay 2x) 3 ores = _jox9x& = 120. a G2) k as jee hh ores = Oxgxtxe = 210 ¥ EEEEEe LXDx* 2x! é pa Sd oby | ee ussorgo = O86 The nurnbea oF bik stoirgs. with ab mest Rua L's F aie 10 bits ae Da6_- 7 os Quay | How _rmany bit Staings OF length 10. cn te foamed — |eohich will combain erthee S_ Gest 05 08 5 consent 169 ah a ae oe OE the _numbea of bit oteirgs of le _lehich coil) contain. elthet 5 convective” 0S 08 S” Conse= | cubve As Bae 09. _of lergth 10. caiicg _S. ~coreeastve Ob. 50% ado_ ce faced eomecutively - © scanned with OKEN Scanner | 5 consecutive zeeas can be pliced_in 6 possible — combi nations in-an- LO_bit sta [+ No of oe conseautve 0 S25 Xba ae =_192. lip 8 ae ____| NO. Or ne ae aa a _ ; 5 5 = oe a et ee consecutive Ls. Ran a ang pan € pie obi FHon inan 10 bit sible combi fea & consecutive. 15. > 5 = 32x6 = 192. Total numbed of bit skdings_ of length 19 that can — can be foamed containing erthes 5 conmeciltive 0'5 08 | 5 conbecuctive 15 aa, 192-192 =38 4 ~~ 05,_IP zip code contains_6 digit How mat difeoent. zip |code can he ammnleahatbedig ai igits its O-Gu rf, tio ee ib_usedl_nnoae sthaS once, —__— oe ast digit is nok’o! Fete, curbee_of bis_n=,S——— Freee et © scanned with OKEN Scanner __ Fike thiad cligit can hoe Rivduegs ot 2 ____ |: No Of padpible_combinations = 8 fi No digit ib used enoae tron One a The fast digit can_have_an | ralue bebuceen O40 4, ae “No of oe i ble combi = “15 alloewed.— Bee fee et Nov of oe combinations = E saa i foueth digit can_have + values, | No: of possible combinations = Che #-fth ..cligit Can. have. 6 Valueyeadowt No. of podsible corn binations = 6. The Sixcth_cligit can hove 5 values, [x No.of possible combnations= 5 Total numbea of zip codes, — |= 1Ox9x8x4X 6X5 =151, 200 - tae (Tota) numbea of zip co. des-aae 151,206. 0 — Es digit id, eae ab ice: JiJoThe Rest digit is nob \0' © scanned with OKEN Scanner “Nook Porsible_Combiectionh-s = 4. f The Aicek digit can. have_any value between 1 +o 9. tke secopel digit can. “hove any_volue_bebudeenO-t0 9, See No: of possible _combincrtioAs #8) 9 the thied. oe ee — H | nlo-of pdasible combinations = § Fike Ruth digit can have 4 values, (The Sift ‘git Con ve 6 values * No-of paésible cCombinatians = 6. : H Pas |= 9X9xRXEXG = = 6,080) si aol fi | F te fi iqtt_of zip code is _not'O! then theae | __}aee_136,020__poisible_ combinations. — 99 ose the Binornial_theosem to_expand_Ca- ab) 6 i Hite qeiteal Bam of expansion ee Oty) 1 Cone = = = =P): yh orev © scanned with OKEN Scanner Heae, X=30, y=-2b- and n=6. Ba he hy i Theater to seh Orr nian (a~ 2b)6 = = (8) Gad-K C-2b)4 : New, alee indi ter. foe, k= 01,21 “0 C2p)° = | Ged. Le = Bagot ij Rake ions a —($) CaaS! 2p)" = 6. eae (2b). ==29)605b itp Fos _k=2 - (9: Ca0ge= == 15. (aa)4. C2by* = 4860q4 52 : fon k=a ne (S Come 3 (=a )s= 20. CaP Cab = = Aa2008E NJ foe k= 4 ke TS : (é \ C30) 6-4 “aby =15-9q2. a lBbE = 2160 abd vijfoa k= 5 -i 8) CF 2 G2b)S= 6. 4g. 50b5) )aa846 abe AIS =]. (A). 64UbE = CALE Nowy. oni all a ‘ogethea, we ge © scanned with OKEN Scanner Qa-2b)6 = 429.06 - 9916 ab + 4860046? ~4320q>5% +216002b4 - $46ab> + 64 bs OH men saya win of men and 6 wornen Ave feasons 4o oem a committee So that ob lease b men ade -thece on -the Commitee. Tn how many. way Can He be done? =) |501?: [The committee must consist of 5 people with atleast ben. The_possible_combinations aa of 3 men and 2_cwormentn 7 on = FX6xS = dF 3 Dx2xI EO Aa Pier Be no of cays to_select 3 een foam + men. 1 fae ‘select. 2. women faom 6 women WEE Sey a f= Ss5 LA to. 5 elect a. committee. coith 3 men id 2 ae ol sghac fs (BY ({)* 35 XIS = 525, en: b]-4 = gpd 4 worenis (s ee +o a 4 rae Poor + men is’ YXDx2 x1 __d © scanned with OKEN Scanner The no-oF f onyo-to Seleck 1 woman Fearn 6 werren ip: CG) = NO of cgay to foam a coromiHee with 4 men and Mannan io (#)* (6) = = DF A= 2104 C] 5 men and o woman: : a Aa: OF ways to a 5 men. foom + ren is: = 218 (4) = 4x6%= 2x —|No-of an to Select 0 O.wornan. é ti IF No. 0 woays +o fam_a 2. cormniee 20th S men ernst l aaa women Io. aby acai § ee Lee (S) = Ux} =2] fyi + baie aged eee of ‘ae a — - | ee ooeu = acon tolnaliben so yo tp foom.< a Commitee 6 atleast men_ade sected_ 1 F56. 5 —__Q 3] | Suppone_aepebitions aac pomiteas — A i $3, Per yo theee- digit con be foemed fs [for Bier digs 9,914, 5) and 97 _ | ii] How many” aae- cubtiple._ of 102 Hil] How many .ace even) © scanned with OKEN Scanner AM Sq )9- ‘oe ae ways thaee- digit 9 it 7 Con be Learned 0M) O1X rs 2,.4,4,5 Birce, Sepetitions ate allcwed we can aepect -the sf Same_oum bea ck any of the -Hhaee positions. Ke -|Foe ech position, theae aae Six possible values to —_|chonbe. Peon, a | As there ade _Six_pasrtions and three ~ =digit no. i -i5 to he -foamedt —_ + | Tétal_no-¢ of thee digit oumbees = 6x6 x6. = 216. ee eo ati es co pas mk -zea0_and_zéaais not peovided eit ames lio a —___lplace Hit How_many—aae even. —__- et Galatea One ples clan 2 ok tack the ones ——,$0-we_only how hove -tido_cholees to _pud | oa hundasds place = 6 choise. 5 | Foe tens ploowe= 6 choices. Te 2S for_ones place = 2 choices. Totod Ine: of even giants umber = 6x6x2 = a2: | © scanned with OKEN Scanner ag. | | yt | et al | [oo ot test =645- a | Thus, coePB cienk of oF oe —— & Say Whe i5 the, oe of 20°F in the expansion oF C2-1)'99 501 6 find coettcient of 99 in expansion of (2-x)'5, ce can use Binomial th, (atb)? = = (?) ank pf Tin this (abe, a=, b=-x and n=!9. C2-x)!9 = et) O'S Ck yk Now ie And roalbiciae of. ad, J. Oe k=, ow egek_ wave —(2- que TC 199 9 Ay a nis ate € EN 4S Z i) ee oo (9) ~Saila acer Pal Dele = = 92933 XE XALE x FXYXBXARS. onc 910.= [ody = 92948 x1OM = = 945 +6642, = © scanned with OKEN Scanner | | | Qiy) | Cc i] in] ga JSPM | peti lore | | So, coefFiciertt of #9 in expansion of C2-n)'9 15 ~9 454-6642. Ave pencils and five pends aae to be aezanged in a aa-TIn he many ways they can be areanged if: All pencils must Ke attanged™ togethea. No two penals Should be kept tngethes One pen and one pend} must be aeeanged tog ethea or Sol 'TAN perrils ace aaaanged togethee. Take E cents, a5.a single, blatk. We need to daeang 6 dinits beatae of perci) ) Possible combinyctidn foe 6 units = 6) = 420 eb. 22 oo Pospible combinatide oa 5 perciloin black =5] = 190 ways. te 6) x F1 £420 \201= 86400 ways. i ITheae ate &€400. wayo to azaange all penals togeltec : Ii. No “too pena la together. a PB ici : ce ay Figg ore ling ys aa Cieie de pencils_in the gop>_ between the. pens are ee ake ane 002ing.5 —gaps_out of 6 foe penals = 6 - = 5)x635) Jefi00 was if ees __[Theee cae 86400 cdysrto” dacarpe st no cto pencils _|ate together. ney my em © scanned with OKEN Scanner | So Mp One pen and one pend! togethea Choosing one pen ard ore perxil to foarn & unit = 25 asad | Wehave @ Hems-to aeeange,-: thee Ade | 8! = 40320. ways. | Aazanging pen and pendl. within a untt=2ways | *. 25 XBIX2 = 2016006 ways: These ave 2016000. cays to Aageange one pen and [One pencil togethee: Quy And the nur bee of peerickattions “that can be. inode out of the lee es IP MISST S9LP PL. NASA SSL NATION: =| S01:- ‘ip Theee aae_ Il letteas in ‘the uned MIDSSTSSTPPP. | appenss. 4 times: ZX appeans. 4 hres. | O appeats 2 Himes 1 oppeats once. “re 9 weed no: of peemecboctions: Al Al xD] x Ou! n=_D4650 i © scanned with OKEN Scanner iif Theae axe 1d. lebteas in vxced AesnooLn) ATTON: A_appeats Steves: T appears 2-+times 5 appears 4 Hm : N_appeaay_2. times. “Tand © appeas_ once. * -—The sequited no» of pearnucations, - PERPCECr EUs + iat fod 108.10, Red, tei cauctomobile license plates can be made — i) er ry pio two diPReaent leHeas-foll=_ oe boy thave digits: Solve the paoblem if the digit Cort Dok bes zedge fee ee ae posthan, uxe_ Can ‘only.dd.¢ a a ledies —— and. (these ae 26 lebtens. 35°C) i rag a i ere can be elected Foor io agen 4{— Ci = 10 toa 40 |i Tre second digit Con be seleded Feom. S-digite Grass ae © scanned with OKEN Scanner ee i e thied dligrt con be Selected feo 8 cligrts in =§ wayd: “Total No: of License plete : _|__ = 2649S gx 9x1 is | =468000@ - —|As feet digit cannok_bezeao, - wp have GY digrls in Rest place ke wads =e on 0. off Requiaed License plakes 0ee, | De aSK9xGue = EVE Mele — —Q18} The company hab 10 membeos_o ons baad of > _Idizectoes Th how woayd can they elect a ___ [ d gtesldens, vice paesider by sdlaclony. ard) teeasuee?. [ooo eee eee Als company has _16_beaed_membeas out of which ____| paesident, vice president, Secaetacy and taensvaes aaa be_eelected eee By. pearnutacion Loerna, pgs ale pe ig! A . (n-8)) © scanned with OKEN Scanner og : By "Binomial Th, _ | Heae, x= yey and NEI) i = 10xgy 3x4 = 5040 —Pln). The no of ways 10 membeas can cece paerident, ie peesident; Secee-taty and teeasuees 1 5040. pnd [eighth seam in expansion of Co) 's Cay? S Be Qwerty u aaa] “The ig Pibeam occas ben 28 Bol = er }The “eighth 4 tenm is, 3) B= tyt= = IHG x6 yt i: ee Hh =leam. -0f expansion, 8 imag is i 3} 1A box contains 6 white_and 5 black balls. Bnd. i —fpuerbee oF coast A a canbe a jaan Be i Te aero i far of eee ee lowe. | SalPs— © scanned with OKEN Scanner ice fete ene Sr an ; BI = 3840. Woy ins EEL port be_whre ioe ae balls Ago 6 need> to be selected then N0- oP ays =* C ann 1. balls rnust be Selected facm 9 balls - * Requiced value | SCax 9a. [EEEEE = ~_ 39) ii] BIL Of thers hove Same colaus, re. Eithee_all_ balls_aae black o@ white : Tee oF cyto dea ah balsam feo 7 x15 5 6Cy, = 6! = 6%5 = 15. 4) x2 4 OE (The no: of ways to dean 4 black btball Feo : eee =f =5. eel ae 4 balls faom box_woith_all_of +thern pg a ds roan cal Oud ig 1545 =_20- a aoe © scanned with OKEN Scanner Qig Th => |! These aee 2520 cays aaarge leHteas of — 15 Con cwoad ‘HOLLDAY! be aaean- ged per nae TL always come +o | lettee L. S19: io The word‘ HoLTOAY' has + iff leHees. no of days in which lettees of woed 'HOLTDAY' be Qrtorged caithout any desrtaictons, X6XS XYXDK2X1 = 5040. |Dye t0_ syrometey, “T? will come. -helbee L' in hah 7 of Slane e aeeangement. [+ SHO = 520 fe ELE oad HOLE DAY! ST" 15 always” lePt of 1 (Q14 Ab Yo. con one disseoute 10. apples —o8 fia hao ma child _ ~ anon $0)” od = 7 We have -to fi rel no. oF omy tn_disksbute 10 apples—in 4 childsen. ~*~ [ Co kt idle have. the Foernala,. eae Cork-D\_ ne | Heae, o=10 Oe a Seis = Bly ee © scanned with OKEN Scanner | Gay)? = 20-7 wey aN. aot T 22 Ca = i lal, 31. C13-3)) _B) x toy =a tol — Ox lol : tas J 2x41 Bx2x« I Sle “Aen _Cin= 296 “Thee are 036 to distaibule lo -cpples le among 4 distince 2 ong ds || Use Binomial “theoaern bo_expand Cais > [Bcccading ao Binomial th™, #| ENG yD |Heae, CHA tyB> + C9 CxHP (2)_ | sol*+ 68x eR. — [Trib ip the. Pe tequigedl paseo oa. : © scanned with OKEN Scanner Ae ugh? = GAP +PC O4P (09-+ Rebar | = x2 +5C; 13 (294 62 OD +203 (2)

You might also like