solution to mcs 013 assign 2010

7
Course Code : MCS-013 Course Title : Discrete Mathematics Assignment Number : MCA(1)/011/Assign/2010 Maximum Marks : 100 Weightage : 25% Last Dates for Submission : 15 th April, 2010 (For January Session) 15 th October, 2010 (For July Session) The assignment has eight questions. Total marks for this assignment questions are 80 . 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. Q 1. a) Make truth table for i) p(~q ~ r) ~p q p q r ~p ~q ~ r ~q ~r (~q ~r) ~p q p(~q ~ r) ~p q T T T F F F F F F T T F F F T T F F T F T F T F T F F T F F F T T T F F F T T T F F F F T F T F T F T T T T F F T T T F T F T F F F T T T T F T ii) pr q ~p r p q r ~p q ~p r ( q ~p) r pr q ~p r T T T F F T T T T F F F F F T F T F F T T T F F F F F F F T T T T T T F T F T T T T F F T T F T T F F F T F F T b) What are conditional connectives? Explain use of conditional connectives with an example. ANS : The statement `if p then q' is called a conditional statement and is written logically as p q.(This asserts that the truth of p guarantees the truth of q.) p q can also be read as `p implies q', where p is sometimes called the antecedent and q the consequent. Example: p: It is raining. q: I get wet. p q: If it is raining, then I get wet. s: It is Sunday. w: I have to work today. s w: If it is Sunday, then I have to work today.

Upload: jagdish-bhanushali

Post on 16-Mar-2016

218 views

Category:

Documents


4 download

DESCRIPTION

Partial solution to MCS-013 Assign 2010.

TRANSCRIPT

Page 1: Solution to MCS 013 Assign 2010

Course Code : MCS-013 Course Title : Discrete Mathematics Assignment Number : MCA(1)/011/Assign/2010 Maximum Marks : 100 Weightage : 25% Last Dates for Submission : 15th April, 2010 (For January Session)

15th October, 2010 (For July Session) The assignment has eight questions. Total marks for this assignment questions are 80 . 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. Q 1. a) Make truth table for

i) p→(~q ∨ ~ r) ∧~p ∧ q p q r ~p ~q ~ r ~q ∨ ~r (~q∨ ~r) ∧~p ∧q p→(~q ∨ ~ r) ∧~p ∧q

T T T F F F F F F T T F F F T T F F T F T F T F T F F T F F F T T T F F F T T T F F F F T F T F T F T T T T F F T T T F T F T F F F T T T T F T

ii) p→r ∨ q ∧~p ∨ r p q r ~p q ∧~p r ∨ ( q ∧~p) ∨ r p→r ∨ q ∧~p ∨ r T T T F F T T T T F F F F F T F T F F T T T F F F F F F F T T T T T T F T F T T T T F F T T F T T F F F T F F T

b) What are conditional connectives? Explain use of conditional connectives with an example. ANS :

The statement `if p then q' is called a conditional statement and is written logically as p q.(This asserts that the truth of p guarantees the truth of q.) p q can also be read as `p implies q', where p is sometimes called the antecedent and q the consequent. Example: p: It is raining. q: I get wet. p q: If it is raining, then I get wet. s: It is Sunday. w: I have to work today. s w: If it is Sunday, then I have to work today.

Page 2: Solution to MCS 013 Assign 2010

~s w: If it is not Sunday, then I have to work today. s ~w: If it is Sunday, I do not have to work today. (s ^ p) ~ w: If it is Sunday and it's raining, then I don't have to work today.

c) Write down suitable mathematical statement that can be represented by the following symbolic properties.

i) (∃ x) ( ∀ y) P Ans: There exist x such that for all y, P is True. i.e., ∃ x such that, ∀ y , P

ii) ∀ (x) (∀ y) (∃ z) P Ans : For all x, there exist z for all y such that P is true. i.e., ∀ x,∀ y,∃ z such that P.

Q 2.

a) What is proof? Explain method of indirect proof with the help of one example . Ans: Proof: A proof is a logical argument demonstrating that a specific statement, proposition, or mathematical

formula is true or false. It consists of a set of assumptions (also called premises) that are combined according to logical rules in order to establish a valid conclusion. This validation can take one of two forms : Direct proof or indirect proof.

