<p>A generally high degree of mathematical maturity makes a lot of the formal aspects of (not necessarily theoretical) computer science much easier to understand. So doing a minor in mathematics along with your major in computer science would do more good than harm. </p>

CC BY-SA 2.5
2011-03-07T16:50:43.543Z
2011-03-07T16:50:43.543Z
Dave Clarke
<p>Linear algebra, probability theory, some graph theory/combinatorics at a bare minimum. </p>

CC BY-SA 2.5
2011-03-07T05:41:02.107Z
2011-03-07T05:41:02.107Z
Suresh Venkat
<p>Some things you may need, some more, some less:</p>

<ul>
<li>Mathematical Logic</li>
<li>Probability Theory / Combinatorics / Statistics</li>
<li>Linear Algebra</li>
<li>Calculus</li>
<li>Graph Theory</li>
<li>Set Theory</li>
<li>Number Theory</li>
<li>Maybe some optimization theory</li>
</ul>

<p>Of course (almost) anything will be useful, especially if you are going into theoretical computer science fields.</p>

CC BY-SA 2.5
2011-03-09T00:27:14.560Z
2011-03-09T00:27:14.560Z
George
<p>All of the other answers +...</p>

<p>Arguably the most useful thing for you to try and do is engage in research. Following stackexchange, reading some background material/papers and figuring out what you might find interesting might be the most effective  way to prepare yourself to grad school.</p>

CC BY-SA 2.5
2011-03-09T03:09:06.737Z
2011-03-09T03:09:06.737Z
Sariel Har-Peled
<p>i really support the answers above. I can add the following that may be useful for the big picture of math in CS:</p>

<p>Math can be part of the goal itself; algorithm analysis, complexity bounds, deterministic or probabilistic proofs, parallel algorithms and many more research areas related to time and space of computation.</p>

<p>On the other side, math can be the actual path for a higher level goal; PDEs, light equations for computer graphics, the whole research area of computational physics (dynamical systems, statistical mechanics, galaxy formation) to name some of them.</p>

<p>Under the right circumstances, both forms of math could live together.</p>

CC BY-SA 3.0
2012-08-03T20:10:56.790Z
2012-08-03T20:10:56.790Z
labotsirc
<p>excellent/wide responses so far. I suggest some classes not mentioned so far. esp classes that lean toward application of the theory &amp; require the student to write/debug code &amp; visualize [graph results] as part of assignments. or build/debug working systems. etc. </p>

<ul>
<li>differential equations. esp the relationship between it &amp; discrete differential equations eg generating functions.</li>
<li>numerical methods. optimization. Runge Kutta diffeq solver etc. a neat/highly educational exercise is to solve/graph the Lorentz weather equation. concepts about precision/accuracy in software arithmetic etc.</li>
<li>there is an MIT class "modelling and simulation of dynamical systems". something similar would not be available at all universities but maybe some will have it.</li>
<li>some universities will have principles/dynamics of complex systems or complex adaptive systems etc</li>
<li>anything related to modelling or simulation of systems using software with a mathematical focus</li>
<li>fractal systems &amp; mathematics</li>
<li>machine learning (esp with gradient descent techniques)</li>
<li>quantum computing (some classes in this are highly or mostly mathematical)</li>
</ul>

CC BY-SA 3.0
2012-08-03T15:16:36.823Z
2012-08-03T15:16:36.823Z
vzn
<p>Great question. I just recently passed the PhD qualifying exam that was in part an entrance exam - mix of undergraduate and graduate topics.</p>

<p>To be practical - it depends on the school you are planning to attend, type of entrance exam they might require and type of the program they offer.</p>

<p>Some require GRE, so preparing to enroll is not CS specific. Some require GRE subject, which is equivalent to 5-6 core CS undergraduate courses and theory will be covered (automata theory, discrete math, etc)</p>

<p>To get the most fundamental background I would take Discrete Math, Algorithms and Theory of Computation from <a href="http://aduni.org/courses/" rel="nofollow">Ad Uni</a>.</p>

<p>There are other fantastic sources from MIT and Stanford but these three courses, presented by great Shai Simonson are excellent foundation. </p>

