Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by junk_mayavi
3
answers
1
Why L = { w x w ∣ w , x ∈ ( a + b ) + } is not regular?
We can say there are four types of strings in the language so the regex will be: a(a+b)+a + b(a+b)+b + a(a+b)+b + b(a+b)+a Please expleain where I am wrong
We can say there are four types of strings in the language so the regex will be: a(a+b)+a + b(a+b)+b + a(a+b)+b + b(a+b)+a Please expleain where I am wrong
5.5k
views
commented
Feb 1, 2018
Theory of Computation
theory-of-computation
regular-language
decidability
+
–
2
answers
2
Merge Sort
Let A,B,C,D,E are sorted sequences having length 70,74,80,85,102 respectively.They are merged into a single sequence by merging together two sequences at a time.The minimum number of comparisons that will be needed by algorithm in best case for going merging is _________.
Let A,B,C,D,E are sorted sequences having length 70,74,80,85,102 respectively.They are merged into a single sequence by merging together two sequences at a time.The minim...
4.3k
views
commented
Jan 30, 2018
Algorithms
merge-sort
algorithms
numerical-answers
+
–
1
answer
3
Dearrangements
Anyone give a solution for this.....
Anyone give a solution for this.....
615
views
commented
Jan 27, 2018
1
answer
4
test series
What will be the output of the following C program? #include<stdio.h> int main() { char c = 'A'; int x=5, y=10, res1, res2; res1=c++ || x++ ||--y; res2 = ++x && --c && ++y; printf("%d %d %d %c", res1, res2, x+y , c); return 0; } What is the output?
What will be the output of the following C program?#include<stdio.h int main() { char c = 'A'; int x=5, y=10, res1, res2; res1=c++ || x++ || y; res2 = ++x && c && ++y; p...
411
views
commented
Jan 26, 2018
Programming in C
programming-in-c
+
–
3
answers
5
GATE CSE 1995 | Question: 1.11
What are $x$ and $y$ in the following macro definition? macro Add x, y Load y Mul x Store y end macro Variables Identifiers Actual parameters Formal parameters
What are $x$ and $y$ in the following macro definition?macro Add x, y Load y Mul x Store y end macroVariablesIdentifiersActual parametersFormal parameters
4.7k
views
commented
Jan 23, 2018
Compiler Design
gate1995
compiler-design
macros
easy
+
–
1
answer
6
solve by generating function along with approach thanks advance
In how many ways 2 alike apple, 3 alike orange and 4 alike mango can be given to 3 children if each child can have 1 or more than 1 fruits.
In how many ways 2 alike apple, 3 alike orange and 4 alike mango can be given to 3 children if each child can have 1 or more than 1 fruits.
1.1k
views
commented
Jan 23, 2018
Mathematical Logic
discrete-mathematics
generating-functions
+
–
0
answers
7
Can we find the entire question paper in gate while attempting exam?
My query might be a stupid one.I am checking out the online gate exam interface from official site.There is a button if we click we can see the entire paper together.Is it always going to be there?I dont ... the potential difficulty of the paper before attempting questions in one shot and also helps to miss out on easy questions.
My query might be a stupid one.I am checking out the online gate exam interface from official site.There is a button if we click we can see the entire paper together.Is i...
685
views
commented
Jan 22, 2018
GATE
exam
+
–
0
answers
8
Static Single Assignment
x = 7 if b { x = 8 } print(x) Convert the following code in Static single assignment form.
x = 7if b { x = 8}print(x)Convert the following code in Static single assignment form.
314
views
commented
Jan 21, 2018
Compiler Design
compiler-design
static-single-assignment
+
–
0
answers
9
Hashing-MadeEasy
Please explain primary and secondary clustering in brief. I tend to forget their difference because their definitions seem quite similar to me. And also, which one is true? According to me it was S1 and S3 but given is S3 only.
Please explain primary and secondary clustering in brief. I tend to forget their difference because their definitions seem quite similar to me. And also, which one is tru...
2.3k
views
commented
Jan 21, 2018
Algorithms
algorithms
data-structures
hashing
+
–
0
answers
10
made easy
A language L satisfies the pumping lemma for context-free languages but doesn't satisfy the pumping lemma for regular language. Which of the following statement about L is true? a)L is necessarily a context-free language B)L is necessarily a context-free language, ... a regular language. C)L is necessarily a non-context free language d)None of the above dout why option c is wrong
A language L satisfies the pumping lemma for context-free languages but doesn’t satisfy the pumping lemma for regular language.Which of the following statement about L ...
347
views
commented
Jan 20, 2018
1
answer
11
Resource Allocation
Consider a scenario where 3 processes P1, P2 and P3 are sharing x resources of the same type. The maximum need of the three processes is 4, 8, 6. It is also known that the maximum combined need of both processes P1 and P2 at a time is 9 and they always execute only in combined manner. Then the value of x is ___
Consider a scenario where 3 processes P1, P2 and P3 are sharing x resources of the same type. The maximum need of the three processes is 4, 8, 6. It is also known that t...
5.3k
views
commented
Jan 20, 2018
Operating System
operating-system
+
–
0
answers
12
Test series
Consider the following grammar S→S#S | S&S | id The above grammar with the given production rules is fed to a yacc tool (which is an LALR (1) parser generator) for parsing and evaluating arithmetic expressions. Which one of the following is true about the action of yacc for the given grammar?
Consider the following grammar S→S#S | S&S | idThe above grammar with the given production rules is fed to a yacc tool (which is an LALR (1) parser generator) for parsi...
271
views
commented
Jan 18, 2018
0
answers
13
given language is DCFL?
$L=\{0^l1^{2l}0^{l+n}|l\geq{0},n\geq{0}\}$
$L=\{0^l1^{2l}0^{l+n}|l\geq{0},n\geq{0}\}$
378
views
commented
Jan 18, 2018
2
answers
14
Test Series
873
views
commented
Jan 18, 2018
Algorithms
algorithms
binary-search
recurrence-relation
ace-test-series
+
–
1
answer
15
PROBABILITY
An algorithm takes a list of numbers and replaces it with where . Then it performs the same operation on the resulting list (replacing each pair of consecutive elements with their maximum), and it continues doing the same until there are only two elements left in the list. For instance ... that the number 63 will appear in the final two-element list? A) 1/63 B) 1/4 C) 1 D) 32/63
An algorithm takes a list of numbers and replaces it with where .Then it performs the same operation on the resulting list (replacing each pair of consecutive elements...
551
views
answered
Jan 17, 2018
0
answers
16
Weighted undirected graph
Consider a Weighted undirected graph connected with 'V' vertices and 'E' edges.What is the worst case time complexity to check if 2 particular vertices 'x' and 'y' are present in the graph, if present then calculate the minimum distance between them?
Consider a Weighted undirected graph connected with 'V' vertices and 'E' edges.What is the worst case time complexity to check if 2 particular vertices 'x' and 'y' are p...
1.1k
views
commented
Jan 17, 2018
Algorithms
algorithms
+
–
1
answer
17
gatebook-os
Consider a virtual memory system running on a RISC CPU. Page tables are not locked in memory and may be swapped to disk. An 1w (load word) instruction reads one data word from memory; the address is the sum of value in a register and an immediate constant ... In the worst case how many page faults could be generated as a result of the fetch, decode, and execution of an 1w instruction?
Consider a virtual memory system running on a RISC CPU. Page tables are not locked in memory and may be swapped to disk. An 1w (load word) instruction reads one data word...
2.3k
views
commented
Jan 17, 2018
Operating System
page-fault
operating-system
virtual-memory
+
–
1
answer
18
Theads
True/False : 1)Several threads can share same physical address space. 2)Several threads can share same virtual address space.
True/False :1)Several threads can share same physical address space.2)Several threads can share same virtual address space.
1.7k
views
commented
Jan 16, 2018
Operating System
operating-system
threads
+
–
0
answers
19
What will be the output of this C program
What will be the output of following programs : void fun1(struct node* head) { for(head == NULL) { return; } fun1(head->next); printf("%d ", head->data); } And this one ! void fun1(struct node* head) { while(head == NULL) { return; } fun1(head->next); printf("%d ", head->data); }
What will be the output of following programs :void fun1(struct node* head) { for(head == NULL) { return; } fun1(head->next); printf("%d ", head->data); } And this one ! ...
1.8k
views
commented
Jan 16, 2018
Programming in C
programming-in-c
linked-list
+
–
3
answers
20
How to Find Data Transfer Rate?
Consider a disk pack with following specifications - 16 surfaces, 128 tracks/surface, 256 sector/track and 512Bytes/sector. Now, the disk is rotating at 3600RPM, what is the data transfer rate. Please be as elaborative and simplified in your approach of explaining! Thank you, all the nerds on this site!
Consider a disk pack with following specifications - 16 surfaces, 128 tracks/surface, 256 sector/track and 512Bytes/sector. Now, the disk is rotating at 3600RPM, what is...
3.9k
views
commented
Jan 15, 2018
Operating System
disk
+
–
2
answers
21
number of spanning tree
Consider a complete bipartite graph with ‘m’ and ‘n’ vertices. If m = 4, n = 4, then the number of spanning trees of graph are ________.
Consider a complete bipartite graph with ‘m’ and ‘n’ vertices. If m = 4, n = 4, then the number of spanning trees of graph are ________.
6.1k
views
commented
Jan 15, 2018
Algorithms
algorithms
spanning-tree
numerical-answers
+
–
0
answers
22
minimal dfa
Consider the following grammar: $S\rightarrow aA|bB$ $A\rightarrow aA|bB$ $B\rightarrow bB|ϵ$ Then the number of states in a minimal D.F.A of the above grammar is ______________ ?
Consider the following grammar:$S\rightarrow aA|bB$$A\rightarrow aA|bB$$B\rightarrow bB|ϵ$Then the number of states in a minimal D.F.A of the above grammar is __________...
419
views
commented
Jan 15, 2018
Theory of Computation
theory-of-computation
minimal-state-automata
number-of-states
+
–
6
answers
23
GATE CSE 2004 | Question: 78
Two $n$ bit binary strings, $S_1$ and $S_2$ are chosen randomly with uniform probability. The probability that the Hamming distance between these strings (the number of bit positions where the two strings differ) is equal to $d$ is $\dfrac{^{n}C_{d}}{2^{n}}$ $\dfrac{^{n}C_{d}}{2^{d}}$ $\dfrac{d}{2^{n}}$ $\dfrac{1}{2^{d}}$
Two $n$ bit binary strings, $S_1$ and $S_2$ are chosen randomly with uniform probability. The probability that the Hamming distance between these strings (the number of b...
7.4k
views
commented
Jan 12, 2018
Probability
gatecse-2004
probability
normal
uniform-distribution
+
–
4
answers
24
GATE CSE 2016 Set 1 | Question: 29
Consider the following experiment. Step 1. Flip a fair coin twice. Step 2. If the outcomes are (TAILS, HEADS) then output $Y$ and stop. Step 3. If the outcomes are either (HEADS, HEADS) or (HEADS, TAILS), then output $N$ and stop. Step 4. If ... , TAILS), then go to Step $1.$ The probability that the output of the experiment is $Y$ is (up to two decimal places)
Consider the following experiment.Step 1. Flip a fair coin twice.Step 2. If the outcomes are (TAILS, HEADS) then output $Y$ and stop.Step 3. If the outcomes are either (H...
11.8k
views
comment edited
Jan 10, 2018
Probability
gatecse-2016-set1
probability
normal
numerical-answers
+
–
3
answers
25
CMI2015-A-07
You arrive at a snack bar and you can't decide whether to order a lime juice or a lassi. You decide to throw a fair $6$-sided die to make the choice, as follows. If you throw $2$ or $6$ you order a lime juice. If you throw a $4$, you order a lassi. Otherwise, you throw ... is the probability that you end up ordering a lime juice? $\frac{1}{3}$ $\frac{1}{2}$ $\frac{2}{3}$ $\frac{3}{4}$
You arrive at a snack bar and you can’t decide whether to order a lime juice or a lassi. You decide to throw a fair $6$-sided die to make the choice, as follows.If you ...
1.3k
views
commented
Jan 10, 2018
Probability
cmi2015
probability
+
–
0
answers
26
gatebook test - Algorithm design paradigms
Select the wrong statement from the following given options. a. Dynamic programming is applicable when subproblems are not independent. b. Divide and conquer algorithm does more work than necessary repeatedly solving the common subproblems c. ... exactly once and saves the result into a table. d. Longest path problem has optimal substructure property.
Select the wrong statement from the following given options. a. Dynamic programming is applicable when subproblems are not independent.b. Divide and conquer algorithm doe...
601
views
reshown
Jan 10, 2018
Algorithms
algorithms
test-series
dynamic-programming
+
–
0
answers
27
IES 2018_Digital Logic
In large radar installations, it is required to translate the angular position of a shaft into digital information. this is most generally achieved by employing a code wheel. For unambiguous sensing of the shaft position, one employs a/an a) Octal Code b) BCD code c) Binary Gray code d) Natural binary code
In large radar installations, it is required to translate the angular position of a shaft into digital information. this is most generally achieved by employing a code wh...
394
views
commented
Jan 9, 2018
Digital Logic
ies-2018
ies
digital-logic
+
–
11
answers
28
GATE IT 2004 | Question: 35
In how many ways can we distribute $5$ distinct balls, $B_1, B_2, \ldots, B_5$ in $5$ distinct cells, $C_1, C_2, \ldots, C_5$ such that Ball $B_i$ is not in cell $C_i$, $\forall i= 1,2,\ldots 5$ and each cell contains exactly one ball? $44$ $96$ $120$ $3125$
In how many ways can we distribute $5$ distinct balls, $B_1, B_2, \ldots, B_5$ in $5$ distinct cells, $C_1, C_2, \ldots, C_5$ such that Ball $B_i$ is not in cell $C_i$, $...
11.5k
views
commented
Jan 7, 2018
Combinatory
gateit-2004
combinatory
normal
balls-in-bins
+
–
7
answers
29
GATE CSE 2014 Set 3 | Question: 24
A bit-stuffing based framing protocol uses an $\text{8-bit}$ delimiter pattern of $01111110.$ If the output bit-string after stuffing is $01111100101,$ then the input bit-string is: $0111110100$ $0111110101$ $0111111101$ $0111111111$
A bit-stuffing based framing protocol uses an $\text{8-bit}$ delimiter pattern of $01111110.$ If the output bit-string after stuffing is $01111100101,$ then the input bit...
22.5k
views
commented
Jan 6, 2018
Computer Networks
gatecse-2014-set3
computer-networks
error-detection
+
–
0
answers
30
OS critical section
Let 'n' processes competing to enter their critical sections and mutex be a global binary semaphore initialized to 1. The process is coded as follows: Signal(mutex); C.S; wait(mutex); Which of the following statements are TRUE? s1: This ... decision is not postponed indefinitely and there is no competition to enter as well. can we take this as progress? Please answer.
Let 'n' processes competing to enter their critical sections and mutex be a global binary semaphore initialized to 1. The process is coded as follows:Signal(mutex); C...
654
views
asked
Jan 2, 2018
Operating System
process-synchronization
operating-system
critical-section
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register