Problem Detail: Suppose an algorithm goes through a list of n integers and for every iteration of the loop it is needs to check if the current evaluated element of the list is even. If it is even, return the index Read More …
Blog
[Solved]: Does a Hadamard Gate have uses outside of pure and evenly mixed states?
Problem Detail: The standard usage cases for the Hadamard gate seem to be passing a pure $|0rangle$ or $|1rangle$ state in to get an even amplitude (probability) mixed state which has either matching or mismatching phase. The other use of course, Read More …
[Solved]: Designing a prefix code for integers?
Problem Detail: trying to figure out how to approach this problem. Suppose a sender in a network wanted to communicate the length n of the block it will be using in a subsequent transmission. If there were not limits on the Read More …
[Solved]: Unprovable Post correspondence problem instance
Problem Detail: Since there is no algorithm for the post correspondence problem, there exists an instance of this problem such that we can neither prove that the instance is positive nor prove that the instance is negative, i.e. an unprovable instance Read More …
[Solved]: Complexity inversely propotional to $n$
Problem Detail: Is it possible an algorithm complexity decreases by input size? Simply $O(1/n)$ possible? Asked By : mmdemirbas Answered By : Peter Consider an algorithm with some running time bounded by $f(n)$ and suppose that $f(n) in O(1/n)$. That means that there Read More …
[Solved]: Best Fit Memory Allocation Algorithm Statistical Analysis
Problem Detail: I’ve been reading book on Operating System, in which author writes : Somewhat surprisingly, it(Best fit) also results in more wasted memory than first fit or next fit because it tends to fill up memory with tiny, useless holes. Read More …
[Solved]: Efficient algorithm for iterated find/replace
Problem Detail: I’m looking for an algorithm for doing iterated find/replace, where the act of finding the replacement list of tokens for a given find is slow. Specifically: I have a function, f, that maps a sequence of tokens to either Read More …
[Solved]: Algorithm for a list of best solutions to the Assignment problem
Problem Detail: I am trying to brute force a classical substitution cipher. The problem is that there are $26!$ possible keys. So, I’d like to do frequency analysis to try likely keys first. Then, on the first $n$ tries I will Read More …
[Solved]: Closest pair of points in a Plane
Problem Detail: I want to write an algorithm to find the closest pair of points among n points in an XY-plane. I have the following approach in my mind: Find the minimum x co-ordinate(minX) and minimum y(minY) co-ordinate. Name the point Read More …
[Solved]: What is meant by superlinear speedup? Is it possible to have superlinear speedup in practice?
Problem Detail: In parallel computing, I know the speed up equation is $$ frac{1}{ s + frac{1-s}{p} } $$ But what is meant by superlinear speed up? Is it something theoritical? Could you explain it with equations? Asked By : LuckyB Answered Read More …