0% found this document useful (0 votes)
51 views26 pages

MCS-013 (2022-23) Solved Assignment

Uploaded by

Rishabh
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)
51 views26 pages

MCS-013 (2022-23) Solved Assignment

Uploaded by

Rishabh
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/ 26
MCS-013 Solved Assignment 2022-2023 ourse Code ‘ourse Title hemat [Assignment Number BCA (2)/013/Assignment/2022-23 Maximum Marks 100 [31st October, 2022 (for July Session) Last Date of Submis ii sth April, 2023 (for January Session) Note: There are eight questions in this assignment, which carries 80 marks. Rest 20 marks are for viva-voce. Answer all the questions. You may use illustrations and diagrams to enhance the explanations. Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation. Q1. (a) State and explain De Morgan's laws for Boolean algebra. Solution : De Morgan’s law: The complement of the union of two sets is equal to the intersection of their complements and the complement of the intersection of two sets is equal to the union of their complements. These are called De Morgan’s laws. For any two finite sets A and B; i) (AU B)' = A'/ B' (which is a De Morgan's law of union). Gi) (A By =A’ UB (which isa De Morgan's law of intersection). Where, A denotes ‘intersection’ U denotes ‘union’ * denotes ‘compliment’. Qi. (b) Make truth table for followings. )po(-r vq) a(~par) i)pora~gyv(pa-n) Solution : Dpr-rvg (par) p|a| er |p) = lervalepan! PEG NGER BO Craps T T T F F T T: T T D Fir f[3ti]r F F F T rF | T FE Fl F T F E tlef[elri[ st] er F F F F | oT T T F [oT a T 7 Fr] T FE T t [| T ay ‘i. ee ee F F T F T Flre[re[rf[r r T T + ii)poGra-g)v(pa~r) pla] faa | nr (era alipa~ nf Ore Ov amperes Dyna rilr[r[ rer F F F F tTilt[r[ri[r F T B rT T| FR] T |. ARP F | F F tT[rF[r[>r[t T | e T F[t [rj | F F F F T F F[ Fr [tT F F F T rFi[el[rl[t |e F F F T rle[ri rit T F T T Qt. (€) Give geometric representation for fallowings: i) {5,5} * {- 2, - a} ii) {1,5} x{-2,-3) Q1. (c) Give geometric representation for followings: ii) Solution (5, 5} {- ={G,-2),G,-3), ii) {1,5} x {-2, ii) {1, 5} * {- 2, - 3k = {C4 - 2), (1,- 3), (5, - 2), (5, - a) Q2. (a) Draw Venn dia DAN BNE) (AUBNE) ii) (AU BAC) U(BAC) ram to represent followings: Solution )ANBAC)AAUBNE Qz. (a) Draw Venn diagram to represent followings: )(ANBNC)N(AUBNC) ii) (AU BNC) uU(BNC) Solution ; D(ANBNC)N(AU BNC) ii) (AUBNC)U (BNC) Q2. (b) Write down suitable mathematical statement that can be represented by the following symbolic properties. )ENEy WAP i) ¥@ Gy) G2Q Solution : (i) Mathematical statement of the above symbolic properties is “Some element of x, and y and all the elements of z belongs to the function P” Gi) ¥ @) Gy) @ 2 Q: This is printing mistake on the question. The correct question might be like the following: WaAAyEDQ So, the mathematical statement of the above symbolic properties is “All the elementf of x and some element of y and z belongs to the function Q” Q2. (c) Show whether v5 is rational or irrational. Solution : Let us assume that V5 is a rational number. So it can be expressed in the form p/q where p,q are co-prime integers and q +0 = V5=2 q On squaring both the sides we get, pis a multiple of 5 => p= 5rn (say) sre? > (ii) From the equation (i) and (ii), we get 5q? = 25mm? => g=5m? => (is a multiple of 5 ie. q is a multiple of 5 Hence, p, q have a common factor 5. This contradicts our assumption that they are co-primes, Therefore, is not a rational number. Hence, V5 is an irrational number. Q3. (a) Explain inclusion-exclusion principle with example. Solution : Qg. (a) Explain inclusion-exelusion principle with example. Solution : Let A, B be any two finite sets. Then n(A UB) = n(A) + n(B) ~ n(A NB) Here "include" n(A) and n(B) and we "exclude" n(A. B) Example: Ina town of 10000 families it was found that 40% of families buy newspaper A, 20% family buy newspaper B, 10% family buy newspaper C, 5% family buy newspaper A and B, 3% family buy newspaper B and Cand 4% family buy newspaper A and C. If 2% family buy all the newspaper, Find the number of families which buy (a) Number of families which buy all three newspapers, (b) Number of families which buy newspaper A only. Solution : 40% 20% © 10% (a) Number of families which buy all three newspapers: n(AU BUC) = nfA) + n(B) + n(C) - n(AN B)—nf[AN C)- n(BNC) + n(ANBNC) n(AU BUC) = 40+ 20+ 10- 5-3-4 +2 = 60% (b) Number of families which buy newspaper A only = (40 - 7) = 33% Q3. (b) Make logic circuit for the following Boolean expressions: i) ('y'2’) + (ya)! + (az'y) (b) Make logic circuit for the following Boolean expres: ) + (x'y2)! + (xz'y) ii) Ca°yz’) (xyz’) G'y"2) Solution : i) ('y'2!) + @'y2)" + Cxz'y) j oy \ eyed J, (cya) ixyay \ | | poe ee J— exye) + ya)! + (nye) ) } z {) oo fi) (x'yz') Qxyz') @'y'2) x x > \ oz) \— (ye) (nye) Ory2) Q3. () What is a tautology? If P and Q are statements, show whether the statement (P — Q) v(Q P)is a tautologyor not. Q3. (e) What is a tautology? If P and Q are statements, show whether the statement (P + Q)v(Q— is a tautologyor not, Solution ; ‘Tautology: A tautology isa compound statement in Math which always results in Truth value, It cloesn't matter what the individual part consists of, the result in tautology is alwa true. Cheek whether the statement is a tautology or not. Now I am going to find the result of the given statement ic. P a me ~Q P-=Q QoP @—QVv(Q>P) t t F F t rT ¥ t F F T F T T F T T F T F T F F T T T T ic Since all the outputs are True (1). Hence, itis a tautology Q4. (a) How many words can be formed using letter of PE T using each letter at most once? i) Ifeach letter must be used, ii) If some or all the letters may be omitted. Solution G@) In the word “PEPSUDENT, total umber of letters = 9 among which 'P' appears 2 times, ' il letters appearing 1 time each. appears 2 times and other than "P* and So the number of distinct letters = (9 - 2) =7 (P, E, SU, D,N,T) ‘The number of words can be formed using all the distinct letters of the word by. "EPSUDENT” is given 271276 %5% 4x3 x 2x t= 5040 (Answer) Gi) If some or all the letters may be omitted then it can be denote ‘Sum P(7, n)" where n= 0,1, 2, So, the required number of words, ) + P(r, 4) + POA, 5) + PC, 6) + P77) = P(7, 0) + P(7, 1) + P(Z, 2) + PC, 3 = 1474424210 + 840 + 2520 + 5040 + 5040 3700 (Answer) Q4. (b) Show that: @=> P and (~Qv P) are equivalent. Q4. (b) Show that: Q => P and (~Q v P) are equivalent. Solution : We can easily prove that Q > P= ~Qv P using Truth table. Truth table of Q—P: Q P Q-P T T F T F F F T F F F T Truth table of ~Qv P: Q P ~Q “OVP T T F T T F F F F T T = F FE T T It is clear from the above truth tables, the final outcomes are same. Hence, Q — P= ~Qv P (Proved) Q4. (c) Prove that 2" > n3, yn 210 Solution : Q4. (c) Prove that 2" > n3, ¥n2 10 Solution : Step 1: Let, P (n) : 2” > n3 For n= 10, 2! =1024 > 103 vefore, P (10) is true. Step 2: We assume that P (k) is true for an arbitrary k= 10. 'Thus, 2* > k3 Step 3: Now, we want to prove that 2**! > (k + 1)3 ( i) | > (: =) x= (k41)" [b> 10) ok+1 = 9 x ak 5 ok (By our assumption) 22H > ($1)? Thus, P (k + 1) is true whenever P (k) is true for k = 10. Therefore by the principle of mathematical induction, P (n) is true ¥ n= 10. (Proved) Q4. (d) Explain principal of duality with the help of example. Solution : Qa. (d) Explain principal of duality with the help of example, Solution ; Principal of Duality : ‘This principle states that the dual of the Boolean function is obtained by interchanging the logical AND operator with logical OR operator and zeros with ones. For every Boolean function, there will be a corresponding Dual function. Example: Boolean Expressions and Their Corresponding Du Given Expression Dual | Given Expression | Dual o-1 1-0 eee A+AB=A O40 trast | AB=A+B | AtB=AB AO=0 Atizt [(A+©) (4 +B) = AB + ACTAC + AB = (A+B), (A+C) “AB = (A+B)(A+B). A+B=B+A AtB=AB+AB+AB es) A+A=t | AB+A+AB=0 | ((A+B))A(A+B) =1 A+(B+C) = (A+B) +C Q5. (a) How many different professionals committees of 10 people can be formed, each containing at least 2 Professors, at least 3 Managers and 3 ICT Experts from list of 10 Professors, 6 Managers and 8 ICT Experts? ommitter n be formed, each containing : Q5. (a) How many different profe s of 10 people Professors, at least 3 Managers na and 3 ICT Experts from list of 10 Profess nd leas sors, 6 Managers ict perts? Solution : Given, Total number of Professors = 10 Total number of Managers = 6 Total number of ICT expert = 8 onal in a committee = 10 ‘The number of profes: So, the number of different committees of 10 professionals can be formed if each committee contain: at least 2 Professor, at least 3 Managers and at least 3 ICT expert is given by ~ Different Possibilities Combination Result 2 Professors, 3 Managers, 5 ICT Experts WE LxPC nts 50400 2 Professors, 4 Managers, 4 ICT Experts HO KSE NO, 47250 2 Professors, 5 Managers, 3 ICT Experts 1C,x©C, x8 15120 3 Professors, 3 Managers, 4 ICT Experts. 168000 3 Professors, 4 Managers, 3 ICT Experts 100800 4 Professors, 3 Managers, 3 ICT Experts 235200 Total 616770 Hence, the number of different committees can be formed is 616770. (Answer) Qs. (b) Aand B are mutually exclusive events such that P(A) = 1/4 and P(B) = 2/5 and P (AU B) = 1/2. What is the probability of P (A) B). Qs. (b) A and B are mutually exclusive events such that P(A) = 1/4 and P(B) = 2/5 and P (AU B) = What is the probability of P (AN B). Solution : Since, A and B are mutually exclusive events. «P (ANB) =o (Answer) Note: ‘This question has some printing mistake, [Reason ; As A and B are two mutually exclusive events, then it must be P(AU B) = P(A) + P(B) But, as per the data given in the question, 1/2 # 1/4 Qs. (c) Explain addition theorem in probability. Solution : Addition theorem on probability: If A and Bare any two events then the probability of happening of at least one of the events is defin« as P(AUB) = P(A) + P(B)- P(ANB). Proof: Since events are nothing but sets, From set theory, we have n(AUB)=n(A)+n(B)-—n(ANB). Dividing the above equation by n (S), (where $ is the sample space) n(AUB) _n n(S) on (A), n(B)_ (ANB) (S$) * n(S)— -n(S) Qs. (c) Explain addition theorem in probability. Solution ; Addition theorem on probability: If A and B are any two events then the probability of happening of at least one of the events is define as P(AUB) = P(A) + P(B)- P(ANB). Proof: Since events are nothing but sets, From set theory, we have n(AUB) =n(A) +n(B)—n(ANB). Dividing the above equation by n (S), (where $ is the sample space) n(AUB)_n(A) | n(B)_ (ANB) n(s) (5) n(S) ‘Then by the definition of probability, P(AUB)=P(A)+P(B)- P(ANB). Q6. (a) How many ways are there to distribute 15 district item into 5 distinct boxes with: i) At least two empty box. ii) No empty box. Solution : Q6. (a) How many ways are there to distribute 15 district item into 5 distinct boxes with: i) At least two empty box. ii) No empty box, Solution : Given, no. of distinet objects (r) = 15 Number of distinet boxes Let, U be the possible distributions of 15 distinct objects into 5 distinct boxes. Also let, A; denote the set of possible distributions with the i" box being empty. (i) Thus the number of distributions with at least two empty boxes is | A U Ay UA, U As | We have, where 15 Also, | Aj| = (5 ~ remaining 4 boxes. 15 = 3°5, the number of distributions in which the objects are put into one of the Similar 5 and so forth. , [APN Aj | A, VA, UA, U Ag | x 215 45C, x 115 — 5C, x 015 215 +90, x 15-50, x 0! 43161395 (Answer) (ii) The number of "no empty bo given by [An Ayn Ay Ayn As 51550, x 435 + 5C, x gS ~5C, x a5 450, x 135 5c, x ol8 15292030400 (Answer) Q6. (b) Explain principle of multiplication with an example. Q6. (b) Explain principle of multiplication with an example. Solution If A and B are two independent e iment, then the probability that es in a probability both events occur simultaneously is: P(A and B)=P(A}-P(B) In case of dependent events , the probability that both events occur simultaneously is P(Aand B)=P(A)-P(B | A) (The notation PCB |.A) means "the probability of B, given that A has occured.") Exampl Q. You have a cowboy hat, a top hat, and an Indonesian hat called a songkok, You also have four shirts: white, black, gre dom, what is the and pink. If you choose one hat and one shirt probability that you choose the songkok and the black shirt? Solution: The two events are independent events; the choice of hat has no effect on the choice of shirt There are three different hats, so the probability of choosing the songkok is é There are four different shirts, so the probability of choosing the black shirt is ;- , by the Multiplication Rule: P(son ok and black shirt) = 1 i Q6. (e) Three Sets A, Band Caré: A = (1, 2, 8, 9,12, 15,17}, B= (1,2,3,4, 10 } and C = {7, 9, 10, 14, 13). Find AUBNC; AN ~BUC; AN BU Cand (AN ~C), Solution AUBNC 3.4,10} 147, 9, 10, 11, 13} 5217) {7. 9, 10, 11, 13} {9, 10} AUBNC ‘9, 10) (Answer) Tage) Be FO Wilale or =taterMeoron a) Q6. (c) Three Sets A, Band Care: A = (1, 2,8, 9,12, 15,17) B 13}. Find AUBNC; AN -BUC;ANBUCand (AN -O). 7.9, 10, 1 Solution AuBne (7.9, 10,1, 13) 2,8,0,12,15,17}U{1,2,9.4,10} 9 ta 4,8, 9,10, 12, 15,17} 14, 6, 10,31, 13} {9,10} AUBNC={9,10} (Answer) An-BUC =A N(NOTBUO) 1,2, 8, 9,3, 15,17} 9 (Nor (1,2, 944,10} U 47, 9,10, 12,29}) 7.9.10, 11,18) 11, 2,8, 0,12, 15,17) 0 (Nor {1.2.3 = 18, 12, 15,17) (Answer) An Buc 2,8,0,12, 15,17) 14, {1,2} U (7, 9,10, 11,13) {1,2,7,9,10, 11,13} (Answer) (an-o) (An orc) 15,17} 9 (Nor 47, 9,10, 11, 13)) ={0,2,8,19, 15,17} (Answer) Qy. (a) Find how many 3 digit numbers are even? Solution Qz. (a) Find how many 3 digit numbers are even? Solution : ‘The 3-digits even numbers are : 100, 102, 104, «1, 998 ‘The above sequence of numbers is an A.P. whose 1st term (a) = 100, last term (J) = 908 and common difference (d) = (102 ~ 100) = 2. Now, we need to find the number of terms (1). By the formula of number of terms (7) in an A.P. is given by - l-a a = +1 998 — 100 =e Sn= 1=450 “on = 450 The number of 3 digit even numbers is 450. (Answer) Q>. (b) Acoin is tossed n times. What is the probability of getting exactly p tails? Solution : The repeated tossing of the coin is an example of a Bernoulli trial. According to the problem: Number of trials =n Probability of tail: a =1/2 and hence the probability of head, b =1/2 For exactly p tails: x=p Therefore, probability of getting exactly p tails, Px =p) = CaP? m {1 r wer ~5 (2) -G) -c Gy" "Lae G)- (Answer) Q. (©) What is a function? Explain following types of functions with example. Q7- (e) What isa function? Explain following types of functions with example. i) Surgective ii) Injective ii) Rijective Funetion: A funct isa relation between a set of inputsand a set of permissible outputs w h the property that +h input is related to exactly tput. Let A & B be any two non-empty set ‘mapping from A to B will bea function only when every ele in set B, ntin set Ahas one end, aly one image ) Surjective Function : Ifthe function f': A-+Bis such that each element in B (codomain) isthe °F image of at least one element in A, then we say that fisa function of Aonto’ B Thus fi A—-B is surjective if, for all b € B, there are son oa A such that fla) =b. mple: The function flx) = 2x from the se numbers is a surjective function. atural numbers N to the set of non negative even i) Injective Funetion : A function fA —~ Bis ‘mapping if different elements of Ab whenever f(x) = fly), X= y. to be a one - one function or injective (on fis injective ifand only if re different Fimages in B. A fun Example: f(x) = x + 9 from the set of real number K to R is an injecti (x) = 12, when f(y) = 8,the value of y can only be 3, so x = y. function. When x = 3,then ) Bijective Function : A function f ({rom set A to B)is bijective if for every y in B, thereis exactly one xin A such that f(x) = y. Alternatively, fis bijective if itis a one - to- one correspondence between those sets, in other words, both injective and surjective. imple: If fl) = and surjective. Thus, it isa bijective funetion. the set of positive real numbers to positive real numbers is both injective Q7. (A) Write the following statements in symbolie form: (a) Shyam is rich but unhappy (b) Either do physical exercise or be ready for poor health Solution: (a) Shyam is rich but unhappy: up + Shyam is unhappy. ‘Then, the symbolically we can represnt ‘Shyam is rich but unhappy’ as p Aq. () Either do physical exereise or be ready for poor health Vf p physical exercise a poor hes ‘Then, the symbolically we can represnt health’ as pv 4. ither do physical exercise or be ready fo Q>- (A) Write the following statements in symbolie form: (a) Shyam is rich but unhappy (b) Either do physical exercise or be ready for poor health Solution; (a) Shyam is rich but unhappy: If p: Shyamis ricih, q+ Shyam is unhappy. Then, the symbolically we can represnt 'Shyam is rich but unhappy! as p Aq. (b) Either do physical exercise or be ready for poor health If ps physical exercise q: poor health Then, the symbolically we can represnt 'Either do physical exercise or be ready for poor health’ as pv q. Q8. (a) Find inverse of the following function: f (:c) = What is a relation? Explain equivalence relation with the help of an example. Solution; Finding inverse : 4 1? — 2a 4 (®)’= (“y —by-9 aed Q8. (a) Find inverse of the following function: f (7) = What is a relation? Explain equivalence relation with the help of an example Solution: Finding inverse : gh avg f(z) = + Va? — Da — 36 Hence, the required inverse of the given function is (Answer) Relation : Relation : Relations in maths is a subset of the cartesian product of two sets. Suppose there are two sets given by X and Y. Let x € X (xis an element of set X) and y € Y. Then the cartesian product of X and Y, represented as X x Y, is given by the collection of all possible ordered pairs (x, y). In other words, relation says that every input will produce one or more outputs. Equivalence Relation: Arelation R ona set A is called an equivalence relation if it satisfies following three properties: 1. Relation R is Reflexive, i.e. aRa V ae 2. Relation R is Symmetric, i.e, aRb = bRa aRb and bRe => 3, Relation R is transitive, i. Example: Let A = {1, 2,3, 4} and R = {(1, 1), G, 3), (2, 2), (2, 4), (3, D, (3, 3), 4, 2), (4, D}- Show that R is an Equivalence Relation. Check the equivalency of the given relation: Reflexive: Relation R is reflexive as (1, 1), (2, 2), (3, 3) and (4, 4) € R. Symmetric: Relation R is symmetric because whenever (a, b) € R, (b, a) also belongs to R. Example: (2, 4) € R = (4, 2) ER. Transiti e: Relation R is transitive because whenever (a, b) and (b, c) belongs to R, (a, c) also belongs to R. Example: (3, 1) € R and (1, 3) €R> (3, 3) ER. So, as R is reflexive, symmetric and transitive, hence, R is an Equivalence Relation. Q8. (b) Find dual of Boolean Expression for the output of the following logic circuit. QB. (b) Find dual of Boolean Expression for the output of the following logie circuit. Solution: Y = (AByBC’ A = Dai aaa From the above logic circuit, we have The final output = (A BY! BC! Using duality principal of Boolean algebra, we have the dual of the above boolean logic expression (AB)'BC'=B(A'+B')C' [Since, (AB)' = A’ + B'] (Answer) Q8. (e) Explain Logical Conneetives and Logical Quantifiers with the help of examples. Solution; ‘The main logical connectives are conjunction, disjunction, negation, conditional and biconditional, Quantifiers are another type of phrase or a special word used in mathematical statements. The quantifier phrases used in this Symbolically this quantifier is expressed as ¥ se are for all, for every, for each, for any ete, Example of logical connective ‘negation’ : If p :Itis raining outside, ‘Then, Negation of p is given by - ~p:ltisnot raining outside. Example of ‘quantifier’: Solution: a —— (asy = (AB)BC’ From the above logic circuit, we have The final output = (A B)' BC’ Using duality principal of Boolean algebra, we have the dual of the above boolean logic expression (AB)'BC'=B(A'+B)C' [Since, (AB)' = A’ + B'] (Answer) Q8. (c) Explain Logical Connectives and Logical Quantifiers with the help of examples. Solution: The main logical connectives are conjunction, disjunction, negation, conditional and biconditional. Quantifiers are another type of phrase or a special word used in mathematical statements. The quantifier phrases used in this case are for all, for every, for each, for any ete. Symbolically this quantifier is expressed as ¥ Example of logical connective ‘negation’ : If p:Itis raining outside. Then, Negation of p is given by - ~ p :Itis not raining outside. Example of ‘quantifier’: The statement “there exists an even prime other than 2” is a false statement that uses an existential quantifier. This can be written as 3x € N, xis a primeand x is even.

You might also like