tag:blogger.com,1999:blog-6918427997759942244.post3552176205618998576..comments2019-01-20T15:54:07.449-05:00Comments on Elegant Coding: Eleven Equations True Computer Science Geeks Should (at Least Pretend to) KnowGeoff Moeshttps://plus.google.com/115939011793378995055noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-6918427997759942244.post-84079555859932473042012-09-22T13:28:02.436-04:002012-09-22T13:28:02.436-04:00People who know that mathematics is heart of compu...People who know that mathematics is heart of computer science(CS), will understand the real importance of these equation.<br /><br />Programming/Coding is just a small aspect of CS. Real CS is mostly about the things which give life to the code written by the developers.VINAYhttps://www.blogger.com/profile/01410147700496018763noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-11514622260823663602012-09-05T18:47:55.581-04:002012-09-05T18:47:55.581-04:00like dionyziz said, you should change your first b...like dionyziz said, you should change your first big-O equivalence.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-32398590732648524192012-09-05T15:10:39.463-04:002012-09-05T15:10:39.463-04:00Looking for web references, I put this into Google...Looking for web references, I put this into Google:<br /><br />(ln(-1))/(sqrt(-1))<br /><br />I should have known what would happen. :)benbradleyhttps://www.blogger.com/profile/11913177302145223457noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-31344061838976804322012-04-02T16:15:56.822-04:002012-04-02T16:15:56.822-04:00i stay with Euler's identity, Bayes Theorem an...i stay with Euler's identity, Bayes Theorem and the binomial coefficientAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-87959745494789231062012-04-02T12:31:57.320-04:002012-04-02T12:31:57.320-04:00While some of the equations mentioned are, even fo...While some of the equations mentioned are, even for me, too theoretical (Euler's identity, case in point), keep in mind that theory is the basis of many real-world applications.<br /><br />Baye's Theorem is the concept behind most, if not all, spam filters. You use De Morgan's Law when optimizing/checking your conditionals. Public-Key Cryptography---a.k.a, why online transactions are secure---wouldn't be possible without concepts like the Binomial Theorem and Fermat's Little Theorem.<br /><br />I'm not claiming that these theories are the "end all, be all" foundation of today's technology. A spam filter relying solely on Baye's Theorem would be too naive. But making a spam filter without knowledge of Baye's, or at least of probability, is a hopeless effort.Jayhttps://www.blogger.com/profile/09662267965748603231noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-90391906043333230682012-02-19T03:45:08.319-05:002012-02-19T03:45:08.319-05:00Your first big-O equivalence is incorrect. The sec...Your first big-O equivalence is incorrect. The second part of the equivalence you wrote is actually always true, and so your equivalence does not hold if the first part of the equivalence is false (as is if, for instance, we let f(n) = n^2 and g(n) = n). The reason why this is so is because you've put the existential quantifier of k inside the universal quantifier of n, meaning that you've allowed the existence of k to depend on the value of n; but this is always true as we can just let k = 5f(n)/g(n).<br /><br />The correct way to write it is the other way around; that is, the k existential quantifier must be independent of the universal quantifier of n. In addition, you have to allow for a finite amount of values to not satisfy the inequality utilizing a n0, because big-O talks about asymptotic behavior, not general behavior.<br /><br />Here's how it should be:<br /><br />f(n) in O(g(n)) <=> exists n0 in |N: exists k in |R+: forall n in |N: n > n0 => k * g(n) >= f(n).dionyzizhttps://www.blogger.com/profile/14102709707889222530noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-85969782591355145572011-12-06T21:43:18.962-05:002011-12-06T21:43:18.962-05:00Great post! As a computer scientist and hobby math...Great post! As a computer scientist and hobby mathematician, I was elated to read this. I am now beginning my fourth year of studies and have come across a few of these (I was so happy to see Fermat's Little Theorem on there because I am in a factorization and primality testing class this semester and a number theory one next). <br /><br />I think people are getting hung up on the term "computer scientist". I took a class on modern physics and can hold a decently intelligent conversation about Einstein's Theory of Relativity. This in no way makes me a physicists. Just because you program or make computer programs, this does not make you a computer scientist. And if you have a degree in CS, be proud of your background! If you don't like the theory fine, but the importance of the backing theories is relative. Sure you maybe able to write a brute force program to find the shortest path in a graph. But why not search for a better solution? This is a problem I see in out world today. We do what works and hope for the best. We should do what works, but also look for something better.<br /><br />Ignore the haters man, this was refreshing and a pleasure to read.Corey Stubbshttps://www.blogger.com/profile/08221617871232581552noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-32293070296940503432011-11-30T06:34:06.801-05:002011-11-30T06:34:06.801-05:00Tommy McGuire: That's interesting, I never tho...Tommy McGuire: That's interesting, I never thought of the duality between ∀ and ∃ as another formulation of De Morgan's. And I agree that it's another important thing to know.Tarmilhttps://www.blogger.com/profile/02652099798546294621noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-37394489194647523512011-11-29T22:08:34.178-05:002011-11-29T22:08:34.178-05:00refreshing]refreshing]Jhttps://www.blogger.com/profile/16243232631883704631noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-48775926066995327732011-11-29T19:19:45.871-05:002011-11-29T19:19:45.871-05:00I am both mathematician and programmer. Unlike man...I am both mathematician and programmer. Unlike many software types, I value knowledge for it's own sake, yet much of it is surprisingly useful anyway.<br /><br />Unfortunately I can only dream of knowing everything and recognize there must be a limit. But I am still embarrassed by people who are proud of their narrow minds.ShawnThttps://www.blogger.com/profile/16109052047353093944noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-26497082289362631332011-11-29T14:42:11.852-05:002011-11-29T14:42:11.852-05:00It's not much of a generalization, but I prefe...It's not much of a generalization, but I prefer the predicate version of De Morgan's:<br /><br />~∀x p(x) ≡ ∃x ~p(x)<br />~∃x p(x) ≡ ∀x ~p(x)Tommy McGuirehttps://www.blogger.com/profile/11707703831241539347noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-64430107132807150642011-11-29T14:04:08.868-05:002011-11-29T14:04:08.868-05:00What's cool about Euler's is if you rewrit...What's cool about Euler's is if you rewrite it for pi. <br /><br />pi=(ln(-1))/(sqrt(-1))<br /><br />pi in terms of two imaginary numbers.Adamhttps://www.blogger.com/profile/12477433522655950176noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-81428963842606772492011-11-29T13:42:23.853-05:002011-11-29T13:42:23.853-05:00Formalism tends to dilute learning as far as I kno...Formalism tends to dilute learning as far as I know. I was writing a tiny software based 3d engine with texture mapper, and although I knew I could plug in standard homogeneous transformation matrices, i opted to work out the trig on paper and do it manually. <br />Much more easy to visualize whats happening, for someone reading the code.<br />A few months ago I "discovered" integral images on my own, only the concept seemed so trivial that I didn't give it a fancy name. Later I find that it's considered a big deal. So I agree that you need to know the math, but conceptual understanding beats the formula any day...Vivekhttps://www.blogger.com/profile/13340953911780739648noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-28127042709088654372011-11-29T12:42:51.232-05:002011-11-29T12:42:51.232-05:00Ohh man - Y combinator? there are tons of good pro...Ohh man - Y combinator? there are tons of good programmers that have no idea about this ....Victorhttps://www.blogger.com/profile/02923137136978825287noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-70946882260207856252011-11-29T12:15:57.981-05:002011-11-29T12:15:57.981-05:00@Jasmine... But computer scientists help make comp...@Jasmine... But computer scientists help make complex models to slow down the development process.<br /><br />Certainly you can see the value in that?<br /><br />Granted, in the 3D world, if you don't know your computer science, you might as well go home.thoinesshttps://www.blogger.com/profile/01491480455090559144noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-65872277819975320352011-11-29T11:44:06.881-05:002011-11-29T11:44:06.881-05:00Computer scientists are so amusing... do you guys ...Computer scientists are so amusing... do you guys ever get anything done? I've been programming for 30 years and only knew a few of these.Jasminehttps://www.blogger.com/profile/09618734526176282409noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-77233199681120984572011-11-29T10:52:34.348-05:002011-11-29T10:52:34.348-05:00Good article! A fresh reading!Good article! A fresh reading!Vasu Srinivasanhttps://www.blogger.com/profile/10021094634221315273noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-70944392468637680242011-11-29T10:51:46.329-05:002011-11-29T10:51:46.329-05:00"But if you understand social psychology you ..."But if you understand social psychology you can create Internet, which was truly happen ."<br /><br />^Thisthoinesshttps://www.blogger.com/profile/01491480455090559144noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-3245116037134037752011-11-29T10:44:22.748-05:002011-11-29T10:44:22.748-05:00Josh: If you think that graph theory is mostly inf...Josh: If you think that graph theory is mostly informal then there are loads more equations you could do with knowing. You might try reading Bernard Carre's "Graphs and Networks". Graph theory is one of the most formalised areas of computer science.digitighttps://www.blogger.com/profile/18426086162354899347noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-24255499684381758062011-11-29T10:41:11.889-05:002011-11-29T10:41:11.889-05:00Karmi: Did you notice that the equations were for ...Karmi: Did you notice that the equations were for computer science geeks, not for programmers?digitighttps://www.blogger.com/profile/18426086162354899347noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-66782411325727934962011-11-29T10:16:42.186-05:002011-11-29T10:16:42.186-05:00From other point is logic, mathematic and programm...From other point is logic, mathematic and programming the same thing.<br /><br /> And from another point are all things the same. <br /><br />Then we used to say: University . :)<br /><br />Steven Jobs learned at the UNIVERSITY kanJi then Apple is happen.<br /><br />;)memoSkhttps://www.blogger.com/profile/09428193391169315099noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-14399389597283210952011-11-29T10:04:39.170-05:002011-11-29T10:04:39.170-05:00You've left out the most important formulae th...You've left out the most important formulae that's ubiquitous and always always used by everybody in I.T.:<br />The Three B's <br />"Bullshit Baffles Brains"barelyawarehttps://www.blogger.com/profile/15385590501599614549noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-15721220539856665222011-11-29T10:00:54.294-05:002011-11-29T10:00:54.294-05:00Mathematic != PROGAMMING
But if you understand s...Mathematic != PROGAMMING <br /><br />But if you understand social psychology you can create Internet, which was trully happen . <br /><br />If you understand mathematic you can do 3d programing and also opmizing code . Mathematic could by used like programmers hammer as also other skils .memoSkhttps://www.blogger.com/profile/09428193391169315099noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-16164990801029673352011-11-29T00:47:14.896-05:002011-11-29T00:47:14.896-05:00I would have recognized DeMorgan's if it used ...I would have recognized DeMorgan's if it used the format I'm more familiar with seeing for negation. A line over the expression. <br /><br />For a few more of the equations, I was familiar with the concept, but fuck the notation.<br /><br />For the rest, they seem more likely to be used by someone doing something related to machine learning/AI/information theory than you run of the mill I-spend-all-day-parsing-user-input programmer.<br /><br />Thank you for making me feel like I'm not a 'true' computer scientist. Next would you like to tell me about how I'm not a 'man' because I don't like to work on cars?Eric Bettshttps://www.blogger.com/profile/01905274586092342378noreply@blogger.comtag:blogger.com,1999:blog-6918427997759942244.post-68445257638506321462011-11-29T00:10:38.867-05:002011-11-29T00:10:38.867-05:00nelhage, I am confused by your last objection. Ter...nelhage, I am confused by your last objection. Terms in the simply-typed lambda calculus are strongly normalizing so no implementation of a fixed-point combinator (which can be used to construct divergent terms) can be well-typed in the STLC.Coghttps://www.blogger.com/profile/05577836853536292311noreply@blogger.com