this idea is a complete rip off an article that appeared in wired a little while ago and it got me thinking what would my list for computer science look like? plus i thought it might be a fun post and unlike the wired list this one goes to eleven. so here they are in no particular order:

binomial coefficient

the binomial coefficient equation generates pascal’s triangle and gives you the coefficients for the binomial theorem these ideas are often attributed to pascal but in fact they have been known in part for over a millennia.

as i mentioned that this list is no particular order and i don’t wish to play favorites but if there is one equation here that you should really consider learning and committing to memory this is it. it is central to combinitorics which has connections to many areas of math, i guess i should qualify that if you are serious about computer science and math related programming topics then you should be able to recite and apply it from memory, even when you are drunk, sleep deprived or being held at gun point. ok that might be a bit much but you get the idea. if you are programmer and you haven’t learned it, or need a refresher, i have a post that relates it to thejava collections api.

demorgan’s laws

logical form:

set form:

ok so that’s like four "equations" for demorgan’s laws, one can’t help but to struck by the similarity between the two sets and this is not a coincidence these two sets of formulas are essentially the same thing, they are special cases of complemented distributive lattices† which means technically it’s really just two formulas:

in this case the ∨ symbol means lattice join operation and the ∧ symbol is the lattice meetoperation and the dash with the right downward mark means lattice complementation, i used this to differentiate from the tilde for boolean complementation. also these two formulas arecategorical duals of each other, which means that if one were smart and had a good grasp ofcategory theory we could probably be really ocd about it and get it down to one formula.

understanding set theory and boolean algebra are very important basic concepts in our profession and the boolean version can make you better programmer, as you can use it torefactor logical if statements.

this equation and these concepts are not only central to linear algebra but these linear algebraic ideas and others are both used and extend into many other areas of math includinglinear transformations and graphs in terms of matrices like the adjacency matrix and much more.

linear algebra is becoming increasingly central to the types of things we are doing in our profession, it is used heavily in statistics and machine learning not to mention the page rank algorithm is based in part on this equation.

pumping lemma for regular languages

no comp sci list would be complete with at least one formula from either formal language theory or automata theory. the problem is that these two are pretty different from other areas of math in terms of "equations" i tried to think of some basic ideas and the pumping lemma came to mind, and i found the above formula concisely expressed on wikipedia. this version of the pumping lemma is a more limited version of another theory which is used to check whether alanguage is regular. also this is maybe not the best choice as it is pretty dense, if you want a better explanation i recommend this.

while this "equation" is pretty specialized, it is actually a special case of the more general iteration theorem, the real point here is really about more general domain knowledge. it is central to what you do every day you are programming such as compilers and regular expressions not to mention the almost ubiquitous kleene star.

i confess after all my machinations to try to reduce demorgan’s laws down to less equations i am totally cheating here by pulling a twofer in including two formulas, both shannon’s information theory:

and the formula for chaitin’s constant, which is associated with algorithmic information theoryand kolmogorov complexity:

interestingly this area has a parallel in the physical word, in terms of thermodynamic entropy, which also parallels the boltzman equation mentioned in the wired article. seth loyd draws some interesting connections between computation and the physical world including entropy and boltzman’s equation.

in programming and computer science information is our business and these ideas are central to many things that we deal with especially the storage, transmission, computational transformation (like compression), and computation of information. we’ve already seen the possible relationship between both of these theories and reusability and software frameworks.

bayes' theorem

of all of equations on the list, bayes' theorem may stand out on its own merits as being one of the most recognizable and it might even qualify as a poster child for the statistical revolution sweeping our industry. it rose from obscurity to being used for spam detection and with such applications as classifiers, machine learning, data mining and more.

mathematically it is part of a rift in statistics and probability and i confess i may not yet call myself "an initiate of the bayesian conspiracy" but it hard to deny its utility plus there seems to be a more axiomatic basis that relates to boolean logic set theory, which makes it all the more alluring.

fermat’s little theorem

these two equations of fermat’s little theorem are really the same equation written in two different forms, where (a ⊥ p) means coprime and (p ∈ p) means prime.

