This can be extremely practical: it is all about making something useful or efficient. If I have a list of vectors and it is more efficient to store them as a list of x-coordinates and a list of y-coordinates, so be it.
Form versus Function Leading on from the above; if a thing can be presented in many different ways then it is no longer fair to say that one particular presentation is the thing.
To misquote that song again: "It ain't what you are it's what you do " that matters. Now, there are probably lots of negative reactions to what I've written so far. One will be "That's not maths, that's just good sense. Another will be "That isn't the type of maths meant in the question.
This is almost certainly true and here I actually have a lot more sympathy with the person who said "At least I haven't touched the maths for 10 years,". He or she is wrong, of course, they have been doing maths for 10 years because whenever they wrote a program they were doing maths. They just didn't realise it. And here we get to the point about why I was delighted with the sadly unrealised possibility of teaching mathematics to students who were already programmers.
I do actually use some "real maths" in my programs. I recently coded a fun 3D shape explorer which involved using some maths to figure out the projections and other transformations that I had to apply to my data. I was mildly amused to find myself actually coding quaternions! But of course, the maths that was involved was trivial compared to the maths that I do when I'm working.
It was "back of envelope" stuff. That type of maths, then I agree with the sentiment that you pick it up when you need it, and if you need something more complicated than you can find on Wikipedia then you find a real mathematician to do it for you.
However, in order that you can pick it up when you need it then you need to have learnt something. That thing might not be anything you ever actually use, but having learnt that something makes it all the easier to pick up what you do actually use later in life. So this is where I disagree with Coder: you do need to learn some mathematics if you are ever going to use any mathematics and you need to learn it from the mathematical side which doesn't mean proving theorems, by the way. And so finally to the "Mathematics is Programming".
You can learn all of these things from being a good programmer. And if you've learnt these things, you will find mathematics much easier because you will understand that when we talk about a vector in a vector space then it's just an instance of the class Vector which means that we can do all the things that Vector does to that instance: add, subtract, scale, and so forth.
That's why I would love to teach mathematics to programmers. But, speaking as a mathematician, I would say that the first of these, "Abstraction", is easier to learn in mathematics than in programming because mathematics is the pursuit of abstraction.
Whenever we see some behaviour our training is always to ask "What is it about that thing that makes it behave in that way? What if I took another thing that was similar, would it behave in the same way? How much of what that thing is would I have to lose for it to stop behaving like that? But we don't do this with just "real world" objects whatever they are , we do this with things that have already been abstracted. A mathematician and a physicist both attended a seminar on some new model involving 24 dimensional space.
Afterwards, they were discussing it and the physicist remarked: "That was really hard. I mean, how does one visualise dimensional space? There were quite a few comments on this answer expressing a variety of views. These have now been deleted by a moderator on the understanding that I would try to take into incorporate them or respond to them in my answer.
However, I'm not sure that I can. Reading those comments and the rest of what's on this page, I can only come to the conclusion that there is a huge misunderstanding as to what mathematics actually is.
Moreover, I don't feel competent enough to explain it. Fortunately, someone has already linked to Lockhart's Lament so I'll defer the explanation to that. Whilst I might have put it differently as I grew up in a scientific environment, I would have put more emphasis on the experimental nature of mathematics , I don't think I could put it better. I do still think I can add something. As well as the misunderstandings as to what mathematics is , there are also misunderstandings as to what "doing mathematics" means.
I see two almost contradictory stances:. Mathematics is about equations and formulas. So there's no need to study it because Wikipedia exists this is almost the converse of Euler's apocryphal challenge to Diderot. Mathematics is about theorems and definitions. So there's no need to study it as programs never prove anything which is about as complete a fallacy as Whilst the two stances contradict each other, they end up in the same place: there's no point in a programmer learning any mathematics - and most assuredly not from a mathematician!
After all, what do they know about anything? Anything that a programmer really needs to know can be found in Wikipedia, or cribbed off someone else.
Above, I described myself as a Cargo Cult Programmer. I bet most of you had a private giggle to yourself and thought, "Ah yes, I bet I know what your programs look like then. You probably felt a bit smug and superior though I'm sure you felt bad about feeling smug and superior. So when I say that you should learn a bit of mathematics to understand how mathematics works, I'm saying it for exactly the same reason as you might if you saw a bit of code that I'd written: "How much easier your life would be if you'd stop cut-and-pasting code from StackOverflow and learnt just a bit about how to do it properly.
The most important thing, though, is that you should learn it from mathematicians. Why so? Here's an analogy. The language that I'm most adept at is TeX. Says it all, really! Now, suppose I want to learn a bit more about TeX and it just so happens that Don Knuth is in town and has offered to give some tutorials on TeX. Or I could just read about it on Wikipedia. Or maybe it's Perl and Larry Wall, or C is that the right one? It may well be that these people are not the best teachers , but they sure make up for it in the amount that they know!
And that's what mathematicians are. We're the people who write the actual language, who then write the libraries that you use. Of course, you don't have to know how to prove a theorem - you're not going to write a library! But if you know a bit about how we think, then it might help you understand why we wrote the library the way we did, and if you understand that it might help you make better use of it. If you are still in university then you have an amazing opportunity to learn from people who are experts in their area and who - for some reason - are willing to spend their time explaining it to you.
The other point I wanted to expand on a bit was why as a programmer you should not be scared of learning a bit more mathematics. It's not the Deep Connections, nor the usefulness. It's that your ability to program a computer can directly help you learn mathematics. I just want to mention a few. Understanding variables.
So many people get confused by simple statements like "Let n be a natural number There are places in mathematics where it's important to remember the scope of a variable. These are all commonplace in programming. Learn to translate a mathematical statement into a program and you'll find it much easier to keep track of what's what. The nature of proof.
If you've ever written a test, or written a program to be used by someone else, then you understand the core of proofs. When you do that, you have to know that whatever the user puts in, you can deal with it insert obligatory xkcd reference here.
That's all a proof is! Sorry to break this to you, but we invented it, not you. We've been "not repeating ourselves" for millennia. That's why I have a copy of Euclid's elements on my shelves and it's still useful. And there's more. If I knew a bit more about programming, I'd write a book called "Mathematics for Programmers" where the aim wasn't to teach "The mathematics that programmers should know" but "mathematics that everyone should know, but optimised for programmers".
But I'll probably never know enough about programming to write it - unless someone offers to collaborate with me! I'll leave it there. Probably if I thought more, I'd change what I've written; hopefully I'd explain it better. In a months' time I might even disagree with parts of it.
If anyone wishes to argue further, or comment otherwise, probably best not to do so in the comments here. You know where to find me. They're not that closely related. For programming, it is important to know about mathematics- especially those branches pertaining to, for example, algorithm performance, but the simple fact is that there is no branch of mathematics that will tell you that Singletons are a horrifically bad idea, for example, or when to favour inheritance over composition, or whether or not you're really going to need that flexibility, and not to repeat yourself, and dozens of other core programming necessities.
Mathematics might be able to express what your program does, but it most certainly cannot tell you the most maintainable, human-readable, feasible way to go about it.
One is that math can be used to reason about computer programs. It can help answer questions like "How will the running time of my program change as the input data changes? You typically cover topics like these in upper division courses on the theory of computation, the design of algorithms, and computer language design.
The second way math and program are related is that programming is used to solve mathematical problems. This is important because many problems of "ordinary life" can actually be recast as mathematical problems and then solved maybe approximately on a computer. These sorts of topics will show up to some extent in almost all of your courses, but particularly in courses on discrete math and mathematical modeling. Relational calculus consists of two calculi, the tuple relational calculus and the domain relational calculus, that are part of the relational model for databases and provide a declarative way to specify database queries.
This in contrast to the relational algebra which is also part of the relational model but provides a more procedural way for specifying queries. The relational algebra might suggest these steps to retrieve the phone numbers and names of book stores that supply Some Sample Book:.
The relational algebra and the relational calculus are essentially logically equivalent: for any algebraic expression, there is an equivalent expression in the calculus, and vice versa. This result is known as Codd's theorem. The next area is artificial intelligence AI and machine learning. Description: This class, taught by one of the foremost experts in AI, will teach you basic methods in Artificial Intelligence, including: probabilistic inference, computer vision, machine learning, and planning, all with a focus on robotics.
Extensive programming examples and assignments will apply these methods in the context of building self-driving cars. You will get a chance to visit, via video, the leading research labs in the field, and meet the scientists and engineers who are building self-driving cars at Stanford and Google. Prerequisites: The instructor will assume solid knowledge of programming, all programming will be in Python. Knowledge of probability and linear algebra will be helpful. For scientific application development, Game programming, real-time systems, simulation systems, and such applications, Mathematics is required indeed.
After all, programming uses mathematics and science to solve problems. On the other hand, to program an application that captures users information for registering them in your database, does not require any high level of mathematics. From the mathematics practitioner side, different topics in Mathematics as well as many other science branches could benefit significantly from programming.
I think more than anything else, it's the similarity of the thought process used that makes the two seem so similar. For example, both are extremely logical.
If you follow the same set of steps or same formula, you'll always come up with the same result. Another example is the need to think spatially. In mathematics, I found I often had to hold numbers in my head and visualize what I was doing. This same ability to visualize something not visible, or break down a problem into smaller problems is often applied to programming.
So I feel that although you do not need to have a mathematical background to program, where math is defined as performing calculations with numbers, you do need to have similar thought process and understanding as what you would use when solving math problems. I suppose, to date, you've been taught elements of calculus and some trigonometry. And you call that Mathematics. That's like calling a pair of legs "a human being.
Calculus have little to do with programming, and is more tightly related to physics and engineering. You will need physics for game engines and calculus for statistical analysis. Statistical analysis drives more jobs that it is comfortable to admit. Calculus, for us, is more about relating programming to the real world. Computational calculus is the branch that studies how bad that relation is going so far.
Trigonometry is a crazy jack in the box that comes out when you least expect it and then signal analysis , audio generation and many other stuff depend on it. Go trough Algebra and Logic , study the history of Pascal, Leibniz, yeah he almost invented calculus, got it halfway wrong, argued with Newton until it all started making almost sense - and still conceived the binary coding thing and Babbage and many of your doubts will wane.
Mathematics, especially applied mathematics , is important to programming because a lot of what we ask computers to do is crunch numbers. Understanding numerical methods and how to apply computation efficiently and appropriately is one of the things many programmers do on a daily basis. Here I will tell you practical stuff where I have encountered Mathematics in solving some Computing Problems particularly in Internet domain :.
A problem with your question is that "mathematics" and "programming" are both very wide and deep subjects about which there is more to know than anyone could master in a lifetime no exaggeration. I personally hold an MA degree in mathematics. During my time in university, it seemed as if the more I learned, the less I knew compared to my peers; it felt is if I became less intelligent over the years.
When I presented my master's thesis to a group of professors, even most of them seemed to be largely unfamiliar with what I studied. Likewise, I am now a database-driven web application developer. If you compared me to someone who does embedded assembler language programming, you might think of us as two very talented professionals, but we would have vastly different expertise even though we're both "programmers".
As you progress in your study of higher mathematics beyond freshman calculus , you will find that mathematics instills a discipline for abstract reasoning that will serve you well when you program. I think that this discipline is very important because you will deal with abstract concerns as you program. Sure, in freshman programming, you will likely learn about pointer arithmetic. You will write short programs to illustrate this concept and your understanding of how it drives your computer obey your will.
However, learning about how pointer arithmetic works in the abstract will not make you good at using pointers in a real program. When it comes time to take on a mess of 10K lines of code and make some changes to the pointer arithmetic, you will need to be able to reason at a very abstract level, making strategic decisions to balance different concerns about how your changes will affect the code.
As a programmer, you must balance "readability" of your code, performance of your code, ease-of-use of the resulting programs, among many other concerns.
You must be able to make very abstract comparisons to balance these concerns among one another. You will make many of these comparisons every day. I haven't even gotten started about time-management. You will abstractly reason about the probability that something you do will affect your ability to do your tasks on time, and once again, you will make many decisions every day that will affect your work.
Finally, you must maintain your philosophical discipline to be able to assimilate new ideas and concepts in order to be able to continue on as old methodologies and practices fall out of use. Once again, you will have to be able to evaluate the ideas that come along and make an abstract comparison to what you already know. In short, programming, as most of us know it, doesn't have a whole lot to do with mathematics, as most of us know it; but when you look at it at an abstract level, they have a lot in common.
Constructing that or any algorithm in a way that can be executed by a machine is programming. This much could be considered a branch of mathematics. Note however that computer science and programming are not actually the same thing.
It is important to have a foundation in computer science if you want to be a good programmer, because it helps you to better design and reason about the algorithms you develop.
But it is not a requirement. Solving math problems bends your mind to think critically and analytically at the same time and this helps in developing your brain to think logically. Analytical thinking is studying a particular problem to develop more ideas about it or find a solution by breaking it down to the smallest pieces of information known about the problem.
This is called the First Principle. Analytical thinking can help you investigate problems and find solutions to them. Below are some of the uses of mathematics in various fields of computer science.
Games employ math for most of their functionalities. In big games like PUBG and EVE online, and even little games like Pong and Pacman, mathematics is needed for the actions and movements between characters, with geometry and trigonometry underpinning the angles at which characters move. In advanced fields of programming like AI and ML, mathematics is essential. A very extensible part of mathematics found in AI and ML is statistics.
Data is the basis of AI and ML and how that data is analyzed and consumed is statistics. Other mathematics used in AI and ML include:. Random numbers are used for simulation, cryptography, and some other areas. The way these random numbers are generated is purely mathematical.
These random numbers are used in data encryption. The popular topics used in the field of simulation and cryptography are:. Mathematics is the underlying foundation of programming. Statistics plays a fundamental part in computer science as it is used for data mining, speech recognition, vision and image analysis, data compression, traffic modeling, and even artificial intelligence, as shared by Medium.
It is also used for simulations. A background in statistics is needed to understand algorithms and statistical properties of computer science. Calculus is the examination of continuous change and the rates change occurs. It handles the finding and properties of integrals and derivatives of functions. There are two types of calculus, differential calculus, and integral calculus. Differential calculus deals with the rate of change of a quantity.
Integral calculus determines the quantity where the change rate is known. Calculus is used in an array of computer science areas, including creating graphs or visuals, simulations, problem-solving applications, coding in applications, creating statistic solvers, and the design and analysis of algorithms.
Discrete math examines objects that care be represented finitely. It includes a variety of topics that can be used to answer various tangible inquiries. It involves several concepts, including logic, number theory, counting, probability, graph theory, and recurrences.
0コメント