MCA (1) /011/assign/2010
MCA (1) /011/assign/2010
Q 1.
a) Make truth table for
1. p→(~q V ~ r) ^ ~p ^ q
p q r ~p ~q ~r ~q v ~r ~p ^ q p(~q v ~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
F T T T F F F T F
T F F F T T T F F
F T F T F T T T T
F F T T T F T F F
F F F T T T T F F
2. p→r V q ^ ~p V r
p q r ~p rVq r V q ^ ~p r V q ^ ~p V r
T T T F T F T
T T F F T F F
T F T F T F T
F T T T T T T
T F F F F F F
F T F T T T T
F F T T T T T
F F F T F F F
2. What are conditional connectives? Explain use of conditional connectives with an example.
Conditional Connectives:
If p and q are two propositions, the compound proposition, it is denoted by (“if p then q “) p q. it is also read as “p
implies q” or “p is sufficient for q” or “p only if q”. Here p is called the hypothesis and q the conclusion. Thus any statement of
the form p q is called or conditional statement or conditional proposition.
The two connectives “” and “” are called conditional connectives.
Ans :
i) (∃x) ( ∀ y) P
Statement :
x
(∃ x ∈ N) ( ∀ y ∈Z)( ∈Q )
y
i) ( ∀ x) ( ∀ y) (∃z) P
Statement :
z
( ∀ x ∈ N) ( ∀ y ∈ N) (∃z ∈N) ( ∈Q ¿
xy
Q 2.
1. What is proof? Explain method of indirect proof with the help of one example .
Proof:
A proof of a proposition p is a mathematical argument consisting of a sequence of statements p1,p2,p3,……..,pn from which p
logically follows. Thus p is the conclusion of that argument.
The Statement that is provided to be true is called Theorem.
Indirect Proof:
In indirect proof there are two methods for proving pq. they are proof by contra positive and proof by contradiction.
1. Proof by contra positive :
In this method we can use the fact that the propositions pq is logically equivalent to its contra positive (-q -p).
i.e. pq ≡ (~q ~p).
For Example : “If Shiva does not agree with the communist then he is not orthodox.”
To prove if x,y ∈ Z such that xy is odd.then both x and y are odd.
Let p:xy is odd
q:both x and y are odd.
So ~p:xy is even
~q:both x and y are even
We have to prove pq, by proving ~q~p.
Assume ~q is true, and suppose x is even.
Then x=2n for some n∈N
Therefore xy=2ny
But xy is even by defination
Hence ~p is true.
2. Proof by contradiction :
This method is also called reduction adabsurdum (a Letin Phrase) because it relies on reducing a given assumption to an
absurdity. In this method ro prove, q is true let assume that q is false(i.e. ~q is true). By a logical argument, we reach to
a contradiction r ^ ~r for some statement that is always false also.
Proof by Contradiction:
Suppose that √ 5 is rational. Thus there exist positive integer a and b. such that
√ 5 = a/b
a = √ 5b
a2 = 5b2 ……………………( 1 )
5|a2 = 5|a.
Therefore by defination, a = 5c for some c ∈ Z.
a2 = 25 c2
But from eq (1) a2 = 5b2
25c2 = 5b2
5c2 = b2
5|b2 = 5|b
Hence it is found that 5 divides both a and b. Which contradicts that a have no common factor.
Hence √ 5 is rational.
2. Show whether √ 15is rational or irrational.
Suppose that √ 15 is rational. Thus there exist positive integer a and b. such that
√ 15 = a/b
a = √ 15b
a2 = 15b2 ……………………( 1 )
15|a2 = 15|a.
Therefore by defination, a = 15c for some c ∈ Z.
a2 = 225 c2
But from eq (1) a2 = 15b2
225c2 = 15b2
15c2 = b2
15|b2 = 15|b
Hence it is found that 15 divides both a and b. Which contradicts that a have no common factor.
Hence √ 15 is rational.
Q 3.
1.What is Boolean algebra? Explain how Boolean algebra methods are used in logic circuit design.
Boolean algebra:
A Boolean algebra is the algebra of truth values and operations on them. To us imaging that we have just two number 0 and 1
and we have two logical value false and true.
A Boolean expression can be transformed from an algebraic expression into a logic diagram composed of AND, OR and NOT
gates. A logic diagram includes an inverter circuit for each variable present in the complement form. For example if any logic
expression is defined by F = A+B.C then it is clear that equivalent logic circuit will require one AND gate and one OR gate.
Similarly the expression F = A + B’ requires one OR gate and one NOT gate.
For Example: Consider F = A . B + C’
A
B
A . B + C’
C
2.If p an q are statements, show whether the statement [(~p→q) ^ (q)] → (p V ~q) is a tautology or not.
From the above table it is clear that given statement is not a tautology.
Q 4.
a) Make logic circuit for the following Boolean expressions:
i) (x’.y + z) + (x+y+z)’
ii) ( x'+y).(y’+ z).(y+z’+x’)
1. (x’.y + z) + (x+y+z)’
X
Y
(x’.y + z) + (x+y+z)’
2. ( x'+y).(y’+ z).(y+z’+x’)
X
Y
Z
( x'+y).(y’+ z).(y+z’+x’)
b) What is dual of a Boolean expression? Find dual of Boolean expression for the output of the following logic
circuit:
Boolean expression ::
Let B = (S,V,^,’,O,I) be a Boolean algebra. Each of the variables x1,x2,…xk as well as the elements
O and I of the Boolean Algebra B are Boolean Expression.
Hence by solving the Boolean expression for the output of the above logic circuit is :
1. A∩B = {1,99}
A∩B∪C = {1,2,5,11,19,15,99}
2. A∪B = {1,2,3,4,9,19,15,22,33,99}
A∪B∩C = {2,19,15}
Q. 5
a) Draw a Venn diagram to represent followings:
(i) (A ∆ B) ∩ (C~A)
(ii) (A ∩ B) U (B ∆ C)
1. (A ∆ B) ∩ (C~A)
(ii) (A ∩ B) U (B ∆ C)
b) Give geometric representation for following
1. { 2} x R
2. {1, -2) x ( 3, -3)
1. {2 } x R
Defination :
As the name “counter example” it suggests that it is an example to counter a given statement. A counter
example to a statement is an example that shows that the statement is false.
For example: -
The Statement “All men speak English”. It is quite likely that someone does not know English. (I.e. for whom
the statement is not true). A counter example to a statement proves that p is false i.e. ~p is true.
Example:
( ∀ a ∈ R ¿(∀ b ∈ R)
[(a2 = b2)]
(a = b)
For disapproving above statement a pair of real numbers a and b is needed for which a 2 = b2 but a ≠ b i.e. a counter
example. One such counter example is a= 1 and b= -1.
Q 6.
1. What is inclusion-exclusion principle? Also explain one application of inclusion-exclusion principle.
Ans :
Let A and B be any finite sets. Then
n(A U B) = n(A) + n(B) – n(A ∩ B)
In other words to find the number n(A U B) of element in the union A U B add n(A) and n(B) and then subtract n(A ∩ B)
i.e. “include” n(A) and n(B) and “exclude” n(A ∩ b). This principle holds for number of sets.
For Example:
Find the probability of the student in a college studying Japanese given that:
All students have to study one language out of Hindi, Spanish, and Japanese. 65 study Hindi, 45 study Spanish and 42
study Japanese. Further 20 study Hindi and Spanish, 25 study and Japanese, 15 study Spanish and Japanese and 8 study all
three language.
Solution ::
The total no. of student if |H U S U J | where H, S and J are no. of student of Hindi, Spanish and Japanese respectively.
By Inclusion Exclusion Principle, we have :
| HUSUJ | = | H | + | S | + | J | - | H∩ S | - | H ∩J | - | S ∩ J | + | H∩S∩J |
= 65 + 45 + 42 - 20 - 25 – 15 – 8
= 100
x3 −8
2
ii) f(x) = x −4 x≠±2
x3+ 5
i) f(x) = x−3 x≠3
Ans. :
Inter changing x and y, we get
x=( y3 + 5 ) / (y – 3)
Solving for y, we get
Y= √ (−2 x−5)
Replacing y By f-1(x), we get
f-¹(x) = √ (−2 x−5)
3
x −8
ii)
2
f(x)= x −4 x≠±2
Ans. :
Inter changing x and y, we get
x=( y3 - 8 ) / (y2 – 4)
Solving for y, we get
Y= (−3 x +8)
Replacing y By f-1(x), we get
f-¹(x) =(−3 x +8)
Q 7.
a) Find how many 3 digit numbers are even? Also find how many 4 digit numbers are composed of odd digits?
Ans. :
Even Numbers :
By the multiplication principle, the number of integers between 100 and 999 with all digits even is 4.5.5 = 100 (Note
that the first digit cannot be zero, but the second and third digits can be 0.)
Odd Numbers :
For a number to be odd the last digit should be odd. So, the last position can be filled up in 5 ways. If the middle
position is filled up by 0, then the first position can be filled up in 8 ways. Thus the number of odd numbers with 0 in the middle
position and all digits distinct is 40, by the multiplication principle.
If the middle position is filled up by a digit other than 0, then this can be done in 8 ways, then the first position can be
filled up in 7 ways. So, the numbers of odd numbers with all digits distinct with the middle digit not zero is 5.8.7 = 280.
Ans.:
Total no of persons = 15
Total no of Engineers = 10
Total no of Professors = 12
The committee of 15 persons can be possible only in 6 ways, either
( 10 Engineers and 5 Professor) or
( 9 Engineers and 6 Professors) or
( 8 Engineers and 7 Professors) or
( 7 Engineers and 8 Professors) or
( 6 Engineers and 9 Professors) or
( 5 Engineers and 10 Professors).
C C + 10C9 . 12C6 + 10C8 . 12C7 + 10C7 . 12C8 + 10C6 . 12C9 + 10C5 . 12C10
10 10 . 12 5
792+9240+35640+59400+46200+16632
167904 Ans.
c) What is a function? Explain Bijective mapping with an example.
Definition:
Let A and B be non-empty sets. A function (or a mapping) f from A to B is a rule that assigns to each element x in A
exactly one element y exactly one element y in B. We write this as f: A B, read it as ‘f is a function from A to B’.
Bijective Mapping:
A Mapping f: A b is said to be bijective if and only there is both one to one and onto mapping between both A and B.
For example : let f be the function from A to B where A = (1,2,3,4) and B = (a, b, c, d) with f(1) =d , f(2) = b, f(3) = c, f(4) =
a, then f is bijective function, f is one-one since the function takes distinct values. It is also onto since every element of B
is the image of some element in A. Hence f is a bijective function.
Q 8.
a) What are De morgan’s Law? Also explain the use of De morgan’s law with example?
~ (p ^ q) ≡ ~ p v ~q
~ (p v q) ≡ ~ p ^ ~q
Example:
Truth Table:
20 !
C ( 20,8 ) =
( 20−8 ) ! 8 !
C ( 20,8 ) =1,25,970×distribute
2. No empty box.
Total boxes = 10 boxes
Total Objects = 20 Objects
n!
C (n , r )=
( n−r ) ! r !
20!
C ( 20,10 ) =
( 20−10 ) ! 10!
C ( 20,10 ) =1,84,756×distribute
1. Explain principle of multiplication with an example.
Ans:
Suppose that a task/procedure consists of a sequence of subtasks or steps, says, Subtask 1, Subtask 2… Subtask k.
Furthermore, suppose that Subtask 1 can be performed in n 1, ways, Subtask 2 can be performed in n 2 ways after Subtask 1 has
been performed, Subtask 3 can be performed in n 3 ways after Subtask 1 and Subtask 2 have been performed, and so on. Then
the multiplication principle says that the number of ways in which the whole task can be performed is n 1, n2…n3.
Example:
There are three political parties, P1, P2 and P3.The party P1 has 4 members, P2 has 5 members and P3 has 6 members in
an assembly. Suppose we want to select two persons, both from the same party, to become president and vice-president. In
how many ways can this be done?
Solution of Example :
From P1, we can do the task in 4 x 3 = 12 ways, using the multiplication principle. From P 2, it can be done in 5 x 4 = 20
ways. From P3 it can be done in 6 x5 = 30 ways. So, by the addition principle, the number of ways of doing the task is 12 + 20 +
30 = 62.
Example is that the addition principle helps us to count all possible arrangements grouped into mutually exclusive and
exhaustive classes.