Recent questions and answers

9.3k
views
5 answers
15 votes
Let $H$ be a binary min-heap consisting of $n$ elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in ... \Theta (1)$\Theta (\log n)$\Theta (n)$\Theta (n \log n)$
618
views
2 answers
4 votes
The sum of three positive numbers is $12$ and two of them are equal. Find the largest possible product.$86$64$48$72$
164
views
1 answers
0 votes
let suppose address of first index of array is n and size of each block of array is u. then the index of second element is a+u.let suppose the array has m elements. ... array of same size, if it's address of second last element is (n - u).
18.8k
views
4 answers
38 votes
Consider a grammar with the following productions$S \rightarrow a \alpha b \mid b \alpha c \mid aB$ ... $LR(k)$
8.3k
views
6 answers
9 votes
The number of swappings needed to sort the numbers $8 , 22, 7, 9, 31, 5, 13$ in ascending order using bubble sort is$11$12$13$10$
18
views
0 answers
0 votes
Why does linear combination of 2 linearly independent vectors produce every vector in R^2 ?
8
views
0 answers
0 votes
I have always been intrested in IIT couldnt crack them even though i did everything i could i know that might be hard to comorehend but i got some colleges ... with merit seats available and after that i intend to to take Gate for IIt
91
views
2 answers
1 votes
#include <stdio.h> int main() { // Write C code here int i=10,*p,**q,***r; p=&i; *p=15; q=&p; **q=20; r=&q; ***r=*p+1; printf("%d",i); return 0; }answer the output as integer _________
3.1k
views
3 answers
7 votes
Consider the following $\mathrm{C}$ function definition.int f X(char * a) { char * b = a; while (*b) b ++; return b - a; }Which of the following ... in main (), the function call $\mathrm{fX}(\mathrm{c})$ will always return a value
5.0k
views
3 answers
8 votes
Consider the following $\text{C}$ program. Assume parameters to a function are evaluated from right to left.#include <stdio.h> int g( int p) { printf( ... $ program?$20101020$10202010$20102010$10201020$
4.8k
views
4 answers
18 votes
Find the inverse of the matrix $\begin{bmatrix} 1 & 0 & 1 \\ -1 & 1 & 1 \\ 0 & 1 & 0 \end{bmatrix}$
20
views
0 answers
0 votes
Which of the following statements is/are true?A) Graph coloring is a systematic technique for allocating registers and managing register spills.B) ... resolves the shift/reduce conflict arising from the dangling-else ambiguity correctly.
2.5k
views
3 answers
3 votes
Let $A$ and $B$ be non-empty finite sets such that there exist one-to-one and onto functions $\text{(i)}$ from $A$ to $B$ and $\text{(ii)}$ from $A \times A$ to $A \cup B$. The number of possible values of $\text{|A|}$ is ___________.
15
views
0 answers
0 votes
Consider a system with 4KB page size and 3-level paging is used. The virtual address space is 36 bits and the physical address space is 32 bits. The page table ... 8 bits for page table indexing and each page table fits one page-frame[NAT]
41
views
1 answers
0 votes
How many child processes will be created in the following code: main(){if(!fork()){ if(!fork()) fork();}fork();}
12.9k
views
4 answers
31 votes
Let $R_1$ and $R_2$ be two equivalence relations on a set. Consider the following assertions:$R_1 \cup R_2$ is an equivalence relation$R_1 \cap R_2$ is an equivalence ... ) is true but assertions (i) is not trueNeither (i) nor (ii) is true
3.6k
views
2 answers
0 votes
Give an $NFA$ recognizing the language $(01 ∪ 001 ∪ 010)^{*}.$Convert this $NFA$ to an equivalent $DFA.$ Give only the portion of the $DFA$ that is reachable from the start state.
1.1k
views
1 answers
1 votes
Give a counterexample to show that the following construction fails to prove $\text{Theorem 1.49,}$ the closure of the class of regular languages under the star operation$.$ ... $N$ does not recognize the star of $N_{1}^{'s}$ language.
938
views
1 answers
0 votes
Show that if $M$ is a $DFA$ that recognizes language $B,$ swapping the accept and not accept states in $M$ yields a new $DFA$ recognizing the ... of languages recognized by $NFA's$ closed under complement$?$ Explain your answer$.$
1.3k
views
1 answers
1 votes
Let $F$ be the language of all strings over $\{0,1\}$ that do not contain a pair of $1's$ that are separated by an odd number of symbols. Give the state ... helpful first to find a $4$-state $\text{NFA}$ for the complement of $F.)$
39
views
0 answers
0 votes
In the series aaa_b_a_baaabbbabaabbbbWhich one is the correct answer and why?
217
views
1 answers
1 votes
If the sum of the first $20$ consecutive positive odd numbers is divided by $20^{2}$, the result is$1$20$2$1 / 2$
870
views
1 answers
0 votes
860
views
1 answers
0 votes
The formal description of a $\text{DFA}$ $\text{M}$ is $({q1, q2, q3, q4, q5}, {u, d}, δ, q3, {q3}),$ where $\text{δ}$ is given by the following table. Give the state diagram of this machine.
1.5k
views
1 answers
0 votes
The following are the state diagrams of two $\text{DFAs,}$ $\text{M1}$, and $\text{M2.}$ Answer the following questions about each of these machines.What ... accept the string $\text{aabb?}$Does the machine accept the string $\epsilon?$
221
views
1 answers
0 votes
Find the error in the following proof that $2 = 1.$Consider the equation $a = b.$ Multiply both sides by a to obtain $a^{2} = ab.$ Subtract $b^{2}$ from both sides to ... $a$ and $b$ equal $1,$ which shows that $2 = 1.$
387
views
1 answers
0 votes
Consider the undirected graph G= (V, E) where V , the set of nodes, is {1, 2, 3, 4} and E, the set of edges, is {{1, 2}, {2, 3}, {1, 3}, {2 ... . What are the degrees of each node? Indicate a path from node 3 to node 4 on your drawing of G.
305
views
1 answers
0 votes
For each part, give a relation that satisfies the condition.Reflexive and symmetric but not transitiveReflexive and transitive but not symmetricSymmetric and transitive but not reflexive
427
views
2 answers
0 votes
If A has a elements and B has b elements, how many elements are in A × B? Explain your answer.
367
views
1 answers
0 votes
Write formal descriptions of the following sets.a. The set containing the numbers 1, 10, and 100b. The set containing all integers that are greater than 5c ... abae. The set containing the empty stringf. The set containing nothing at all
532
views
1 answers
1 votes
Examine the following formal descriptions of sets so that you understand which members they contain. Write a short informal English description of each set.a. {1, 3, 5, 7, . . . }b ... the reverse of w}f. {n| n is an integer and n = n + 1}
53
views
1 answers
0 votes
Find Output of below Code#include<stdio.h>int sum(int n) { n = 3; if (n == 2) return 2; return sum(n-1)*n ;}int main() { printf("%d\n", sum(5) ); return 0}
31
views
1 answers
1 votes
Consider the following grammar: Prog → {S} S→ Prog X; | Y = z; X →ϵ |S Prog Y → SZ Z→id Determine follow(S) from the above grammar. (A) { } , id} (B) { }, ϵ , id} (C) { },{ id} (D ) { },{ id,ϵ }
31
views
1 answers
0 votes
why the limited broadcasting address is all 1's as all 1's should be the specific ip address of the last host in the network and not the address of all the host in the specific n/w. Please explain
21
views
0 answers
0 votes
1.2k
views
2 answers
1 votes
Consider performing depth-first search (DFS) on an undirected and unweighted graph $G$ starting at vertex $s$. For any vertex $u$ in $G, d[u]$ is the length of the ... , then $(u, v)$ becomes a $\_\_\_\_\_\_\_\_$ edge.treecrossbackgray
1.8k
views
2 answers
0 votes
Which of the following is false?Interrupts which are initiated by an instruction are software interruptsWhen a subroutine is called, the address of the instruction following the ... $1$'s is a binary micro programNone of the options
46
views
0 answers
0 votes
DMA
Consider a disk with data transfer rate 50MBPS. It is operated with cycle stealing mode of DMA. Here whenever 64bits information is available it is transferred in 40ns. What is the percentage(%) of time CPU blocked due to DMA?
7.9k
views
5 answers
23 votes
The minimum positive integer $p$ such that $3^{p} \pmod {17} = 1$ is$5$8$12$16$
To see more, click for the full list of questions or popular tags.