We reached the station late, and _______ missed the train.
a.
near
b.
nearly
Correct Answer
c.
utterly
d.
mostly
No explanation saved for this question yet.
Q2mcq
Kind: _______:: Often: Frequently (By word meaning)
a.
Mean
b.
Type
c.
Cruel
d.
Kindly
Step-by-Step AI Explanation
Verified Method
This question was officially declared void ("Marks To All") β every candidate was awarded marks for it regardless of answer.
Q3mcq
A series of natural numbers $F$ 1, $F$ 2, $F$ 3, $F$ 4, $F$ 5, $F$ 6, $F$ 7, β¦ obeys $F n+1$ = $F n$ + $F n-1$ for all integers $n \ge$ 2. If $F$ 6 = 37, and $F$ 7 = 60, then what is $F$ 1 ?
a.
4
Correct Answer
b.
5
c.
8
d.
9
No explanation saved for this question yet.
Q4mcq
A survey for a certain year found that 90% of pregnant women received medical care at least once before giving birth. Of these women, 60% received medical care from doctors, while 40% received medical care from other healthcare providers. Given this information, which one of the following statements can be inferred with certainty?
a.
More than half of the pregnant women received medical care at least once from a doctor.
Correct Answer
b.
Less than half of the pregnant women received medical care at least once from a doctor.
c.
More than half of the pregnant women received medical care at most once from a doctor.
d.
Less than half of the pregnant women received medical care at most once from a doctor.
No explanation saved for this question yet.
Q5mcq
Looking at the surface of a smooth 3-dimensional object from the outside, which one of the following options is TRUE?
a.
The surface of the object must be concave everywhere.
b.
The surface of the object must be convex everywhere.
c.
The surface of the object may be concave in some places and convex in other places.
Correct Answer
d.
The object can have edges, but no corners.
No explanation saved for this question yet.
Q6mcq
The country of Zombieland is in distress since more than 75% of its working population is suffering from serious health issues. Studies conducted by competent health experts concluded that a complete lack of physical exercise among its working population was one of the leading causes of their health issues. As one of the measures to address the problem, the Government of Zombieland has decided to provide monetary incentives to those who ride bicycles to work. Based only on the information provided above, which one of the following statements can be logically inferred with certainty?
a.
All the working population of Zombieland will henceforth ride bicycles to work.
b.
Riding bicycles will ensure that all of the working population of Zombieland is free of health issues.
c.
The health experts suggested to the Government of Zombieland to declare riding bicycles as mandatory.
d.
The Government of Zombieland believes that riding bicycles is a form of physical exercise.
Correct Answer
No explanation saved for this question yet.
Q7mcq
Consider two functions of time $(t),$
$f(t)$ = 0.01 $t$ 2
$g(t)$ = 4 $t$ where 0 < $t$ < $\infty.$ Now consider the following two statements: (i) For some $t$ > 0, $g(t)$ > $f(t).$ (ii) There exists a $T,$ such that $f(t)$ > $g(t)$ for all $t$ > $T.$ Which one of the following options is TRUE?
a.
only (i) is correct
b.
only (ii) is correct
c.
both (i) and (ii) are correct
Correct Answer
d.
neither (i) nor (ii) is correct
No explanation saved for this question yet.
Q8mcq
Which one of the following sentence sequences creates a coherent narrative? (i) Once on the terrace, on her way to her small room in the corner, she (ii) She begins to pant by the time she has climbed all the stairs. (iii) Mina has bought vegetables and rice at the market, so her bags are (iv) He was leaning against the parapet, watching the traffic below.
notices the man right away.
heavy.
a.
(i), (ii), (iv), (iii)
b.
(ii), (iii), (i), (iv)
c.
(iv), (ii), (i), (iii)
d.
(iii), (ii), (i), (iv)
Correct Answer
No explanation saved for this question yet.
Q9mcq
f x and g y are functions of x and y, respectively, and f x = g y for all real () () () () values of $x$ and $y.$ Which one of the following options is necessarily TRUE for all x and y?
a.
f x = 0 and g y = 0 () ()
b.
f x = g y = constant () ()
Correct Answer
c.
d.
f x + g y = f x - g y () () () ()
No explanation saved for this question yet.
Q10mcq
Which one of the options best describes the transformation of the 2-dimensional figure P to Q, and then to R, as shown?
a.
Operation 1: A clockwise rotation by 90ΒΊ about an axis perpendicular to the plane of the figure Operation 2: A reflection along a horizontal line
Correct Answer
b.
Operation 1: A counter clockwise rotation by 90ΒΊ about an axis perpendicular to the plane of the figure Operation 2: A reflection along a horizontal line
c.
Operation 1: A clockwise rotation by 90ΒΊ about an axis perpendicular to the plane of the figure Operation 2: A reflection along a vertical line
d.
Operation 1: A counter clockwise rotation by 180ΒΊ about an axis perpendicular to the plane of the figure Operation 2: A reflection along a vertical line
No explanation saved for this question yet.
🎉 10 Free Sample Solutions Completed
Unlock All 65 Questions & Solutions
Sign up free in seconds to unlock step-by-step AI answers for the remaining 55 questions.
Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the target hardware. S2: The back-end includes phases that are speciο¬c to the target hardware. S3: The back-end includes phases that are speciο¬c to the programming language used in the source code. Identify the CORRECT option.
a.
Only S1 is TRUE.
b.
Only S1 and S2 are TRUE.
c.
S1, S2, and S3 are all TRUE.
d.
Only S1 and S3 are TRUE.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel be another function that deletes a node in a doubly-linked list given a pointer to the node and a pointer to the head of the list. Let n denote the number of nodes in each of the linked lists. Which one of the following choices is TRUE about the worst-case time complexity of SLLdel and DLLdel?
a.
SLLdel is O(1) and DLLdel is O(n)
b.
Both SLLdel and DLLdel are O(log(n))
c.
Both SLLdel and DLLdel are O(1)
d.
SLLdel is O(n) and DLLdel is O(1)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s, p, q, r}, with s being the start state and p being the only ο¬nal state.
0
1
s 1 p q
1
0 r 0
0,1 Which one of the following regular expressions correctly describes the language accepted by A?
a.
1(0 β 11) β
b.
0(0 + 1) β
c.
1(0 + 11) β
d.
1(110 β) β
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
The Lucas sequence L n is deο¬ned by the recurrence relation:
L n = L n-1 + L n-2, for n $\ge$ 3, with L 1 = 1 and L 2 = 3. Which one of the options given is TRUE?
a.
b.
c.
d.
- L n = 2 2
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Suppose two hosts are connected by a point-to-point link and they are conο¬gured to use Stop-and-Wait protocol for reliable data transfer. Identify in which one of the following scenarios, the utilization of the link is the lowest.
a.
Longer link length and lower transmission rate
b.
Longer link length and higher transmission rate
c.
Shorter link length and lower transmission rate
d.
Shorter link length and higher transmission rate
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let β‘ β€
1 2 3 4
β’ 4 1 2 3 β₯
A = β’ β£ β₯ β¦
3 4 1 2
2 3 4 1 and β‘ β€
3 4 1 2
β’ 4 1 2 3 β₯
B = β’ β£ β₯. β¦
1 2 3 4
2 3 4 1 Let det(A) and det(B) denote the determinants of the matrices A and B, respectively. Which one of the options given below is TRUE?
a.
det(A) = det(B)
b.
det(B) = -det(A)
c.
det(A) = 0
d.
det(AB) = det(A) + det(B)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the following deο¬nition of a lexical token id for an identiο¬er in a program- ming language, using extended regular expressions:
letter $\to$ [A-Za-z]
digit $\to$ [0-9]
id $\to$ letter (letter | digit) β Which one of the following Non-deterministic Finite-state Automata with - transitions accepts the set of valid identiο¬ers? (A double-circle denotes a ο¬nal state)
letter
a.
letter letter
b.
letter letter
c.
letter letter digit
d.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let k be the number of keys, m be the number of slots in the hash table, and k > m. Which one of the following is the best hashing strategy to counteract the adversary?
a.
Division method, i.e., use the hash function h(k) = k mod m.
b.
Multiplication method, i.e., use the hash function h(k) = m(kA - kA), where A is a carefully chosen constant.
c.
Universal hashing method.
d.
If k is a prime number, use Division method. Otherwise, use Multiplication method.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
The output of a 2-input multiplexer is connected back to one of its inputs as shown in the ο¬gure.
Multiplexer
0
Q
1
S Match the functional equivalence of this circuit to one of the following options.
a.
D Flip-ο¬op
b.
D Latch
c.
Half-adder
d.
Demultiplexer
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Geetha has a conjecture about integers, which is of the form
βx P (x) =β βyQ(x, y), where P is a statement about integers, and Q is a statement about pairs of integers. Which of the following (one or more) option(s) would imply Geethaβs conjecture?
a.
βx P (x) β§ βyQ(x, y)
b.
βxβyQ(x, y)
c.
βyβx P (x) =β Q(x, y)
d.
βx P (x) β§ βyQ(x, y)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let A be the adjacency matrix of the graph with vertices {1, 2, 3, 4, 5}.
3
2 5 1
4 Let Ξ» 1, Ξ» 2, Ξ» 3, Ξ» 4, and Ξ» 5 be the ο¬ve eigenvalues of A. Note that these eigenvalues need not be distinct. The value of Ξ» 1 + Ξ» 2 + Ξ» 3 + Ξ» 4 + Ξ» 5 =.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a 3-stage pipelined processor having a delay of 10 ns (nanoseconds), 20 ns, and 14 ns, for the ο¬rst, second, and the third stages, respectively. Assume that there is no other delay and the processor does not suο¬er from any pipeline hazards. Also assume that one instruction is fetched every cycle. The total execution time for executing 100 instructions on this processor is
ns.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer system polls the keyboard every 10 ms (milli seconds) to check for a keystroke and consumes 100 ΞΌs (micro seconds) for each poll. If it is determined after polling that a key has been pressed, the system consumes an additional 200 ΞΌs to process the keystroke. Let T 1 denote the fraction of a second spent in polling and processing a keystroke. In an alternative implementation, the system uses interrupts instead of polling. An interrupt is raised for every keystroke. It takes a total of 1 ms for servicing an interrupt and processing a keystroke. Let T 2 denote the fraction of a second spent in servicing the interrupt and processing a keystroke. The ratio 1 is T. (Rounded oο¬ to one decimal place)
T
2
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
The integer value printed by the ANSI-C program given below is. #include<stdio.h> int funcp(){
static int x = 1;
x++;
return x; } int main(){
int x,y;
x = funcp();
y = funcp()+x;
printf("%d\n", (x+y));
return 0; }
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the control ο¬ow graph shown.
ENTRY
B1
i = m - 1
j = n
a = 10
B2
i = i + 1
j = j - 1
B3
a = 20
B4
i = a + 1
EXIT Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?
a.
B1: {}, B2: {a}, B3: {a}, B4: {a}
b.
B1: {i, j}, B2: {a}, B3: {a}, B4: {i}
c.
B1: {a, i, j}, B2: {a, i, j}, B3: {a, i}, B4: {a}
d.
B1: {a, i, j}, B2: {a, j}, B3: {a, j}, B4: {a, i, j}
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the two functions incr and decr shown below.
decr(){ incr(){
wait(s); wait(s);
X = X-1; X = X+1;
signal(s); signal(s);
} } There are 5 threads each invoking incr once, and 3 threads each invoking decr once, on the same shared variable X. The initial value of X is 10. Suppose there are two implementations of the semaphore s, as follows: I-1: s is a binary semaphore initialized to 1. I-2: s is a counting semaphore initialized to 2. Let V1, V2 be the values of X at the end of execution of all the threads with implementations I-1, I-2, respectively. Which one of the following choices corresponds to the minimum possible values of V1, V2, respectively?
a.
15, 7
b.
7, 7
c.
12, 7
d.
12, 8
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the context-free grammar G below
S $\to$ aSb | X
X $\to$ aX | Xb | a | b, where S and X are non-terminals, and a and b are terminal symbols. The starting non-terminal is S. Which one of the following statements is CORRECT?
a.
The language generated by G is (a + b) β
b.
The language generated by G is a β (a + b)b β
c.
The language generated by G is a β b β (a + b)
d.
The language generated by G is not a regular language
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the pushdown automaton (PDA) P below, which runs on the input alpha- bet {a, b}, has stack alphabet {β₯, A}, and has three states {s, p, q}, with s being the start state. A transition from state u to state v, labelled c/X/Ξ³, where c is an input symbol or, X is a stack symbol, and Ξ³ is a string of stack symbols, represents the fact that in state u, the PDA can read c from the input, with X on the top of its stack, pop X from the stack, push in the string Ξ³ on the stack, and go to state v. In the initial conο¬guration, the stack has only the symbol β₯ in it. The PDA accepts by empty stack.
a/β₯/Aβ₯
a/A/AA b/A/
s p
b/A/
/A/ /A/
q
/A/
/β₯/ Which one of the following options correctly describes the language accepted by P ?
a.
{a m b n | 1 $\le$ m and n < m}
b.
{a m b n | 0 $\le$ n $\le$ m}
c.
{a m b n | 0 $\le$ m and 0 $\le$ n}
d.
{a m | 0 $\le$ m} βͺ {b n | 0 $\le$ n}
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the given C-code and its corresponding assembly code, with a few operands U1βU4 being unknown. Some useful information as well as the semantics of each unique assembly instruction is annotated as inline comments in the code. The memory is byte-addressable. //C-code;assembly-code (; indicates comments)
;r1-r5 are 32-bit integer registers
;initialize r1=0, r2=10
;initialize r3, r4 with base address of a, b
L01: jeq r1, r2, end;if(r1==r2) goto end int a[10], b[10], i;
int
32-bit
L02:
lw
r5,
0(r4)
;r5
<-
Memory[r4+0]
(i=0;
i<10;i++)
L03:
shl
r5,
r5,
;r5
<-
r5
a[i]
b[i]
L04:
sw
r5,
0(r3)
;Memory[r3+0]
L05:
add
r3,
r3,
;r3
<-
r3+U2
L06: add r4, r4, U3 L07: add r1, r1, 1 L08: jmp U4;goto U4 L09: end Which one of the following options is a CORRECT replacement for operands in the position (U1, U2, U3, U4) in the above assembly code?
a.
(8, 4, 1, L02)
b.
(3, 4, 4, L01)
c.
(8, 1, 1, L02)
d.
(3, 1, 1, L01)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
A 4 kilobyte (KB) byte-addressable memory is realized using four 1 KB memory blocks. Two input address lines (IA4 and IA3) are connected to the chip select (CS) port of these memory blocks through a decoder as shown in the ο¬gure. The remaining ten input address lines from IA11βIA0 are connected to the address port of these blocks. The chip select (CS) is active high. IA11 MSB IA10 IA9 IA8 10-bit IA7 IA6 1KB memory 1KB memory 1KB memory 1KB memory IA5 IA2 IA1 IA0 LSB
Decoder X1 CS X2 CS X3 CS X4 CS IA4 A1 Q1 IA3 A0 Q2
Addr Addr Addr Addr
Q0
Q3 The input memory addresses (IA11βIA0), in decimal, for the starting locations (Addr=0) of each block (indicated as X1, X2, X3, X4 in the ο¬gure) are among the options given below. Which one of the following options is CORRECT?
a.
(0, 1, 2, 3)
b.
(0, 1024, 2048, 3072)
c.
(0, 8, 16, 24)
d.
(0, 0, 0, 0)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a sequential digital circuit consisting of T ο¬ip-ο¬ops and D ο¬ip-ο¬ops as shown in the ο¬gure. CLKIN is the clock input to the circuit. At the beginning, Q1, Q2 and Q3 have values 0, 1 and 1, respectively.
T D T
Q Q Q CLKIN
CLK CLK CLK
Q1 Q2 Q3 Which one of the given values of (Q1, Q2, Q3) can NEVER be obtained with this digital circuit?
a.
(0, 0, 1)
b.
(1, 0, 0)
c.
(1, 0, 1)
d.
(1, 1, 1)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
A Boolean digital circuit is composed using two 4-input multiplexers (M1 and M2) and one 2-input multiplexer (M3) as shown in the ο¬gure. X0βX7 are the inputs of the multiplexers M1 and M2 and could be connected to either 0 or 1. The select lines of the multiplexers are connected to Boolean variables A, B and C as shown. X0 0
Multiplexer X1 1 X2 2 X3 3 S1 S0 0 A M3 C Q X4 0 1 S
M1
Q
Multiplexer
M2 X5 1 X6 2 X7 3 S1 S0 A C
Multiplexer
Q B Which one of the following set of values of (X0, X1, X2, X3, X4, X5, X6, X7) will realise the Boolean function A + A.C + A.B.C?
a.
(1, 1, 0, 0, 1, 1, 1, 0)
b.
(1, 1, 0, 0, 1, 1, 0, 1)
c.
(1, 1, 0, 1, 1, 1, 0, 0)
d.
(0, 0, 1, 1, 0, 1, 1, 1)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the IEEE-754 single precision ο¬oating point numbers P=0xC1800000 and Q=0x3F5C2EF4. Which one of the following corresponds to the product of these numbers (i.e., P $\times$ Q), represented in the IEEE-754 single precision format?
a.
0x404C2EF4
b.
0x405C2EF4
c.
0xC15C2EF4
d.
0xC14C2EF4
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let A be a priority queue for maintaining a set of elements. Suppose A is implemented using a max-heap data structure. The operation Extract-Max(A) extracts and deletes the maximum element from A. The operation Insert(A,key) inserts a new element key in A. The properties of a max-heap are preserved at the end of each of these operations. When A contains n elements, which one of the following statements about the worst case running time of these two operations is TRUE?
a.
Both Extract-Max(A) and Insert(A,key) run in O(1).
b.
Both Extract-Max(A) and Insert(A,key) run in O(log(n)).
c.
Extract-Max(A) runs in O(1) whereas Insert(A,key) runs in O(n).
d.
Extract-Max(A) runs in O(1) whereas Insert(A,key) runs in O(log(n)).
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the C function foo and the binary tree shown. typedef struct node { int val; 10 struct node *left, *right; } node;
5 11 int foo(node *p) {
3 int retval; 8 13 if (p == NULL) return 0; else { retval = p->val + foo(p->left) + foo(p->right); printf("%d ", retval); return retval; } } When foo is called with a pointer to the root node of the given binary tree, what will it print?
a.
3 8 5 13 11 10
b.
3 5 8 10 11 13
c.
3 8 16 13 24 50
d.
3 16 8 50 24 13
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let f: A $\to$ B be an onto (or surjective) function, where A and B are nonempty sets. Deο¬ne an equivalence relation βΌ on the set A as
a 1 βΌ a 2 if f (a 1) = f (a 2), where a 1, a 2 β A. Let E = {[x]: x β A} be the set of all the equivalence classes under βΌ. Deο¬ne a new mapping F: E $\to$ B as
F ([x]) = f (x), for all the equivalence classes [x] in E. Which of the following statements is/are TRUE?
a.
F is NOT well-deο¬ned.
b.
F is an onto (or surjective) function.
c.
F is a one-to-one (or injective) function.
d.
F is a bijective function.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Suppose you are asked to design a new reliable byte-stream transport protocol like TCP. This protocol, named myTCP, runs over a 100 Mbps network with Round Trip Time of 150 milliseconds and the maximum segment lifetime of 2 minutes. Which of the following is/are valid lengths of the Sequence Number ο¬eld in the myTCP header?
a.
30 bits
b.
32 bits
c.
34 bits
d.
36 bits
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let X be a set and 2 X denote the powerset of X. Deο¬ne a binary operation Ξ on 2 X as follows:
AΞB = (A - B) βͺ (B - A). Let H = (2 X, Ξ). Which of the following statements about H is/are correct?
a.
H is a group.
b.
Every element in H has an inverse, but H is NOT a group.
c.
For every A β 2 X, the inverse of A is the complement of A.
d.
For every A β 2 X, the inverse of A is A.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local host, so a DNS lookup is triggered (by the local DNS server deployed on your local host) over the 3-tier DNS hierarchy in an iterative mode. No resource records are cached anywhere across all DNS servers. Let RTT denote the round trip time between your local host and DNS servers in the DNS hierarchy. The round trip time between the local host and the web server hosting www.gate-2023.in is also equal to RTT. The HTML ο¬le associated with the URL is small enough to have negligible transmission time and negligible rendering time by your web browser, which references 10 equally small objects on the same web server. Which of the following statements is/are CORRECT about the minimum elapsed time between clicking on the URL and your browser fully rendering it?
a.
7 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.
b.
5 RTTs, in case of persistent HTTP with pipelining.
c.
9 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.
d.
6 RTTs, in case of persistent HTTP with pipelining.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a random experiment where two fair coins are tossed. Let A be the event that denotes HEAD on both the throws, B be the event that denotes HEAD on the ο¬rst throw, and C be the event that denotes HEAD on the second throw. Which of the following statements is/are TRUE?
a.
A and B are independent.
b.
A and C are independent.
c.
B and C are independent.
d.
Prob(B|C) = Prob(B)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider functions Function 1 and Function 2 expressed in pseudocode as follows:
1
Function
2
n > 1
do
for
i =
1 to
i = 1
to
x =
x +
x = x
+ 1;
end
for
end for n = n/2; end while Let f 1 (n) and f 2 (n) denote the number of times the statement βx = x + 1β is executed in Function 1 and Function 2, respectively. Which of the following statements is/are TRUE?
a.
f 1 (n) β Ξ(f 2 (n))
b.
f 1 (n) β o(f 2 (n))
c.
f 1 (n) β Ο(f 2 (n))
d.
f 1 (n) β O(n)
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let G be a simple, ο¬nite, undirected graph with vertex set {v 1,..., v n }. Let Ξ(G) denote the maximum degree of G and let N = {1, 2,...} denote the set of all possible colors. Color the vertices of G using the following greedy strategy: for i = 1,..., n
color(v i) β min{j β N: no neighbour of v i is colored j} Which of the following statements is/are TRUE?
a.
This procedure results in a proper vertex coloring of G.
b.
The number of colors used is at most Ξ(G) + 1.
c.
The number of colors used is at most Ξ(G).
d.
The number of colors used is equal to the chromatic number of G.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Let U = {1, 2, 3}. Let 2 U denote the powerset of U. Consider an undirected graph G whose vertex set is 2 U. For any A, B β 2 U, (A, B) is an edge in G if and only if (i) A = B, and (ii) either A B or B A. For any vertex A in G, the set of all possible orderings in which the vertices of G can be visited in a Breadth First Search (BFS) starting from A is denoted by B(A). If β denotes the empty set, then the cardinality of B(β ) is.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the following two-dimensional array D in the C programming language, which is stored in row-major order: int D[128][128]; Demand paging is used for allocating memory and each physical page frame holds 512 elements of the array D. The Least Recently Used (LRU) page-replacement policy is used by the operating system. A total of 30 physical page frames are allocated to a process which executes the following code snippet: for (int i = 0; i < 128; i++) for (int j = 0; j < 128; j++)
D[j][i] *= 10; The number of page faults generated during the execution of this code snippet is
.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with L levels for virtual to physical address translation. The page size is 4 KB (1 KB = 1024 B) and a page table entry at any of the levels occupies 8 bytes. The value of L is.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a sequence a of elements a 0 = 1, a 1 = 5, a 2 = 7, a 3 = 8, a 4 = 9, and a 5 = 2. The following operations are performed on a stack S and a queue Q, both of which are initially empty. I: push the elements of a from a 0 to a 5 in that order into S. II: enqueue the elements of a from a 0 to a 5 in that order into Q. III: pop an element from S. IV: dequeue an element from Q. V: pop an element from S. VI: dequeue an element from Q. VII: dequeue an element from Q and push the same element into S. VIII: Repeat operation VII three times. IX: pop an element from S. X: pop an element from S. The top element of S after executing the above operations is.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the syntax directed translation given by the following grammar and se- mantic rules. Here N, I, F and B are non-terminals. N is the starting non-terminal, and #, 0 and 1 are lexical tokens corresponding to input letters β#β, β0β and β1β, respectively. X.val denotes the synthesized attribute (a numeric value) associated with a non-terminal X. I 1 and F 1 denote occurrences of I and F on the right hand side of a production, respectively. For the tokens 0 and 1, 0.val = 0 and 1.val = 1.
N $\to$ I # F N.val = I.val + F.val
I $\to$ I 1 B I.val = (2 I 1.val) + B.val
I $\to$ B I.val = B.val
F $\to$ B F 1 F.val = (B.val + F 1.val)
F
$\to$
B
F.val
= 12
B
$\to$
0
B.val
= 0.val
B
$\to$
1
B.val
= 1.val
The value computed by the translation scheme for the input string
10#011 is. (Rounded oο¬ to three decimal places)
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the following table named Student in a relational database. The primary key of this table is rollNum. Student
name
gender
1
Naman
M
62
2
Aliya
F
70
3
Aliya
F
80
4
James
M
82
5
Swati
F
65
The SQL query below is executed on this database.
SELECT *
FROM Student
WHERE gender = βFβ AND
marks > 65; The number of rows returned by the query is.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider a database of ο¬xed-length records, stored as an ordered ο¬le. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 bytes. The data ο¬le is block-aligned in that each data record is fully contained within a block. The database is indexed by a primary index ο¬le, which is also stored as a block-aligned ordered ο¬le. The ο¬gure below depicts this indexing scheme.
Data File
Primary Key Other Fields
(15 Bytes) (85 Bytes)
Index File
Block Anchor Block
Primary Key Pointer Suppose the block size of the ο¬le system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index ο¬le to search for a record with a given key. You may assume that a binary search on an index ο¬le of b blocks takes log b block accesses in the worst case.
2 Given a key, the number of block accesses required to identify the block in the data ο¬le that may contain a record with the key, in the worst case, is.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
Consider the language L over the alphabet {0, 1}, given below:
L = {w β {0, 1} β | w does not contain three or more consecutive 1βs}. The minimum number of states in a Deterministic Finite-State Automaton (DFA) for L is.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.
An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX, and BLOCK OFFSET. The number of bits in the TAG is.
Numerical answer locked.
Correct Answer & Step-by-Step Solution Locked
Sign in free to reveal the correct answer and AI explanation for this question.