Showing posts with label Math for Computer science. Show all posts
Showing posts with label Math for Computer science. Show all posts

Math for Computer science Questions and Answers 281 to 290

Math for Computer science

Questions 281 to 290



281.
What is the 5th term of (3 + x)8 ?
(a)  C(8, 4) 34 x4                                      (b)  C(8, 5) 33 x5       (c)  C(8, 4) 34 x5
(d)  C(8, 4) 35 x4                                     (e)  C(7, 4) 34 x4.
282.
How many different strings can be made by reordering the letters of the word ABRACADABRA
(a)  8 ! / 5!2!2!         (b)  11! / 5!2!2!         (c)  5!2!2! / 11!         (d)  5!2!2! / 8!          (e)  11!.
283.
What is the value of k after the following code has been executed.
k := 0
          for i1 := 1 to n1
              for  i2 := 1 to n2
              for i2 := 1 to n2
              :
              :
                for  im := 1 to nm
                     k := k + 1
(a)  n1 + n2 + n3 +….nm                           (b)  n1.n2.n3…………nm                     (c)  C(n+m-1, m)
(d)  C(n,m)                                             (e)  P(n,m).
284.
GCD of 24.35.72 and 24.32 is
(a)  22.35.72              (b)  24.35.72              (c)  25.34.72              (d)  24.32.70              (e)  22.35.74.
285.
How many solutions are there to the equation x1 + x2 +x3+x4 = 17
(a)  C(20,17)                                          (b)  C(20 , 3)                                          (c)  1140                       
(d)  All the above                                   (e)  none of the above.
286.
Fermat’s theorem states that If  p is prime and a is an integer not divisible by p, then
(a)  ap–1  1 (mod p)                                                             (b)  ap  1 (mod p)                    (c)  ap–1  0 (mod p)
(d)  ap–1  1 (mod p–1)                            (e)  ap  1 (mod p–1).
287.
Warshall’s algorithm is used for finding the __________ of a relation.
(a)  reflexive closure                                                             (b)  symmetric closure              (c)  transitive closure
(d)  transpose                                        (e)  inverse.
288.
Suppose that A is a subset if V*. Then the set consisting of concatenations of arbitrarily many strings from A represented by A* is called
(a)  Symmetric closure                           (b)  Reflexive closure                   (c)  Kleene closure
(d)  Finite closure                                   (e)  Finite state closure.
289.
The finite-state machine with no output is called _________
(a)  Kleene machine                               (b)  Finite machine                (c)  Output-free machine
(d)  Finite-state automata                        (e)  Moore machine.
290.
Type 2 grammars are also called ­__________
(a)  Context-sensitive grammars             (b)  Regular grammars            c)  Context-free grammars
(d)  Context less grammars                    (e)  Irregular grammars.

Answers


281.
Answer : (a)
Reason : For finding the 5th term use the general term formula tr+1 = C(x, y)xn–r yr. Here you have to find the term tr+1.
282.
Answer : (b)
Reason : This is a problem of permutations with repetitions. If n be the total number of letters and r1 letters are of same type and r2 letters are of same type then the number of different strings by reordering the letters of the word is n!/r1! × r2!
283.
Answer : (b)
Reason : By the definition of product rule.
284.
Answer : (d)
Reason : Gcd of 24.35.72 and 24.32 is 2 min(4,4) 3 min(5,2) 7 min(2,0) = 24.32.70
285.
Answer : (d)
Reason : This is combinations with indistinguishable objects. Here n=4 and r=17. The number of solutions is equal to the number of 17-combinations with repletion allowed from  a set with 4 elements. Therefore the answer is C(4+17-1,17) = C(20,17) = C(20,3).
286.
Answer : (a)
Reason : Definition of Fermat’s theorem
287.
Answer : (c)
Reason : Warshall’s algorithm is one of the algorithms for finding the transitive closure of the relation.
288.
Answer : (c)
Reason : Definition of the kleene’s closure
289.
Answer : (d)
Reason : Definition of finite-state automata
290.
Answer : (c)
Reason : Type 2 grammars are also called context-free grammars.

