Most Popular
1500 questions
13
votes
2 answers
Do Higher Order Functions provide more power to Functional Programming?
I've asked a similar question on cstheory.SE.
According to this answer on Stackoverflow there is an algorithm that on a non-lazy pure functional programming language has an $\Omega(n \log n)$ complexity, while the same algorithm in imperative…
vz0
- 233
- 1
- 6
13
votes
2 answers
Identifying events related to dates in a paragraph
Is there an algorithmic approach to identify that dates given in a paragraph correlate to particular events (phrases) in the paragraph?
Example, consider the following paragraph:
In June 1970, the great leader took the oath. But it was only after…
check123
- 530
- 3
- 11
13
votes
3 answers
Why can't we flip the answer of a NDTM efficiently?
I read several times that it is not possible to flip the answer of a NDTM efficiently. However, I don’t understand why. For instance, given a NDTM $M$ that runs in $O(n)$, this text (section 3.3) states that it is unclear how another NDTM $T$ can…
user1494080
- 451
- 3
- 13
13
votes
1 answer
Swap space management during pure demand paging
The following is a doubt that I came across while doing a OS home assignment - however, it seems more concept-based than a straightforward coding question, so IMHO I don't think the homework tag is appropriate for this.
In a pure demand paging…
TCSGrad
- 602
- 7
- 15
13
votes
1 answer
Number of clique in random graphs
There is a family of random graphs $G(n, p)$ with $n$ nodes (due to Gilbert). Each possible edge is independently inserted into $G(n, p)$ with probability $p$. Let $X_k$ be the number of cliques of size $k$ in $G(n, p)$.
I know that…
user1374864
- 641
- 3
- 6
13
votes
1 answer
Is any language that can express its own compiler Turing-complete?
A comment over on tex.SE made me wonder. The statement is essentially:
If I can write a compiler for language X in language X, then X is Turing-complete.
In computability and formal languages terms, this is:
If $M$ decides $L \subseteq…
Raphael
- 73,212
- 30
- 182
- 400
13
votes
2 answers
Fast hashing: combination of different techniques to identify changes in a file?
I want to create a fast way to detect whether a file might or might not be the same. For almost 100% sureness I would use an existing hash algorithm, e.g. SHA256.
However, the files are expected to be huge video files with several GB, so calculating…
Thomas Weller
- 271
- 2
- 9
13
votes
2 answers
Is there a theory/abstraction behind OOP?
Functional programming has the very elegant Lambda Calculus and its variants as a backup theory. Is there such a thing for OOP? What is an abstraction for the object oriented model?
Viclib
- 441
- 3
- 6
13
votes
2 answers
Kolmogorov Complexity: Why would you need more bytes than the string itself?
I was reading Wikipedia's entry on Kolmogorov Complexity (thanks to this question), which states:
It can be shown that the Kolmogorov complexity of any string cannot be more than a few bytes larger than the length of the string itself.
Why would…
loneboat
- 233
- 1
- 5
13
votes
3 answers
Multicore SAT Solver
I am trying to solve a 25k clauses 5k variables SAT problem. As it has been running for an hour (precosat) and I'd like to solve bigger ones afterwards, I'm looking for a multi-core SAT-Solver.
As there seem to be many SAT-Solvers, I'm quite…
multsatsolv
- 131
- 4
13
votes
1 answer
How do I find the shortest representation for a subset of a powerset?
I'm looking for an efficient algorithm for the following problem or a proof of NP-hardness.
Let $\Sigma$ be a set and $A\subseteq\mathcal{P}(\Sigma)$ a set of subsets of $\Sigma$. Find a sequence $w\in \Sigma^*$ of least length such that for each…
avakar
- 626
- 3
- 12
13
votes
2 answers
Tiling an orthogonal polygon with squares
Given an orthogonal polygon (a polygon whose sides are parallel to the axes), I want to find the smallest set of interior-disjoint squares, whose union equals the polygon.
I found several references to slightly different problems, such as:
Covering…
Erel Segal-Halevi
- 6,088
- 1
- 25
- 60
13
votes
5 answers
Reason to learn propositional & predicate logic
I can understand the importance that computer scientists or any software development related engineers should have understood the study of basic logics as a basis.
But is there any tasks/jobs that explicitly require the knowledge about these, other…
IsaacS
- 345
- 1
- 3
- 10
13
votes
1 answer
Restricted version of the Clique problem?
Consider the following version of the Clique problem where the input is of size $n$ and we're asked to find a clique of size $k$. The restriction is that the decision procedure cannot change the input graph into any other representation and cannot…
ShyPerson
- 937
- 6
- 23
13
votes
2 answers
How do I test if a polygon is monotone with respect to a line?
It's well known that monotone polygons play a crucial role in polygon triangulation.
Definition: A polygon $P$ in the plane is called monotone with respect to a straight line $L$, if every line orthogonal to $L$ intersects $P$ at most…
com
- 3,199
- 3
- 27
- 39