# What branches of mathematics do I need to know to make AI algorithms?

#### petormojer

I am in high school and I don't know much math.
By AI I mean Artificial Intelligence.

And by AI algorithms, I mean like algorithms that can allow a program to distinguish object from object in a picture, what key word to use based on data from the past, "learns" you and other objects, and etc.

#### ellipsis

I also responded to your other thread. In principle, computer science and mathematics are the same; if you can find a solution to a problem in one, you can do so for the other. But there is a big disconnect, in that mathematics does not (yet) deal with the mechanics of computational requirements, and the most efficient way to calculate functions.

From what I know, there is no formalized "mathy" way of expressing the algorithms used in artificial intelligence (and in computer science in general, really). I haven't seen a mathematical formalization of quicksort yet, anyway.

Combinatorics would come in handy, though. Really, you need to look at current vectors of attack to AI.

Take me with a grain of salt, though. I don't know about the high, arcane wizard math yet; I'm only up to differential equations, and my major is CS.

#### FactChecker

Gold Member
2018 Award
algorithms that can allow a program to distinguish object from object in a picture, what key word to use based on data from the past, "learns" you and other objects, and etc.
My first thought was neural networks (NN). You "train" a NN to recognize objects. This link seems to verify that NN is central to pattern recognition. http://www.dontveter.com/basisofai/basisofai.html

#### homeomorphic

The problem is that AI is a massive field. So, you're going to need vastly different kinds of math for different things within AI. From what I've heard, stuff like computer vision is very math-heavy. You can use partial differential equations and Fourier analysis and lots of stuff.

My general gut reaction is to say that you need to learn discrete math, linear algebra, and prob/stat. Maybe some basic graph theory. But that might depend on what you are trying to do. If you are trying to do game programming, I'm guessing you would need stuff that's covered in a more standard algorithms course, like shortest path algorithms and that sort of thing. For that, you just need some discrete math/graph theory. Part of the "math" is going to be in the subject itself, too.

But there is a big disconnect, in that mathematics does not (yet) deal with the mechanics of computational requirements, and the most efficient way to calculate functions.
That IS math. P = NP is one of the millennium problems, a set of 7 problems (6 left) that you can win a million dollars for solving. The only disconnect is the same disconnect that exists between theoretical computer science and practical programming. In practice, it might not only be about big O. You might have to time different algorithms to see which is that fastest on the type of input data that you have and so on, and you might care about constant factors and so on.

I haven't seen a mathematical formalization of quicksort yet, anyway.
The way I see it, quicksort IS just math. Sorting is closely related to permutations of finite, totally ordered sets. And I'm sure someone has written it out in full rigor somewhere. The fact that people don't normally bother to do that just means it's non-rigorous, rather than that it's not math. There is actual algebra and math involved in analyzing the running time (best case, worst case, average case), too, even in CS classes.

#### FactChecker

Gold Member
2018 Award
But there is a big disconnect, in that mathematics does not (yet) deal with the mechanics of computational requirements, and the most efficient way to calculate functions.
I disagree. Many AI problems of pattern recognition boil down to optimizing the match of the observed image with the trained objects. There has been a lot of work on the mathematics of optimization algorithms. To see some of that, check out the Davidon-Fletcher-Powell algorithm, integer programming, neural networks, Kalman filters, fast fourier transforms, and a variety of Operations Research techniques. See also optimal control theory.

#### homeomorphic

I think I should add multi-variable calculus to the list, since you need that to understand gradient descent and some of it for prob/stat.

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving