Friday, 14 June 2013

Math for Computer science SET-I

¬[pv (¬ pvq)] is logically equalent to
(a) pÙq                   (b) ¬ p Å ¬q            (c) ¬ p Ù¬q             (d) ¬ p Ù q              (e) p Ù ¬ q.
2.
The member of the set
{x / x is the square of an integer less than 100}
(a) {1, 4, 9, 16, 25, 36, 49, 64}                 (b) {1, 4, 9, 16, 25, 36, 64, 81}                
(c) {1, 4, 9, 16, 36, 49, 64, 81}                 (d) {1, 4, 9, 16, 25, 36, 49, 64, 81}          
(e)
3.
A ÇÆ = Æ, is known as
(a) Indentity law                                      (b) Domination laws (c) Idempotent laws
(d) Absorption laws                                (e) Complement laws.
4.
Let A = {0, 2, 4, 6, 8, 10}; B = {0, 1, 2, 3, 4, 5, 6} A È (B  A) is given by
(a) {0, 2 4, 6, 8, 10}                                 (b) {0, 1, 2, 3, 4, 5, 6}                            
(c) {0, 1, 2, 3, 4, 5, 6, 10}                        (d) {0,1, 2, 3, 4, 5, 6, 8}                          
(e) {0, 1, 2, 3, 4, 5, 6, 8, 10.
5.
Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} then bit string for the set A = {1, 5, 7, 8, 9} is
(a) 0 1 0 0 0 0 0 1 1 1 0                           (b) 0 1 0 0 0 1 0 1 1 1 0                         
(c) 0 1 0 0 0 1 1 0 1 1 0                           (d) 0 1 0 0 0 1 0 1 0 1 0 (e) 0 1 0 0 0 1 0 1 1 0 1.
6.
Let U = {0, 1 2, 3, 4, 5, 6, , 8, 9, 10}. the set represented by the bit string 0 1 0 1 1 1 1 0 0 0 0 is
(a) {0, 2,7 8, 9, 10}                                  (b) {1, 3, 4, 5, 6}       (c) {1, 3, 4, 6, 7}
(d) {1, 3, 4, 5}                                         (e) {0, 1, 3, 4, 6}.
7.
The set {x / x Î A and x Ï B} is defined by
(a) A complement                                  (b) B  A                                               (c) A - B                             
(d) (AÇB)                                               (e) B complement.
8.
Let f is a function from A to B.
for aÎ A such that f (a) = b then 'a' is called
(a) image                                               (b) pre image           (c) range element    
(d) codomain element                                                           (e) mapping.
9.
Let f be a function from A to B.
'f' is said to be a surjective function if
(a) for each aÎ A bÎ B ' f (a) = b             (b) for each b ÎA $ aÎ B ' f (a) = b
(c) for each aÎ B aÎ A ' f (a) = b              (d) for each bÎ Ba ÎA ' f (b) = a
(e) for each a ÎB b ÎA ' f (b) = a.
10.
Let 'n' be a positive integer. Then which of the following are true for a real number 'x'.
(a) x + n = x + n                                                         (b) x + n = x + n (c) x + n = x + n
(d) x + n = x + n                                                         (e) x + n = x + n

Answers

1.
Answer : (c)
Reason:  ¬ [(p Ú ¬p) Ù (p v q)]
¬(p Ú ¬p) v ¬ (p v q)
¬(T) v ¬ (p v q)
F v ¬ (p v q)
¬ (p v q)
¬ p v ¬ q.
2.
Answer : (d)
Reason:  {x / x is the square of an integer less than 100}
=     { 12, 22, 32, 42, 52, 62, 72, 82, 92)
=     {1, 4, 9, 16, 25, 36, 49, 64, 81}.
3.
Answer : (b)
Reason:  by definition
4.
Answer : (e)
Reason:  A = {0, 2, 4, 6, 8, 10}
              B = {0, 1, 2, 3, 4, 5, 6}
              B  A = {1, 3, 5}
              A È (B  A) = {0, 1, 2, 3, 4, 5, 6, 8, 10}.
