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 …
Category: Uncategorized
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 …
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 …
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 …
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 …
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 …
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 …
What are the conditions for a NFA for its equivalent DFA to be maximal in size?
Problem Detail: We know that DFAs are equivalent to NFAs in expressiveness power; there is also a known algorithm for converting NFAs to DFAs (unfortunately I do now know the inventor of that algorithm), which in worst case gives us $2^S$ Read More …
maze solving algorithms (pledge algorithm)
Problem Detail: I saw this maze, and tried to apply pledge algorithms to it. But I am not able to solve this maze using this algorithm. What am I missing/doing incorrectly? PLEDGE ALGORITHM: in both cases we don’t get to exit. Read More …
Proof that Hamiltonian cycle/circuit with a specified edge is NP-complete
Problem Detail: I’m a little stuck on this question, any help would be appreciated! Given that the Hamiltonian Path (HP) and the Hamiltonian Circuit/Cycles (HC) problems are known to be NP-complete, show that HCE is NP-complete. HCE: Given an undirected graph Read More …