this is a beautiful little theorem in number theory which can be generalized and written even more succinctly using eulers totient function which is represented by φ (n):

these ideas are crucial for understanding encryption algorithms like rsa and there’s this cool result.

natural join

natural join, like all of the relational algebra join operations is a composition of the more basic, operations: selection (σ), projection (π), cartesian product (×), set difference (-) and union (∪). natural join is the cartesian product of two tables selecting matching rows and eliminating duplicate columns. (in the formula above the projection (π) is the set (a) of attributes with duplicates removed and then selects (σ) the set (c) of common attributes which match in both sets and are equal in both sets.)

the relational algebra is in my opinion a bit of an odd beast when it comes to algebraic structures, but if you use sql you are already using an implementation of it. as data persistence becomes more heterogeneous i think understanding these concepts, will become more important. additionally relational algebra also has strong ties to abstract algebra[ and category theory[.

the fixed-point (y) combinator

just as we need a "equation" from formal language theory or automata theory we really should have one that is related to lambda calculus, in this case this equation is in the untyped lambda calculus. even though the fixed-point combinator stands up on its own, it is fairly well known, well at least in name due to the use of it by paul graham for his incubator (y-combinator).

the fixed-point combinator allows one to implement anonymous recursion which is a powerful programming technique. it also ties into some deeper theoretical aspects of computer science and logic such as combinatory logic.

o(n)

many cs majors may cringe at this, and another possible reaction is that’s not much of an equation. there’s actually quite a bit to this for example did you know there are some substantial and quite beautiful equations associated with this seemingly simple formula. they are:

also the following is a definition of (lim sup) limit superior:

where inf is infimum and sup is supremum two concepts that seem to show up quite a bit especially when you are concerned with bounds like with lattices and they also seem to show up in relation to topology.

and we all know why we should care about his one: algorithms, algorithms, algorithms.

euler’s identity

euler’s identity is also listed in wired’s article and i have to agree that it is one the most beautiful and intriguing formulas in math.

now this isn’t really as relevant to cs as the other formulas but if you a true computer geek you are hopefully some kind of math geek, and this is such a great formula, not to mention that it appears in the simpsons' homer3. it’s actually a specific case (where θ = π) of euler’s formula:

these formulas will give one a better understanding complex numbers which are needed in other areas of advanced math also these formulas relate to fourier analysis which does have applications in computer science.

i am curious to see how well this list holds up, how will i feel about it in a year? also in writing this i realized that i still have quite a bit more to learn about at least half of this list, if not all of it, which made it hard to write as it was quite a little (unfinished) research project. i have already written individual articles on several of these equations and have at least two in the works for linear algebra, at least two on the relational algebra and one planned for pascal’s triangle, and those are just the ideas i’ve already had, who knows what the future holds. i hope you enjoyed it as much as i did writing it.

† the set version may not apply to all cases in set theory, this assumes union and intersection over the power set of a set universe, this would be closed under these operations and would include complements of all elements. the set universe is the upper bound and the empty set is the lower bound.

From： www.elegantcoding.com

About author

Popular
Links

- 2012\'s Job Opportunities Won\'t Be Much Better
- The 25 Best Jobs
- ETFs with exposure to 1347 Property Insurance Holdings, Inc. : December 14, 2016
- 1347 Property Insurance Holdings, Inc. Appoints Industry Veteran Dan Case as Chief Operating Officer
- 1347 Property Insurance Holdings, Inc. :PIH-US: Earnings Analysis: Q1, 2017 By the Numbers : June 1, 2017
- Rennova Health Reports First Quarter 2017 Financial Results
- Repligen to Participate in 14th Annual Craig-Hallum Institutional Investor Conference
- Corporate insiders have sold $4B in stock in 30 days; here's who's buying and selling in the Triad
- Preformed Line Products Now Provides all Hardware Needed for ACCC® Conductor Installations, Worldwide
- Preformed Line Products Now Provides all Hardware Needed for ACCC® Conductor Installations, Worldwide