Since P and not P cannot both be true at the same time, the conjunction is always false. Therefore P \land \neg P is a contradiction.
Q1mcq2 marks
If A, B, C are three events such that $P(B)=\frac{3}{4}$, $P(A\cap B\cap C)=\frac{1}{3}$, and $P(\overline{A}\cap B\cap \overline{C})=\frac{1}{3}$ then $P(B\cap C)$ equals:
a.
1/12
Correct Answer
b.
1/6
c.
1/15
d.
1/9
Step-by-Step AI Explanation
Verified Method
Since $B$ is split into disjoint parts, $P(B)=P(A\cap B\cap C)+P(A\cap B\cap \overline{C})+P(\overline{A}\cap B\cap C)+P(\overline{A}\cap B\cap \overline{C})$. Using the given values and the fact that $P(B)=3/4$, we get the needed part for $B\cap C$ as $1/12$.
Q2mcq1 mark
A relation R on a set A is called an ________ relation, if R is reflexive, symmetric and transitive.
a.
Compatibility
b.
Equivalence
Correct Answer
c.
Partial order
d.
Associative
Step-by-Step AI Explanation
Verified Method
A relation that is reflexive, symmetric, and transitive is, by definition, an equivalence relation.
Q2mcq2 marks
If $a_{m,n}$ is defined recursively for $(m,n)\in \mathbb{N}\times\mathbb{N}$ by $a_{0,0}=0$,
$$a_{m,n}=\begin{cases}a_{m-1,n}+1 & \text{if } n=0, m>0 \\ a_{m,n-1}+n & \text{if } n>0\end{cases}$$
then for any $(m,n)\in \mathbb{N}\times\mathbb{N}$, $a_{m,n}$ is given by:
a.
$\frac{m(m+1)}{2}+\frac{n(n+1)}{2}$
b.
$\frac{n^2+n+2m}{2}$
Correct Answer
c.
$\frac{2m+n-1}{2}$
d.
None of these
Step-by-Step AI Explanation
Verified Method
For $n=0$, the recursion adds 1 each step in $m$, giving a linear dependence on $m$. For $n>0$, the second recurrence accumulates the sum $1+2+\cdots+n=\frac{n(n+1)}{2}$, and the full closed form is $\frac{n^2+n+2m}{2}$.
Q3mcq1 mark
Surjective function is also called _________.
a.
onto
Correct Answer
b.
one-to-one
c.
many-to-one
d.
into
Step-by-Step AI Explanation
Verified Method
A surjective function maps every element of the codomain to at least one element of the domain, which is exactly the definition of an onto function.
Q3mcq2 marks
Solution of $e^x-3x=0$ correct to two decimal places is:
a.
1.53
b.
1.51
Correct Answer
c.
1.50
d.
1.54
Step-by-Step AI Explanation
Verified Method
The equation $e^x=3x$ has a positive root near $x\approx 1.5129$, which rounds to $1.51$.
Q4mcq1 mark
Let $f(x)=x^2+x$ and $g(x)=x+1$. What is the function of $f\circ g$?
a.
$x^2+3x+2$
Correct Answer
b.
$x^2+x+1$
c.
$x^2+2x+1$
d.
$x^2+2x+2$
Step-by-Step AI Explanation
Verified Method
$f\circ g$ means substitute $g(x)$ into $f(x)$. So $f(g(x))=(x+1)^2+(x+1)=x^2+2x+1+x+1=x^2+3x+2$.
Q4mcq2 marks
The function $f(t)=\int_{-1}^{x} t(e^t-1)(t-1)(t-2)^3(t-3)^5\,dt$ has a local minima at $t=$
a.
0 and 1
b.
1 and 3
Correct Answer
c.
2 and 3
d.
1, 2 and 3
Step-by-Step AI Explanation
Verified Method
By the Fundamental Theorem of Calculus, local extrema of $f$ occur where the integrand changes sign. The sign analysis shows minima at $t=1$ and $t=3$.
Q5mcq1 mark
If $\binom{n}{12}=\binom{n}{8}$, then $n$ equals _________.
a.
20
Correct Answer
b.
12
c.
6
d.
30
Step-by-Step AI Explanation
Verified Method
For binomial coefficients, $\binom{n}{r}=\binom{n}{n-r}$. Since $12$ and $8$ are complementary, $12=n-8$, hence $n=20$.
Q5mcq2 marks
Which of the following grammar rules violate the requirements of being in Chomsky Normal Form? $P$, $Q$ and $R$ are non-terminals and $r$, $s$ and $t$ are terminals.
(i) $P\to QR$
(ii) $P\to QsR$
(iii) $P\to s$
(iv) $P\to t$
a.
(i) and (ii) only
b.
(i) and (iii) only
c.
(ii) and (iii) only
Correct Answer
d.
(iii) and (iv) only
Step-by-Step AI Explanation
Verified Method
In CNF, productions must be of the form $A\to BC$ or $A\to a$ (and possibly $S\to\epsilon$). Rule (ii) mixes terminals and non-terminals on the right-hand side, and rule (iii) is not allowed in standard CNF as printed here.
🎉 10 Free Sample Solutions Completed
Unlock All 151 Questions & Solutions
Sign up free in seconds to unlock step-by-step AI answers for the remaining 141 questions.
Consider a machine with clock rate of 200 MHz. The following measurements were recorded while running a given set of benchmark programme:
Instruction Type | Count | Cycles per Instruction
Arithmetic and Logic | 10 | 1
Load and store | 8 | 2
Branch | 2 | 4
Others | 4 | 3
Calculate the MIPS rate:
a.
90
b.
104
c.
108
d.
94
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a disk that rotates at 3600 rpm. The seek time to move the head between the adjacent track is 2 ms. There are 32 sectors per track, which are stored in linear order from sector 0 to sector 31. The head sees the sector in ascending order. Assume the read/write head is positioned at the start of sector 1 on track 8. There is a main memory buffer large enough to hold an entire track. How long will it take to transfer sector 1 on track 8 to sector 1 on track 9?
a.
17.24 ms
b.
16.2 ms
c.
16.7 ms
d.
17.28 ms
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
A system is based on an 8-bit microprocessor and has two I/O devices. The I/O controllers for this system use separate Control and Status registers. Both devices handle data on a 1-byte-at-a-time basis. The first device has two status lines and three control lines. The second device has three status lines and four control lines. How many distinct addresses are needed to control the two devices?
a.
Six
b.
Eight
c.
Seven
d.
Nine
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
If the expression $((2+3) * 4 + 5 * (6+7) * 8) + 9$ is evaluated with $*$ having precedence over $+$, then the value obtained is the same as the value of which of the following prefix expressions?
a.
+ + * + 2 3 4 * * 5 + 6 7 8 9
b.
+ * + + 2 3 4 * * 5 + 6 7 8 9
c.
* + + 2 3 4 * * 5 + + 6 7 8 9
d.
* + + + 2 3 4 * * 5 + 6 7 8 9
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a max heap represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4. Now consider that a value 35 is inserted into this heap. After insertion, the new heap is:
a.
40, 30, 20, 10, 15, 16, 17, 8, 4, 35
b.
40, 35, 20, 10, 30, 16, 17, 8, 4, 15
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
The following postfix expression with single digit operands is evaluated using a stack: 823/^/23*+51*-. Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated are:
a.
6, 1
b.
5, 7
c.
3, 2
d.
1, 5
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
The following C function takes a singly linked list as input argument. It modifies the list by moving the last element to the front of the list and returns the modified list. Some part of the code is left blank.
typedef struct node1 {
int value;
struct node1 *next;
} Node;
Node * move_to_front (Node * head) {
Node *p, *q;
if (head == NULL || head->next == NULL)
return head;
q = NULL; p = head;
while (p->next != NULL) {
q = p;
p = p->next;
}
return head;
}
Choose the correct alternative to replace the blank line.
a.
q = NULL; p->next = head; head = p;
b.
q->next = NULL; head = p; p->next = head;
c.
head = p; p->next = q; q->next = NULL;
d.
p->next = NULL; next = head; head = p;
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
If $T(1)=O(1)$, give the correct matching for the following pairs:
(a) $T(n)=T(n-1)+n$
(b) $T(n)=T(n/2)+n$
(c) $T(n)=T(n/2)+\log n$
(d) $T(n)=T(n-1)+\log n$
(i) $T(n)=O(n)$
(ii) $T(n)=O(n\log n)$
(iii) $T(n)=O(n^2)$
(iv) $T(n)=O(\log^2 n)$
a.
(a)-(iii), (b)-(ii), (c)-(i), (d)-(iv)
b.
(a)-(iii), (b)-(i), (c)-(iv), (d)-(ii)
c.
(a)-(ii), (b)-(iii), (c)-(iv), (d)-(i)
d.
(a)-(iii), (b)-(i), (c)-(ii), (d)-(iv)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
An array A contains N integers arranged in a random sequence. We want to check if any value is duplicated in the sequence. Which of the following would be the most efficient algorithm, asymptotically, in the worst case?
a.
For each pair of positions i and j, check if A[i] is equal to A[j]
b.
Sort the array using insertion sort. When inserting each element into the sorted prefix, check if there is already a value equal to it in the prefix
c.
Sort the array using merge sort. Scan the sorted array from beginning to end looking for adjacent equal elements
d.
Sort the array using quick sort. Use binary search on the sorted array to find duplicated values
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
How many different ways of inserting the keys {23, 33, 34, 42, 46, 52} are there using the hash function $h(k)=k \bmod 10$ and linear probing that will result in the same hash table as shown below?
0: empty
1: empty
2: 42
3: 23
4: 34
5: 52
6: 46
7: 33
8: empty
9: empty
a.
10
b.
20
c.
30
d.
40
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
How many different ways of inserting the keys {23, 33, 34, 42, 46, 52} are there using the hash function $h(k)=k \bmod 10$ and linear probing that will result in the same hash table as shown below?
a.
10
b.
20
c.
30
d.
40
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
The following set of functional dependencies are given in a schema with attributes A, B, C, D & E.
A → B
A → C
CD → E
B → D
E → A
Which of the following functional dependencies is NOT implied by the above set?
a.
BC → CD
b.
CD → AC
c.
BD → CD
d.
AC → BC
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Relation R is decomposed using a set of functional dependencies F, and relation S is decomposed using another set of functional dependencies G. One decomposition is definitely BCNF, the other is definitely 3NF, but it is not known which is which. To make a guaranteed identification, which one of the following tests should be used on the decompositions? (Assume that the closures of F and G are available).
a.
Dependency preservation
b.
Lossless-Join
c.
BCNF definition
d.
3NF definition
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the following relations A, B and C.
How many tuples does the result of the following SQL query contain?
Select A.Id
From A
Where A.Age > All (select B.Age from B
Where B.Name = 'Arun')
a.
4
b.
3
c.
0
d.
1
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Match the following:
(A) Code and Fix
(B) Evolutionary Prototyping
(C) Spiral
(D) Staged delivery
(E) Waterfall
(i) Assess risks at each step; do most critical action first
(ii) Build an initial small requirement specification, code it; then evolve the specification or code as needed
(iii) Build initial requirement specification for reversal releases, then design and code in sequence
(iv) Standard phases in order
(v) Write same code, debug it, repeat
a.
(A)-(ii), (B)-(iii), (C)-(iv), (D)-(v), (E)-(i)
b.
(A)-(iii), (B)-(iv), (C)-(v), (D)-(i), (E)-(ii)
c.
(A)-(iv), (B)-(iii), (C)-(ii), (D)-(v), (E)-(i)
d.
(A)-(v), (B)-(ii), (C)-(i), (D)-(iii), (E)-(iv)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
You have a system that contains a special processor for doing floating point operations. You have determined that 50% of your computations can use the floating point processor. The speed up of the floating point processor is 15. Overall speed up achieved by using the floating point processor is:
a.
0.876
b.
1.876
c.
6.876
d.
7.0
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
A non pipelined processor has a clock rate of 2.5 GHz and an average CPI of 4. An upgrade to the processor introduces a five stage pipeline. However due to internal pipeline delays such as latch delay, the clock rate has reduced to 2 GHz. What is the MIPS rate for each processor?
a.
625 MIPS, 2000 MIPS
b.
625 MIPS, 1000 MIPS
c.
625 MIPS, 2500 MIPS
d.
2.5 MIPS, 2000 MIPS
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Assume 'n' programs of lengths $l_1, l_2, \ldots, l_n$ are to be stored on a tape. Program $i$ is to be retrieved with frequency $f_i$. If the programs are stored in the order $i_1, i_2, i_3, \ldots, i_n$, the expected retrieval time (ERT) is ________.
What is the maximum time and space taken by Breadth first search algorithm on any Graph $G$ with $n$ vertices and $e$ edges? When we used adjacency list.
a.
$t(n,e)=O(n+e)$ and $s(n,e)=O(n)$
b.
$t(n,e)=\Omega(n+e)$ and $s(n,e)=\Omega(n)$
c.
$t(n,e)=Q(n+e)$ and $s(n,e)=Q(n)$
d.
$t(n,e)=Q(n-e)$ and $s(n,e)=Q(n)$
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
In a _____ based clustering index, the index record contains the search-key value and a pointer to the first data record with that search-key value and the rest of the records will be in the sequential pointers.
a.
Dense
b.
Sparse
c.
Straight
d.
Continuous
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the following relational schemes for a library database:
Book (Title, Author, Catalog_no, Publisher, Year, Price)
Collection (Title, Author, Catalog_no)
With the functional dependencies:
I: Title Author → Catalog_no
II: Catalog_no → Title Author Publisher Year
III: Publisher Title Year → Price
Assume {Author, Title} is the key for both schemes. Which of the following statement is true?
a.
Both Book and collection are in BCNF
b.
Both Book and collection are in 3NF only
c.
Book is in 2NF and collection is in 3NF
d.
Both Book and collections are 2NF only
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.