Hacker Newsnew | past | comments | ask | show | jobs | submit | MarvelousWololo's commentslogin

Not OP but I’m interested in this subject as well. I took a look at this book and others that are similar and I’ve realized my foundations on math are really lacking to even understand the given examples. Since I only had the opportunity to finish my high school diploma and this was several years ago I wonder if you could have any suggestion to brush my math knowledge up in order to properly understand the examples of these books. The thing for me is that I’m not sure where I should start. Would you know any resource to introduce me to the math foundations in order to understand such texts? Or maybe math concepts that I should study before I dig in. I really appreciate it. Thanks.


I'm not sure if this is universally true or not, but the algorithms courses at the universities I'm familiar with require a course in discrete math as a prerequisite.

You can find Discrete and Combinatorial Mathematics (an Applied Introduction), 5th Edition, Ralph P. Grimaldi online and an answer key can be found online as well. (This book covers two discrete math courses. Chapters 1-5, 7, 8, 12 is a first course in discrete math. I'm not sure what chapters the second course covers, but that requires linear algebra as a prerequisite.)

It's not perfect, but it's a start. I think you need to be familiar with some high school algebra, exponents, and logarithms. You can find some review information in the appendix. If you have troubles with recalling that information, then you can try Khan academy. (It really is an if you don't use it, you lose it situation with much of math.)

You're probably aware of this already, but most people don't read the book and come away with the knowledge required to solve the problems. You'll need to work through the examples in the chapter, be able to recall the definitions and theorems, and then work the exercises at the back of the book.

I think the discussion of proof methods is pretty poor in the book. You can find many intro to proof method type supplemental notes online to help fill in the details.

There really is so much information out there that you can pretty much always find an alternative explanation or viewpoint for undergrad level material. Many profs will post their own lecture notes, homework, and solutions. There are some math forums that have explanations. So find a book you're reasonably comfortable with and supplement it with extra material.


The best book if you have any programming background is 'Mathematical Modeling and Applied Calculus' by Joel Kilty and Alex M. McAllister reviewed here: https://www.maa.org/press/maa-reviews/mathematical-modeling-...

There's a small workshop for it here: https://learnaifromscratch.github.io/calculus.html throwing in some youtube tutorials. The book presents everything as functions and their parameters, like linear functions, trig, sigmoidal, e and logarithms, you learn all the parameters to these functions and can type into desmos online graph to see what they're doing visually. You don't have to do the whole thing just use it for background material when an algorithm text uses calculus methods like L'Hopital's rule.

Poh-Shen Loh has a discrete math course open on his youtube channel https://www.youtube.com/c/DailyChallengewithPoShenLoh/search... you can use the book he recommends to look up anything that is assumed knowledge in lectures. Discrete Mathematics, by L. Lovász, J. Pelikán, and K. Vesztergombi. A book called Asymptopia by Spencer is well done too, good chapters for learning everything you want about big-O/omega/theta some topics are advanced and some anyone can do.


>Since I only had the opportunity to finish my high school diploma and this was several years ago I wonder if you could have any suggestion to brush my math knowledge up in order to properly understand the examples of these books.

You should really consider taking a few community college math courses if you're serious. Math is extremely difficult to learn on your own. Not only because of not knowing what you don't know, but because it requires intense effort and repetition which is very hard to force yourself to do. You can work through the concepts and delude yourself into thinking you understand something when really you're just hand waving it. Taking an actual course and being faced with the gaps of your knowledge by someone else is very humbling and essential to actually learning it.


That of course assumes the community college is serious about its mission to educate. Most of the students just want to pass because the math course is required for this or that vocational program, and in this age it's wiser to humour the students and wave them through.


> You can work through the concepts and delude yourself into thinking you understand something when really you're just hand waving it

I keep seeing this and I don't quite understand how this one works.

If I were studying math on my own (which I've done and still do), I'd do the following:

1. Pick a book. Say, Rudin's Principles of Mathematical Analysis[0]. Read a section, then attempt problems. Pick a problem. Say, "prove {1/n: n is natural} U{0} is compact directly from the definition(not using Heine-Borel)". It's guaranteed your "proof" is not a proof.

2. Compare your solution to existing solution manuals or ask a question on MSE[1]. Since the given book by Rudin is super-massively famous, each question has probably been asked/answered about a bagillion times each on MSE, so just searching MSE alone would likely to spit out many answers to your questions. People on MSE will tell you exactly why your "solution" is wrong and where you tripped up. Sometimes even the clarifying answers are hard to understand. But then you can ask new questions, think more, correct your misconceptions until it all finally clicks. Do that with all the rest of the problems[2].

I don't see how the process above is delusional.

[0] This book is not a realistic fit for a novice, though. Instead, one would start with books like [3], [4], [5], [6] to learn how to prove things and think like a mathematician would.

[1] https://math.stackexchange.com/

[2] In reality, the more math you see and do, the more mathematically mature and less dependent on others(to check your work) you become. In fact, if you can solve any problem in "B@by Rudin" and some famous abstract algebra textbook (say, Dummit & Foote's "Abstract Algebra") cold, you're way ahead of most any undergrad math major in the world! Because standards on undergrad math majors are not that high, nor that brutal the world over no matter what they say. If, additionally, you can solve any given problem in a book like, say, Hatcher's "Algebraic Topology" or any other famous grad level textbooks on, say, differential geometry or, uhh, functional analysis, you're officially in the big leagues. Again, if you're worried about being delusional about your proofs, you can always present them on MSE.

[3] "Book of Proof" by Richard Hammach. It's online free.

https://www.people.vcu.edu/~rhammack/BookOfProof/

[4] "Discrete Math" by Susanna Epp

https://www.google.com/books/edition/Discrete_Mathematics_wi...

[5] "How to Think About Analysis" by Lara Alcock

https://www.google.com/books/edition/How_to_Think_about_Anal...

[6] "Linear Algebra" by Kuldeep Singh

https://www.google.com/books/edition/Linear_Algebra/BJNoAgAA...


> I keep seeing this and I don't quite understand how this one works. > I don't see how the process above is delusional.

Because those that are just starting to learn math don't take your approach to learning.

I had a lot of bad habits that I had to break when I was learning math that really caused me to do poorly in many classes. If you are coming at it from a more qualitative field, then it's very easy to read the book and come away with nothing from it.

I'm taking a discrete math course and I was trying to offer up some advice on the school's subreddit to someone struggling in the class. They mentioned something about me taking the easier prof, so that's why I'm doing well. I said that I had fully worked at least 50 problems in each chapter we covered and asked how many they had done. The response was I went to lecture, read the notes once, and attempted the homework exercises; I didn't know you had to do some much work in this class.


Step 1.5: Decide you're not making progress on the problem, look up the answer on MSE, say, "OK, I get that" and go on.

Alternate: Ask a question, get a not-quite-right answer, and find yourself completely stuck two chapters further in with no way of figuring out where you went wrong.


Concrete Mathematics by Graham/Knuth/Patashnik is still a great resource on the kind of mathematics and mathematical thinking we need in CS, but I'm not sure if it is fully accessible with a high-school level of Maths.

To be perfectly honest, I doubt I would've ever gotten through college-level maths without being forced to do it, as it can be very frustrating and difficult in the beginning. Unless you are quite confident in your self-discipline and enthusiasm to learn maths, rather than books I'd recommend something interactive (online course, forums, challenges).

If you are interested in a starting point to learn mathematics that are relevant for CS, I'd start with propositional logic and boolean algebra, as well as proofs via induction.


Art of Computer programming starts at a high school level.

It's very rigorous and considered one of the more difficult reads. But if you start at chapter 1 page 1, it covers all the math you'll ever need for the rest of the books (which is sufficient maths to reach masters or even PH.d level comp sci)

I know I've recommended it to high schoolers. A lot of math is just getting used to the nomenclature and vocabulary. The sooner you get used to rigor the better


AoCP is an absurdly inefficient way to learn algorithms that 99.999% of people won’t need


TAOCP is probably the best book if you approach it as infotainment/puzzles casual reading on the weekend reading about the history of trees and their mathematical properties kind of reading not anxiety filled interview passing cramming. Even autodiff online algorithms is in there something heavily used right now.


I've bought them and looked through it but if someone asks how they should go about learning algorithms for leetcode there are so many better options thank Knuth. That is years of effort to get through.


Most algorithm books don't cover the math like summations or generating functions.

Chapter one of TAOCP for better or worse, is a very rigorous mathematics introduction.

I'm not recommending it for it's algorithms (which are unfortunately somewhat out of date). I'm recommending it because it's an incredible mathematics introduction, albeit a very difficult one.


Can you elaborate on "out of date"? I've seen a lot of books considered out of date because of their publishing date, but to what's exactly being compared to be considered so?


Well, Volume 4 was released in 2016 and is not out of date at all. Its a very good read, but on an obscure subject.

But Volume 1 has lots of out-of-date advice and is somewhat of a shame, because its otherwise an excellent introduction to computing + the mathematics needed to understand computing. For example, the assembly language is based on the 1960s computers, such as decimal computing and 6-bit numbers (based on the days of old, before 8-bits were standardized).

Functions are introduced by self-modifying code first and foremost: by rewriting "jump" instructions at the end of functions as a return. No one does this anymore: pretty much all compilers do the stack-thing instead. (Push return address onto a stack register).

The Fascicle on MMIX updates a lot of those sections to a modern-like 64-bit assembly language. However, the sections on cofunctions, arrays, garbage collection aren't part of that update... and should be updated (Knuth's discussion on these concepts is great, but are told in an "old way" based on 1960s tech)

Volume2: Seminumerical Algorithms (chapter 3 / 4) is again, a decent introduction to the subject. But the RNG stuff is fully obsolete. The statistical tests may have passed muster in the 1970s or 1980s, but today's statistical tests (aka: PractRand) go above and beyond what Knuth discusses.

There's a lot of interesting discussions in the randomness chapters: such as the efficacy of multiplication when it comes to bit-mixing (and I feel like modern RNGs are sleeping on that tidbit), but modern RNGs are generally based on a simpler sequence of ADD / XOR / SHIFT instructions based around the concept of permutations / perfect bijections.

----------------

Ironically, I consider the section on "tape sorting" to be "suddenly up-to-date" again. Modern RAM acts more like a tape (sequential is far faster than random), meaning that thinking of sorting problems in terms of external-sort is surprisingly relevant.

Given that today's cache is 768MB (see AMD's Milan-X CPUs: expected to be a ~$5000 CPU-server chip), we see that L3 cache basically serves as the RAM from Knuth's time, while today's DDR4 RAM really acts as the fast-sequential / slow-random layer that Knuth studied so much.


The obvious example for me is the chapter on tape merging


Modern "RAM" is far faster at sequential than it is at random access.

So tape merging is in fact, useful again strangely enough. That's one of the sections that suddenly and surprisingly has regained relevance.



I had exactly the same issue with this book. It brought back memories of seeing teachers solve problems on the board and skipping some obvious (to the teacher at least) step.

This prompted me to check out khan academy. Man, that is an incredible resource. I really envy the schoolchildren of today that have instant access to this incredibly smart tutor, who can be rewinded at the touch of a button.


Check out the course 6.042J from MIT (Mathematics for Computer Science).

https://ocw.mit.edu/courses/electrical-engineering-and-compu...


Would you care to share your source? Thanks.


https://www.astrazeneca.com/media-centre/press-releases/2020...

If you're looking for different articles from other sources (as opposed to this press release), you can find quite a few more by going to your favorite search engine and trying a query like "astrazeneca vaccine cost"


As a front end dev I’ve been thinking about it for so long but honestly I don’t know what I should build or study first.


It’s always best to work on something you’ll actually use. Maybe think about an app you already use but want to improve or simplify (a to-do list without the frills for instance).

As far as learning, I think this Stanford course is the best way (though not for those who aren’t absolute beginners to programming). I notice it hasn’t been updated lately but it should be current enough https://www.youtube.com/watch?v=TZL5AmwuwlA


Unity impose hardware constraints that are difficult to overcome in poorer places too. I have an old Dell at home and I won't even try to install Unity on it because it struggles to Windows 10. It's a perfect fine machine for coding with a simple Linux distro.


as a remote dev i usually do my bookings on airbnb or booking but sometimes i wish the place i rented were specifically target for tech people. like with good, fast and reliable internet connections. good and easy access to public transportation. and inspiring views. i wonder if there are other remote devs around here who would be interested by that.


also i'm trying to make it as open as possible to like minded folks, so i've put this little repo together so if you feel like editing something about the description about the facebook group itself, just open a pr: https://github.com/MarvelousWololo/fifteen-to-thirty/issues


as a remote dev i usually do my bookings on airbnb or booking but sometimes i wish the place i rented were specifically target for tech people. like with good, fast and reliable internet connections. good and easy access to public transportation. and inspiring views. i wonder if there are other remote devs around here who would be interested by that.


web developer looking for a 6-8 months contract in the greater london. skills: nodejs, react (my angular is a little bit rusty). £430/day. start date: second half of august. contact: marvelous.wololo@gmail.com. experience: i've been recently working with dashboards for big data and fintechs.

Location: london

Remote: no

Willing to relocate: where?

Technologies: javascript

Résumé/CV: by request

Email: marvelous.wololo@gmail.com


Sorry about the ignorance but how do you run it from your garage? What about bandwidth? Could you share the url? Also would you recommend me any guide to get started?


The usual roadblock in this process is getting ports exposed to the internet. In the best case this can just be done on your router configuration. In the unfortunately common case the ISP blocks you from doing this and the only solution is to change ISP.


I've heard of ISPs blocking ports, but not in Europe. I just forward ports 80 and 443 to the server (and pinhole the IPv6 ports) and it's done.

The upstream bandwidth is about 60Mb/s, which is fine for almost everything.


How can I do such thing? I'm in Europe as well. Do you have any guide to get me started?


The only thing you have to google for is “Port Forwarding” and it’s usually a few clicks in your router interface. Then you just run the service you want on your computer / NAS / Raspberry Pi and tell your router to forward the port to your service IP / Port. If you have a dynamic IP at home you probably also do have to get a script or something to update your domain records if you want to point a domain to your home service.


Unfortunately my visa is attached to my employer for one year. If I look for a new job I have to go through the visa application process again.


> If I look for a new job I have to go through the visa application process again.

If you are a sensitive person who cannot tolerate being shouted at then I'd say it's not a big issue if you go through the visa process again. If you are truly miserable in your current situation like you said, then it's not good for your mental health to stay there longer than absolutely necessary.


Not really, I'm a software engineer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: