Problem Detail: I have some concerns about the Halting problem. This is the proof I know: Let $h(M, i)$ be a function, $M$ being Turing machine and $i$ input for the Turing machine. Let $h(M, i)$ output true whenever $M(i)$ halts. Read More …
Category: Uncategorized
[Solved]: Proof of correctness of A star search algorithm
Problem Detail: I’ve been looking for the proof of correctness for the A star (A*) algorithm but none of the texts and websites offer it. Mostly they are talking about the proof of optimality of the A* algorithm. I’m looking for Read More …
[Solved]: What is the result of multiplying O(n) and Ω(n)?
Problem Detail: If $f(x) = Omega(n)$ and $g(x)= O(n)$, what would be the order of growth of $f(x) cdot g(x)$ ? First I figured it should $Theta(n)$ , as two extremes would cancel each other and the order of growth will Read More …
[Solved]: Use dynamic programming to find a subset of numbers whose sum is closest to given number M
Problem Detail: Given a set $A$ of $n$ positive integers $a_1, a_2,ldots, a_n$ and another positive integer $M$, I’m going to find a subset of numbers of $A$ whose sum is closest to $M$. In other words, I’m trying to find Read More …
[Solved]: Algorithm to determine two binary expression trees will give the same result based on associative and commutative properties of some operators
Problem Detail: Given n different numbers, I would like to find out whether there exists an algebraic expression using all the n numbers, with n−1 binary operators and unlimited number of parentheses, that evaluates to a certain number T. My idea Read More …
[Solved]: Relation between RAM and Turing machine
Problem Detail: Denote $D$ a set of finite sequences of integers. In Papadimitriou’s “Computational Complexity” in theorem 2.5 it is proved that if a RAM program $Pi$ computes a function $phi$ from $D$ to integers in time $f(n)$, then there is Read More …
[Solved]: Reflection on Concurrency
Problem Detail: Reflection is a common mechanism for accessing and changing the structure of a program at run-time, found in many dynamic programming languages such as Smalltalk, Ruby and Python, and in impoverished form in Java and (hence) Scala. Functional languages Read More …
[Solved]: Team construction in tri-partite graph
Problem Detail: The government wants to create a team with one alchemist, one builder, and one computer-scientist. In order to have good cooperation, it is important that the 3 team-members like each other. Therefore, the government gathers $k$ candidates of each Read More …
[Solved]: Is this NP-hard: min-weight n-clique in a complete n-partite graph
Problem Detail: I have a complete $n$-partite graph, where each partite set has $n$ vertices (yes it’s also $n$), so the graph has $n^2$ vertices in total. My problem is to find a minimum weight $n$-clique in the graph. I would Read More …
[Solved]: What if the electricity goes off while a file is being renamed?
Problem Detail: Suppose I’m renaming a file and the electricity goes off right in the middle. Naively, it looks like the file could be in some “half-renamed” state. Maybe the name would have half the old name and half the new Read More …