Problem Detail: I want to prove that grammar $$ begin{cases} S’rightarrow S Srightarrow aSb ~|~ A Arightarrow bA~|~b end{cases} $$ isn’t $LR(1)$. I’ve constructed parser table and got Shift-Reduce conflict. I want to prove that without parser table, using another $LR(1)$ Read More …
Category: Uncategorized
[Solved]: Undecidability of a restricted version of the acceptance problem
Problem Detail: It’s known that the following language, the so-called acceptance problem is undecidable: $A_{TM} = {langle M,wrangle,vert,Mtext{ is a TM which accepts }w}$ The proof is by contradiction: Assume there is a TM $H$ which decides $A_{TM}$. Let $D$ be Read More …
[Solved]: Algorithm for computing volume of union or intersection of n-dimensional convex polytopes given their facets?
Problem Detail: I’ve googled this problem somewhat pretty extensively, and all the relevant literature understandably deals with 2-d or 3-d cases, rather than the n-d case. EDIT: Yes, ℝn. I’ve done many searches combining terms like union, intersection, volume, convex hulls, Read More …
[Solved]: For every computable function $f$ does there exist a problem that can be solved at best in $Theta(f(n))$ time?
Problem Detail: For every computable function $f$ does there exist a problem that can be solved at best in $Theta(f(n))$ time or is there a computable function $f$ such that every problem that can be solved in $O(f(n))$ can also be Read More …
[Solved]: Why is the processor’s pipeline delay calculated as N*max(Delay) ? why not N*(D1 + D2 + D3 … )?
Problem Detail: Consider a four stage pipeline, and each stage has delays D1, D2, D3 and D4, so the total delay because of the various stages should be N * (D1 + D2 + D3 + D4) where N is the Read More …
[Solved]: Is the image of a function the codomain of a function?
Problem Detail: Here is a definition from the functions section in my discrete math textbook (Discrete Mathematics and its Applications 7e, Rosen 2012): Let $f$ be a function from $A$ to $B$, and let $S$ be a subset of $A$. The Read More …
[Solved]: How does insertion work in an AVL tree?
Problem Detail: From the above image, while trying to maintain an AVL tree data structure, how would the tree look after inserting the value 10? Also, if anyone has any suggestions or simple method of rotating, feel free to share. Read More …
[Solved]: How to enumerate combinations in parallel
Problem Detail: I have $ntimes k$ matrix with $k<n$ and I would like to find all its $nchoose k$ submatrices which are $ktimes k$ matrices that are the concatenations of all possible $k$ rows. Actually I tried to do it with Read More …
[Solved]: Time complexity for count-change procedure in SICP
Problem Detail: In famous Structure and Interretation of Computer Programs, there is an exercise (1.14), that asks for the time complexity of the following algorithm – in Scheme – for counting change (the problem statement suggests drawing the tree for (cc Read More …
[Solved]: How to prove that $n(log_3(n))^5 = O(n^{1.2})$?
Problem Detail: This a homework question from Udi Manber’s book. Any hint would be nice 🙂 I must show that: $n(log_3(n))^5 = O(n^{1.2})$ I tried using Theorem 3.1 of book: $f(n)^c = O(a^{f(n)})$ (for $c > 0$, $a > 1$) Substituing: Read More …