5.
Answer : (b)
Reason:  U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
              A= {1, 5, 7, 8, 9}
              bit string of set A is 01000101110.
6.
Answer : (b)
Reason:  U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
              bit string of set A is 01011110000
              A = {1, 3, 4, 5, 6}.
7.
Answer : (c)
Reason:  by definition
              A  B = {x / x ÎA and x Ï B}.
8.
Answer : (b)
Reason:  By definition of preimage.
9.
Answer : (c)
Reason:  By definition of surjection, for each b ÎB =aÎ A ' f(a) = b.
10.
Answer : (a)
Reason:  By definition.

 
 
 
 
11.
Let f(x) = x + 5 and g(x) = x2 then (fog) (x) is
(a) x + 5                  (b) x2                       (c) x2 - 5                  (d) x2 + 5                 (e) x – 5.
12.
Which of the following is the encrypt of the menage "Do Not Pass go" by translating the letters into numbers applying the caesar cipher f(p) = (p + 3) mod 26.
(a) GR QWR SDVV JR                           (b) GR QRW SVDV JR                          
(c) GR QRW SDVV RJ                           (d) GR QRW SDVV JR                          
(e) GR QWR SDVV RJ.
13.
Binary equavalent of the decimal number 645 is
(a) 1 1 0 0 0 0 0 1 0 1                                                            (b) 1 0 1 0 0 0 0 1 0 1          (c) 1 0 1 0 0 0 1 0 0 1
(d) 1 0 1 0 0 0 0 0 1 1                                                           (e) 0 1 0 1 1 1 1 0 1 0.
14.
Decimal equivalent of the Binary notation 1 1 0 1 0 0 1 0 0 0 1 is
(a) 1673                   (b) 1809                  (c) 1682                   (d) 1681                  (e) 1697.
15.
How many positive integers less than 100 are divisible by either 7 or 11
(a) 2                        (b) 22                      (c) 20                      (d) 23                      (e) 19.
16.
The pigeonhole principle is stated as
(a)   If K + 1 or more objects are placed into K boxes. then there is at least one box containing two or more of the objects.
(b)   If K + 1 or more objects are placed into K boxes then there is at most one box containing two or more of the objects
(c)   If K + 1 or more objects are placed into K boxes then there is exactly one box containing two or more of the objects
(d)   If K + 1 or more objects are placed into K boxes then there is no box containing two or more of the objects
(e)   If K + 1 or more objects are placed into K boxes then all the boxes containing two or more of the objects.
17.
Probability of the sample space of a Random Experiments always equals to
(a) 0                        (b) 1                        (c) 1/2                     (d) 1/4                     (e) a.
18.
A relation R is said to be symmetric Relation
(a) if (a, b) Î R whenever (b, a) Î R           (b) if (a, b)Ï R whenever (b, a) Ï R
(c) if (b, a) Î R whenever (a, b) Î R           (d) if (h, a) Î R whenever (a, b) Ï R
(e) if (b, a) Ï R whenever (a, b) Î R.
19.
Let R = {(a, a) (a, c) (b, a) (b, b)} and S = {(a, b) (b, c) (c, a) (c, c)} then SoR is given by
(a) {(a, a) (b, a) (a, c) (b, b) (b, c)}            (b) {(a, a) (a, b) (a, c) (b, c) }                   
(c) {(a, a) (a, b) (a, c) (b, b) (c, b)}            (d) {(a, a) (a, b) (a, c) (b, b) (b, c)            
(e) {(a, a) (a, b) (c, a) (b, b) (b, c)}.
20.
Let V = {S, A, B, a, b} and T = {a, b} Find the language generated by the grammer {V, T, S, P} when the set P of production consists of S® a A, A®a, B ® ba
(a) L(G) = {ab, aba}                                (b) L(G) ba, aba}                                   
(c) L(G) = {aa, aab}                                 (d) L)G) = {aa, bba}  (e) L(G) = {Iaa, aba}.