Indirect Proof: Indirect proof is a type of proof that begins by ASSUMING what is to be proved is FALSE. Then we try to prove that our ASSUMPTION is true. If our ASSUMPTION leads to a contradiction then the original statement which was assumed false must be true.

e.g. Let us prove the following using an indirect proof.

For all integers n, if 3n + 1 is even, then n is odd. Proof: Suppose that the conclusion is false. That is: n is NOT odd.

Assume the contrary is true. That is: n is even. Then the statement contrary of the given statement is: For all integers n, if 3n + 1 is even, then n is EVEN Lets try to prove it. n is even means n is a multiple of 2that is: n = 2m for some integer m. Then: 3n + 1 = 3(2m) + 1 = 6m + 1 --- Call it Equation (1) Well6m is even. So, 6m + 1 is odd. Therefore, 3n + 1 is ODDbecause 3n + 1 = 6m + 1 from Equation (1). By assuming n is even, weve shown that 3n + 1 is ODD which is a contradiction to our assumption. Therefore: If n is odd then 3n + 1 is even. This is the contrapositive of the statement to be proved. Since the contrapositive is true, it follows that the original statement if 3n + 1 is even, then n is odd is true.

b) Show whether 15 is rational or irrational. Ans:

Page 3: Solution to MCS 013 Assign 2010

(Marks 6 + 4) Q 3.

a) What is Boolean algebra? Explain how Boolean algebra methods are used in logic circuit design. ANS: Boolean Algebra: In abstract algebra, a Boolean algebra is an algebraic structure (a collection of elements and

operations on them obeying defining axioms) that captures essential properties of both set operations and logic operations. Specifically, it deals with the set operations of intersection, union, complement; and the logic operations of AND, OR, NOT.

Example: In the circuit given, there are two gates (AND and OR) gives logical

output A + AB. Using Boolean algebra we can show the output is same as input A (Absorption law).And thus can reduce the cost of circuit (in term of money as well as output time as well). So Boolean algebra is very much useful in logic design of circuits.

b) If p an q are statements, show whether the statement

[(~p→q) ∧ (q)] → (p ∨ ~q) is a tautology or not. ANS: Here,

[(~p→q) ∧ (q)] → (p ∨ ~q) = [(~(~p) ∨ q) ∧ q] → (p∨ ~q ) = [(p ∨ q) ∧ q] → (p∨ ~q ) = q → (p∨ ~q ) = ~q∨ (p∨ ~q ) = p∨ ~q And for the case p =F and q=T, p∨ ~q is false. i.e. given equation is not tautology.

Q 4.

a) Make logic circuit for the following Boolean expressions:

i) (x′.y + z) + (x+y+z)′  Ans :

ii) ( x'+y).(y′+ z).(y+z′+x′) Ans :

b) What is dual of a Boolean expression? Find dual of Boolean expression for the output of the following

logic circuit:

Page 4: Solution to MCS 013 Assign 2010

c). Set A,B and C are: A = {1, 2, 3, 4, 9,19,15,99}, B = { 1,22,33,99 } and C { 2, 5,11,19,15}, Find A ∩ B∪ C and A ∪ B∩ C A ∩ B∪ C= (A ∩ B)∪ C ={1,2,5,11,22,19,15,99} A ∪ B∩ C= A ∪ (B∩ C) ={1,2,3,4,9,19,15,99}

(Marks 4 + 4 +2) Q. 5

a) Draw a Venn diagram to represent followings:

(i) (A Δ B) ∩ (C~A)

(ii) (A∩ B) ∪ (BΔC)

Page 5: Solution to MCS 013 Assign 2010

b) Giv

i)

ii)

c) WAns: a

unFocefa

Q 6.

a) WhAns: Istates The melemenand C,This cside. For th

where

ve geometric re

{ 2} x R

{1, -2) x ( 3=

What is countera counterexamniversal quantior example, coertain propertyalse. Thus, any

hat is inclusionIn combinatoriathat if A and B

meaning of the snts in each set,,

can be seen by

e general case

|A| denotes the

epresentation fo

3, -3)