Read More


Math for Computer science Questions and Answers 271 to 280

Math for Computer science

Questions 271 to 280



271.
If the codomain of a function is a subset of real numbers then the function is called
(a)  real function                                    (b)  real variable function           (c)  real valued function
(d)  real codomain function                     (e)  real range function.
272.
If R is a relation represented by the matrix MR = {(0 1 1), (1 1 0), (1 0 1)} then matrix representation of R2  is
(a)  {(1 0 1), (1 1 0),(0 1 1)}                     (b)  {(1 0 0), (0 1 0), (0 0 1)}                    
(c)  {(0 0 0), ( 1 1 1),( 1 1 1)}                    (d)  {(1 1 1), ( 1 1 1),( 1 1 1)}                   
(e)  {(1 0 1), (0 1 1), (1 0 1 )}.
273.
Which of the following relation is not an equivalence relation?
(a)  x is perpendicular to y                     (b)  x is parallel to y
(c)  x - y is an even integer                     (d)  The relation of similarity of triangles     (e)  x = y.
274.
An experiment is conducted any number of times under identical conditions whose outcome cannot be predicted with certainty, before the experiment is run is called a
(a)  sampling experiment                       (b)  random experiment                         
(c)  uncertain experiment                        (d)  vague experiment                 (e)  seldom experiment.
275.
A teacher chooses a student at random from a class of 30 girls. What is the probability that the student chosen is a girl?
(a)  0                      (b)  1                       (c)  1/2                    (d)  1/30             (e)  cannot say.
276.
Series of type fn = fn-1 + fn-2   where f0 = 0 and f1 = 1 is called as   
(a)  Fibonacci Series                             (b)  Lemma Series                                  (c)  Lucas Series
(d)  Lambda Series  (e)  Laplace series.
277.
What is the decrypted message of “ EPP XLI FIWX ” if it is encoded using the encryption key (p–4) mod 26 
(a)  YOU ARE BEST                              (b)  ALL ARE GOOD       (c)  ALL THE BEST     
(d)  ALL THE WISH                                (e)  ALL THE GOOD.
278.
An integer s is an inverse of a modulo m if        
(a)  a  s (mod m)                                (b)  s   a (mod m)                        (c)  s.a   1 (mod m)
(d)  m.s   1 (mod a)                                                           (e)  m.a   1 (mod s).
279.
The least number of objects required N, so that at least r of them are distributed in one of the k boxes available is
(a)  N = k(r-1)                                        (b)  N = k.r                                  (c)  N = k.(r – 1) -1                       
(d)  N = k.r + 1                                       (e)  N = k.(r – 1) +1.
280.
inverse of 3 modulo 7 is                       
(a)  – 2                                                  (b)  5                                                     (c)  4   
(d)  both (a) and (b)                                (e)  both (b) and (c).


Answers 



271.
Answer : (c)
Reason : From the definition of the real valued function.
272.
Answer : (d)
Reason : MR2 = {(0 1 1), (1 1 0), (1 0 1)}× {(0 1 1), (1 1 0), (1 0 1)}= {(1 1 1), ( 1 1 1),( 1 1 1)}
273.
Answer : (a)
Reason : x is perpendicular to y is not equivalent because a is not perpendicular to x. som this relation si not reflexive. So not equivalent.
274.
Answer : (c)
Reason : From the definition if uncertain event.
275.
Answer : (b)
Reason : Because it is a class of 30 girls the student chosen will be certainly a girl. So the probability of choosing a girl is 1.
276.
Answer : (a)
Reason : From the description of Fibonacci series.
277.
Answer : (c)
Reason : Because the encryption key is (p–4)mod 26 e is substituted with a, p is substituted with l and likewise so the decrypted message is all the best.
278.
Answer : (c)
Reason : If s.a   1 (mod m) then s is the inverse of a modulo m
279.
Answer : (e)
Reason : By the generalized definition of pigeon-hole principle.
280.
Answer : (d)
Reason : Use Euclidean method to find the inverse of 3 modulo 7. the answer is –2. so the numbers of the form 7p–2 becomes the solution.
Read More


