125 votes
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. ...
user avatar
  • 1,349
27 votes

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 ...
user avatar
13 votes

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 ...
user avatar
13 votes

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 ...
user avatar
  • 139
11 votes

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 ...
user avatar
  • 351
9 votes
Accepted

Decidability of checking an antiderivative?

The short answer to your question is "no". Richardson's theorem and its later extensions basically state that as soon as you include the elementary trigonometric functions, the problem of deciding if $...
user avatar
  • 19.1k
8 votes

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 ...
user avatar
  • 351
8 votes
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: ...
user avatar
  • 1,914
8 votes

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 ...
user avatar
  • 28.4k
7 votes

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 ...
user avatar
  • 97
7 votes

Decidability of checking an antiderivative?

Your problem seems to reduce the following simpler question: Given two functions $F,G$ in class of functions, do we have $F(x)=G(x)$ for all $x$? (In other words, do they have the same value ...
user avatar
  • 143k
7 votes

Changing variables in recurrence relations

What $S(m) = T(2^m)$ means is that $S$ and $T$ are two different functions which produce the same result while taking inputs as $m$ and $2^m$ respectively. Function $S$ can be considered as an ...
user avatar
6 votes
Accepted

Why do Computers use Hex Number System at assembly language?

Computers don't use the hexadecimal number system for assembly language. Assembly language, or rather machine code, uses base 256 (typically): instructions are encoded in units of bytes. When ...
user avatar
6 votes
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 ...
user avatar
  • 25.6k
6 votes
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 ...
user avatar
5 votes
Accepted

Is Big-Oh notation preserved under monotonic functions?

By definition, $$ f(n) \in O(g(n))$$ means there exists some positive constant $c$, such that for any large enough $n$, $$ |f(n)| \le c |g(n)|$$ or equivalently, $\lim_{n\to\infty} \frac{f(n)}{g(n)} \...
user avatar
  • 20.4k
5 votes

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 ...
user avatar
  • 1,483
5 votes

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 ...
user avatar
  • 1,483
5 votes
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 \...
user avatar
4 votes
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 ...
user avatar
  • 521
4 votes

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 ...
user avatar
  • 143
4 votes
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, ...
user avatar
3 votes

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, ...
user avatar
3 votes

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 ...
user avatar
  • 31
3 votes

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 ...
user avatar
  • 25.6k
3 votes

Why do Computers use Hex Number System at assembly language?

The simplest reason is that, the computer does not see this, it only sees the binary. This really just aids the programer. Binary is a mess to look at, octal does not usually work since an octal ...
user avatar
  • 1,602
3 votes

Trigonometry in computer science

Interpolation. If by computer science you include numerical computing, any why the hell not, you often use trig functions in interpolation. Sometimes you have a sampled version of a function, say a ...
user avatar
  • 91
3 votes

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 ...
user avatar
3 votes

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 ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible