search
Log In

Answers by prateekdwv

12 votes
1
Let $\oplus$ and $\odot$ denote the Exclusive OR and Exclusive NOR operations, respectively. Which one of the following is NOT CORRECT? $\overline{P \oplus Q} = P \odot Q$ $\overline{P} \oplus Q = P \odot Q$ $\overline{P} \oplus \overline{Q} = P \oplus Q$ $P \oplus \overline{P} \oplus Q = ( P \odot \overline{P} \odot \overline{Q})$
answered Feb 14, 2018 in Digital Logic 2.9k views
4 votes
2
What is the remainder when $4444^{4444}$ is divided by $9?$ $1$ $2$ $5$ $7$ $8$
answered Dec 11, 2017 in Combinatory 1.2k views
12 votes
3
Let $T(a, b)$ be the function with two arguments (both nonnegative integral powers of 2) defined by the following recurrence: $ T(a, b) = T \left( \frac{a}{2}, b \right) +T\left( a, \frac{b}{2} \right) \quad \quad \text{ if } a, b \geq 2$ ... $\begin{pmatrix} r+s \\ r \end{pmatrix}$ $2^{r-s}$ if $r \geq s$, otherwise $2^{s-r}$
answered Dec 9, 2017 in Algorithms 1k views
7 votes
4
Consider the following program operating on four variables $u, v, x, y$, and two constants $X$ and $Y$. x, y, u, v:= X, Y, Y, X; While (x ≠ y) do if (x > y) then x, v := x - y, v + u; else if (y > x) then y, u:= y - x, u + v; od; print ((x + ... $\frac1 2 \times \text{gcd}(X, Y)$ followed by $\frac1 2 \times \text{lcm}(X, Y)$. The program does none of the above.
answered Dec 6, 2017 in Algorithms 687 views
2 votes
5
Confusion regarding these log representations. 1.(logn)2 2.log2n 3.log(logn) 4.log(n)2 which of these are equal . Also explain meaning of each one.(Pls provide any source if possible).
answered Dec 1, 2017 in Algorithms 154 views
0 votes
6
1 vote
7
#include<stdio.h> main() { int i=511; char *ptr=(char *)&i; printf("%d",*ptr); } explain...how output came -1????
answered Sep 24, 2017 in Programming 146 views
0 votes
8
L = { a^m b^n b^k d^l |(n+k)=odd only if m=l; m, n, k , l>0}. Which is true? a)CFL but not DCFL b)regular but not CFL c)DCFL but not regular d)none
answered Sep 19, 2017 in Theory of Computation 83 views
1 vote
9
1 vote
10
If F(n) = (log n)n then, is F(n) = O(n2) true? Also, what about F(n) = $\Theta$(n2)
answered Sep 11, 2017 in Algorithms 109 views
4 votes
11
Let us define an operation $truncate$, which removes the rightmost symbol from any string. For example, $truncate (aaaba)$ is $aaab$. The operation can be extended to languages by $truncate (L)= $ {$truncate(w):w ∈ L$} Show how, given a dfa for any regular language L, ... $truncate (L)$. From this, prove that if $L$ is a regular language not containing $λ$, then $truncate (L)$ is also regular.
answered Sep 8, 2017 in Theory of Computation 903 views
3 votes
12
Consider these statements: S1: If a language is infinite, it has to be non-Regular. S2: Let L be any language. $(\overline{L})^{*} \neq (\overline{L^{*}})$ (a) Both are True (c) S1 → True, S2 → False (b) Both are False (d) S1 → False, S2 → True
answered Sep 7, 2017 in Theory of Computation 278 views
0 votes
13
A={<M,w> M is a TM that accepts w} B=Ʃ* Is A Mapping reducible to B? http://theory.stanford.edu/~trevisan/cs154-12/reductions3.pdf
answered Sep 6, 2017 in Theory of Computation 316 views
1 vote
14
#include<stdio.h> int f(int a){ a > 20 ? return 10: return 20; } int main(){ int b=fun(20); return 0; } what will be the output of this program ?
answered Aug 27, 2017 in Programming 389 views
3 votes
15
how $\phi \cdot R = R \cdot \phi = \phi$ ? where R is regular expression, and why is $\phi^* is $\epsilon$
answered Aug 18, 2017 in Theory of Computation 1.4k views
3 votes
16
X posed many puzzles about an island that has two kinds of inhabitants knights who always tells the truth, and their opposite knaves, who always lie. You encounter two people A and B. What are A and B if A says 'B is a knight' and B says 'two of us are of opposite types'?
answered Aug 13, 2017 in Mathematical Logic 116 views
3 votes
17
A tridiagonal matrix [-2..2,5..9] is stored in row major order with base address 301.what is the address of data [0][8] if nonzero elements are stored??
answered Aug 9, 2017 in DS 616 views
1 vote
18
1 vote
19
Is it always the case that implication comes with universal quantifier and conjunction comes with existential quantifier?
answered Jun 7, 2017 in Mathematical Logic 237 views
2 votes
20
11 votes
21
When two $\text{n}$-bit binary numbers are added the sum will contain at the most $\text{n}$ bits $n + 2$ bits $n + 3$ bits $n + 1$ bits
answered May 8, 2017 in Digital Logic 4.2k views
22 votes
22
$(1217)_8$ is equivalent to $(1217)_{16}$ $(028F)_{16}$ $(2297)_{10}$ $(0B17)_{16}$
answered May 7, 2017 in Digital Logic 3.4k views
4 votes
23
The question basically says no. of different outputs produced for given sequence of input (1,2,...,n) I thought in terms of push - pop pairs but cant arrive at the answer @arjun sir , @bikram sir
answered Jan 25, 2017 in Programming 243 views
0 votes
24
Is there any simple graph with degree sequence <1,1,1,1,2,2,3,3,3,3>
answered Jan 20, 2017 in Graph Theory 64 views
0 votes
25
Consider the following transaction T1 T2 T3 R(A) W(A) commit W(A) commit W(A) commit Which of the following is TRUE regarding above transaction? (1) Transaction is view serializable since it has a view-equivalent serial schedule < T1, T2 T3 > (2) Transaction ... a view-equivalent serial schedule < T3, T2 T1 > (4) Transaction is not serializable Your Answer: 3 Correct Answer: 1 Status: incorrect
answered Jan 19, 2017 in Databases 132 views
2 votes
26
"Number of possible conflict equivalent serial schedules to some non-serial schedule is total number of topological sorts of its precedence graph." I haven't read this method anywhere yet but I found it by myself while solving some problems, and tried on several problems ... giving me a correct answer, please can anyone refer me to standard(reference) books about this!(I found that,too but failed)
answered Jan 17, 2017 in Databases 427 views
2 votes
28
Suppose we have a O(nlogn) time algorithm that finds median of an unsorted array. Now consider a QuickSort implementation where we first find median using the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified ... original quick sort. Average case time complexity of modified quick sort is same as that of original quick sort. None of the above
answered Jan 9, 2017 in Algorithms 1.5k views
2 votes
30
answered Jan 8, 2017 in Operating System 101 views
...