Math for Computer science Questions and Answers 261 to 270

Math for Computer science

Questions 261 to 270



261.
“If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool is closed.” The rule of inference used is ­­­­_________.
(a)  Addition                                          (b)  Simplification                        (c)  Modus ponens
(d)  Modus tollens                                  (e)  Hypothetical syllogism.
262.
The contrapositive of the implication given below
       “I come to the class whenever there is going to be a quiz.”
(a)   If there is going to be a quiz, I come to class
(b)  If I come to class, there will be a quiz         
(c)  If I do not come to class, then there will not be a quiz
(d)  If there is not going to be a quiz, then I will not come to the class    
(e)  If there is not going to be a quiz, then I will come to the class.
263.
A is a subset of B but A  B then A is called ______ of B.
(a)  superset           (b)  proper subset    (c)  power set          (d)  null set         (e)  sample set.
264.
The name given to the rule of inference P(c) for an arbitrary c, xP(x) is
(a)   Universal instantiation                      (b)  Universal generalization                   
(c)  existential instantiation                     (d)  existential generalization                  
(e)  Universal quantification.
265.
Which of the following functions is not one-one defined over the set of positive integers?
(a)  x2                     (b)  x–1                   (c)  x+1                   (d)  2x+1                 (e)  4x.
266.
Let p(x) be the statement “x = x2”. If the universe of discourse consists of the integers which one of the following propositions is false?
(a)  P(0)                                                (b)  P(1)                  (c)  xp(x)             
(d)  For all p(x)                                       (e)  Both (a) and (b) are false.
267.
The fallacy occurring when one or more steps of the proof are based on the truth of the statement being proved
(a)   Fallacy of denying the hypothesis  
(b)  Fallacy of affirming the conclusion 
(c)  Fallacy of begging the question
(d)  Fallacy of denying the conclusion
(e)  Fallacy of affirming the hypothesis.
268.
The set containing those elements that are in A but not in B where A and B are two sets is denoted by
(a)  A  B              (b)  A  B              (c)  A  B              (d)  A  B              (e)  A – B.
269.
Which of the following pairs of sets are equal?
(a)  {1,3,3,3,5,5,5,5,5}, {1,3,5}                  (b)  {{1}}, {1,{1}}        (c)  , { }        
(d)  (a) and (b)                                       (e)  (b) and (c).
270.
The range of the function that assigns to a bit string the number of times the block 11 appears in the bit string.
(a)  set of integers                                 (b)  set of whole numbers           (c)  set of real numbers
(d)  set of all bit strings                          (e)  set of  irrational numbers.

Answers


261.
Answer : (c)
Reason : The compound propositions given are in s the form (pq) p. So the rule of inference used is modus ponens.
262.
Answer : (c)
Reason : The given statement in if – then form is “If there is going to be a quiz then I come to the class.” The contrapositive of an implication pq is ¬q¬p. Hence the answer.
263.
Answer : (b)
Reason : A is called a proper subset of B if AB and A  B then
264.
Answer : (b)
Reason : P(c) for an arbitrary c,  xP(x) is universal generalization.
265.
Answer : (a)
Reason : The function x2 is not one-one over a set of +ve integers because more than one value of the domain are mapped to a single value of the co-domain. For eg. f(2) = f(–2) = 4.
266.
Answer : (d)
Reason : For all p(x) is false because if x = 2 , 2 is not equal to 4. so For all p(x) is false.
267.
Answer : (c)
Reason : From the definition of  fallacy of begging the question.
268.
Answer : (e)
Reason : From the definition of set difference.
269.
Answer : (a)
Reason : Duplicated elements are considered to be same in sets.
270.
Answer : (b)
Reason : The function assigns the number of times the block 11 appears in the bit string. It can be from 0 to any number. So the answer is the set of whole numbers.
Read More