Problem Detail: Dynamic programming with large number of subproblems. So I’m trying to solve this problem from Interview Street: Grid Walking (Score 50 points) You are situated in an $N$-dimensional grid at position $(x_1,x_2,dots,x_N)$. The dimensions of the grid are $(D_1,D_2,dots,D_N$). Read More …
Blog
Why are there more non-computable functions than computable ones?
Problem Detail: I’m currently reading a book in algorithms and complexity. At the moment I’m, reading about computable and non-computable functions, and my book states that there are many more functions that are non-computable than computable, in fact the majority is Read More …
Time Complexity for Creating a Graph from a File
Problem Detail: Assume that I have a file that consists of pairs of numbers separated by a space. These numbers are the labels for vertices in my graph. For example: 0 5 0 7 2 3 4 5 1 5 . Read More …
Would proving P≠NP be harder than proving P=NP?
Problem Detail: Consider two possibilities for the P vs. NP problem: P=NP and P$neq$NP. Let Q be one of known NP-hard problems. To prove P=NP, we need to design a single polynomial time algorithm A for Q and prove that A Read More …
Intersection/Union of recursively enumerable languages that aren’t decidable?
Problem Detail: For $L_1, L_2 $ and $L_1 in RE $ and $ L_1notin R$ and $L_2 in RE $ and $ L_2notin R$ I was asked to prove/disprove if the following can occur: $L_1 cap L_2 in R$ $L_1 cup Read More …
What is dynamic programming about?
Problem Detail: Sorry in advance if this question sounds dumb… As far as I know, building an algorithm using dynamic programming works this way: express the problem as a recurrence relation; implement the recurrence relation either via memoization or via a Read More …
Fast k mismatch string matching algorithm
Problem Detail: I am looking for a fast k-mismatch string matching algorithm. Given a pattern string P of length m, and a text string T of length n, I need a fast (linear time) algorithm to find all positions where P Read More …
Irregularity of ${a^ib^jc^k mid text{if } i=1 text{ then } j=k }$
Problem Detail: I read on the site on how to use the pumping lemma but still I don’t what is wrong with way I’m using it for proving that the following language is not a regular language: $L = {a^ib^jc^k mid Read More …
Prove that regular languages are closed under the cycle operator
Problem Detail: I’ve got in a few days an exam and have problems to solve this task. Let $L$ be a regular language over the alphabet $Sigma$. We have the operation $operatorname{cycle}(L) = { xy mid x,yin Sigma^* text{ and } Read More …
Can input to a Turing machine be of infinite length?
Problem Detail: Considering only the alphabet $Sigma = {0,1}$, the strings which can be given as input to the Turing machines are from the set $Sigma^{*}$. But does it make sense for the input to be an infinite binary string ? Read More …