Answers

11.
Answer : (d)
Reason:  f (x) = x + 5
              g (x) = x2
              (fog) (x) = f [g (x)]
              = f [x2]
              = x2 + 5.
12.
Answer : (d)
Reason:  f (p) = (p + 3) mod 26
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
                                                         D O N O T P A S S G O
                                                         3 14 13 14 19 15 0 18 18 6 14
                                            (+3)
                                                         6 17 16 17 22 18 3 21 21 9 17
                                                         G R Q R W S D V V J R
Code is GR QRW SDVV JR
13.
Answer : (d)
Reason:  1 1 0       1 0 0 1    0 0 0 1
              210 29 28   27 26 25 24       23 22 21 20
              = 1024 + 512 + 128 + 16 + 1
              = 1681
              (110 1001 0001)2 = (1681)10
14.
Answer : (b)
Reason:  The numbers less than 100 divisible by 7 are
              7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98
               the no - of numbers divisible by 7 are 14
              The numbers divisible by 11 are
              11, 22, 33, 44, 55, 66, 77, 88, 99
               The no - of numbers divisible by 11 are 6
              The no - of numbers divisible by both 7 and 11 are 1
               The + ve integers less than 100 divisible by 7 or 11
              = 14 + 9 – 1    =     23 – 1     = 22.
15.
Answer : (a)
Reason:  By definition.
16.
Answer : (e)
Reason:  (x+y)4 = 4c0 x4 y0 + 4c1. x41. y + 4c2. x42, y2 + 4c3. x43 y3 + 4c4. x44 y4
              (x+y)4 = x4 + 4x3y + 6x2y2 + 4xy3 + y4
17.
Answer : (b)
Reason:  By definition of probability of sample spare.
18.
Answer : (c)
Reason:  By definition of symmetric Relation.
19.
Answer : (d)
Reason:  R = {(a, a) (a, c) (b, a) (b, b)}
              S = {(a, b) (b, c) (c, a) (c, c)}
              SoR = S[R(x)] " x Î {a, b, c}
              ={(a, a) (a, b) (a, c) (b, b) (b, c)}.
20.
Answer : (c)
Reason:  S ® AB, S ® aA,   A® a       B® ba
              L(G) = {aa, aba}.
 
 
 
