New answers tagged

5 votes

Is possible to have a "pointer" to a tree node in a functional language?

You are looking for the zipper data structure.
user avatar
  • 28.2k
5 votes

Array access is O(1) implies a fixed index size, which implies O(1) array traversal?

Big-O notation can be tricky because it hides details. Big-O describes a way to measure a function related to complexity. That function may be "number of memory accesses," which would ...
user avatar
  • 3,085
2 votes

Array access is O(1) implies a fixed index size, which implies O(1) array traversal?

The cost of array access would be for example $c_1$ if the array size is less than $2^{64}$, $c_2$ if the array size is less than $2^{128}$, $c_3$ if the array size is less than $2^{256}$ and so on. ...
user avatar
  • 25.2k
0 votes

Is Turing machine a scientific theory in CS?

Short answer: the Turing Machine is a fundamental concept in the Theory of Computability. Like the prime decomposition is a fundamental concept in the Theory of Numbers.
user avatar
  • 3,912
0 votes

Is Turing machine a scientific theory in CS?

Firstly, I recommend you, not to visualize science and math as separate theories. Basically, to induce any kind of new scientific approach, there must be some mathematical model working underneath it.....
user avatar
31 votes
Accepted

Array access is O(1) implies a fixed index size, which implies O(1) array traversal?

It's a good question. From a pragmatic perspective, we tend not to worry about it. From a theoretical perspective, see the transdichotomous model. In particular, a standard assumption is that there ...
user avatar
  • 141k
1 vote

What is meant by the term "prior" in machine learning

In Bayesian statistics, a "prior" represents the beliefs we have before observing some data. Then, after we observe some data, we update our beliefs; those updated beliefs are called the &...
user avatar
  • 141k
0 votes

What is meant by the term "prior" in machine learning

It's roughly any pre-training choices you encode into your model In machine learning a prior is, according to the book "Deep Learning" by Goodfellow, Bengio, and Courville, a probability ...
user avatar
  • 101
2 votes

Is there a notation for types?

In looking at int op int→int my focus is immediately drawn to . If you have ever studied Lambda Calculus and how it forms the ...
user avatar
  • 5,032
1 vote

Is there a notation for types?

You can write a new union type as $$ \mathrm{type} \; number = int \; | \; float $$ Then, you can write down your function $$ addition : number \rightarrow number \rightarrow number $$
user avatar
  • 296
1 vote

Is there a notation for types?

One approach is to use union/intersection types: https://stackoverflow.com/q/5653678/781723. Haskell type classes can be used to support this, but with some significant restrictions: https://www....
user avatar
  • 141k

Top 50 recent answers are included