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 …
Category: Uncategorized
[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 …
[Solved]: Why the Smallest Operable Data Type in Most Programming Languages Is One-Byte Sized?
Problem Detail: Why the smallest operable data type in most programming languages is one-byte sized? Is it possible that to operate with a single bit? If it is possible, how to do it in practical? Asked By : WeZZard Answered By : adrianN Read More …
[Solved]: Is {wxw^r} a regular language?
Problem Detail: Is ${ WxW^{mathrm{R}} mid W,xin{0,1}^+}$ a regular language? If so, why? The notation $W^{mathrm{R}}$ means the reverse string of $W$? If we consider the best answer in this solution, if the language is regular, then its FA should reject all 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]: 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 …