Problem Detail: Given two arbitrary regular expressions, is there an “efficient” algorithm to determine whether they match the same set of strings? More generally, can we compute the size of the intersection of the two match sets? What algorithms are there Read More …
Blog
Is there an anti-Bloom filter?
Problem Detail: A Bloom filter makes it possible to efficiently keep track of whether various values have already been encountered during processing. When there are many data items then a Bloom filter can result in a significant memory saving over a Read More …
Regular expression to show that all strings contain each symbol atleast once
Problem Detail: I’m studying for my exam and I came across the following exam question from last year, the only way I know how to solve this is build a regex that accounts for all six different series of letters so Read More …
Network modem question
Problem Detail: How would I solve the following can anyone help me.I know MIPS is basically how many instruction the processor can do per second but what should I do? Assume that we are receiving a message across a network using Read More …
Lower bound for finding kth smallest element using adversary arguments
Problem Detail: In many texts a lower bound for finding $k$th smallest element is derived making use of arguments using medians. How can I find one using an adversary argument? Wikipedia says that tournament algorithm runs in $O(n+klog n)$, and $n Read More …
Proving that recursively enumerable languages are closed against taking prefixes
Problem Detail: Define $mathrm{Prefix} (L) = {xmid exists y .xy in L }$. I’d love your help with proving that $mathsf{RE}$ languages are closed under $mathrm{Prefix}$. I know that recursively enumerable languages are formal languages for which there exists a Turing Read More …
NP-complete proof from Dasgupta problem on Kite
Problem Detail: I am trying to understand this problem from Algorithms. by S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani, chapter8, Pg281. Problem 8.19 A kite is a graph on an even number of vertices, say $2n$, in which $n$ of the Read More …
Is rejection sampling the only way to get a truly uniform distribution of random numbers?
Problem Detail: Suppose that we have a random generator that outputs numbers in the range $[0..R-1]$ with uniform distribution and we need to generate random numbers in the range $[0..N-1]$ with uniform distribution. Suppose that $N < R$ and $N$ does Read More …
What is the purpose of Mark field in Fibonacci Heaps?
Problem Detail: In Fibonacci heaps, we keep a mark field for every node in the heap. Initially all the nodes are unmarked. Once a node is deleted, its parent is marked. If a node is deleted and its parent is already Read More …
How does binary addition work?
Problem Detail: I find binary confusing. I have watched minecraft redstone videos on binary adders, real binary adders, diagrams, etc and yet I have not learned much at all. How does electrons flowing through wires made of gold “add/subtract” to make Read More …