<p>Hope this helps.</p>

CC BY-SA 3.0
2012-08-03T16:32:45.897Z
One of these courses are mirrored on YouTube:  [Theory of Computation](http://www.youtube.com/watch?v=HyUK5RAJg1c).  Unfortunately, the mirrors for [Algorithms](http://www.youtube.com/watch?v=gwlevtaC-u0) and [Discrete Math](http://www.youtube.com/watch?v=_FG9hhiZipo) are incomplete.
Jeffε
CC BY-SA 3.0
2012-08-02T15:21:07.600Z
2012-08-02T15:21:07.600Z
Edmon
<p>There is a course at MIT OCW called <a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2005/">Mathematics for Computer Science</a>, it lists some <a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2005/lecture-notes/"><strong>topics you MUST cover</strong></a>. </p>

<p>Learning some <a href="http://www.extension.harvard.edu/openlearning/math222/">Abstract algebra</a> will be a big plus. Because I see too many references to group theory in literature.</p>

CC BY-SA 2.5
2011-03-07T17:17:31.157Z
dang. forgot abstract algebra in my answer - good call.
Suresh Venkat
CC BY-SA 3.0
2012-08-05T15:06:01.837Z
The Fall 2005 version linked above is missing about 1/3 of the lecture notes. The [Spring 2005](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-spring-2005/lecture-notes/) and [Spring 2010](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-spring-2010/lecture-notes/) versions have more complete notes.
Daniel Apon
CC BY-SA 2.5
2011-03-07T10:39:58.023Z
2011-03-07T10:39:58.023Z
Pratik Deoghare
<p>I'm a self-taught professional programmer. I am pretty good at it (Ruby, Unix, Clojure, Java, Objective-C), but now I'm thinking of taking it to the next level by maybe applying for a masters or PhD program in CS. What topics in math should I study to prepare for this goal? </p>

CC BY-SA 2.5
2011-03-08T04:24:38.780Z
related: [How do I get started in theoretical CS?](http://cstheory.stackexchange.com/questions/3881/how-do-i-get-started-in-theoretical-cs), [Book recommendations for CompSci related math](http://cstheory.stackexchange.com/questions/4546/book-recommendations-for-compsci-related-math)
Kaveh
CC BY-SA 3.0
2012-08-02T15:27:26.120Z
See: http://cstheory.stackexchange.com/q/2571/1621
Dana Moshkovitz
CC BY-SA 3.0
2012-08-02T16:37:25.713Z
If you're going in cold, with little or no academics behind it, my advice would be to select a program that provides an entry path for non-CS people.  It's not uncommon for people with EE, physics, mathematics, or other similar BS degrees to want to make a career change.  Some universities have programs designed to help facilitate that in their course structures.
Novak
<soft-question><advice-request><career>
What math courses should I take to prepare for a CS masters or PhD?
dan
# What math courses should I take to prepare for a CS masters or PhD?

(Asked by: username_0 on 2011-03-07)

I'm a self-taught professional programmer. I am pretty good at it (Ruby, Unix, Clojure, Java, Objective-C), but now I'm thinking of taking it to the next level by maybe applying for a masters or PhD program in CS. What topics in math should I study to prepare for this goal?

**Tags:** soft-question, advice-request, career
> **Comments:**
> **username_1**: related: [How do I get started in theoretical CS?](http://cstheory.stackexchange.com/questions/3881/how-do-i-get-started-in-theoretical-cs), [Book recommendations for CompSci related math](http://cstheory.stackexchange.com/questions/4546/book-recommendations-for-compsci-related-math)  
> **username_2**: See: http://cstheory.stackexchange.com/q/2571/1621  
> **username_3**: If you're going in cold, with little or no academics behind it, my advice would be to select a program that provides an entry path for non-CS people.  It's not uncommon for people with EE, physics, mathematics, or other similar BS degrees to want to make a career change.  Some universities have programs designed to help facilitate that in their course structures.  

---

## 8 answers

### Answer by username_12 on 2011-03-07. Score: 11 | Accepted answer

There is a course at MIT OCW called [Mathematics for Computer Science](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2005/), it lists some [**topics you MUST cover**](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2005/lecture-notes/).

Learning some [Abstract algebra](http://www.extension.harvard.edu/openlearning/math222/) will be a big plus. Because I see too many references to group theory in literature.

> **Comments:**
> **username_5**: dang. forgot abstract algebra in my answer - good call.  
> **username_13**: The Fall 2005 version linked above is missing about 1/3 of the lecture notes. The [Spring 2005](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-spring-2005/lecture-notes/) and [Spring 2010](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-spring-2010/lecture-notes/) versions have more complete notes.  

---

### Answer by username_4 on 2011-03-07. Score: 14

A generally high degree of mathematical maturity makes a lot of the formal aspects of (not necessarily theoretical) computer science much easier to understand. So doing a minor in mathematics along with your major in computer science would do more good than harm.


---

### Answer by username_5 on 2011-03-07. Score: 13

Linear algebra, probability theory, some graph theory/combinatorics at a bare minimum.


---

### Answer by username_6 on 2011-03-09. Score: 9

Some things you may need, some more, some less:

* Mathematical Logic
* Probability Theory / Combinatorics / Statistics
* Linear Algebra
* Calculus
* Graph Theory
* Set Theory
* Number Theory
* Maybe some optimization theory

Of course (almost) anything will be useful, especially if you are going into theoretical computer science fields.


---

### Answer by username_7 on 2011-03-09. Score: 4

All of the other answers +...

Arguably the most useful thing for you to try and do is engage in research. Following stackexchange, reading some background material/papers and figuring out what you might find interesting might be the most effective way to prepare yourself to grad school.


---

### Answer by username_8 on 2012-08-03. Score: 2

i really support the answers above. I can add the following that may be useful for the big picture of math in CS:

Math can be part of the goal itself; algorithm analysis, complexity bounds, deterministic or probabilistic proofs, parallel algorithms and many more research areas related to time and space of computation.

On the other side, math can be the actual path for a higher level goal; PDEs, light equations for computer graphics, the whole research area of computational physics (dynamical systems, statistical mechanics, galaxy formation) to name some of them.

Under the right circumstances, both forms of math could live together.


---

### Answer by username_9 on 2012-08-03. Score: 2

excellent/wide responses so far. I suggest some classes not mentioned so far. esp classes that lean toward application of the theory & require the student to write/debug code & visualize [graph results] as part of assignments. or build/debug working systems. etc.

* differential equations. esp the relationship between it & discrete differential equations eg generating functions.
* numerical methods. optimization. Runge Kutta diffeq solver etc. a neat/highly educational exercise is to solve/graph the Lorentz weather equation. concepts about precision/accuracy in software arithmetic etc.
* there is an MIT class "modelling and simulation of dynamical systems". something similar would not be available at all universities but maybe some will have it.
* some universities will have principles/dynamics of complex systems or complex adaptive systems etc
* anything related to modelling or simulation of systems using software with a mathematical focus
* fractal systems & mathematics
* machine learning (esp with gradient descent techniques)
* quantum computing (some classes in this are highly or mostly mathematical)


---

### Answer by username_10 on 2012-08-02. Score: 1

Great question. I just recently passed the PhD qualifying exam that was in part an entrance exam - mix of undergraduate and graduate topics.

To be practical - it depends on the school you are planning to attend, type of entrance exam they might require and type of the program they offer.

Some require GRE, so preparing to enroll is not CS specific. Some require GRE subject, which is equivalent to 5-6 core CS undergraduate courses and theory will be covered (automata theory, discrete math, etc)

To get the most fundamental background I would take Discrete Math, Algorithms and Theory of Computation from [Ad Uni](http://aduni.org/courses/).

There are other fantastic sources from MIT and Stanford but these three courses, presented by great Shai Simonson are excellent foundation.

Hope this helps.

> **Comments:**
> **username_11**: One of these courses are mirrored on YouTube:  [Theory of Computation](http://www.youtube.com/watch?v=HyUK5RAJg1c).  Unfortunately, the mirrors for [Algorithms](http://www.youtube.com/watch?v=gwlevtaC-u0) and [Discrete Math](http://www.youtube.com/watch?v=_FG9hhiZipo) are incomplete.  

---

