Mathematics for computer science

165 Views Asked by At

I am currently pursuing a computer science degree & I am out of touch of most subjects in mathematics, even from secondary & high school. I wanted to know what subjects in mathematics would be absolutely necessary for computer science & it's prerequisite.

Do I have to do the entire algebra course (starting from Algebra basics) from Khan Academy?

I am really confused. I hope someone can help me out. Thanks

1

There are 1 best solutions below

4
On BEST ANSWER

Since I'm a software engineer, I'll answer on the assumption you're more interested in practical applications than things like these (although that last one inspires some terminology relevant to my first bullet point below). At a minimum, you need to understand:

  • The idea of functions: in particular, you must be comfortable with functions as objects in their own right. A programmer expands the notion of "function" slightly, so it can do something rather than merely returning something. Comfort with functions is related to comfort with algebra. Functions in programming are basically written in algebra, except variables' names tend to be words or phrases, to make them easier to understand.
  • The difference between logarithmic, polynomial and exponential functions, how to differentiate and integrate them, and their relative growth rates. In particular, $\ln n\in o(n^\epsilon),\,n\in o(e^{\epsilon n})$ for any $\epsilon>0$. In algorithm design, you'll want to reduce time complexity, space complexity etc., although sometimes there's a trade-off. When you understand the colour-coded claims made here, and how to prove a few easy ones, and why they matter, you'll have what you need. As a simple example, the fact that binary search takes $O(\ln n)$ time, together with $\int\ln ndn=n\ln n-n+C$, tells us binary insertion sort takes $O(n\ln n)$ time.
  • There are $b-a+1$ integers from $a$ to $b$ inclusive. Do you know why the $+1$ is there? Good; you won't make these mistakes too often.

Depending on what you work in, you might also need to understand the mathematics in machine learning, numerical approximations, or 2D/3D graphics. A fair bit of calculus and linear algebra comes up from time to time (though which parts of it vary by subject), as can other things. For interview questions, however, that's what matters most. Category theory is also relevant to functional programming, but that's not for the faint of heart.

The CS theory Stack Exchange might give you more specific ideas than that, especially with lists such as this.