NEW
Font size
WorksheetsCPE251.ME
Total questions: 50
Worksheet time: 38mins
Which of the following option is true?
If the Sun is a planet, elephants will fly
3 +2 = 8 if 5-2 = 7
1 > 3 and 3 is a positive integer
-2 > 3 or 3 is a negative integer
Let P: If Sahil bowls, Saurabh hits a century.; Q: If Raju bowls, Sahil gets out on first ball. Now if P is true and Q is false then which of the following can be true?
Raju bowled and Sahil got out on first ball
Raju did not bowled
Sahil bowled and Saurabh hits a century
Sahil bowled and Saurabh got out
Which of the following option is suitable, if A is “10110110”, B is”11100000” and C is”10100000”?
C=A or B
C=~A
C=~B
C=A and B
If A is “001100” and B is “010101” then what is the value of A (Ex-or) B?
000000
111111
001101
011001
What is the one’s complement of this string “01010100”?
10101010
00110101
10101011
10101001
If P is always against the testimony of Q, then the compound statement P→(P v ~Q) is a __________
Tautology
Contradiction
Contingency
None of the mentioned
Let domain of m includes all students, P (m) be the statement “m spends more than 2 hours in playing polo”. Express ∀m ¬P (m) quantification in English.
A student is there who spends more than 2 hours in playing polo
There is a student who does not spend more than 2 hours in playing polo
All students spends more than 2 hours in playing polo
No student spends more than 2 hours in playing polo
Which rule of inference is used in each of these arguments, “If it is Wednesday, then the Smartmart will be crowded. It is Wednesday. Thus, the Smartmart is crowded.”
Modus tollens
Modus ponens
Disjunctive syllogism
Simplification
What rule of inference is used in this argument?
“If I go for a balanced diet, then I will be fit. If I will be fit, then I will remain healthy. Therefore, if I go for a balanced diet, then I will remain healthy.”
Modus tollens
Modus ponens
Disjunctive syllogism
Hypothetical syllogism
p ∧ q is logically equivalent to ________
¬ (p → ¬q)
(p → ¬q)
(¬p → ¬q)
(¬p → q)
Which of the following statement is correct?
p ∨ q ≡ q ∨ p
¬(p ∧ q) ≡ ¬p ∨ ¬q
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
All of mentioned
The ten switches A, B, C, D, E, F, G, H, N, M are placed in the given circuit (all are open at a given time). If you close one switch you need to pay 1 unit cost. What is the cost you need to pay to glow this Lamp.
2 units
4 units
3 units
1 unit
Let P, Q, R be true, false, false, respectively, which of the following is true?
Q↔(P∧R)
P↔(Q∨R)
P∧(Q∧¬R)
(P→Q)∧¬R
The Ex-nor of this string “01010101” with “11111111” is?
00110100
10101010
01010101
10101001
Which of the following represents: ¬R (negation of R) if R stands for “I like badminton but hate math”?
I do not like badminton or math
I dislike badminton but love math
I hate badminton and math
I hate badminton or like math
What rules of inference are used in this argument? “All students in this science class as taken a course in physics” and “Mary is a student in this class” imply the conclusion “Mary as taken a course in physics.”
Existential generalization
Universal instantiation
Existential instantiation
Universal generalization
The statement (¬P↔Q)∧¬Q is true when?
P: False, Q: False
P: True, Q: True
P: True, Q: False
P: False, Q: True
In boolean algebra, the OR operation is performed by which properties?
Associative properties
Commutative properties
Distributive properties
All of the Mentioned
In the circuit shown the lamp will be glowing if _______.
P: True, Q: False
P: True, Q: True
P: False, Q: False
None of the mentioned
One of De Morgan's theorems states that ¬(A + B) =¬A x ¬B . Simply stated, this means that logically there is no difference between:
a NOR and an AND gate with inverted inputs.
a NAND and an OR gate with inverted inputs.
an AND and a NOR gate with inverted inputs.
a NOR and a NAND gate with inverted inputs.
Which of the following statement regarding sets is false?
A ∪ A = A
(A ∪ B)’ = A’ ∪ B’
A – (B ∩ C) = (A - B) ∪ (A – C)
A ∩ A = A
Let the sets be A, B, C, D then (A ∩ B) X (C ∩ D) is equivalent to ______.
(A X D) ∪ (B X C)
(A X C) ∪ (B X D)
None of the mentioned
(A X C) ∩ (B X D)
The set O of odd positive integers less than 10 can be expressed by ____.
{1, 2, 5, 9}
{1, 2, 3}
{1, 3, 5, 7, 9}
{1, 5, 7, 9, 11}
Let set A = {1, 2} and B = {3, 4}, then A X B is ____.
{(3, 1), (4, 1)}
{(1, 3), (2, 4)}
{(1, 3), (2, 4), (1, 4), (2, 3)}
{1, 2, 3, 4}
Which of the following function f: Z X Z → Z is not onto?
f(a, b) = a + b
f(a, b) = a – b
f(a, b) = |b|
f(a, b) = a
If set A as 3 elements then number of elements in A X A X A are _______.
19
27
9
6
Which of the following sequences in Ap will have common difference 3, where n is an integer?
an = 2n2 + 3
an = 3n2 + 3n
an = 2n2 + 3n
an = 5 + 3n
Let A order (a x b) and B order (c x d) be two matrices, then if AB exists, the order of AB is?
a x b
b x c
a x d
c x d
For matrix A and a scalar k, (kA)T is equal to _____.
k(A)T
k2(A)
k(A)
k2(A)T
Let the sequence be 1x2, 3x22, 5x23, 7x24, 9x25 ……. then the next term of this AGP is given by _____.
10x26
None of the mentioned
10x27
11x26
Where is linear searching used?
When the list has only a few elements
When performing a single search in an unordered list
Used all the time
When the list has only a few elements and When performing a single search in an unordered list
What is the best case for linear search?
O(nlogn)
O(logn)
O(n)
O(1)
What is the worst case for linear search?
O(nlogn)
O(logn)
O(n)
O(1)
Which of the following is not an application of binary search?
To find the lower/upper bound in an ordered sequence
Union of intervals
Debugging
To search in unordered list
What is the time complexity of the Quick search algorithm?
O(n)
O(log n)
O(m+n)
O(mn)
What is the space complexity of quick search algorithm?
O(n)
O(log n)
O(m+n)
O(mn)
A procedure for solving a problem in terms of actions and their order, is called as
Program instructions
Algorithm
Template
All of the choices
An artificial and informal language that helps programmers to develop algorithms, is called
Instruction code
Algocode
Pseudocode
Control code
Specifying the order in which statements are to be executed in a program is called
Program control
Program counter
Program order
Program flow
For a binary search algorithm to work, it is necessary that the array (list) must be
sorted
unsorted
in a heap
popped out of stack
What will be the plain text corresponding to ciphered text “rmw ” if an affine cipher is used with key values as a=5, b=10?
csk
kkr
srt
msd
What will be the ciphered text corresponding to plain text “sanfoundry” if an affine cipher is used with key values as a=5, b=10?
wkxjcgxzra
gkxteuxfzw
ukxhmyxdfg
rfsexbsumv
Which of the following statements is logically equivalent to the statement, “If a and b ≠ 0 are rational numbers and r ≠ 0 is an irrational number, then a + br is irrational.”
If a and b ≠ 0 are rational and r ≠ 0 is real, then a + br is rational only if r is irrational.
If a and b ≠ 0 are rational and r ≠ 0 is real, then a + br is irrational only if r is irrational.
If a and b ≠ 0 are rational and r ≠ 0 is real, then r is rational only if a + br is rational.
If a and b ≠ 0 are rational and r ≠ 0 is real, then a + br is rational only if r is rational.
Which of the following statements is true:
A number k divides the sum of three consecutive integers n, n + 1, and n + 2 if
and only if it divides the middle integer n + 1.
An integer n is divisible by 6 if and only if it is divisible by 3.
For all integers a, b, and c, a | bc if and only if a | b and a | c.
If r and s are integers, then r | s if and only if r2 | s2
Which of the following statements is true:
A number is rational if and only if its square is rational.
An integer n is odd if and only if n2 + 2n is odd.
A number is irrational if and only if its square is irrational.
At least one of two numbers x and y is irrational if and only if the product xy is irrational.
"A key is a string of bits used by a cryptographic algorithm to transform plain text into ciphertext." Which of the following is capable of becoming a key in a cryptographic algorithm?
An integer values
A square matrix
An array of characters (i.e. a string)
All of the mentioned
Cipher in cryptography is ___________.
Encrypted message
Algorithm for performing encryption and decryption
Both algorithm for performing encryption and decryption and encrypted message
Decrypted message
The solution of the linear congruence 4x = 5(mod 9) is?
6(mod 9)
8(mod 9)
9(mod 9)
10(mod 9)
The inverse of 19 modulo 141 is?
50
51
54
52
In which cipher each letter of the plaintext is substituted by any other letter to form the cipher message?
Shift cipher
DES encryption
Block cipher
AES encryption
