Problem Detail: How can I prove that the language that the operator $A$ defines for regular language $L$ is a context free language. $A(L)= { w_1w_2: |w_1|=|w_2|$ and $w_1, w_2^R in L }$, where $x^R$ is the reversed form of $x$. Read More …
Author: ignougroup
[Solved]: Expected number of updates of minimum
Problem Detail: I came across the following problem in a exam. We choose a permutation of n elements $[1,n]$ uniformly at random. Now a variable MIN holds the minimum value seen so far at it is defined to $infty$ initially. Now Read More …
[Solved]: Is the $k$P$k$N-3SAT problem NP-complete?
Problem Detail: Consider the following 3-SAT variant defined over the variables $x_1,ldots,x_n$. In the $k$P$k$N-3SAT problem each variable $x_j$, $j in [n]$, occurs exactly $k$ times as a positive literal in $phi$, and exactly $k$ times as a negative literal in Read More …
[Solved]: Can this CFG be written into an equivalent LL(1) grammar?
Problem Detail: I have the following CFG which I suspect cannot be rewritten to one which is LL(1): $S rightarrow epsilon | aSbS | bSaS | cSdS | dScS$ I’ve thought about it for a while, and can’t seem to make Read More …
[Solved]: Understanding Monte Carlo Probabilities
Problem Detail: I am trying to get a good grasp on Monte Carlo (MC) algorithms, but I feel I am missing something fundamental. What I don’t understand is how MC improves its confidence of giving the correct solution by running more Read More …
[Solved]: What’s the big deal with the knapsack problem?
Problem Detail: In my CS course, we are covering things from one topic to another in sort of a sensible manner. For example, binary search tree -> 234-tree -> red-black tree -> heap -> greedy algorithms -> dynamic programming. And all Read More …
[Solved]: Proving that a language of Turing machine descriptions is/is not Turing recognizable
Problem Detail: How to approach to solve this question and the likes of it? Let $L$ be the set of strings $langle Mrangle$ such that $M$ accepts all strings of even length and does not accept any strings of odd length. Read More …
[Solved]: How to find a Deterministic PDA for an intersection of languages
Problem Detail: There are two languages, $qquad L_1 = {win{a,b}^*: N_aleq N_b}$ and $qquad L_2={win{a,b}^*: N_bleq 2N_a}$ where $N_a$ means the number of occurrences of $a$ in the string $w$. Same for $N_b$. I’ve proved that $L_1$ has a DPDA (hope Read More …
[Solved]: Can someone help me understand cache conscience radix sort? (excerpt from journal article attached)
Problem Detail: Article: CC-Radix: a Cache Conscious Sorting Based on Radix sort (IEEE 2003) I’m trying to figure out what the author means by this section: Explanation of CC-Radix For clarity reasons, we explain the recursive version of CC-Radix sort as Read More …
[Solved]: Generating a set of minimal-length strings that, together, invoke every production of a context free language
Problem Detail: Problem (tl;dr) Given a context free grammar, $G$, find a set of strings that take $G$ through every production it has at least once. How and how fast can it be done? Background I’m working on a compiler whose Read More …