Problem Detail: I’m reading few proofs which prove a given problem is NP complete. The proof technique has following steps. Prove that current problem is NP, i.e., given a certificate, prove that it can be verified in polynomial time. Take any Read More …
Author: ignougroup
Is this grammar LR(1)
Problem Detail: I am reading parser chapter from dragon book and I found a grammar over there – $ S rightarrow L=R $ $ S rightarrow R $ $L rightarrow *R $ $L rightarrow id $ $R rightarrow L $ Now Read More …
Is this language regular or non-regular: {ww : w ∈ {a,b}* }
Problem Detail: This is a question from a text book that’s giving me some trouble. The question is: Determine whether or not this language is regular. Justify your answer. $$L = {ww : w in {a,b}^* }$$ I think this language Read More …
Is computation expression the same as monad?
Problem Detail: I’m still learning functional programming (with f#) and I recently started reading about computation expressions. I still don’t fully understand the concept and one thing that keeps me unsure when reading all the articles regarding monads (most of them Read More …
Correctness proof of greedy algorithm for 0-1 knapsack problem
Problem Detail: We have a 0-1 knapsack in which the increasing order of items by weight is the same as the decreasing order of items by value. Design a greedy algorithm and prove that the greedy choice guarantees an optimal solution. Read More …
Why are NP-complete problems so different in terms of their approximation?
Problem Detail: I’d like to begin the question by saying I’m a programmer, and I don’t have a lot of background in complexity theory. One thing that I’ve noticed is that while many problems are NP-complete, when extended to optimization problems, Read More …
Multitape Turing machines against single tape Turing machines
Problem Detail: Introduction: I recently learned that a multi-tape Turing Machine $text{TM}_k$ is no more “powerful” than a single tape Turing machine $text{TM}$. The proof that $text{TM}_k equiv text{TM}$ is based on the idea that a $text{TM}$ can simulate a $text{TM}_k$ Read More …
Do not understand why log n = O(n^c) (for any c>0)
Problem Detail: Can anyone help me understand this equation? $log (n) = O(n^c)$ (for any $c>0$) Does it mean that $O(log (n)) < O(n^c)$ (for any $c>0$)? Added: Please also prove that $log (n) = O(n^c)$ is true. Asked By : Xin Read More …
Books to prepare before reading Knuth’s The Art Of Computer Programming (TAOCP)
Problem Detail: Many people say that TAOCP is not supposed to be read as a book (actually a volume of books), but if I decide to go that way, which math/computer science books/topics do I need to study to help me 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 …