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 …
Blog
[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]: 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]: 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]: Halting problem
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 …
[Solved]: Why are pushdown automata countable?
Problem Detail: I began a chapter in a textbook on computational theory where they begin to talk about decidable languages. The problems in this section are pretty confusing and I honestly don’t know how to begin them because I’m not 100% Read More …
[Solved]: Quantifiers in lambda calculus
Problem Detail: I’m learning lambda calculus, however I’m quite confused about the quantifiers in lambda calculus. As far as I know, quantifiers such as “∃” are concepts of first order logic (FOL), which are not needed by lambda calculus. Moreover, I Read More …
[Solved]: Binary rooted tree isomorphism
Problem Detail: My trees are rooted and have at most two children at every vertex. I need references that help me solve any or all of the questions below: How many isomorphism classes of trees with n vertices are there? What Read More …
[Solved]: Is $L_p$ decidable when p is a trivial property?
Problem Detail: If $qquaddisplaystyle L_p = { langle M rangle : p in P(L(M)) text{ s.t. } p text{ is a specific trivial property} }$, where a trivial property is a property that is shared by all recursively enumerable languages or Read More …
[Solved]: A hash function with predicted collisions
Problem Detail: As far as I know, the more collision-resistant a hash function is, the better. But is there any way to define a hash function with predicted collisions? In other words, a hash function that collides for some known set Read More …