example? Explmple is an excepification (a "foronsider the prop (laziness) holdhard-working

-exclusion prinal mathematics

B are two (finite

statement is tha, respectively, m

counting how

of the principl

e cardinality of

for following

lain the use of ption to a propr all" statementposition "all studs for all studestudent is a co

nciple? Also exs, the inclusione) sets, then

at the number minus the num

many times ea

le, let A1, ..., An

f the set A.

counterexampposed general rt). udents are lazy

ents, even a sinounterexample

xplain one appn–exclusion pr

of elements in mber of element

ach region in th

n be finite sets.

ple. rule, i.e., a spec

y". Because thingle example o

to "all student

lication of inclrinciple (also k

the union of thts that are in bo

he figure to the

Then

Inclusion–

cific instance o

is statement maf a diligent stuts are lazy".

(Mark

lusion-exclusioknown as the s

.

he two sets is toth. Similarly,

right is includ

–exclusion illus

of the falsity of

akes the claim udent will prove

s 3+4 +3)

on principle. sieve principle

he sum of the for three sets A.

ded in the right

strated for thre

f a

that a e it

e)

A, B

hand

ee sets

Page 6: Solution to MCS 013 Assign 2010

b) Find inverse of the following functions

i) f(x) = 353

−+

xx

3≠x

Ans: Let y= 353

−+

xx

y( 3−x )=( 53 +x )

yx – 3y =( 53 +x )

yx – 3x =3y+5

3x – yx + 3y+5 = 0

3x – y(x - 3)+5 = 0

3x – y(x - 3)+5 = 0

ii) f(x) = 48

2

3

−−

xx

2±≠x

(Marks 6+4) Q 7. a) Find how many 3 digit numbers are even? Also find how many 4 digit numbers are composed of odd digits? Ans: 3 digit numbers number means we have to put 0-9 digit at 3 places....ABC at the position of A (first place) we can put any digit 1-9 not 0, otherwise it will not a 3 digit number, so by 9 ways at the position of B (second place) we can put 0-9 i.e by 10 ways... at the position of C (third place) we can put 0,2,4,6 or 8 i.e by 5 ways... so, total no. of digit = 9*10*5 = 450 Total no. of three digit even numbers =450 For 4 digit number composed of odd digits only, We have four each digit selection options are 1,3,5,7,9 total 1 out of 5. So, total 4 digit numbers composed of odd digits are 5C1*5C1 *5C1 *5C1 =5*5*5*5=625. b) How many different 15 persons committees can be formed each containing at least 5 Engineers and at least one Professor from a set of 10 Engineers and 12 Professors? Ans: Total Number of comities = = !

! ! !

! ! !

! !

=252 X 12 X 11440 =34594560. c) What is a function? Explain Bijective mapping with an example. Ans: Function is a set of ordered pairs (x, y) where x X and y Y, such that each element of X has a single pair with some element of Y. Here

Page 7: Solution to MCS 013 Assign 2010

(Marks 4 + 3 + 3) Q 8.

a) What are Demorgan’s Law? Also explain the use of Demorgen’s law with example? Ans:

b) How many ways are there to distribute 20 district object into 10 distinct boxes with

i) At least two empty box. ii) No empty box.

Ans:

c) Explain principle of multiplication with an example.

Ans: Multiplication Rule: “Suppose that event E1 can result in any one of n(E1) possible outcomes; and for each outcome of the event E1, there are n(E2) possible outcomes of event E2. Together there will be n(E1) × n(E2) possible outcomes of the two events.”

i.e., if event E is the event that both E1 and E2 must occur, then n(E) = n(E1) × n(E2) e.g. How many different combinations can you choose out of 2 t-shirts and 4 pairs of jeans? Then, We have 2 t-shirts and with each t-shirt we could pick 4 pairs of jeans. Altogether there are 2 × 4 = 8 possible combinations. With principle of multiplication, We could write E1 = "choose t-shirt" and E2 = "choose jeans"

n(E1) = 2 (since we had 2 t-shirts) n(E2) = 4 (since there were 4 pairs of jeans) So total number of possible outcomes is given by: n(E) = n(E1) × n(E2) = 2 × 4 = 8.