21.
A sentence is made up of
(a)   Noun phrase proceeded by a verb phrase
(b)   Noun phrase followed by verb phrase
(c)   Noun phrase followed by Noun phrase
(d)   Verb phrase followed by Noun phrase
(e)   Verb phrase followed by a verb phrase.
22.
Let a set A has a4 elements then P(A) denotes the powerset of the set A. Now cardinality of P(A) is
(a) 16                      (b) 81                      (c) 256                    (d) 1                        (e) 4.
23.
A function from set A to set B is one - to -one and onto, then the ferniction is known as
(a) Sujection                                          (b) Injection                                           (c) Bijection
(d) Homomorphism                                (e) Automorphism.
24.
(pÙØq)®p is a
(a) Contingency             (b) Contradiction           (c) Tautology    
(d) Contrapositive          (e) Inverse.
25.
The fallacy of denying the antecedent is denoted by
(a) [(p®q)Ù p] ®q         (b) [(p®q)Ù Øp] ®Øq
(c) [(p®q)Ù q] ®p         (d) (p®q)Ù Øq] ® Øp   
(e) [(p®q)Ù Ør] ® Øq.
26.
For which of the following ‘2’ is an element.
(a) {2, {2}}              (b) {{2}, {{2}}} (c) {{2}, {{2, {2}}
(d) {f, {2}}              (e) {{2}}.
27.
Let F(x) : x is a pearl, P(x) : x is soft.
The statement “All pearls are soft” equivalent
(a) "x[F(x) Ù P(x)]          (b) "x[F(x) Ú P(x)]         (c) "x[F(x) « P(x)]
(d) "x[F(x) ® P(x)]                    (e) "x[F(x), P(x)].
28.
Suppose that U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. The bit string for the set A = {1, 3, 6, 10} is
(a) 00 1110 0111            (b) 10 1001 0101            (c) 11 0110 0111
(d) 10 1001 0001            (e) 00 1010 1010.
29.
Suppose that U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. The element of the set for which the bit string is 11 1100 1111
(a) {0, 1, 2, 3, 5, 7, 8, 9, 10}        (b) {1, 2, 3, 4, 7, 8, 9, 10}          
(c) {1, 3, 5, 6, 7, 8, 9, 10}            (d) {2, 3, 4, 7, 8, 9, 10}
(e) {1, 3, 4, 5, 6, 7, 8, 9, 10}.
30.
Find the value of éë1/2û + é1/2ù + 1/2ù
(a) 1 (b) 2 (c) 0 (d) 0.5     (e) 1.5.

Answers
21.
Answer : (b)
Reason:  By definition of the sentence.
22.
Answer : (a)
Reason:  n(A) = |A| = 4 = cordinality of A
                     |P(A)| = cardinality of power set of A
                     = 24
                     = 16.
23.
Answer : (c)
Reason:  By definition of bijection.
24.
Answer :  (c)
Reason: 
P
Q
ùQ
P Lù Q
(P Lù Q) ®P
F
F
T
F
T
F
T
F
F
T
T
F
T
T
T
T
T
F
F
T
       \ (PLùq) ® P is a Toutology.
25.
Answer :  (b)
Reason:  by definition
26.
Answer :  (a)
Reason:  by definition
27.
Answer :  (d)
Reason:  for all x
If x is a pearl then x is soft
       \ "x, [f(x) ® P(x)]
28.
Answer :  (d)
Reason:  Bit string of A = {1,3,6,10} in U = {1,2,3,4,5,6,7,8,9,10} is 1010010001
29.
Answer :  (b)
Reason:  U = {1,2,3,4,5,6,7,8,9,10} the elements for which bit string is 1111001111 is {1,2,3,4, 7,8,9,10}
30.
Answer :  (b)
Reason:  éë1/2û + é1/2ù +1/2ù       =     éë0.5û + é0.5ù +1/2ù
                                    =            é0 + 1 +1/2ù
=            é3/2ù = é1.5ù = 2
 
 
 
 
31.
Let f(x) = ëx2/2û. Find f(s) if S= {1, 2, 3, 4}
(a) {1, 2, 4, 4, 8}     (b) {1, 2, 5, 8}            (c) {0, 2, 4, 8}    (d) {0, 2, 5, 8} (e) {0, 2, 4, 9}.
32.
Which of the following statements is false?
(a) fÎ{f}         (b) fÎ{f, {f}}                    (c) {f}Î{f}
(d) {f}Î{{f}}            (e) {f} Ì{{f}, {f}}.
33.
From the following, choose the decimal expansion of the integer that has (101011010)2 as its binary expansion.
(a) 338    (b) 344    (c) 346          (d) 330  (e) 340.
34.
From the following, choose the binary expansion of 246.
(a) 1111 0011  (b) 1111 0110       (c) 1111 0101    (d) 1111 1100 (e) 1111 1001.
35.
The r-combination from a set with “n” elements when repetitions of elements are not allowed is
(a) C(n+r+1, r)        (b) C(n+r-1, r)                        (c) C(n, r)
(d) C(n+r-1, r- 1)             (e) C(n+r+1, r+1).
36.
Which of the following statements is true in a year?
(a)        Among any group of 366 people there must be at least one with the same birthday.
(b)        Among any group of 366 people there must be at least two with the same birthday
(c)        Among any group of 366 people there must be at most one with the same birthday
(d)        Among any group of 366 people there must be at most none with the same birthday
(e)        Among any group of 366 people there must be exactly 2 with the same birthday.
37.
What is the probability that a card selected from a deck is a king?         
(a) 1/4     (b) 1/52   (c) 4/52         (d) 2/52 (e) 3/52.
38.
What is the probability that a positive integer less than 100 selected at random is divisible by 25?
(a) 3/100  (b) 4/100 (c) 2/100       (d) 5/100           (e) 1/100.
39.
What is the probability that a positive integer selected at random from the set of positive integers not exceeding 21 is divisible by 5 or 3?
(a) 11/20  (b) 10/20 (c) 11/21       (d) 10/21           (e) 12/21.
40.
Let A = {0,11} and B = {1,10,101} then AB is given by [concatenation of A and B is AB]
(a)        {01, 010, 0110, 110, 1110, 11110}
(b)        {01, 010, 0111, 111, 1110, 11110}
(c)        {01, 010, 0101, 111, 1110, 11101}
(d)        {01, 010, 0111, 111, 1110, 11111}
(e)        {01, 010, 0110, 111, 1110, 11010}.

Answers

31.
Answer :  (c)
Reason:  Let f(x) = ëx2/2û if S= {1,2,3,4}
       f(s) = f({1,2,3,4})
       f(1) = ë12/2û = ë1/2û = ë0.5û = 0
       f(2) = ë22/2û = ë4/2û = ë2û = 2
       f(3) = ë32/2û = ë9/2û = ë4. 5û = 4
       f(4) = ë42/2û = ë16/2û = ë8û = 8
       \ f(s) = {0,2,4,8}
32.
Answer :  (c)
Reason:  by definition
33.
Answer :  (c)
Reason:  (1010 11010)2
       = 1x28+ 0x27 + 1x26 + 0x25 + 1x24 + 1x23 + 0x22 + 1x21 +0x20
       = 256 +0 +64+ 0 + 16 +8 +0 +2 +0
       = 346
34.
Answer :  (b)
Reason:  2|246
       2|123-0   
       2|61-1
       2|30-1
       2|15-0
       2|7-1
       2|3-1
       2|1-1
       (11110110)2
35.
Answer :  (c)
Reason:  by definition
36.
Answer :  (b)
Reason:  In a year there are 365 days, if we distribute every day one pessons birthday then at least two with the same birthday.
37.
Answer :  (c)
Reason:  E: Selecting a king
38.
Answer :  (a)
Reason:  E: A positive integer less than 100 in divisible by 25
39.
Answer :  (d)
Reason:  Positive integer not exceeding 21 divisible by 5 or 3
      
40.
Answer :  (c)
Reason:  A={0,11} B={1, 10, 101}
       AB = {01, 010, 0101, 111, 1110, 11101}
 
 
 
 
41.
Find gof if f(x) = ax + b and g(x) = cx + d when a,b,c,d are constants.   
(a) ac + bc + d      (b) ac + bcx + d        (c) acx + bc + d            (d) ac + bc + dx (e) ax + bc + d.
42.
To show The statement p(1) is true for a fixed +ve integer ‘1’, is called    
(a) Inductive step           (b) Inductive hypothesis (c) Basic Step
(d) Strong induction                   (e) Rule of inference.
43.
The difference of A and B denoted by A – B contains
(a)        Those elements in both A and B
(b)        Those elements in either A or B
(c)        Those elements purely in A but not B
(d)        Those elements in Set A, but not in universal set
(e)        Those elements in Set B, but not in set A.
44.
A fair coin has been tossed for 3 times. What is the probability that all three times head will be outcome.
(a) 3/8     (b) 1/3     (c) 1/8           (d) 3/3   (e) 0.
45.
Let G be grammar with Vocabulary V = {s, 0,1}, Set of terminals T = {0,1} starting symbol s, and production p = {s ®1s1, s® 0} then the language of the grammar, [L(G)] is
(a)        {0, 110, 11110, 1011101, …………}
(b)        {0, 110, 11101, 1111110, ……….}
(c)        {0, 101, 11011, 1110111, …………}
(d)        {0, 110, 11110, 1111101, …………}
(e)        {0, 110, 11110, 1111110, ……….}.
46.
Let V = { S, A, a, b} and T = {a, b} Let G = {V,T,S,P}. The language of G, L(G) is given by L(G) = {bb, ba}then the production is given by
(a) P = {S ®a AB, A®Bb, B ® l }         (b) P = {S ®A, A®B, B ® l }
(c) P = {S ®b B, B®b, B ® a }  (d) P = {S ®A Ba, AB®a}
(e) P = {S ®b A, A®B, B ® a }.
47.
Which of the following statements is true?
(a)        Sentence ® Noun Verb
(b)        Sentence ® Noun Pronoun
(c)        Sentence ® Noun Phrase Verb Phrase
(d)        Sentence ® Verb Phrase Noun Phrase
(e)        Sentence ® Noun Phrase Noun Phrase.
48.
Let R be a relation from C to A and S be a relation from B to C. Then RoS defined by
(a) { (b, c) / b Î B, c Î C }          (b) { (c, a) / c Î C, a Î A }
(c) { (a, b) / a Î A, b Î B }          (d) { (a, c) / a Î A, c Î C }
(e) { (b, a) / b Î B, aÎA }.
49.
Let R = { (1,1), (1,2), (2,2), (2,3),(2,4), (3,1), (3,2), (3,3), (3,4) } then R-1 is given by
(a)        { (1,1), (1,2), (2,2), (2,3), (3,1), (3,2), (3,3),(2,4), (4,3)}
(b)        ( (1,1), (2,1), (2,2), (3,2), (1,3), (2,3), (3,3),(4,2), (4,3)}
(c)        { (1,1), (2,1), (2,2), (3,2), (2,3), (3,1), (3,3), (4,2),(3,4)}
(d)        { (1,1), (1,2), (2,2), (2,3),(2,4) (3,1), (3,2), (3,3), (4,3)}
(e)        { (1,1), (4,1), (4,2), (3,2), (1,3), (2,3), (3,3), (3,4),(4,2) }.
50.
From a deck of well shuffled pack of cards 4 cards are drawn. What is the probability that all four are aces?  
(a) 5/52C4      (b) 2/52C4            (c) 1/52C4         (d) 4/52C4         (e) 3/52C4.

Answers

41.
Answer :  (c)
Reason:  f(x) = ax+b g(x) = cx+d
       (gof) (x) = g[f(x)]
                            = g[ax+b]
                            = C(ax+b) +d 
                     = acx+bc+d
42.
Answer :  (c)
Reason:  by definition
43.
Answer :  (c)
Reason:  by definition
44.
Answer :  (c)
Reason:  Let E : getting all three times head
       A fair con is tossed for three times so the
       Total no. of cases are 23 = 8
       These will be only one case favorable to E.
      
45.
Answer :  (c)
       L (G) = {0, 101, 11011, 1110111, …..}
46.
Answer :  (c)
Reason:  L(G) = {bb, ba}
      
47.
Answer :  (c)
Reason:  Sentence Noun phrase verb phrase
48.
Answer :  (c)
49.
Answer :  (b)
Reason:  R-1 = {(1,1) (2,1) (2,2) (3,2) (4,2) (1,3) (2,3) (3,3) (4,3)}
50.
Answer :  (c)
Reason:  In a pack of cards these are 4 aces so all four aces can be selected in only one way.
From the deck of well shuffled pack of cards 4 cards are drawn, which can be selected in 52
       E : getting 4 aces