We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit th开发者_StackOverflowe question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI read a lot of blogs and forum posts about mathematics in programming and made a conclusion for myself that basic mathematics is needed in programming. I'm not a good mathematician. But is it somehow possible to improve my logical and algorithmic thinking without going deep into science of mathematics? Are there any exercises or some books that could help me to improve these skills so that I could become an good architect?
Thank you in advance.
Work through Project Euler.
The beginning of CLRS Algorithms has a bit on number theory, discrete math, combinatorics, probability, graph theory, and other really useful stuff. It's teaching exactly what is applicable to algorithms, and skipping everything else.
http://en.wikipedia.org/wiki/Concrete_Mathematics <-- Written specially for you by Donald Knuth!
You might be interested in Project Euler for exercises.
Here's an interesting article, if you haven't seen it already, that discusses learning math via Wikipedia:
http://steve-yegge.blogspot.com/2006/03/math-for-programmers.html
Great suggestions above - to put some of this in context, there's a great project to reform math education in high school. It might help you understand some of the frustrations of learning math and how to overcome those difficulties.
Remember - much of math education is to exercise your ability to think abstractly and to solve problems. Both of these skills take practice and sometimes, even though you may not see the direct connection between the problems and so-called "real life", there's always something to learn and practice by working out the problems.
But is it somehow possible to improve my logical and algorithmical thinking without going deep into math science?
But logic and problem solving is the basis of mathematics.
I suspect the real problem is with how mathematics is taught, and what you (and your previous teachers) think mathematics is. I'd recommend A Mathematician's Lament, for a better explanation of what mathematics is, versus what we are normally taught is mathematics.
Are there any excercises or some books that could help me to improve these skills so that I could become an good architect?
Yes, others have given you a better list of suggestions than I could, but the basic idea is yes you can learn to be better at mathematics, in particular the mathematics that most commonly pertains to Computer Science and programming.
I'm assuming you mean a software architect, because traditional architecture, like engineering, has a firm foundation in applied mathematics. Anyhow, good software architect need to be comfortable enough to do informal problem and algorithmic analysis, which does require a mathematical basis.
I would normally say if you could learn equivalent to the typical first year university mathematics requirements for a computer science degree (i.e. first year of calculus, discrete math(s) or linear algebra), it would go a long way to make you a better Computer Scientist, and better programmer or architect. It is not impossible without, but it can make you be better at your job (quicker to evaluate or solve problems correctly, efficiently and effectively).
Good luck.
I'd say that the math you need depends on the problems you're asked to solve.
The problems you're asked to solve depend on the math skills you have.
Anyone who says you only need 4th grade math is also telling you that you cannot reasonably expect to have a chance to solve more challenging problems.
I would point out that computers have changed mathematics and applications. My engineering education consisted of a lot of calculus and closed-form solutions using pencil and paper.
My first career meant applying discrete, numerical analogs to those techniques on computers.
If you want to do that kind of work, it's best to learn a lot about numerical methods and linear algebra.
Google's Page Rank was a $25B eigenvalue problem when this paper was published. Google's market cap is $144B today.
Computer graphics are very mathematically intensive. If you like graphics, better learn matricies well.
Statistics are terribly important, especially when you have oceans of data available to you on the web. Learn R and basic statistics cold.
Read something like "Programming Collective Intelligence" to see what kinds of novel problems will require some sophisticated math.
If you want to solve those kinds of problems, best to get busy.
The emphasis on what constitutes "Discrete Mathematics" in Computer Science undergraduate curriculums has shifted in the past forty years. It used to be that such courses would cover material such as abstract algebra and go into concepts such as 'sorts' and 'kinds', which is useful for algebraic specification of programs. If that is the sort of math you think you will enjoy, then buy an old book on Discrete Maths, like this one: Discrete Mathematics in Computer Science (1977) $5 shipped!
I don't believe the ridiculously expensive Susanna Epps book contains similar material, and should know, since that hideously overpriced book is what I had to use in my freshman Discrete Maths class (2003) -- I can't believe the price has almost doubled since its outrageous price even then!
You don't need to know calculus to be able to program. Computer programming is composed of very simple math operations, just addition, subtraction, multiplication, decimal rounding, and even long division (4th grade math comes in handy).
Counters are extremely useful; you need to know how to start at zero and count up. Simple. Most languages are zero based meaning that start with zero instead of starting with one. Many learners forget that. Increment and preincrement (for example, i++
and ++i
) increase the variable i
by one after or before using the variable in the statement.
Logical operators are huge in programming. Less than and greater than are used frequently to test for a certain value and stay within proper limits. You need to realize that i < 5
is the same as 5 > i
but they calculate to either true
or false
. When used like so: if (i < 5) ...
when i = 4
, then it is equivalent to if (true) ...
Likewise the AND, OR, and NOT operators are important for boolean testing. You may want to know if (i < 5 && i >= 0) ...
which means if i is less than five AND i is greater than or equal to 0. NOT (!
) and OR (||
) act in a similar way.
Some languages require you to differentiate between integers and decimals (or floating point numbers). Integer mathematics makes use of rounding in ways that is different for each language. Decimal numbers have different issues with accuracy as operations become more complex.
Some advanced techniques involve the modulus operation (%
). All that does is take the remainder of dividing two numbers. It is useful for distinguishing between even and odd numbers (e.g. rows in a table).
More general information on basics of computer programming including control structures and operators: http://computerprogramming.suite101.com/
theres a lot of types of programming. If you're designing wireless compression algorithms you'll probably want a masters degree in engineering. If you're making an online color-picker, you'll be fine with high school trig.
Mathematics for Computer Science, a free course book from Princeton gives a good coverage of the maths relevant to programming and computer science in general.
It is true that a good base in mathematics will help in programming a lot! To enhance your algorithmic thinking you can try solving combinatorics questions. Sometimes some mathematical results serve to reduce the complexity of code, so if you want to solve basic problems then make yourself comfortable with High school mathematics at least. I suggest you to read "The Art Of computer Programming" by Donald E. Knuth and "Concrete Mathematics" by Ronald L. Graham, Donald E. Knuth and Oren Patashnik. I think Concrete Mathematics will give you a good foundation of mathematics for computer science, you should give it a try.
Best of Coding!
精彩评论