# Tag Info

Accepted

### How/when is calculus used in Computer Science?

I can think of a few courses that would need Calculus, directly. I have used bold face for the usually obligatory disciplines for a Computer Science degree, and italics for the usually optional ones. ...
• 1,349

### How/when is calculus used in Computer Science?

This is somewhat obscure, but calculus turns up in algebraic data types. For any given type, the type of its one-hole contexts is the derivative of that type. See this excellent talk for an overview ...

### What is the meaning of $O(m+n)$?

Part 1 I'm going to do something I decided I wouldn't do: try to nutshell my research on this topic. I'll go over on how the algorithmic O-notation must be defined, why it is probably not what you've ...
• 431

### How/when is calculus used in Computer Science?

Automation - Similar to robotics, automation can require quantifying a lot of human behavior. Calculations - Finding solutions to proofs often requires calculus. Visualizations - Utilizing ...
• 139

### How/when is calculus used in Computer Science?

Numerical Methods. There exist cumbersome calculus problems that are unique to specific applications, and they need solutions faster than a human can practically solve without a program. Someone has ...
• 139

### What is the meaning of $O(m+n)$?

Part 2 $$\newcommand{\TR}{\mathbb{R}} \newcommand{\TN}{\mathbb{N}} \newcommand{\subsets}[1]{\mathcal{P}(#1)} \newcommand{\setb}[1]{\left\{#1\right\}} \newcommand{\land}{\text{ and }}$$ Algorithms ...
• 431
Accepted

### What is the "continuity" as a term in computable analysis?

Different people have different views on what the definition of continuity should be, but the way I see it, we should define continuity to be computability relative to some oracle. For example: ...
• 3,183

### What is the "continuity" as a term in computable analysis?

Arno's answer provides some very useful background reading material, I would just like to address your specific question about $\mathbb{R}$. Let us first recall a result by Peter Hertling, see Theorem ...
• 30.9k

### How/when is calculus used in Computer Science?

The fact is that there's very little chance you'll ever use calculus. However, virtually every other scientific discipline DOES use calculus and you are working on a science degree. There are certain ...
• 97
Accepted

### How does sum of first $k$ integers equal $k(k+1)/2$

Let me tell you the story of young Carl Friedrich Gauss. He was six years old and in a small school with one class for everyone from 6 to 16. His teacher needed some quiet time for some job, so he ...
• 30.7k
Accepted

### How to solve recurrence. T(n). = T(n-1) + T(n/2) + n?

Let $S(n) = T(n) - 2n - 2$. You can check that $S(n) = S(n-1) + S(n/2)$ (ignoring the fact that $n/2$ need not be an integer). This shows that the additive $n$ term doesn't make a big difference. For ...
• 278k

### Can someone explain why there are two summations here?

And why are they exactly the same? I showed a math professor and he thinks they're labelled wrong but couldn't figure it out. I don't even get why there are two. When in doubt, check the book's ...
• 1,483

### How/when is calculus used in Computer Science?

Many people already provided applications in CS. But sometimes you'll find Calculus when you least expect: Regular-expression derivatives reexamined If you know automata this pdf might be worth ...
• 1,483
Accepted

### What is the depth of recursion if we split an array into $\log_2(n)$ with each recursive call?

Let $f(n) = n/\log n$, and denote by $g(n)$ the number of applications of $f$ it takes to get $n$ below some arbitrary constant. On the one hand, $f^{(t)}(n) \geq n/\log^t n$, and so  g(n) \geq \...
• 278k

### How/when is calculus used in Computer Science?

Some more specific examples: Calculus is used to derive the delta rule, which is what allows some types of neural networks to 'learn'. Calculus can be used to compute the Fourier transform of an ...
• 143
Accepted

### Abs(sum of differences of elements in a sorted array) = array.Max()-array.Min() Why?

If you picture these as distances along a road, it should be very intuitive. If (for example) you start at kilometer #7, then proceed through kilometers #45, #81, and #97, then the distances you ...
• 633
Accepted

### Do formulas involving fewer repetitions of variables give higher numerical precision?

First, I want to say that it is not the case in general that an algorithm that minimizes the number of uses of the inputs is more accurate, at least for IEEE 754 floating point. For example, ...
• 12.1k

### What is the exact definition of undirected graph, directed graph, unidirectional graph, bidirectional graph?

I've only ever heard of directed and undirected graphs, whose definitions can be found in Wikipedia. Rudimentary search reveals the following interpretations of unidirectional and bidirectional graphs;...
• 278k
Accepted

### Set of all rational numbers less than given computable real number is decidable

I would approach this problem as follows. Let $a$ be the computable real, and $A = \{x\in\mathbb{Q}\ |\ x<a\}$. If $a \in \mathbb{Q}$, then $A$ is decidable since $x<a$ is a comparison between ...
• 14.6k

### How/when is calculus used in Computer Science?

Calculus -- the integral portion -- is used directly in CS as a foundation for thinking about summation. If you work through any portion of Knuth's Concrete Mathematics section on summation, you will ...
• 31

### Hash function to hash 6-digit positive integers

I think you've missed the point of hash tables. Hash tables are used to give array-like access to a dataset that's too big and sparse to store in an array. So, for example, it sounds like you're ...
• 81.9k

### Hash function to hash 6-digit positive integers

A hash function cannot avoid collisions when the size $M$ of the hash table is smaller than the size of the universal set $U$ that you are hashing. This is a consequence of the compression step. In ...
• 3,734

### Hash function to hash 6-digit positive integers

A hash table usually uses two different things: One, a hash function that maps an item to a hash code (with the requirement that equal items are mapped to equal hash codes), and two, a function that ...
• 30.7k

### How/when is calculus used in Computer Science?

To these other excellent answers I add this point: rigor in testing. In creating test cases for some applications I have had to make use of calculus to predict expected running times, memory sizes, ...

### Complexity of computing the antiderivative of a given function

Kawamura, in his paper Lipschitz Continuous Ordinary Differential Equations are Polynomial-Space Complete, mentions a classical result of Friedman (Theorem 3.4) which implies that computing the ...
• 278k

### Is $f(cn)$ always $O(f(n))$ for constant $c$ and any function $f$?

First, let us note that for monotone $f$, the statement holds for some $c > 1$ iff it holds for all $c > 1$. Indeed, let $1 < c_1 < c_2$. If the statement holds for $c_2$ then \$f(c_1n) \...
• 278k

### Can most programs (except the IO part) be re-written as a sequence of matrix operations?

If you regard the output of a program as a function of its input then matrices can be used to represent some programs, namely those where the output is a linear function of the input. So a program ...
• 1,589