search
Log In

Recent activity by sh!va

2 answers
1
For $\Sigma =\{a,b\}$ the regular expression $r=(aa)^{*}(bb)^{*}b$ denotes Set of strings with $2\,{a}'s$ and $2\,{b}'s$ Set of strings with $2\,{a}'s$ $2\,{b}'s$ followed by $b$ Set of strings with $2\,{a}'s$ followed by ${b}'s$ which is a multiple of $3$ Set of strings with even number of ${a}'s$ followed by odd number of ${b}'s$
answered Jan 11, 2018 in Theory of Computation 666 views
2 answers
2
Consider the grammar with productions $S\rightarrow aSb\mid SS \mid \varepsilon$ This grammar is not context-free, not linear not context-free, linear context-free, not linear context-free, linear
answered Jan 11, 2018 in Theory of Computation 1.5k views
2 answers
3
Which of the following are context-free? $A=\{a^n b^n\, a^mb^m\mid m,n\geq0\}$ $B=\{a^m b^n\, a^mb^n\mid m,n\geq0\}$ $C=\{a^mb^n\mid m\neq 2n,\,m,n\geq0\}$ A and B only A and C only B and C only C only
answered Jan 11, 2018 in Theory of Computation 778 views
2 answers
4
The number of structurally different possible binary trees with $4$ nodes is $14$ $12$ $336$ $168$
answered Jan 11, 2018 in DS 1.4k views
2 answers
5
Using public key cryptography, $X$ adds a digital signature $\sigma$ to a message $M,$ encrypts $\langle M,\sigma \rangle$ and sends it to $Y,$ where it is decrypted. Which one of the following sequence of keys is used for operations ? Encryption: ${X}'s$ private key followed by ... ${X}'s$ public key followed by ${Y}'s$ private key; Decryption:${Y}'s$ public key followed by ${X}'s$ private key.
answered Jan 11, 2018 in Computer Networks 960 views
3 answers
6
In the IPv4 addressing format, the number of networks allowed under Class C addresses is $2^{20}$ $2^{24}$ $2^{14}$ $2^{21}$
answered Jan 11, 2018 in Computer Networks 759 views
9 answers
7
An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: $245.248.128.0/20$. The ISP wants to give half of this chunk of addresses to Organization $A$, and a quarter to Organization $B$, while retaining the remaining with itself. Which of the ... $245.248.136.0/24 \text{ and } 245.248.132.0/21$
answered Jan 11, 2018 in Computer Networks 11.2k views
2 answers
8
Assume that Source $S$ and Destination $D$ are connected through an intermediate router $R.$ How many times a packet has to visit the network layer and data link layer during a transmission from $S$ to $D$ ? Network layer$-4$ times, Data link layer$-4$ times Network layer ... link layer$-6$ times Network layer$-2$ times, Data link layer$-4$ times Network layer$-3$ times, Data link layer$-4$ times
answered Jan 11, 2018 in Computer Networks 785 views
1 answer
9
Generally, TCP is reliable and UDP is not reliable. DNS which has to be reliable uses UDP because UDP is slower. DNS servers has to keep connections. DNS requests are generally very small and fit well within UDP segments. None of these.
answered Jan 11, 2018 in Computer Networks 1.2k views
2 answers
10
Station $A$ uses $32-byte$ packets to transmit messages to Station $B$ using a sliding window protocol. The round trip time delay between $A$ and $B$ is $40\,ms$ and the bottleneck bandwidth on the path $A$ and $B$ is $64\, kbps.$What is the optimal window size that $A$ should use? $5$ $10$ $40$ $80$
answered Jan 11, 2018 in Computer Networks 929 views
1 answer
11
Let $M=11111010$ and $N=00001010$ be two $8$-$bit$ two's complement number.Their product in two's complement is $11000100$ $10011100$ $10100101$ $11010101$
answered Jan 11, 2018 in Digital Logic 869 views
3 answers
12
Consider an instruction of the type $\text{LW R1, 20(R2)}$ which during execution reads a $32$-$bit$ word from memory and stores it in a $32$-$bit$ register $R1.$ The effective address of the memory location is obtained by adding a constant $20$ and contents of $R2.$ Which one best reflects the source operand? Immediate addressing Register addressing Register Indirect addressing Indexed addressing
answered Jan 11, 2018 in CO and Architecture 862 views
2 answers
13
A sorting technique is called stable if If it takes $O(n\log n)$ time. It uses divide and conquer technique. Relative order of occurrence of non-distinct elements is maintained. It takes $O(n)$ space.
answered Jan 11, 2018 in Algorithms 697 views
1 answer
14
In a compact one-dimensional array representation for lower triangular matrix (all elements above diagonal are zero) of size $n\times n,$ non zero elements of each row are stored one after another, starting from first row, the index of $(i,j)^{th}$ element in this niw representation is $i+j$ $j+\dfrac{i(i-1)}{2}$ $i+j-1$ $i+\dfrac{j(j-1)}{2}$
answered Jan 11, 2018 in Programming 1.1k views
1 answer
15
Quick-sort is run on $2$ inputs shown below to sort in ascending order : $1,2,3\ldots n$ $n,n-1,n-2\ldots 1$ Let $C$1 and $C2$ be the number of comparisons made for A and B respectively. Then, $C1>C2$ $C1=C2$ $C1<C2$ Cannot say anything for arbitrary $n$
commented Jan 11, 2018 in Algorithms 1k views
1 answer
16
Which of the following statements is correct in respect of TCP and UDP protocols? (a) TCP is connection-oriented, whereas UDP is connectionless (b) TCP is connectionless, whereas UDP is connection-oriented (c) Both are connectionless (d) Both are connection-oriented
commented Jan 10, 2018 in Computer Networks 137 views
2 answers
17
The $in$-$order$ and $pre$-$order$ traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$ respectively.The $post$-$order$ traversal of a binary tree is $\text{e d b g f c a}$ $\text{e d b f g c a }$ $\text{d e b f g c a}$ $\text{d e f g b c a}$
answered Jan 10, 2018 in DS 629 views
1 answer
18
A virtual memory system uses $FIFO$ page replacement policy and allocates a fixed number of frames to the process. Consider the following statements M: Increasing the number of page frames allocated to a process sometimes increases the page fault rate. N: Some programs do not exhibit locality of reference. ... $M$. Both $M$ and $N$ are false. $M$ is false, but $N$ is true.
answered Jan 10, 2018 in Operating System 721 views
1 answer
19
Consider three $CPU$ intensive processes, which require $10,20,30$ units and arrive at times $0,2,6$ respectively. How many context switches are needed if shortest remaining time first is implemented? Context switch at $0$ is included but context switch at end is ignored $1$ $2$ $3$ $4$
commented Jan 10, 2018 in Operating System 694 views
1 answer
20
A process executes the following code for(i=0;i<n;i++) fork(); The total number of child processes created is $n^2$ $2^{n+1}-1$ $2^n$ $2^{n}-1$
commented Jan 10, 2018 in Operating System 581 views
2 answers
21
Consider the following scheduling: A. Gang scheduling s. Guaranteed scheduling B. Rate monotonic scheduling t. Thread scheduling C. Fair share scheduling u. Real-time scheduling Matching the table in the order $A,B,C$ gives t,u,s s,t,u u,s,t u,t,s
answered Jan 10, 2018 in Operating System 1k views
2 answers
22
Which of the following is false? User level threads are not scheduled by the kernel. Context switching between user-level threads is faster than context switching between kernel-level threads. When a user thread is blocked all other threads of its processes are blocked. Kernel-level threads cannot utilize multiprocessor systems by splitting threads on different processors or cores.
answered Jan 10, 2018 in Operating System 759 views
2 answers
23
Which of the following is not true with respect to deadlock prevention and deadlock avoidance schemes? In deadlock prevention, the request for resources is always granted if resulting state is safe. In deadlock avoidance, the request for resources ... is safe. Deadlock avoidance requires knowledge of resource requirements a priori. Deadlock prevention is more restrictive than deadlock avoidance.
answered Jan 10, 2018 in Operating System 1k views
2 answers
24
Consider the code segment int i,j,x,y,m,n; n = 20; for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(i%2) { x += ((4*j)+5*i); y += (7+4*j) } } } m=x+y; Which one of the following is false? The code contains loop invariant computation There is scope of common sub-expression elimination in this code There is scope of strength reduction in this code There is scope of dead code elimination in this code
answered Jan 10, 2018 in Compiler Design 981 views
2 answers
25
A counting semaphore was initialized t o $7$. Then $\text{20 P (wait)}$ operations and$\text{x V (signal)}$ operations were completed on this semaphore. If the final value of semaphore is $5$, then the value $x$ will be $0$ $13$ $18$ $5$
answered Jan 10, 2018 in Operating System 1.7k views
3 answers
26
Consider a disk sequence with $100$ cylinders. The request to access the cylinder occur in the following sequence : $4,34,10,7,19,73,2,15,6,20$ Assuming that the head is currently at cylinder $50$, what is the time taken to satisfy all requests if it takes $2\,ms$ to move from one cylinder to adjacent one and shortest seek time first policy is used? $190$ $238$ $233$ $276$
answered Jan 10, 2018 in Operating System 709 views
1 answer
27
Consider the following table: A. Activation record p. Linking loader B. Location counter q. Garbage collection C. Reference counts r. Subroutine call D. Address relocation s. Assembler ... $A, B, C, D$ in the same order gives : $p,q,r,s$ $q,r,s,p$ $r,s,q,p$ $r,s,p,q$
commented Jan 10, 2018 in Operating System 2.1k views
2 answers
28
Consider the function int func(int num) { int count=0; while(num) { count++; num>>=1; } return(count); } For $func(435)$ the value returned is $9$ $8$ $0$ $10$
answered Jan 10, 2018 in Programming 967 views
2 answers
29
In $\text{IEEE}$ floating point representation, the hexadecimal number $\text{0xC0000000}$ corresponds to $-3.0$ $-1.0$ $-4.0$ $-2.0$
answered Jan 10, 2018 in Digital Logic 1.8k views
1 answer
30
Which of the following set of components is sufficient to implement any arbitrary Boolean function? $XOR$ gates, $NOT$ gates $AND$ gates, $XOR$ gates and $1$ $2$ to $1$ multiplexer Three input gates that output $(A.B)+C$ for the inputs $A, B, C$
answered Jan 10, 2018 in Digital Logic 1.4k views
...