Problem Detail: I’m writing a context-free grammar that I hope will be in Chomsky Normal Form, and I have two questions: Can I use a single variable (a non-terminal) on the left-hand side of multiple rules? Can I use a single Read More …
Category: Uncategorized
[Solved]: From the LR(1) parsing table, can we deduce that it is also an LALR and SLR table?
Problem Detail: There is this question I read somewhere but could not answer myself. Assume I have an LR(1) Parsing table. Is there any way that just by looking at it and its items, can I deduce that it is also Read More …
[Solved]: Reduction between $Sigma^*$ and $emptyset$
Problem Detail: Throughout the subject of reductions, I was wondering: If we take $L_1 = Sigma^* $ and $L_2 = emptyset$, is $L_1 leq L_2$? is $L_2 leq L_1$? What I mean is, Is there some sort of reduction between any Read More …
[Solved]: Why is the running time of edit distance with memoization $O(mn)$?
Problem Detail: I understand without memoization it is going to be $O(3^{max,{m,n}})$ because every call results in extra three calls: thus we end up having a call tree with three children for each node, with height $max,{m,n}$, m and n being Read More …
[Solved]: Turn biased random number generator into uniform
Problem Detail: I’m looking at a problem in the book Introduction to Algorithms by Cormen et al. It says that if we are given a random number generator rand() which satisfies the distribution: $P(X = 0) = p,;;P(X=1)=1-p,;;0<p<1$, then we can Read More …
[Solved]: Reconstructing files from binary
Problem Detail: Popular view tells us that any kind of information is just a collection of bits, that is zeroes and ones placed in a particular order. I was thus having this thought. Suppose that I have some kind of file Read More …
[Solved]: Distributed algorithms – $alpha, beta$ synchronizers
Problem Detail: I experience a difficulty in solving exercises in distributed algorithm. Below is the the exercise I try to solve, it looks like I miss basic idea. Exercise. Consider a 15-processor asynchronous network with processors 0,…,14. The processors constantly run Read More …
[Solved]: Studying Programming Language Theory
Problem Detail: I have recently become extremely interested in understanding and proving aspects of (functional) programming languages. However as I dive deeper in, things like $lambda$ calculus, category theory, and denotational semantics are a little difficult to grok without proper explanation. Read More …
[Solved]: Measuring the difficulty of SAT instances
Problem Detail: Given an instance of SAT, I would like to be able to estimate how difficult it will be to solve the instance. One way is to run existing solvers, but that kind of defeats the purpose of estimating difficulty. Read More …
[Solved]: If algorithm runs $theta(n)$ in time T, doubling input size has what effect on time T?
Problem Detail: In other words, is there a relationship between the step size and the actual running time? Suppose that the algorithm is run on identical machine. Asked By : Beached Whale Answered By : David Richerby There’s no clear relationship, except that Read More …