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 …
Category: Uncategorized
[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]: 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]: 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]: 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]: 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]: Why is there a 2n+1 comparison for a linear search algorithm?
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 …
[Solved]: Non Deterministic PDA accepted language not clear
Problem Detail: This is a PDA from the lecture slides I’m using: They say it accepts all words that contain double a’s. While it makes some sense it’s not full proof. What prevents the second a to be read in the Read More …
[Solved]: directed graph data structure with fast in/out neighbor query
Problem Detail: If I store a directed graph $G$ in adjacency list format, one can find all the out-neighbors $j$ of a given vertex $i$ in $mathcal O(d)$ time, where $d$ is the max degree of the graph. These are all Read More …
[Solved]: Is the question of whether the language of a DFA/CFG is equal to a particular set of string decidable?
Problem Detail: Suppose I have a set of strings $S$ that is generated from the alphabet. Suppose I have a DFA $D$ and a CFG $G$, are the questions of ${Dmid Dtext{ is a DFA and }L(D) = S}$ and ${Gmid Read More …