Problem Detail: Let $L_1$, $L_2$, $L_3$, $dots$ be an infinite sequence of context-free languages, each of which is defined over a common alphabet $Σ$. Let $L$ be the infinite union of $L_1$, $L_2$, $L_3$, $dots $; i.e., $L = L_1 cup Read More …
Blog
Types of reductions and associated definitions of hardness
Problem Detail: Let A be reducible to B, i.e., $A leq B$. Hence, the Turing machine accepting $A$ has access to an oracle for $B$. Let the Turing machine accepting $A$ be $M_{A}$ and the oracle for $B$ be $O_{B}$. The Read More …
Can someone give a simple but non-toy example of a context-sensitive grammar?
Problem Detail: I’m trying to understand context-sensitive grammars. I understand why languages like ${ww mid w in A^*}$ ${a^n b^n c^n mid ninmathbb{N}}$ are not context free, but what I’d like to know if a language similar to the untyped lambda Read More …
Confusion about big-O notation comparison of two functions
Problem Detail: On page 16 of this algorithms book, it states: For example, suppose we are choosing between two algorithms for a particular computational task. One takes $f_1(n) = n^2$ steps, while the other takes $f_2(n) = 2n + 20$ steps Read More …
Choosing a subset to maximize the minimum distance between points
Problem Detail: I have a set of points $C$, and I have the distance between each point $D(P_i,P_j)$. These distances are euclidean but the points are actually in a feature space. From the $C$ points I want to choose a subset Read More …
Example of Soundness & Completeness of Inference
Problem Detail: Is the following example correct about whether an inference algorithm is sound and complete? Suppose we have needles a, b, c in a haystack, and have also an inference algorithm that is designed to find needles. sound – Only Read More …
Decision problems vs “real” problems that aren’t yes-or-no
Problem Detail: I read in many places that some problems are difficult to approximate (it is NP-hard to approximate them). But approximation is not a decision problem: the answer is a real number and not Yes or No. Also for each Read More …
Minimum spanning tree and its connected subgraph
Problem Detail: This problem is from the book [1]. In case of being closed as a duplication of that in [2], I first make a defense: The accepted answer at [2] is still in dispute. The proof given by @eh9 is Read More …
Regular expression for a string not containing a set of substrings
Problem Detail: I’m trying to figure out how to build a regular expression for a language that doesn’t contain strings that contain $101$ or $001$. The alphabet is defined as ${0, 1}$. I’m stuck on trying to figure out the DFA. Read More …
Dynamic Programming Solution to 0,1 KnapSack Problem
Problem Detail: I am trying to understand the DP solution to the basic knapsack problem.However even after reading through a variety of tutorials ,its still beyond my comprehension.I am taking an algorithmics course and need to solve questions based on the Read More …