# Math heavy programming challenge book. [closed]

I know how to code and some math. I love Project Euler because it combines both math and programming. Please recommend some math heavy programming challenge books as I can't seem to find any on Google.

Also please recommend some topics that combine computer science with mathematics (like Discrete mathematics or combinatorics). I don't know enough math to know what to search for.

• Are you looking for puzzles or for research topics? For the former, Project Euler is probably the standard. You can slo go to leetcode and filter with the "math" tag but that may not sufficiently scratch the itch (they're almost all modular arithmetic, permutations, or prime number related questions). For the latter, depending on your background, computational algebraic geometry is super cool, and/or computational number theory. Commented Jul 11 at 8:27
• I was searching for both puzzles or research topics I could get into. Could you list some more research topics which requires both the ability to build algorithms and math. Commented Jul 11 at 8:31
• For "probability and statistics" there is, of course, Frederick Mosteller and his Fifty Challenging Problems in Probability with Solutions, which I used to put my Mathematica skills to good use.
– gwr
Commented Jul 11 at 9:35

As this is a soft question, I will provide a soft answer. I don't know any challenge books, so I will focus on the second part of your question. Discrete mathematics and combinatorics are good, but where the interplay of mathematics and computer science really shines is in graph theory. I don't have a great reference for this exactly, but a good place to start (depending on your level) is Cormen at al., Introduction to Algorithms. If you know a lot, just skim the chapters that sound interesting.

Computing run-time of algorithms and data structures is also a classic example of the interplay of math and programming, and I'd think you want to be very comfortable with this.

Also, an honorary mention to number theory. A lot of conjectures has been proven and disproven by running an effective algorithm. For example, if the Collatz conjecture is wrong, then finding a counter-example is just writing some efficient code! (this is a joke, don't try this).

Other things to Google are: Computational mathematics, linear programming (though not that kind of programming) or generally mathematical optimization, and computational number theory. If you want something very math heavy, and are okay with a good bit of prerequirements, you can check out applied algebra and geometry, such as Cox, Litlle, O'Shea, "Ideals, Varieties, and Algorithms. An Introduction to Computational Algebraic Geometry and Commutative Algebra".

• I will second the recommendation of Ideals, Varieties, and Algorithms and also add on some "sequel" recommendations of Cox, Little, O'Shea's Using Algebraic Geometry as well as Bernd Sturmfel's Algorithms in Invariant Theory Commented Aug 6 at 21:21

If you like Project Euler style problems, really the book you should be reading first of all is A = B.

When I studied maths at university, any programming project set to us was a maths problem disguised as programming, so I have a couple of ideas!

1. Wolfram Challenges: lots of puzzles which one can do, with a mathematical flair. See here: https://challenges.wolframcloud.com/
2. Computational Maths by Oxford University: a course which is open source by Oxford university. It’s got lecture notes which may help you build up mathematical knowledge, problem sheets to have a go at, at a 40 page booklet of project ideas. See here: https://courses.maths.ox.ac.uk/course/view.php?id=4931
3. Berkeley University’s Mathematical Project Ideas: Berkeley has a webpage with various mathematical programming project ideas, where each project proposal has suggested texts to read. See here: https://math.berkeley.edu/wp/drp/project-ideas/
4. LeetCode: This website has a range of problems to work through and code, including a fair number which have a mathematical theme. See here: https://leetcode.com/

And perhaps a very important resource, as this will simultaneously allow you to develop strong mathematical skills alongside the programming in a formal manner, ‘Concrete Mathematics: A Foundation for Computer Science’ by Donald Knuth, Oren Patashnik, and Ronald Graham. See here: https://www.amazon.co.uk/Concrete-Mathematics-Foundation-Computer-Science-ebook/dp/B08F5H9DYM

A final thought, consider looking for ongoing research in applied mathematics online, reading through research papers and proposals. A lot of applied mathematics requires elements of programming, particularly if you look into optimisation problems.

Best of luck! I hope this was useful. If you have any further questions about these resources, feel free to ask.

If you have not already tried it, you could use the search line "experimental mathematics". There is for instance a well established journal (https://www.tandfonline.com/journals/uexm20) with this name. The focus is mainly mathematics, but I suspect some articles there include coding aspects. As a research journal, it is not exactly a challenge collection, but maybe it can give some inspiration? (I don't know if you have access to a university library but the older issues, up to 2012, seems to be available on Project Euclid. )

In addition to the subjects mentioned above, I could add fractals and chaos... althhrough I am not sure how much of a challange the typical coding in those subjects is.

• Searched the journal and found articles that scratch the itch. Commented Jul 11 at 10:10