Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Kapil
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Kapil
2
answers
1
What is average Acess Time of system considering only memory read cycles?
The access time of cache memory is 100 ns and that of main memory 1000 ns. it is estimated that 80% of the memory requests are for read and the remaining 20% for write. the hit ratio for read access only is ... of the system for both read asn write requests? c-what is the hit ratio taking into consideration the write cycles?
The access time of cache memory is 100 ns and that of main memory 1000 ns. it is estimated that 80% of the memory requests are for read and the remaining 20% for write. t...
10.1k
views
commented
Jan 1, 2019
2
answers
2
DCFL or Not
$\left \{ a^{m+n}b^{m+n}c^{n}|m,n\geq 1 \right \}$ $\left \{ a^{m+n}b^{m+n}c^{k} |m,n,k\geq 1\right \}$ $\left \{ a^{m+n}b^{m+k}c^{n+k} |m,n,k\geq 1\right \}$ Which one DCFL, CFL or CSL?
$\left \{ a^{m+n}b^{m+n}c^{n}|m,n\geq 1 \right \}$$\left \{ a^{m+n}b^{m+n}c^{k} |m,n,k\geq 1\right \}$$\left \{ a^{m+n}b^{m+k}c^{n+k} |m,n,k\geq 1\right \}$Which one DCFL...
1.5k
views
commented
Jun 22, 2018
Theory of Computation
theory-of-computation
dcfl
context-free-language
pushdown-automata
+
–
14
answers
3
GATE CSE 2018 | Question: 46
The number of possible min-heaps containing each value from $\{1,2,3,4,5,6,7\}$ exactly once is _______
The number of possible min-heaps containing each value from $\{1,2,3,4,5,6,7\}$ exactly once is _______
38.7k
views
commented
Feb 4, 2018
DS
gatecse-2018
binary-heap
numerical-answers
combinatory
2-marks
+
–
2
answers
4
previousgatemodification
A CPU has five-stage pipeline and runs at 1 GHz frequency. Instruction fetch happens in the first stage of the pipeline. A conditional branch instruction computes the target address and evaluates the condition in the third stage of the pipeline. The ... each instruction takes one cycle to complete on average, then total execution time of the program is i am getting 1.32
A CPU has five-stage pipeline and runs at 1 GHz frequency. Instruction fetch happens in the first stage of the pipeline. A conditional branch instruction computes the tar...
877
views
commented
Dec 26, 2017
3
answers
5
Pipelining
Consider a 4 stage pipeline where the branch is resolved at the end of the second cycle for unconditional branches and at the end of the third cycle for the conditional branches. Assume that no instruction starts at first stage time the branch condition is evaluated. Let the branch ... stalls how much faster would the machine be without any branch hazards? a)0.729 b)0.459 c)0.689 d)1.45
Consider a 4 stage pipeline where the branch is resolved at the end of the second cycle for unconditional branches and at the end of the third cycle for the conditional b...
5.1k
views
commented
Dec 26, 2017
CO and Architecture
pipelining
co-and-architecture
branch-conditional-instructions
+
–
0
answers
6
Compiler
In a compiler, keywords of a language are recognized during (A) Parsing of the program (B) The code generation (C) The lexical analysis of the program (D) Dataflow analysis
In a compiler, keywords of a language are recognized during(A) Parsing of the program(B) The code generation(C) The lexical analysis of the program(D) Dataflow analysis
420
views
commented
Dec 25, 2017
Compiler Design
compiler-design
+
–
0
answers
7
Bounded Wait
Process Pi repeat flag[i] = true; while ( flag[j] ) do no-op; < critical - section > flag[i] = false; < remainder - section > until false; Note : "i" refer0s to current process and "j" refers to another process. How Bounded Wait is satisfied here?
Process Pi repeatflag[i] = true; while ( flag[j] ) do no-op; < critical - section flag[i] = false; < remainder - section until false; Note : "i" refer0s to current proc...
1.9k
views
commented
Dec 8, 2017
Operating System
operating-system
process-synchronization
deadlock-prevention-avoidance-detection
semaphore
bounded-waiting
+
–
1
answer
8
Synchronization | Self-Doubt
1. Does starvation freedom imply bounded- waiting ? 2. Does bounded- waiting imply starvation freedom ? Explain with example.
1. Does starvation freedom imply bounded- waiting ?2. Does bounded- waiting imply starvation freedom ?Explain with example.
2.1k
views
commented
Dec 7, 2017
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
+
–
1
answer
9
How to draw register allocation interference graph ?
How to draw register allocation interference graph ? Can anyone explain this along with " What is a live variable "? Explain with the example given below ? a = 1 b = 10 c = 20 d = a + b e = c + d f = c + e b = c + e e = b + f d = 5 + e return d + f
How to draw register allocation interference graph ?Can anyone explain this along with " What is a live variable "?Explain with the example given below ?a = 1 b = 10 c = ...
3.0k
views
answer selected
Nov 9, 2017
Compiler Design
compiler-design
register-allocation
+
–
4
answers
10
ISRO2008-36
An interrupt in which the external device supplies its address as well as the interrupt requests is known as vectored interrupt maskable interrupt non maskable interrupt designated interrupt
An interrupt in which the external device supplies its address as well as the interrupt requests is known asvectored interruptmaskable interruptnon maskable interruptdesi...
5.0k
views
answer selected
Oct 31, 2017
CO and Architecture
isro2008
co-and-architecture
io-handling
interrupts
+
–
5
answers
11
GATE CSE 2003 | Question: 89
Consider the C program shown below: #include<stdio.h> #define print(x) printf("%d", x) int x; void Q(int z) { z+=x; print(z); } void P(int *y) { int x = *y + 2; Q(x); *y = x - 1; print(x); } main(void) { x = 5; P(&x); print(x); } The output of this program is: $12 \ 7 \ 6$ $22 \ 12 \ 11$ $14 \ 6 \ 6$ $7 \ 6 \ 6$
Consider the C program shown below:#include<stdio.h #define print(x) printf("%d", x) int x; void Q(int z) { z+=x; print(z); } void P(int *y) { int x = *y + 2; Q(x); *y = ...
12.3k
views
commented
Oct 27, 2017
Programming in C
gatecse-2003
programming
programming-in-c
normal
pointers
+
–
2
answers
12
Bottom-Up Parsing
Consider the folllowing grammar $ S\rightarrow AaS \ |\ b$ $ A\rightarrow c \ |\ d \ |B$ $ B\rightarrow AgC \ |\ AhC \ | \ DgC | \ DhC$ $C\rightarrow c \ |\ d \ | \ D$ $ D\rightarrow eBf$ Which of the following are viable prefix ? $ \left ( 1 \right )Aab$ $ \left ( 2 \right )ca$ $ \left ( 3 \right )cab$ $\left ( 4 \right )AgCS$
Consider the folllowing grammar$ S\rightarrow AaS \ |\ b$$ A\rightarrow c \ |\ d \ |B$$ B\rightarrow AgC \ |\ AhC \ | \ DgC | \ DhC$$C\rightarrow c \ |\ d \ | \ D$$ D\rig...
2.7k
views
commented
Oct 14, 2017
Compiler Design
compiler-design
viable-prefix
parsing
+
–
1
answer
13
algorithms
I think the options given for this questions are incorrect, i thing answer would be nk log nk, please correct me if i'm wrong.
I think the options given for this questions are incorrect, i thing answer would be nk log nk, please correct me if i'm wrong.
401
views
answered
Oct 7, 2017
Algorithms
time-complexity
algorithm-design
virtual-gate-test-series
+
–
1
answer
14
Decidability
Consider the language L, L = {< M >|M is a turing machine and L(M) ≤p {0p 12p|p > 0}} Where the symbol ‘≤p’ refers to polynomial time reducible which of the following is true regarding the above language? a. L is undecidable b. L is decidable c. L is regular d. none
Consider the language L,L = {< M >|M is a turing machine and L(M) ≤p {0p 12p|p 0}}Where the symbol ‘≤p’ refers to polynomial time reducible which of the followin...
1.5k
views
commented
Oct 2, 2017
2
answers
15
Data structure
Ttotal number of BST's possible with 6 nodes numbered 1,2,3,4,5 and 6 having a height of 4 are ??
Ttotal number of BST's possible with 6 nodes numbered 1,2,3,4,5 and 6 having a height of 4 are ??
952
views
commented
Oct 2, 2017
1
answer
16
Reducibility
Why this is incorrect? For any two languages A and B, if A ⊆ B, then A is reducible to B.
Why this is incorrect? For any two languages A and B, if A ⊆ B, then A is reducible to B.
990
views
commented
Oct 2, 2017
Theory of Computation
theory-of-computation
reduction
+
–
2
answers
17
Find Number Of Tokens and Lexemes
// comment printf("string %d ",++i++&&&i***a); return(x?y:z) Q1] Find Number of Tokens and Lexems in the above code snippet Q2 ] *** -> counted as 1 token or 3 tokens ? why it is so Q3 ] ... single token or separate token Q4 ] If the Question would have been count the number of unique lexemes and tokens what would have been the answer ?
// comment printf("string %d ",++i++&&&i *a); return(x?y:z)Q1] Find Number of Tokens and Lexems in the above code snippetQ2 ] * - counted as 1 token or 3 tokens ? wh...
12.3k
views
commented
Sep 25, 2017
Compiler Design
compiler-design
compiler-tokenization
+
–
10
answers
18
GATE CSE 2007 | Question: 58
Two processes, $P1$ and $P2$, need to access a critical section of code. Consider the following synchronization construct used by the processes: /* P1 */ while (true) { wants1 = true; while (wants2 == true); /* Critical ... waiting. It requires that processes enter the critical section in strict alteration. It does not prevent deadlocks, but ensures mutual exclusion.
Two processes, $P1$ and $P2$, need to access a critical section of code. Consider the following synchronization construct used by the processes:/* P1 */ while (true) { wa...
27.2k
views
commented
Aug 17, 2017
Operating System
gatecse-2007
operating-system
process-synchronization
normal
+
–
1
answer
19
Turing Machine Rice's Theorem
L = {M|M is a TM that accepts all even numbers} For the above language i can have Tyes machine which has all even numbers.And Tno as machine whose language is empty.So i can say it is undecidable. But to show it is Not RE. What ... am assuming here that the property of the language as "Only all even numbers",i guess the same has been given in the question.
L = {M|M is a TM that accepts all even numbers}For the above language i can have Tyes machine which has all even numbers.And Tno as machine whose language is empty.So i c...
1.2k
views
commented
Aug 11, 2017
Theory of Computation
decidability
rice-theorem
theory-of-computation
turing-machine
self-doubt
+
–
2
answers
20
TOC Turing machines Decidability
Check whether the language below is recursive, recursively enumerable but not recursive, or not recursively enumerable? L={⟨M⟩∣ M halts on all palindromes}. How can i use Rice's theorem here? Tyes={All palidroms} Tno={Signma*}.Will that work here? M halts on all palindromes means M halts on only palindromes ?
Check whether the language below is recursive, recursively enumerable but not recursive, or not recursively enumerable?L={⟨M⟩∣ M halts on all palindromes}.How can i...
957
views
commented
Aug 8, 2017
Theory of Computation
theory-of-computation
turing-machine
decidability
+
–
1
answer
21
Doubt on Regular and unambiguous
Please explain with examples, 1)is every regular grammar is unambiguous? 2) An unambiguous grammar will always generate DCFL?
Please explain with examples,1)is every regular grammar is unambiguous?2) An unambiguous grammar will always generate DCFL?
368
views
commented
Jul 18, 2017
Theory of Computation
theory-of-computation
+
–
1
answer
22
Proof of whether a TM accepts epsilon is semi decidable
From rice theorem, I know that it is not recursive. But can someone prove that ? Or atleast give some intuitive proof?
From rice theorem, I know that it is not recursive. But can someone prove that ? Or atleast give some intuitive proof?
1.1k
views
commented
Jul 15, 2017
Theory of Computation
theory-of-computation
decidability
+
–
2
answers
23
toc gatebook test Q 2
Let $R$ be a regular language and $L$ is a language which accepts only even length strings from $R$. Then $L$ is Always Regular Always Not Regular Sometimes Regular, but not always None
Let $R$ be a regular language and $L$ is a language which accepts only even length strings from $R$. Then $L$ isAlways RegularAlways Not RegularSometimes Regular, but not...
801
views
edited
Jul 12, 2017
Theory of Computation
regular-language
+
–
1
answer
24
Series Summation
Series summation of $S_n$ in closed form? $\begin{align*} &S_n = \frac{1}{1.2.3.4} + \frac{1}{2.3.4.5} + \frac{1}{3.4.5.6} + \dots + \frac{1}{n.(n+1).(n+2).(n+3)} \end{align*}$
Series summation of $S_n$ in closed form?$\begin{align*} &S_n = \frac{1}{1.2.3.4} + \frac{1}{2.3.4.5} + \frac{1}{3.4.5.6} + \dots + \frac{1}{n.(n+1).(n+2).(n+3)} \end{ali...
792
views
commented
Jul 12, 2017
Set Theory & Algebra
number-theory
summation
discrete-mathematics
+
–
0
answers
25
Minimum No. of vertices required
Prove the following for graph $G$. When length of the shortest cycle in a graph is $k \geq 3$ and the minimum degree of the graph is $d$, then $G$ ... $k$.
Prove the following for graph $G$.When length of the shortest cycle in a graph is $k \geq 3$ and the minimum degree of the graph is $d$, then $G$ has minimum $\begin{alig...
371
views
commented
Jul 2, 2017
Graph Theory
graph-theory
proof
+
–
2
answers
26
ISRO2015-15
The queue data structure is to be realized by using stack. The number of stacks needed would be It cannot be implemented 2 stacks 4 stacks 1 stack
The queue data structure is to be realized by using stack. The number of stacks needed would beIt cannot be implemented2 stacks4 stacks1 stack
4.4k
views
answer selected
Jun 28, 2017
DS
isro2015
data-structures
stack
+
–
2
answers
27
ISRO2011-50
Data is transmitted continuously at $2.048$ Mbps rate for $10$ hours and received $512$ bits errors. What is the bit error rate? $\text{6.9 e-9}$ $\text{6.9 e-6}$ $\text{69 e-9}$ $\text{4 e-9}$
Data is transmitted continuously at $2.048$ Mbps rate for $10$ hours and received $512$ bits errors. What is the bit error rate?$\text{6.9 e-9}$$\text{6.9 e-6}$$\text{69 ...
5.4k
views
answer selected
Jun 28, 2017
Computer Networks
isro2011
computer-networks
error-detection
+
–
1
answer
28
discrete math
Give an example where distributive lattice is not complemented lattice? Is always distributive lattice bounded?
Give an example where distributive lattice is not complemented lattice?Is always distributive lattice bounded?
8.1k
views
commented
Jun 14, 2017
5
answers
29
min heap
The number of binary min. heaps that can be formed from a set of 7 distinct integers is _________?
The number of binary min. heaps that can be formed from a set of 7 distinct integers is _________?
15.9k
views
commented
Jun 13, 2017
DS
data-structures
binary-heap
combinatory
+
–
2
answers
30
COA DMA doubt
What is formula for % of time CPU gets blocked?? Is it X(X+Y) or X/Y only??? What is formula for % of time CPU is consumed in Interuppt driven IO??? Formula for % of CPU slow down in interrupt driven IO???
What is formula for % of time CPU gets blocked??Is it X(X+Y) or X/Y only???What is formula for % of time CPU is consumed in Interuppt driven IO??? Formula for % of CPU s...
10.4k
views
comment edited
Jun 8, 2017
CO and Architecture
co-and-architecture
dma
interrupts
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register