Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
vijaycs
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by vijaycs
2
answers
1
GATE Overflow | Algorithms | Test 1 | Question: 4
Consider the following algorithm for searching for a given number $x$ in an unsorted array $A[1...n]$ having $n$ values : Sequentially choose $i$ from 1 to n if A[i] = x then Stop else Goto 1 Let $x$ be present in A two times, what is the expected no of comparisons made by the algorithm before it terminates for $n=5$?
Consider the following algorithm for searching for a given number $x$ in an unsorted array $A[1...n]$ having $n$ values : Sequentially choose $i$ from 1 to n if A[i] = x ...
1.5k
views
commented
May 22, 2017
Algorithms
go-alogrithms-1
algorithms
expectation
numerical-answers
+
–
2
answers
2
GATE CSE 2008 | Question: 81
The subset-sum problem is defined as follows. Given a set of $n$ positive integers, $S = \{ a_1, a_2, a_3, \dots , a_n \}$, and positive integer $W$, is there a subset of $S$ whose elements sum to $W$? A dynamic program for solving this problem uses a $\text{2-dimensional}$ ... that there is a subset whose elements sum to $W$? $X[1, W]$ $X[n, 0]$ $X[n, W]$ $X[n-1, n]$
The subset-sum problem is defined as follows. Given a set of $n$ positive integers, $S = \{ a_1, a_2, a_3, \dots , a_n \}$, and positive integer $W$, is there a subset of...
10.1k
views
commented
Apr 18, 2017
Algorithms
gatecse-2008
algorithms
normal
dynamic-programming
+
–
6
answers
3
GATE CSE 2014 Set 3 | Question: 44
The memory access time is $1$ nanosecond for a read operation with a hit in cache, $5$ nanoseconds for a read operation with a miss in cache, $2$ nanoseconds for a write operation with a hit in cache and $10$ nanoseconds for a write ... cache hit-ratio is $0.9$. The average memory access time (in nanoseconds) in executing the sequence of instructions is ______.
The memory access time is $1$ nanosecond for a read operation with a hit in cache, $5$ nanoseconds for a read operation with a miss in cache, $2$ nanoseconds for a write ...
23.7k
views
commented
Apr 5, 2017
CO and Architecture
gatecse-2014-set3
co-and-architecture
cache-memory
numerical-answers
normal
+
–
1
answer
4
GATE Overflow | Algorithms | Test 1 | Question: 13
You are given a 1 billion numbers. The time require in seconds to sort them provided sorting thousand numbers takes 100 microseconds will be _______ 10,000 512 300 65536
You are given a 1 billion numbers. The time require in seconds to sort them provided sorting thousand numbers takes 100 microseconds will be _______10,00051230065536
835
views
commented
Apr 3, 2017
Algorithms
go-alogrithms-1
sorting
+
–
1
answer
5
What will be the output of the following C program? If you think it will give a runtime error, you need to mention it.
What will be the output of the following C program? If you think it will give a runtime error, you need to mention it. In either case,your answer must include proper just...
1.5k
views
commented
Apr 2, 2017
Programming in C
programming-in-c
+
–
4
answers
6
TIFR CSE 2017 | Part B | Question: 8
For any natural number $n$, an ordering of all binary strings of length $n$ is a Gray code if it starts with $0^n$, and any successive strings in the ordering differ in exactly one bit (the first and last string must also differ by one ... two strings are separated by $k$ other strings in the ordering, then they must differ in exactly $k$ bits none of the above
For any natural number $n$, an ordering of all binary strings of length $n$ is a Gray code if it starts with $0^n$, and any successive strings in the ordering differ in e...
3.1k
views
commented
Mar 31, 2017
Digital Logic
tifr2017
digital-logic
boolean-algebra
+
–
4
answers
7
TIFR CSE 2017 | Part A | Question: 11
Let $f \: \circ \: g$ denote function composition such that $(f \circ g)(x) = f(g(x))$. Let $f: A \rightarrow B$ such that for all $g \: : \: B \rightarrow A$ and $h \: : \: B \rightarrow A$ ... ) $f$ is one-to-one (injective) $f$ is both one-to-one and onto (bijective) the range of $f$ is finite the domain of $f$ is finite
Let $f \: \circ \: g$ denote function composition such that $(f \circ g)(x) = f(g(x))$. Let $f: A \rightarrow B$ such that for all $g \: : \: B \rightarrow A$ and $h \: :...
3.9k
views
commented
Mar 31, 2017
Set Theory & Algebra
tifr2017
set-theory&algebra
functions
+
–
3
answers
8
Test by Bikram | Operating Systems | Test 2 | Question: 29
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns. The average time required to access a page is ________ ns
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns.The ...
1.1k
views
commented
Mar 31, 2017
Operating System
tbb-os-2
numerical-answers
+
–
1
answer
9
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
Mar 28, 2017
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
+
–
2
answers
10
ISRO2011-60
A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state? Process Used Max $P_1$ 2 7 $P_2$ 1 6 $P_3$ 2 5 $P_4$ 1 4 $\langle P_4, P_1, P_3, P_2\rangle$ $\langle P_4, P_2, P_1, P_3\rangle $ $\langle P_4, P_2, P_3, P_1\rangle $ $\langle P_3, P_1, P_2, P_4 \rangle$
A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state?ProcessUsedMax$P_1$27$P_2$16$P...
5.6k
views
commented
Mar 28, 2017
Operating System
isro2011
operating-system
resource-allocation
+
–
7
answers
11
GATE CSE 2017 Set 1 | Question: 27
A multithreaded program $P$ executes with $x$ number of threads and uses $y$ number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock $l$, then it cannot re-acquire lock $l$ without releasing ... $x = 1, y = 2$ $x = 2, y = 1$ $x = 2, y = 2$ $x = 1, y = 1$
A multithreaded program $P$ executes with $x$ number of threads and uses $y$ number of locks for ensuring mutual exclusion while operating on shared memory locations. All...
32.9k
views
commented
Mar 27, 2017
Operating System
gatecse-2017-set1
operating-system
process-synchronization
normal
+
–
1
answer
12
MadeEasy Subject Test: Programming & DS - Binary Tree
558
views
commented
Mar 26, 2017
DS
made-easy-test-series
data-structures
binary-tree
+
–
1
answer
13
complexity
Let there are n elements in array and number of sorted subarray is log n of size n/ log n each then what is the time complexity to sort given array
Let there are n elements in array and number of sorted subarray is log n of size n/ log n each thenwhat is the time complexity to sort given array
421
views
commented
Mar 26, 2017
Algorithms
sorting
time-complexity
+
–
4
answers
14
GATE CSE 2017 Set 2 | Question: 42
The next state table of a $2-$ ... $T_1 = Q_1+Q_0, \quad T_0= \bar{Q_1} \bar{Q_0}$ $T_1 = \bar{Q_1}Q_0, \quad T_0= Q_1 + Q_0$
The next state table of a $2-$bit saturating up-counter is given below.$\begin{array}{cc|cc} Q_1 & Q_0 & Q_1^+ & Q_0^+ \\ \hline 0 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 1 & 0...
11.0k
views
commented
Feb 14, 2017
Digital Logic
gatecse-2017-set2
digital-logic
digital-counter
+
–
4
answers
15
GATE CSE 2017 Set 2 | Question: 27
If $w, x, y, z$ are Boolean variables, then which one of the following is INCORRECT? $wx+w(x+y)+x(x +y) = x+wy$ $\overline{w \bar{x}(y+\bar{z})} + \bar{w}x = \bar{w} + x + \bar{y}z$ $(w \bar{x}(y+x\bar{z}) + \bar{w} \bar{x}) y = x \bar{y}$ $(w+y)(wxy+wyz) = wxy+wyz$
If $w, x, y, z$ are Boolean variables, then which one of the following is INCORRECT?$wx+w(x+y)+x(x +y) = x+wy$$\overline{w \bar{x}(y+\bar{z})} + \bar{w}x = \bar{w} + x + ...
10.1k
views
answer edited
Feb 14, 2017
Digital Logic
gatecse-2017-set2
digital-logic
boolean-algebra
normal
+
–
5
answers
16
GATE CSE 2007 | Question: 61
Consider the table employee(empId, name, department, salary) and the two queries $Q_1, \, Q_2$ below. Assuming that department $5$ has more than one employee, and we want to find the employees who get higher salary than anyone in the department $5,$ ... $Q_1$ and $Q_2$ produce the same answer Neither $Q_1$ nor $Q_2$ is the correct query
Consider the table employee(empId, name, department, salary) and the two queries $Q_1, \, Q_2$ below. Assuming that department $5$ has more than one employee, and we want...
26.6k
views
commented
Feb 9, 2017
Databases
gatecse-2007
databases
sql
normal
verbal-aptitude
+
–
1
answer
17
Divide and conquer
Reply with solution @Arjun sir,@habibkhan,@vijaycs
Reply with solution @Arjun sir,@habibkhan,@vijaycs
1.1k
views
answer selected
Feb 7, 2017
Algorithms
algorithms
divide-and-conquer
+
–
1
answer
18
Test by Bikram | Mock GATE | Test 1 | Question: 14
Match the following $List I$ with $List II$ : $W(x)$: $x$ is a worker $A(x)$: $x$ likes Anand List -I a. No worker like Anand b. Some worker like Anand c. If someone s a worker, he likes Anand List II p. $\sim$\forall x$[ $W(x)$ $\rightarrow$ $\sim$A(x) ]$ ... $]$ $a-r, b-q, c-p$ $a-p, b-q, c-r$ $a-r, b-p, c-q$ $a-q, b-p, c-r$
Match the following $List I$ with $List II$ :$W(x)$: $x$ is a worker$A(x)$: $x$ likes AnandList -Ia. No worker like Anand b. Some worker lik...
523
views
answer selected
Feb 6, 2017
GATE
tbb-mockgate-1
discrete-mathematics
mathematical-logic
first-order-logic
+
–
1
answer
19
Test by Bikram | Mock GATE | Test 2 | Question: 46
The number of possible Deterministic Finite Automation with two states $q_0$ and $q_1$, where $q_0$ is always the initial state over the alphabet $\left \{ a,b \right \}$ which accept empty language is : ____________.
The number of possible Deterministic Finite Automation with two states $q_0$ and $q_1$, where $q_0$ is always the initial state over the alphabet $\left \{ a,b \right \}$...
923
views
answer selected
Feb 5, 2017
Theory of Computation
tbb-mockgate-2
numerical-answers
theory-of-computation
finite-automata
number-of-dfa
+
–
0
answers
20
Vgate-2
here SJF is given as well as priorities are given, given answer followes only priority scheduling but i think priority is used in case where there is a tie between two processes in SJF what is the correct approach?
here SJF is given as well as priorities are given, given answer followes only priority schedulingbut i think priority is used in case where there is a tie between two pro...
861
views
commented
Feb 3, 2017
4
answers
21
GATE CSE 2004 | Question: 76
In an $M \times N$ matrix all non-zero entries are covered in $a$ rows and $b$ columns. Then the maximum number of non-zero entries, such that no two are on the same row or column, is $\leq a +b$ $\leq \max(a, b)$ $\leq \min(M-a, N-b)$ $\leq \min(a, b)$
In an $M \times N$ matrix all non-zero entries are covered in $a$ rows and $b$ columns. Then the maximum number of non-zero entries, such that no two are on the same row ...
9.5k
views
commented
Jan 31, 2017
Linear Algebra
gatecse-2004
linear-algebra
normal
matrix
+
–
1
answer
22
2s complement Notation
What is the difference betwen 2s complent of a number and 2s complement representation of a number .
What is the difference betwen 2s complent of a number and 2s complement representation of a number .
1.2k
views
commented
Jan 31, 2017
Digital Logic
number-representation
+
–
6
answers
23
UGC NET CSE | January 2017 | Part 3 | Question: 50
Consider a disk queue with I/O requests on the following cylinders in their arriving order: $6,10,12,54,97,73,128,15,44,110,34,45$. The disk head is assumed to be at cylinder $23$ and moving in the direction of decreasing number of ... in the disk is $150$. The disk head movement using SCAN -scheduling algorithm is: $172$ $173$ $227$ $228$
Consider a disk queue with I/O requests on the following cylinders in their arriving order: $6,10,12,54,97,73,128,15,44,110,34,45$. The disk head is assumed to be at cyli...
4.6k
views
commented
Jan 31, 2017
Operating System
ugcnetcse-jan2017-paper3
operating-system
disk-scheduling
+
–
4
answers
24
UGC NET CSE | January 2017 | Part 3 | Question: 10
For database relation $R(A,B,C,D)$ where the domains of $A,B,C$ and $D$ include only atomic values, only the following functional dependencies and those that can be inferred from them are: $A \rightarrow C$ $B \rightarrow D$ ... normal form Second normal form but not in third normal form. Both in second normal form as well as in third normal form.
For database relation $R(A,B,C,D)$ where the domains of $A,B,C$ and $D$ include only atomic values, only the following functional dependencies and those that can be infer...
983
views
answer selected
Jan 31, 2017
Databases
ugcnetcse-jan2017-paper3
databases
database-normalization
+
–
3
answers
25
Complexity
int loop(int n) { for(int i=1;i<=n;i++) { for(int j=1;j<n;j+=i) { -------------O(1)------------- } } } What is the time complexity of above code segment?
int loop(int n) { for(int i=1;i<=n;i++) { for(int j=1;j<n;j+=i) { -O(1) - } } }What is the time complexity of above code segment?
1.8k
views
answer selected
Jan 30, 2017
DS
time-complexity
algorithms
+
–
1
answer
26
Time Complexity of the given code ?
#include <stdio.h> int main(void) { for(i=1;i<=n;i*=2) { for(j=0;j<=i;j++) { for(k=0;k<=n;k++) { ..... O(1)....; } } } return 0; } What is the time complexity of given code ?
#include <stdio.h int main(void) { for(i=1;i<=n;i*=2) { for(j=0;j<=i;j++) { for(k=0;k<=n;k++) { ..... O(1)....; } } } return 0; }What is the time complexity of given code...
1.0k
views
commented
Jan 29, 2017
Algorithms
time-complexity
algorithms
programming-in-c
+
–
2
answers
27
Pipeline : ans should be 13 or 14?
Here loading result should take in ALU ,rt?
Here loading result should take in ALU ,rt?
844
views
commented
Jan 29, 2017
CO and Architecture
pipelining
+
–
1
answer
28
Test by Bikram | Computer Organization and Architecture | Test 1 | Question: 16
A pipelined processor has two branch delay slots. An optimizing compiler can fill one of these slots $85$ % of the time, and can fill the second slot only $20$ % of the time. ... the instructions executed are branch instructions, then the percentage improvement in performance achieved by this optimization is ________%.
A pipelined processor has two branch delay slots. An optimizing compiler can fill one of these slots $85$ % of the time, and can fill the second slot only $20$ % of the t...
1.4k
views
commented
Jan 28, 2017
CO and Architecture
tbb-coa-1
co-and-architecture
pipelining
speedup
numerical-answers
+
–
0
answers
29
DBMS- is it 1 or 2
S : R1(x ) R2(x ) W1(x ) W2(x); Transactions can commit any place after their last operation executed. The number of statements are correct schedule (s) __________. 1. S is conflict serializable schedule. 2. S is view serializable schedule 3. S is recoverable schedule 4. S is cascadeless Rollback, Recoverable schedule 5. S is strict recoverable schedule.
S : R1(x ) R2(x ) W1(x ) W2(x);Transactions can commit any place after their last operation executed. The number of statements arecorrect schedule (s) __________.1. S is ...
417
views
commented
Jan 28, 2017
Databases
databases
+
–
2
answers
30
PTE- paging
consider a paging system with 48bit virtual address space.Each address defers to a byte in memory.suppose the size of page is 16KB and the main memory size is 16GB.The minimum size of page table with each entry need 2 protection bits is _____ (in GB) now what should be ... . should i round it to 3bytes and make answer as 48GB or shuld i keep it as it is and write the answer as 44GB?
consider a paging system with 48bit virtual address space.Each address defers to a byte in memory.suppose the size of page is 16KB and the main memory size is 16GB.The mi...
829
views
commented
Jan 28, 2017
Operating System
operating-system
paging
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register