Most Popular
1500 questions
12
votes
12 answers
Why are mathematical proofs so hard?
I am an electrical engineer and trying to make a transition into machine learning. I read in multiple articles that I have to learn data structures and algorithms, before this I have to learn about mathematical proofs. I started studying it on my…
user28324
- 249
- 1
- 2
- 5
12
votes
4 answers
Are there competitions for integer programming?
Are there competitions for integer programming like there are for SAT and MAXSAT?
Omar Shehab
- 326
- 1
- 10
12
votes
2 answers
Is there a formal CS definition of VCS and file versions?
I don't know whether it was a joke, but once I read what was referred to as a formal definition of a file in a versioning system such as git, hg or svn. It was something like a mathematical object like a homeomorphism. Was that a joke or is there…
Niklas Rosencrantz
- 1,016
- 1
- 9
- 22
12
votes
3 answers
Minimum circles to cover a set of points and avoid another set of points
Points are in 2d euclidean space. Given a set of n points, A, and a set of m points, B, what is the minimally sized set of circles such that this set of circles covers all points in A and no point in B is covered by a circle?
circles can have…
user3494047
- 281
- 2
- 8
12
votes
2 answers
How to deal with arrays during Hoare-style correctness proofs
In the discussion around this question, Gilles mentions correctly that any correctness proof of an algorithm that uses arrays has to prove that there are no out-of-bounds array accesses; depending on the runtime model, this would cause a runtime…
Raphael
- 73,212
- 30
- 182
- 400
12
votes
2 answers
Why does Coq include let-expressions in its core language
Coq includes let-expressions in its core language.
We can translate let-expressions to applications like this:
let x : t = v in b ~> (\(x:t). b) v
I understand that this does not always work because the value v would not be available when…
Labbekak
- 575
- 3
- 11
12
votes
1 answer
Time Complexity of Universal Turing Machine Simulations and the Time Hierarchy Theorem
I have a little problem to understand the proof of the Time Hierarchy Theorem (Hennie and Stearns, 1966) that ensures the existence of a language acceptable in $U(n)$ but not acceptable in $T(n)$ for any functions $T(n),U(n)$, such that $U(n)$ is…
042
- 706
- 4
- 10
12
votes
1 answer
Is the 0-1 Knapsack problem where value equals weight NP-complete?
I have a problem which I suspect is NP-complete. It is easy to prove that it is NP. My current train of thought revolves around using a reduction from knapsack but it would result in instances of 0-1-Knapsack with the value of every item being equal…
Zeta Two
- 255
- 2
- 6
12
votes
3 answers
Correctness of Strongly Connected Components algorithm for a directed graph
I have been reading up on algorithm for finding the strongly connected components in a directed graph $G=(V,E)$. It considers two DFS search and the second step is transposing the original graph $G^T$.
The algorithm is the following :
Execute DFS…
Geek
- 1,191
- 1
- 10
- 12
12
votes
4 answers
Can an FSA count?
This may be a silly question. It seem clear that an FSA, since it is finite, can only count the number of symbols in its input string up to a number bounded by the number of its states. But now suppose we equip the FSA with output (e.g. printing)…
Torbjörn
- 131
- 1
- 5
12
votes
2 answers
Fair cake-cutting when players join late
The usual statement of the fair cake-cutting problem assumes that all $n$ players get their share at the same time. However, in many cases the players arrive incrementally. For example, we may divide a cake over $n$ players, but then a new player…
Erel Segal-Halevi
- 6,088
- 1
- 25
- 60
12
votes
1 answer
How to detect sunshine on a photo
How would you algorithmically detect for any given photo whether the sun was shining when the picture was taken?
Examples
A sample from this webcam at a mountain top:
Clearly the sun is shining.
In this other sample it's far less obvious:
One…
Marcel Stör
- 221
- 1
- 5
12
votes
5 answers
Is there any use case for the bottom type as a function parameter type?
If a function has return type of ⊥ (bottom type), that means it never returns. It can for example exit or throw, both fairly ordinary situations.
Presumably if a function had a parameter of type ⊥ it could never (safely) be called. Are there ever…
bdsl
- 221
- 1
- 4
12
votes
1 answer
A pumping lemma for deterministic context-free languages?
The pumping lemma for regular languages can be used to prove that certain languages are not regular, and the pumping lemma for context-free languages (along with Ogden's lemma) can be used to prove that certain languages are not context-free.
Is…
templatetypedef
- 9,302
- 1
- 32
- 62
12
votes
6 answers
Can a Turing machine decide the language $L_\emptyset$ of machines with empty language?
Let $$L_\emptyset = \{\langle M\rangle \mid M \text{ is a Turing Machine and }L(M)=\emptyset\}.$$
Is there a Turing machine R that decides (I don't mean recognizes) the language $L_\emptyset$?
It seems that the same technique used to show that $\{A…
Mahdi
- 589
- 3
- 6
- 10