Most Popular
1500 questions
13
votes
1 answer
Is there an isomorphism between (subset of) category theory and relational algebra?
It comes from big data perspective. Basically, many frameworks (like Apache Spark) "compensate" lack of relational operations by providing Functor/Monad-like interfaces and there is a similar movement towards cats-to-SQL conversions (Slick in…
dk14
- 243
- 1
- 7
13
votes
2 answers
Is a unary language regular iff its exponent is a linear function?
While doing the current assignment for my formal languages and automata course, I kind of got stuck on exercises involving unary languages (I hope that's the right term), i.e., languages which build upon a single letter. I don't want to ask about…
SEJPM
- 325
- 2
- 11
13
votes
3 answers
How is this grammar LL(1)?
This is a question from the Dragon Book. This is the grammar:
$S \to AaAb \mid BbBa $
$A \to \varepsilon$
$B \to \varepsilon$
The question asks how to show that it is LL(1) but not SLR(1).
To prove that it is LL(1), I tried constructing…
Vinayak Garg
- 457
- 1
- 7
- 18
13
votes
2 answers
What is a "contradiction" in constructive logic?
In Practical Foundations for Programming Languages, Robert Harper says
If for a proposition to be true means to have a proof of it, what does it mean for a proposition to be false? It means that we have a refutation of it, showing that it cannot be…
afsmi
- 307
- 1
- 6
13
votes
2 answers
Does linear programming admit a strongly polynomial-time algorithm?
The linear programming problem: find a strongly-polynomial time algorithm which for given matrix A ∈ Rm×n and b ∈ Rm decides whether there exists x ∈ Rn with Ax ≥ b.
I know that Steve Smale's lists some of the unsolved problems in mathematics. But…
Krebto
- 244
- 3
- 13
13
votes
2 answers
Proving tautology with coq
Currently I have to learn Coq and don't know how to deal with an or :
As an example, as simple as it is, I don't see how to prove:
Theorem T0: x \/ ~x.
I would really appreciate it, if someone could help me.
For reference I use this cheat…
Imago
- 425
- 4
- 17
13
votes
5 answers
Goldbach Conjecture and Busy Beaver numbers?
Background: I am a complete layman in computer science.
I was reading about Busy Beaver numbers here, and I found the following passage:
Humanity may never know the value of BB(6) for certain, let alone that of BB(7) or any higher number in the…
Ovi
- 317
- 2
- 5
13
votes
1 answer
Proof that a randomly built binary search tree has logarithmic height
How do you prove that the expected height of a randomly built binary search tree with $n$ nodes is $O(\log n)$? There is a proof in CLRS Introduction to Algorithms (chapter 12.4), but I don't understand it.
user1675999
- 1,037
- 6
- 16
- 23
13
votes
1 answer
Algorithmic consequences of algebraic formula for partition function?
Bruinier and Ono have found an algebraic formula for the partition function, which was widely reported to be a breakthrough. I am unable to understand the paper, but does it have any algorithmic consequences for fast computation of the partition…
sdcvvc
- 3,511
- 19
- 28
13
votes
5 answers
Why is b-tree search O(log n)?
B-tree is a data structure, which looks like this:
If I want to look for some specific value in this structure, I need to go through several elements in root to find the right child-node. The I need to go through several elements in the child-node…
Eenoku
- 252
- 1
- 2
- 10
13
votes
1 answer
What functions can combinator calculus expressions compute?
A combinator expression (let's say in the SK basis) can be thought of as a function that maps combinator calculus expressions to combinator calculus expressions. That is, one can think of an expression $X$ as a function $X:L \to L$, where $L$ is the…
N. Virgo
- 1,006
- 5
- 21
13
votes
2 answers
If P=NP, are there cryptosystems that would require n^2 time to break?
If P does equal NP, will it still be possible do design a cryptosystem where the optimal cryptanalysis algorithm takes, say, the square of the time taken up by the legitimate encryption and decryption algorithms? Do any such algorithms already…
S.LAKSHMINARAYAN
- 245
- 1
- 7
13
votes
2 answers
A* graph search time-complexity
Some confusion about time-complexity and A*.
According to
A* Wiki the time-complexity is exponential in the depth of the solution (shortest path):
The time complexity of A* depends on the heuristic. In the worst case of an unbounded search space,…
User
- 540
- 1
- 3
- 15
13
votes
3 answers
What does Θ(1) memory mean?
I have the definition of an in-situ algorithm from the professor, but I don't understand it.
In-situ algorithms refer to algorithms that operate with Θ(1) memory.
What does that mean?
zeeks
- 139
- 1
- 3
13
votes
1 answer
Filling bins with pairs of balls
A bin is called full if it contains at least $k$ balls. Our goal is to make as many bins as possible full.
In the simplest scenario, we are given $n$ balls and may arrange them arbitrarily. In that case, obviously the best we can do is pick…
Erel Segal-Halevi
- 6,088
- 1
- 25
- 60