Answered By : Shaull Assuming you mean simple cycles (otherwise the number is infinite) – yes, of course the number can be exponential: consider the complete graph on $n$ vertices, then every sequence of distinct vertices can be completed to a Read More …
Category: Uncategorized
What are handles in parsing?
Answered By : Alex ten Brink Let’s consider the following grammar: 1: $S to A b$ 2: $S to B b$ 3: $A to a a$ 4: $B to a a a$ Obviously, this language is totally uninteresting: the only words Read More …
Why is linear programming in P but integer programming NP-hard?
Answered By : Benjamin Lindqvist I can’t comment since it requires 50 rep, but there are some misconceptions being spread about, especially Raphael’s comment “In general, a continous domain means there is no brute force (and no clever heuristics to speed Read More …
Learning Automated Theorem Proving
Answered By : Dave Clarke My preference is for Coq, but I imagine that others prefer Isabelle. One of the strange things I found about Isabelle is that there is a two-level syntax, where some of your definitions need to be Read More …
Complexity of Towers of Hanoi
Answered By : JeffE No, the problem you’ve described is actually quite easy. The high-level reason is that the index $i$ is roughly $n$ bits long, so we can actually afford to spend time polynomial in $n$. Consider the following related Read More …
What is the advantage of Randomized Quicksort?
Answered By : Jernej If the input array is distributed uniformly at random then (as you noted) there is no difference between always picking an element at a fixed position (for example the middle one as you suggest) or picking an Read More …
Theoretical machines which are more powerful than Turing machines
Answered By : Yuval Filmus The Church–Turing thesis (in one formulation) states that everything that can be physically computable can also be computed on a Turing machine. Assuming you believe this theses, and given that you’re interested in functions which such Read More …
Why are these (lossless) compression methods of many similar png images ineffective?
Answered By : Raphael Have a look at how compression algorithms work. At least those in the Lempel-Ziv family (gzip uses LZ77, zip apparently mostly does as well, and xz uses LZMA) compress somewhat locally: Similarities that lie far away from Read More …
Applying Expectation Maximization to coin toss examples
Answered By : Nicholas Mancuso (This answer uses the second link you gave.) $newcommand{Like}{text{L}}newcommand{E}{text{E}}$Recall the definition of likelihood: $$Like[theta | X] = Pr[X| theta] = sum_Z Pr[X, Z | theta]$$ where in our case $theta = (theta_A, theta_B)$ are the estimators Read More …
What is the asymptotic runtime of this nested loop?
Answered By : Gilles The result is correct, but your reasoning is not. You can’t mix big-oh with ellipses. It happens to work here because of extra conditions that happen to be true but that you haven’t checked. Why summing big-ohs Read More …