Most Popular
1500 questions
36
votes
5 answers
What does being Turing complete mean?
I see that most definitions of what it is to be Turing-complete are tautological to a degree. For example if you Google "what does being Turing complete mean", you get:
A computer is Turing complete if it can solve any problem that a Turing machine…

sashoalm
- 437
- 1
- 4
- 9
36
votes
3 answers
What are very short programs with unknown halting status?
This 579-bit program in the Binary Lambda Calculus has unknown halting…

MaiaVictor
- 4,127
- 1
- 17
- 33
36
votes
4 answers
What is dynamic programming about?
Sorry in advance if this question sounds dumb...
As far as I know, building an algorithm using dynamic programming works this way:
express the problem as a recurrence relation;
implement the recurrence relation either via memoization or via a…

hey hey
- 463
- 4
- 5
36
votes
7 answers
Why is selection sort faster than bubble sort?
It is written on Wikipedia that "... selection sort almost always outperforms bubble sort and gnome sort." Can anybody please explain to me why is selection sort considered faster than bubble sort even though both of them have:
Worst case time…

RYO
- 501
- 1
- 5
- 8
36
votes
2 answers
Are there improvements on Dana Angluin's algorithm for learning regular sets
In her 1987 seminal paper Dana Angluin presents a polynomial time algorithm for learning a DFA from membership queries and theory queries (counterexamples to a proposed DFA).
She shows that if you are trying to learn a minimal DFA with $n$ states,…

Artem Kaznatcheev
- 4,862
- 2
- 27
- 57
36
votes
2 answers
Planar regular languages
In my class a student asked whether all finite automata could be drawn without crossing edges (it seems all my examples did). Of course the answer is negative, the obvious automaton for the language $\{\; x\in\{a,b\}^* \mid \#_a(x)+2\#_b(x) \equiv 0…

Hendrik Jan
- 30,578
- 1
- 51
- 105
35
votes
2 answers
Why are there more non-computable functions than computable ones?
I'm currently reading a book in algorithms and complexity. At the moment I'm, reading about computable and non-computable functions, and my book states that there are many more functions that are non-computable than computable, in fact the majority…

hsalin
- 733
- 7
- 7
35
votes
2 answers
NP-Hard problems that are not in NP but decidable
I'm wondering if there is a good example for an easy to understand NP-Hard problem that is not NP-Complete and not undecidable?
For example, the halting problem is NP-Hard, not NP-Complete, but is undecidable.
I believe that this means that it is a…

oneself
- 453
- 4
- 5
35
votes
1 answer
What is Temperature in LSTM (and neural networks generally)?
One of the hyperparameters for LSTM networks is temperature. What is it?

Justin Shenk
- 1,025
- 1
- 9
- 15
35
votes
11 answers
Why is data in computer science considered to be discrete?
I understand that "structure" of data is totally dependent on Boolean Algebra, but:
Why is data considered to be a discrete mathematical entity rather than a continuous one?
Related to this:
What are the drawbacks, or invariants, that are…

evil_potato
- 1,362
- 2
- 12
- 11
35
votes
2 answers
on "On the cruelty of really teaching computing science"
Dijkstra, in his essay On the cruelty of really teaching computing science, makes the following proposal for an introductory programming course:
On the one hand, we teach what looks like the predicate calculus, but we do it very differently from…

Matthew Towers
- 568
- 5
- 12
35
votes
7 answers
What are the simplest examples of programs that we do not know whether they terminate?
The halting problem states there is no algorithm that will determine if a given program halts. As a consequence, there should be programs about which we can not tell whether they terminate or not. What are the simplest (smallest) known examples of…

MaiaVictor
- 4,127
- 1
- 17
- 33
35
votes
6 answers
Uniform sampling from a simplex
I am looking for an algorithm to generate an array of N random numbers, such that the sum of the N numbers is 1, and all numbers lie within 0 and 1. For example, N=3, the random point (x, y, z) should lie within the triangle:
x + y + z = 1
0 < x <…

Ruofeng
- 453
- 1
- 4
- 4
35
votes
5 answers
Enumerate all non-isomorphic graphs of a certain size
I'd like to enumerate all undirected graphs of size $n$, but I only need one instance of each isomorphism class. In other words, I want to enumerate all non-isomorphic (undirected) graphs on $n$ vertices. How can I do this?
More precisely, I want…

D.W.
- 159,275
- 20
- 227
- 470
35
votes
2 answers
What is the difference between quantum TM and nondetermistic TM?
I was going through the discussion on the question How to define quantum Turing machines? and I feel that quantum TM and nondetermistic TM are one and the same. The answers to the other question do not touch on that. Are these two models one and the…

bongubj
- 563
- 1
- 6
- 11