search
Log In

Recent activity by tusharp

8 answers
1
When searching for the key value $60$ in a binary search tree, nodes containing the key values $10, 20, 40, 50, 70, 80, 90$ are traversed, not necessarily in the order given. How many different orders are possible in which these key values can occur on the search path from the root to the node containing the value $60$? $35$ $64$ $128$ $5040$
comment edited Aug 12, 2019 in DS 15.6k views
6 answers
2
Consider the relation employee(name, sex, supervisorName) with name as the key, supervisorName gives the name of the supervisor of the employee under consideration. What does the following Tuple Relational Calculus query produce? ... with no immediate male subordinates. Names of employees with no immediate female subordinates. Names of employees with a female supervisor.
commented Apr 25, 2019 in Databases 9.4k views
2 answers
3
Which of the following is NOT a superkey in a relational schema with attributes $V,W,X,Y,Z$ and primary key $V\;Y$? $VXYZ$ $VWXZ$ $VWXY$ $VWXYZ$
commented Apr 25, 2019 in Databases 2.6k views
5 answers
4
A man has three cats. At least one is male. What is the probability that all three are male? $\frac{1}{2}$ $\frac{1}{7}$ $\frac{1}{8}$ $\frac{3}{8}$
commented Apr 24, 2019 in Probability 653 views
4 answers
5
Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus. {$t$ | $\exists$u $\in$ ... v[DeptId]))} Which of the above queries are safe? I and II only I and III only II and III only I, II and III
commented Apr 24, 2019 in Databases 8k views
7 answers
6
A random bit string of length n is constructed by tossing a fair coin n times and setting a bit to 0 or 1 depending on outcomes head and tail, respectively. The probability that two such randomly generated strings are not identical is: $\frac{1}{2^n}$ $1 - \frac{1}{n}$ $\frac{1}{n!}$ $1 - \frac{1}{2^n}$
commented Apr 24, 2019 in Probability 2.6k views
5 answers
7
A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it, counting repetitions. What is the number of multisets of size $4$ that can be constructed from n distinct elements so that at least one element occurs exactly twice? How many multisets can be constructed from n distinct elements?
commented Apr 22, 2019 in Combinatory 2.2k views
2 answers
8
How many ways can n books be placed on k distinguishable shelves if no two books are the same, and the positions of the books on the shelves matter?
commented Apr 21, 2019 in Combinatory 308 views
6 answers
9
Which of the following disk scheduling strategies is likely to give the best throughput? Farthest cylinder next Nearest cylinder next First come first served Elevator algorithm
comment edited Apr 20, 2019 in Operating System 3.9k views
5 answers
10
Consider a selective repeat sliding window protocol that uses a frame size of $1$ $\text{KB}$ to send data on a $1.5$ $\text{Mbps}$ link with a one-way latency of $50$ $\text{msec}$. To achieve a link utilization of $60\%$, the minimum number of bits required to represent the sequence number field is ________.
commented Apr 19, 2019 in Computer Networks 11.1k views
2 answers
11
Which of the following statements are TRUE? S1: TCP handles both congestion and flow control S2: UDP handles congestion but not flow control S3: Fast retransmit deals with congestion but not flow control S4: Slow start mechanism deals with both congestion and flow control $S1$, $S2$ and $S3$ only $S1$ and $S3$only $S3$and $S4$ only $S1$, $S3$ and $S4$ only
commented Apr 16, 2019 in Computer Networks 5.4k views
10 answers
12
Host A (on TCP/IP v4 network A) sends an IP datagram D to host B (also on TCP/IP v4 network B). Assume that no error occurred during the transmission of D. When D reaches B, which of the following IP header field(s) may be different from that of the original datagram D? TTL Checksum Fragment ... only $\text{i}$ and $\text{ii}$ only $\text{ii}$ and $\text{iii}$ only $\text{i, ii}$ and $\text{iii}$
commented Apr 16, 2019 in Computer Networks 6.5k views
4 answers
13
In a communication network, a packet of length $L$ bits takes link $L_1$ with a probability of $p_1$ or link $L_2$ with a probability of $p_2$. Link $L_1$ and $L_2$ have bit error probability of $b_1$ and $b_2$ ... $[1 - (b_1 + b_2)^L]p_1p_2$ $(1 - b_1)^L (1 - b_2)^Lp_1p_2$ $1 - (b_1^Lp_1 + b_2^Lp_2)$
commented Apr 15, 2019 in Computer Networks 3.2k views
6 answers
14
The Boolean function in sum of products form where K-map is given below (figure) is _______
commented Apr 14, 2019 in Digital Logic 1.9k views
4 answers
15
A Boolean function $f$ is to be realized only by $NOR$ gates. Its $K-map$ is given below: The realization is
commented Apr 14, 2019 in Digital Logic 1.3k views
6 answers
16
Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops. The number of states in the state transition diagram of this circuit that have a transition back to the same state on some value of "in" is ____
commented Apr 14, 2019 in Digital Logic 7.2k views
3 answers
17
Consider the following combinational function block involving four Boolean variables $x,\:y,\:a,\:b$ where $x,\:a,\:b$ are inputs and $y$ is the output. f(x, a, b, y) { if(x is 1) y = a; else y = b; } Which one of the following digital logic blocks is the most suitable for implementing this function? Full adder Priority encoder Multiplexor Flip-flop
comment edited Apr 13, 2019 in Digital Logic 2.4k views
4 answers
18
Consider the function $f$ defined below. struct item { int data; struct item * next; }; int f(struct item *p) { return ((p == NULL) || (p->next == NULL)|| ((p->data <= p ->next -> data) && f(p->next))); } For a given linked list ... in non-decreasing order of data value the elements in the list are sorted in non-increasing order of data value not all elements in the list have the same data value
commented Apr 12, 2019 in DS 4.8k views
7 answers
19
A circularly linked list is used to represent a Queue. A single variable $p$ is used to access the Queue. To which node should $p$ point such that both the operations $\text{enQueue}$ and $\text{deQueue}$ can be performed in constant time? rear node front node not possible with a single pointer node next to front
commented Apr 12, 2019 in DS 8.7k views
0 answers
21
What is the best case and worst case of the algorithm? And when will best case and worst case will happen?? int main() { for(i=1 ; i<=n ; i++) { if(n%i == 0) { for(j=1 ; j<=n ; j++) { printf("Hello"); } } } }
commented Apr 12, 2019 in Algorithms 283 views
1 answer
22
The regular expression 0*(10*)* denote the same set as (1) (1*0)*1* (2) 0+(0+10)* (3) (0+1)*10(0+1)* (4) None of these Isnot 1) as same as given expression?
comment edited Apr 11, 2019 in Theory of Computation 114 views
3 answers
23
A program attempts to generate as many permutations as possible of the string, '$abcd$' by pushing the characters $a, b, c, d$ in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings CANNOT be generated using this program? $abcd$ $dcba$ $cbad$ $cabd$
commented Apr 10, 2019 in DS 1.6k views
1 answer
24
5 answers
25
For a set $A$, the power set of $A$ is denoted by $2^{A}$. If $A = \left\{5,\left\{6\right\}, \left\{7\right\}\right\}$, which of the following options are TRUE? $\phi \in 2^{A}$ $\phi \subseteq 2^{A}$ $\left\{5,\left\{6\right\}\right\} \in 2^{A}$ $\left\{5,\left\{6\right\}\right\} \subseteq 2^{A}$ I and III only II and III only I, II and III only I, II and IV only
commented Apr 9, 2019 in Set Theory & Algebra 6.7k views
14 answers
26
The number of ways in which the numbers $1, 2, 3, 4, 5, 6, 7$ can be inserted in an empty binary search tree, such that the resulting tree has height $6$, is _________. Note: The height of a tree with a single node is $0$.
commented Apr 8, 2019 in DS 16.8k views
2 answers
27
A program $P$ reads in $500$ integers in the range $[0, 100]$ representing the scores of $500$ students. It then prints the frequency of each score above $50$. What would be the best way for $P$ to store the frequencies? An array of $50$ numbers An array of $100$ numbers An array of $500$ numbers A dynamically allocated array of $550$ numbers
commented Apr 8, 2019 in DS 5.8k views
3 answers
28
Suppose the predicate $F(x, y, t)$ is used to represent the statement that person $x$ can fool person $y$ at time $t$. Which one of the statements below expresses best the meaning of the formula, $\qquad∀x∃y∃t(¬F(x,y,t))$ Everyone can fool some person at some time No one can fool everyone all the time Everyone cannot fool some person all the time No one can fool some person at some time
comment edited Apr 8, 2019 in Mathematical Logic 5.8k views
3 answers
29
C program is given below: # include <stdio.h> int main () { int i, j; char a [2] [3] = {{'a', 'b', 'c'}, {'d', 'e', 'f'}}; char b [3] [2]; char *p = *b; for (i = 0; i < 2; i++) { for (j = 0; j < 3; j++) { *(p + 2*j + i) = a [i] [j]; } } } What should be the ... $\text{e f}$ $\text{a d}$ $\text{b e}$ $\text{c f}$ $\text{a c}$ $\text{e b}$ $\text{d f}$ $\text{a e}$ $\text{d c}$ $\text{b f}$
commented Apr 7, 2019 in Programming 3.2k views
5 answers
30
Consider the following C program segment. # include <stdio.h> int main() { char s1[7] = "1234", *p; p = s1 + 2; *p = '0'; printf("%s", s1); } What will be printed by the program? $12$ $120400$ $1204$ $1034$
commented Apr 7, 2019 in Programming 4.1k views
...