Algorithms design book / cookbook for Julia?

Not having a computer science degree, I never took a course in design or analysis of algorithms + data structures at a non-beginner level. I’ve taken a beginning data structures course and implemented beginner algorithms like merge sort, quicksort, etc, but I’ve not done anything at the intermediate level.

What books on algorithm design / algorithm cookbooks / data structures do you use and/or recommend in conjunction with Julia? They can either be Julia specific or Julia friendly.

(Side note: I’m not sure this is the right sub-forum for this question.)


Have not read them myself, but The Little Book of Julia Algorithms and Hands-on Design Patterns and Best Practices with Julia might have some of that?


From the page you linked, this appears to be a beginner-level book: “Targeted at middle and high school programmers…”

I see how this might be useful for someone wanting to gain proficiency with Julia programming, but as it’s title says, its focus isn’t really on algorithm design or data structures.

From an ecosystem perspective, my observation is that Julia is still pretty young - it’s neither as large nor as mature as other ecosystems like Java, Python, or .NET. So I’d imagine that folks developing Julia code and packages are doing quite a bit of design and implementation, both in algorithms and data structures. To all you folks, did you learn these things before learning Julia? If so, what books and PLs did you use?

When I was doing my graduate work, I remember that someone in my lab had a copy of Numerical Recipes laying around (though it was an earlier version). I always thought a book like that might come in useful at some point, but didn’t like the necessity of becoming fluent in C or C++ as a gating factor. If such a book existed for Python, I’d have bought a copy a long time ago.

Is it necessary to learn C or C++ in order to gain proficiency in algorithms and data structure design?

I think algorithms and data structures, except for small syntatic differences, are language-independent. If you get a Numerical Recipes version for Fortran (or maybe even a Matlab book, that probably exists), the syntax will be similar enough so that you can adapt the examples to Julia.

In Julia you can find interesting material here: GitHub - ctkelley/SIAMFANLEquations.jl: This is a Julia package for a book project.

here: MIT 18.337 - Modern Numerical Computing

here: GitHub - mitmath/julia-mit: Tutorials and information on the Julia language for MIT numerical-computation courses.

(probably you can find many other interesting lectures by searchin “MIT lecture julia” on google)


As I said, I haven’t read those myself, just seemed the closest to what you were asking based on the recent titles I know. I learned in C first, which I generally do recommend in general for just about anyone, but as Leandro says, the great thing about algorithms is that they really are language-independent.

Oooh, if that’s true, it’s a very good insight. It means my assumptions about language dependence may be completely wrong.

Cool; thanks for this. I’m not enough of a PL expert to know what languages are syntactically similar to Julia, so it’s helpful.

Check out Introduction to Applied Linear Algebra – Vectors, Matrices, and Least Squares, Stephen Boyd and Lieven Vandenberghe.


Check out Introduction to Applied Linear Algebra – Vectors, Matrices, and Least Squares , Stephen Boyd and Lieven Vandenberghe.

+1 on this. I have this saved to my desktop as it’s an absolutely phenomenal text that includes a Julia language companion.


Another vote for the Boyd and Vandenberghe text. Clear presentation with good supplemental materials: slides and a Julia companion.

Although I share the love for this textbook of Steven Boyd’s and I wholeheartedly recommend it to everyone, it should be emphasized that it is a linear algebra (plus some intro to optimization) textbook. I am not sure if it classifies as a textbook on data structures and algorithms. At first I thought that something like Cormen’s Introduction to Algorithms, Third Edition (4th edition is coming soon) or Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne is desired. But I myselft did not learn from these text, that is why I was hesitating to recommend them. I am only aware that they are used by some for intro to algos and data structures.

But then @phendric mentions Numerical recipes, which suggests that indeed some material on numerical (linear algebra and related) algorithms is actually desired. Let me then share my recent discovery in this domain: besides Boyd’s textbook I like Toby Driscoll’s Fundamentals of Numerical Computation | Toby Driscoll. It is that kind of a (introductory yet resonably comprehensive) textbook that demonstrates all the concepts and issues with (Matlab) code. Lovely enough, @tobydriscoll seems to be exploring Julia quite a bit (see also Matlab vs. Julia vs. Python | Toby Driscoll). Maybe the next edition of his textbook will be in Julia :slight_smile: Maybe not.

As a bibliophile (and occassional reader) I keep an eye on the soon to be published book Numerical Linear Algebra with Julia by Eric Darve and Mary Wootters. Just based on the short description I cannot tell if it is just yet another linear algebra primer where textbook-grade for-loops will be rewritten in Julia, or if it will contain any deeper Julia-specific know-how that is often demonstrated by some gurus here at Discourse.

Finally, although Kwong’s Hands-On Design Patterns and Best Practices with Julia | Packt has already been mentioned here and refused by the author of the original post, I would still suggest giving this book another chance. True, it is not about algorithms per se, but it is one of the more comprehensive and compact coverages of Julian programing in Julia. It does contain a know-how relevant for Julian implementation of algorithms in Julia, including the numerical ones.


I haven’t read this book but it has Julia code Algorithms for Optimization


A lovely book. The authors have even made the PDF available for free at their website: Textbooks | Mykel J. Kochenderfer. As a bonus, another book on optimization accompanied by a code in Julia is available there too.


See the corresponding JuliaCon 2019 talk by Tim Wheeler.


Professor Driscoll mentions in one of his posts that he has taught a course from this book using Julia, and he provides the code at FundamentalsNumericalComputation.jl .

I like his automotive metaphor for comparing Python, Matlab, and Julia:

Of course, this was written several years ago; I for one don’t think Julia is in any danger of becoming just a footnote. :smile:


I’d say Matlab was more like an expensive GMC SUV. Not very well designed or built (the exact opposite of BMWs), not exactly exciting, and costing a pretty penny over the years of use.


Cleve Moler may beg to disagree…

He built a clever car everyone could drive without a “license”, bringing improvements over the years worthy of true racing cars. :slight_smile:


Amazon has a preview of this soon-to-be published book: It’s 120 pages long, with content described here:

1 Like

@ptoche, OMG, denary is used instead of decimal…

1 Like

This post was temporarily hidden by the community for possibly being off-topic, inappropriate, or spammy.

I came back recently to Matlab again where I needed to follow code with the debugger. Oh boy, what a relief comparing with the same experience in Julia.