Problem Detail: This is a question I found in a practice exam while I am preparing for my mid term exam. The answer needs justification, either a pseudo code or a logical explanation why not. What puzzled me about that question Read More …
Category: Uncategorized
[Solved]: When testing n items, how to cover all t-subsets by as few s-subsets as possible?
Problem Detail: This problem arose from software testing. The problem is a bit difficult to explain. I will first give an example, then try to generalize the problem. There are 10 items to be tested, say A to J, and a Read More …
[Solved]: Complement of HAMPATH
Problem Detail: Is the complement of the Hamiltonian Path problem known to be in $mathsf{NP}$? I could not find explanations saying that it is, but then neither were there any claims saying that it is not in $mathsf{NP}$. Asked By : pnp Read More …
[Solved]: Which problems are hard for P^NP?
Problem Detail: Quantified Boolean formulae are the prime examples of problems that are hard for the polynomial hierarchy, i.e., for the $Pi$ and $Sigma$ versions of it. However, there is also the $Delta$ version, defined as $Delta_{i+1}^{rm P} := {rm P}^{Sigma_i^{rm Read More …
[Solved]: Algorithm analysis in the presence of undefined functions
Problem Detail: I wonder how we can perform algorithm analysis when in an algorithm we have calls of functions whose definition we do not know, e.g. functions delivered by external libraries. Asked By : marekszpak Answered By : David Richerby There are two Read More …
[Solved]: Is summing over all possible $k$-combinations NP-hard?
Problem Detail: Say we have a set of numbers $A={a_1, a_2, dots, a_n}$, and we wish to sum over all possible combinations of $k$ terms to compute $$ sum_{substack{C subseteq {1,2,dots,n} |C|=k}} prod_{c in C} a_c $$ Naively this requires $O(kbinom{n}{k})$ Read More …
[Solved]: A variant of the busy beaver function
Problem Detail: Reading this question “Natural RE undecidable problems but not Turing-complete” the following language came to my mind: If $Sigma(cdot)$ is the busy beaver function (maximum attainable score among all halting 2-symbol n-state Turing machines of the above-described type, when Read More …
[Solved]: Ordering elements so that some elements don’t come between others
Problem Detail: Given an integer $n$ and set of triplets of distinct integers $$S subseteq {(i, j, k) mid 1le i,j,k le n, i neq j, j neq k, i neq k},$$ find an algorithm which either finds a permutation $pi$ Read More …
[Solved]: How can I compute the average weight of an undirected graph?
Problem Detail: Given a weighted, undirected graph $G = (V,E)$, how can I compute the average weight of edges? It seems an easy problem (divide the total weight to the number of edges!) but I couldn’t manage to find the sum Read More …
[Solved]: ILP and number of variables in constraints
Problem Detail: This question is about the time impact of the length (i.e. number of variables) of the constraints in an Integer Linear Programming formulation. Most people try to reach the minimum number of constraints/variables, but I couldn’t find anything that Read More …