Problem Detail: Assume $L$ is a regular language over an ordered alphabet. Is the language built by taking every word in $L$ and sorting it always a regular language? Asked By : Andrew MacFie Answered By : Niel de Beaudrap No. Counterexample: assuming Read More …
Blog
[Solved]: Calculating cache memory based on LRU algorithm
Problem Detail: Assuming i have 4 blocks of cache memory, Using the LRU (Least Recently Used) replacement algorithm on this following sequence of access to memory blocks: 1 2 3 4 5 2 5 4 1 5 2 3 : 1 Read More …
[Solved]: Is this variant of ATM decidable?
Problem Detail: Ok so I understand how $mathrm{ATM} = {langle M,w rangle mid text{$M$ is a TM and $M$ accepts $w$}}$ is undecidable. Is this because $w$ is a variable? What if the parameter is fixed? Consider $mathrm{BTM} = {langle M,w Read More …
[Solved]: Please explain “decidability” and “verifiability”
Problem Detail: I am trying to (intuitively) understand the two terms “decidability” and “verifiability”. I have done a reasonable amount of searching and going through the various texts I can put my hands on. However, their intuitive understanding seems to escape Read More …
[Solved]: Prove that regular expression is unambiguous
Problem Detail: I’ve got following definition: Function $f$ is a valid mapping of word $w$ to regular expression $R$, if any of following conditions is true: $R = w$ and $f$ is the identity or $R = epsilon$ and $w = Read More …
[Solved]: Closed-form Expression of the Expected value of the Cost of D&C Algorithm?
Problem Detail: Let there is a binary-string, $B$, of length $N$. The probability of occurrence of 0 and 1 in this binary-word is $p$ and $q$ , respectively. Each bit in the string is independent of any other bit. There is Read More …
[Solved]: Finding all vertices on negative cycles
Problem Detail: Given a weighted digraph, I can check whether a given vertex belongs to a negative cycle in $O(|V|cdot|E|)$ using Bellman-Ford. But what if I need to find all vertices on negative cycles? Is there a way to do it 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 …
[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]: 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 …