Most Popular

1500 questions
14
votes
2 answers

What are potential pitfalls with having a minimal kernel that runs managed code?

Suppose I want to build an operating system based on a very small native lower kernel that acts as a managed code interpreter/runtime and a larger upper kernel compiled to a non-native machine language (Java bytecode, CIL, etc.). Examples of similar…
14
votes
2 answers

Do non-computable functions grow asymptotically larger?

I read about busy beaver numbers and how they grow asymptotically larger than any computable function. Why is this so? Is it because of the busy beaver function's non-computability? If so, then do all non-computable functions grow asymptotically…
hollow7
  • 527
  • 3
  • 7
14
votes
2 answers

Do computers actually use carry-lookahead adders?

There are plenty of details about carry lookahead adders such as Kogge-Stone, Lander-Fischer, etc. in college CS courses. They are described as "common in the industry". However, I can't find any evidence (aside from maybe the Manchester carry…
qwr
  • 628
  • 1
  • 7
  • 22
14
votes
1 answer

Why doesn't Knuth's linear-time multiplication algorithm "count"?

The wikipedia page on multiplication algorithms mentions an interesting one by Donald Knuth. Basically, it involves combining fourier-transform multiplication with a precomputed table of logarithmically-sized multiplications. It runs in linear…
Craig Gidney
  • 5,992
  • 1
  • 26
  • 51
14
votes
1 answer

When did $LR(k)$ acquire the meaning "left-to-right scan, rightmost derivation?"

According to the Wikipedia article, the L in $LR(k)$ means "left-to-right scan", and the "R" means "rightmost derivation." However, in Knuth's original paper on $LR(k)$ grammars, he defines $LR(k)$ (on page 610) as a language that is "translatable…
14
votes
3 answers

What does "non-pathological data" mean?

I took an algorithms class on Coursera. The professor in the video about hash tables said that What's true is that for non-pathological data, you will get constant time operations in a properly implemented hash table. What does "non-pathological…
14
votes
3 answers

Is there an abstract machine that can capture power consumption?

When reporting algorithmic complexity of an algorithm, one assumes the underlying computations are performed on some abstract machine (e.g. RAM) that approximates a modern CPU. Such models allow us to report time and space complexity of algorithms.…
14
votes
1 answer

Expected number of swaps in bubble sort

Given an array $A$ of $N$ integers, each element in the array can be increased by a fixed number $b$ with some probability $p[i]$, $0 \leq i < n$. I have to find the expected number of swaps that will take place to sort the array using bubble…
TheRock
14
votes
1 answer

Computational complexity vs. Chomsky hierarchy

I'm wondering about the relationship between computational complexity and the Chomsky hierarchy, in general. In particular, if I know that some problem is NP-complete, does it follow that the language of that problem is not context-free? For…
sjmc
  • 630
  • 4
  • 16
14
votes
1 answer

Complexity of finding the pseudoinverse matrix

How many arithmetic operations are required to find a Moore–Penrose pseudoinverse matrix of a arbitrary field? If the matrix is invertible and complex valued, then it's just the inverse. Finding the inverse takes $O(n^\omega)$ time, where…
Chao Xu
  • 3,103
  • 19
  • 34
14
votes
3 answers

Why use languages in Complexity theory

I'm just starting to get into the theory of computation, which studies what can be computed, how quickly, using how much memory and with which computational model. I have a pretty basic question, but am really hoping some of you guys can help me…
Matteo
  • 241
  • 2
  • 5
14
votes
3 answers

Lambda calculus: difference between contexts and evaluation contexts

Firstly, I'd like to say that my text below may contain errors, so feel free to point out any mistakes in my formulation of the question. Consider an untyped lambda calculus with booleans and if-statements whose terms are given by this syntax: t…
Squera
14
votes
1 answer

Turing machine - infinite tape in one or two directions

I have seen turing machines beeing represented with tapes infinite in one, and in two directions. Is there any difference in the power of such turing machines, or are they basically equivalent? In my head I think they are equivalent, since I guess…
user2795095
  • 419
  • 2
  • 7
  • 15
14
votes
2 answers

What are the state-of-the-art algorithms for pathfinding on a continuous map of the Earth?

Suppose I have got a solar-powered autonomous surface vessel somewhere in the fjords of Norway, supplied with a fairly recent set of maps, a GPS receiver, and no means of downlinking detailed commands from me. This vessel has to reach, say, the…
Deer Hunter
  • 250
  • 2
  • 8
14
votes
3 answers

Time complexity of base conversion

Why can't arbitrary base conversion be as fast as converting from base $b$ to base $b^k$ ? Seems to be a big time complexity difference! I am also interested in reading material about it. Old. Original detailed question Conversion between…