Problem Detail: I’m confused about the complexity of the following code: for(i=1; i<=n; i = 2*i) for(j=1; j<=i; j++) print A[j] I know that the first loop is logn, but I’m confused on what the second for loop would be since Read More …
Category: Uncategorized
[Solved]: What specifically makes quantum computers useful?
Problem Detail: I know that quantum computers are able to process a superposition of all possible states with a single pass through the logic. That seems to be what people point to as being what makes quantum computers special or useful. Read More …
[Solved]: Difference between virtual memory and job pool
Problem Detail: Both virtual memory and job pools store the processes temporarily on disk and bring them to memory at some later stage, so what is the actual difference in between them? What I guess is that when a process is Read More …
[Solved]: Runtime of the optimal greedy $2$-approximation algorithm for the $k$-clustering problem
Problem Detail: We are given a set 2-dimensional points $|P| = n$ and an integer $k$. We must find a collection of $k$ circles that enclose all the $n$ points such that the radius of the largest circle is as large Read More …
[Solved]: Sort deck of cards with least no of moves
Problem Detail: We have n cards with each card numbered from 1 to n. All cards are randomly shuffled but all cards are visible We are allowed only operation MoveCard(n) which moves the card with value n to the top of Read More …
[Solved]: Time complexity of an enumeration of SUBSET SUM instances
Problem Detail: An instance of the SUBSET SUM problem (given $y$ and $A = {x_1,…,x_n}$ is there a non-empty subset of $A$ whose sum is $y$) can be represented on a one-tape Turing Machine with a list of comma separated numbers Read More …
[Solved]: Prove the red blue separation problem is NP-complete
Problem Detail: Consider the following problem: given a set of $m$ red points and $n$ blue points in the plane, find a minimum length cycle that separates the red points from the blue points. That is, the red points are inside Read More …
[Solved]: Analyzing load balancing schemes to minimize overall execution time
Problem Detail: Suppose that a certain parallel application uses a master-slave design to process a large number of workloads. Each workload takes some number of cycles to complete; the number of cycles any given workload will take is given by a Read More …
[Solved]: PDA with N-Stacks comparison with Turing Machines
Problem Detail: Is it possible to compare PDA having N-Stacks with Turning Machines. Are they equally powerful in this situation? It’s been told that PDA with 2-Stacks is equally powerful to Turning Machine. But what if we add more stacks i.e. Read More …
[Solved]: Is Equational Reasoning an application of Referential Transparency?
Problem Detail: In various discussions of the merits of functional programming, the phrase referential transparency or equational reasoning is often listed. My question is – are these roughly the same thing? (One being the concept, and the second being the process Read More …