Problem Detail: I am interested in the time complexity of a compiler. Clearly this is a very complicated question as there are many compilers, compiler options and variables to consider. Specifically, I am interested in LLVM but would be interested in Read More …
Author: ignougroup
Why isn’t this undecidable problem in NP?
Problem Detail: Clearly there aren’t any undecidable problems in NP. However, according to Wikipedia: NP is the set of all decision problems for which the instances where the answer is “yes” have [.. proofs that are] verifiable in polynomial time by Read More …
Finding the height of a d-ary heap
Problem Detail: I would like to find the height of a d-ary heap. Assuming you have an Array that starts indexing at $1$ we have the following: The parent of a node $i$ is given by: $leftlfloorfrac{i+1}{d}rightrfloor$ The $d$ children of Read More …
Can all permutations of a set or string be generated in O(n log n) time?
Problem Detail: I was looking over this question requesting an algorithm to generate all permutations of a given string. A comment in the answer caught my eye: It might seem that it can take O(n) time per permutation, but if you Read More …
HALF CLIQUE – NP Complete Problem
Problem Detail: Let me start off by noting this is a homework problem, please provide only advice and related observations, NO DIRECT ANSWERS please. With that said, here is the problem I am looking at: Let HALF-CLIQUE = { $langle G Read More …
Difference between DPDA and NPDA?
Problem Detail: What are the major differences between Deterministic Push Down Automata and Non-deterministic Push Down Automata? Which one is faster and how? Also what are the drawbacks of DPDA with respect to NPDA. Can anyone quote an example and explain Read More …
Appropriate minor to go with CS major
Problem Detail: I thought this would be the best place for a question like this. Anyway, I was wondering what minor would go well with a Computer Science degree. I was considering a minor in math but I am not entirely Read More …
What is the complexity of this matrix transposition?
Problem Detail: I’m working on some exercises regarding graph theory and complexity. Now I’m asked to give an algorithm that computes a transposed graph of $G$, $G^T$ given the adjacency matrix of $G$. So basically I just have to give an Read More …
Rule of thumb to know if a problem could be NP-complete
Problem Detail: This question was inspired by a comment on StackOverflow. Apart from knowing NP-complete problems of the Garey Johnson book, and many others; is there a rule of thumb to know if a problem looks like an NP-complete one? I Read More …
Pizza commercial claim of 34 million combinations
Problem Detail: A pizza commercial claims that you can combine their ingredients to 34 million different combinations. I didn’t believe it, so I dusted off my rusty combinatorics skills and tried to figure it out. Here’s what I have so far: Read More …