Problem Detail: The question is under the concept of LR parser. Suppose the original grammar is S->AA A->aA|b Is it necessary to add an additional rule S’->S to make it as augmented grammar? In short, I want to know the use Read More …
Category: Uncategorized
[Solved]: Can GDB debug itself?
Problem Detail: Can GDB be run on itself? How or why not? I see something about it http://www.math.utah.edu/docs/info/gdbint_3.html But GDB might not be written in a language that it can debug? Asked By : Dac Saunders Answered By : Dave Clarke Yes, it’s Read More …
[Solved]: Difference between free and global variables
Problem Detail: Is there any difference between free variable and global variable? Or they are just synonyms? In which situations I should use one or another? Asked By : rook Answered By : Gilles They don’t play in the same category. The notion Read More …
[Solved]: Are there any problems in $APX – PTAS$ that are not $APX$-complete?
Problem Detail: I have a question about the structure of the complexity class $APX$. Obviously, unless $P=NP$, no problem in the class $PTAS$ can be $APX$-complete (under the AP-reduction). However, what about the rest of problems in $APX$? Are there any Read More …
[Solved]: Size of the universe for van Emde Boas Trees
Problem Detail: In order to achieve the time complexity of $O(log log u)$ for van Emde Boas trees I read in this lecture that the the universe size $u$ is chosen as $u = 2^{2^k}$ for some integer $k$ for van Read More …
[Solved]: Why is this $f(n) leq 6n^3 + n^2 log n in O(n^3)$ for all $n geq 1$?
Problem Detail: I’m currently studying for an algorithms midterm in about 2 days and am reading from the beginning of the course, and stumbled upon this when I actually looked at the examples. The question equation: $f(n) = 6n^3 + n^2log Read More …
[Solved]: For a Turing Machine $M_1$, how is the set of machines $M_2$ which are “shorter” than $M_1$ and which accept the same language decidable?
Problem Detail: I wonder how come that the following language is in $mathrm R$. $L_{M_1}=Bigl{langle M_2rangle ;Big|;; M_2 text{ is a TM, and } L(M_1)=L(M_2), text{ and } |langle M_1rangle| > | langle M_2 rangle| Bigr} $ (I know that it’s Read More …
[Solved]: Is there a way of objectively measuring the efficiency or quality of software or code design?
Problem Detail: I’ve been thinking about ways of measuring code, and, quite frankly, I can’t think of truly objective, semi-universal ways of evaluating the quality or “strength” of code to say, “Yes, this is better than that based on X, Y, Read More …
[Solved]: Efficiently finding $k$ smallest elements of Cartesian product
Problem Detail: Given lists $A_1, A_2, dots, A_n$ of non-negative numbers, I want to find the $k$ smallest elements of the Cartesian product $A_1 times A_2 times dots times A_n$ ordered by the value $x_1 + x_2 + dots + x_n$, Read More …
[Solved]: Automatic translation between formal languages
Problem Detail: There are parser generators (some of which are limited to certain classes of grammars) which, given a grammar, automatically generate a parser for that grammar. Would it be possible to make a general-purpose translator generator to automatically translate from Read More …