Problem Detail: By a vanilla Turing machine, I mean a Turing machine with one tape (no special input or output tapes). The problem is as follows: the tape is initially empty, other than a string of $n$ $1$s and $0$s terminated Read More …
Blog
Sorting as a linear program
Problem Detail: A surprising number of problems have fairly natural reductions to linear programming problems. See Chapter 7 of [1] for examples of network flows, bipartite matching, zero-sum games, shortest paths, a form of linear regression, and even circuit evaluation! Since Read More …
P, NP and specialised Turing Machines
Problem Detail: I’m sort of new, but very interested to the field of computing and complexity theory, and I want to clarify my understanding about how to class problems, and how strongly the problems relate to the machine being used to Read More …
Why is the consensus number for test-and-set, 2?
Problem Detail: According to Wikipedia, The test-and-set operation can solve the wait-free consensus problem for no more than two concurrent processes. Why can’t it solve the problem for more than two processes? Asked By : ben Answered By : Roy O. Just to Read More …
Why does this sort algorithm work?
Problem Detail: The following O(n^2) sorting algorithm works but I can’t figure out why. array a // length n, indexed 0 to n-1 for ( i = 0; i < n; i++) for ( j = 0; j < n; j++) Read More …
Algorithms computing if a number is a multiple of 3
Problem Detail: When doing mental calculus one can do: Given an integer k, sum all the digits (in base 10), and if the result is a multiple of 3, then k is a multiple of 3. Do you know of any Read More …
If I have a large random array of 0s and 1s that I want to sort what kind of an algorithm and data structures should I consider?
Problem Detail: What are the types of things that need to be considered if I need to sort a large random array of 0s and 1s? You can assume large array is in the order of million or billions. I understand Read More …
Closure of Deterministic context-free languages under prefix
Problem Detail: For a formal language $L subseteq Sigma^{*}$ I define the set Pref(L) to be: $text{pref}(L) = {alpha in Sigma^{*} : exists beta in Sigma^{*} text{ such that } alpha beta in L}$ ie. the set of all (not necessarily Read More …
Why is not known whether integer factorization can be done in polynomial time knowing how to do primality tests efficiently?
Problem Detail: First of all, I have just started studying computer science by myself and maybe I just need some clarification of what “polynomial time” means regarding the time complexity of an algorithm and references to study it well. As I Read More …
Why doesn’t Knuth’s linear-time multiplication algorithm “count”?
Problem Detail: The wikipedia page on multiplication algorithms mentions an interesting one by Donald Knuth. Basically, it involves combining fourier-transform multiplication with a precomputed table of logarithmically-sized multiplications. It runs in linear time. The article acts like this algorithm somehow doesn’t Read More …