Sunday, January 30, 2011

The extravagant burial of super-star Leibniz.

"Although today we recognize his contributions to be of outstanding importance, he died essentially neglected, and only his secretary attended his burial." (http://www.math.nmsu.edu/~history/book/leibniz.pdf)

Another interesting tidbit, the crucial importance of a mentor:
"In 1672 Leibniz was sent to Paris on a diplomatic mission, beginning a crucially formative four-year period there. Christian Huygens (1629–1695), from Holland, then the leading mathematician and natural philosopher in Europe, guided Leibniz in educating himself in higher mathematics, and Leibniz’s progress was extraordinary"

Feels like the equivalent of a one on one MsC in higher mathematics.

Yet another interesting piece of information, which underlines how everything is so simplified and post rationalized in a way that a lot of useful information is lost, is the fact that the now 'obvious' 'Fundemental Theoreom of Calculus' originally came from a publication by Leibniz (ignoring the Leibniz/Newton debate) called "Supplementum geometriae dimensoriae, seu generalissima omnium tetragonismorum effectio per motum: similiterque multiplex constructio lineae ex data tangentium conditione " or in English "More on geometric measurement, or
most generally of all practicing of quadrilateralization through motion: likewise many ways to construct a curve from a given condition on its tangents" publish in the scientific journal "Acta Eruditorum"

Yes, he called it 'a supplement' ... please teach the history of math!


Which brings me to the find of the month:
http://www.math.nmsu.edu/~history/ is a project that has a mission statement this is SO much in line with our attitude towards mathematics, and they even have books, stumbled upon it while reading about Leibniz.

Mission statement: "Our journey towards utilizing original texts as the primary object of study in undergraduate and graduate courses began at the senior undergraduate level. In 1987 we read William Dunham's ..."
.

Thursday, January 27, 2011

66 Points to score your shooter AI.


I present a table that tries to capture the amount of AI sophistication in current shooters.
It is based on my experience, conversations with AI programmers, reviews, user comments and gameplay videos.

The points are roughly sorted by difficulty of implementation with current standard techniques.

It has been laying on my disk for quite some time waiting for a proper article for which I am never finding the time, so I finally gave up and decided to release it in hope for it to be useful even in this summarized table format.



Thursday, January 20, 2011

The plagiarize series - Jan C. Willems - In Control, Almost from the Beginning Until the Day After Tomorrow


"The work involved in preparing publications comes for a large part at the expense of time to think. In science, more writing goes together with less reading. The sheer number of publications makes it also very difficult to get acquainted with, and evaluate a new idea.
I miss the emphasis on breadth and depth, on quality rather than quantity, on synthesis of ideas, on debate and scrutiny rather than passive attendance of presentations, and on reflection rather than activity.
Sure, euphoria bears creativity, and skepticism paralyzes. However, questioning and criticism is an essential part of science. I have seen too many high profile areas collapse under their own weight: cybernetics, world dynamics, general systems theory, catastrophe theory, and I wonder what the future has in store for cellular automata, fractals, neural networks, complexity theory, and sync."

"Life is what intrudes on you while you are learning mathematics" (Jad Nohra & Tom Lahore)

Monday, January 17, 2011

Sunday, January 16, 2011

The plagiarize series - EWD1036

what is an EWD: "Dijkstra was known for his habit of carefully composing manuscripts with his fountain pen. The manuscripts are called EWDs, since Dijkstra numbered them with EWD, his initials, as a prefix. According to Dijkstra himself, the EWDs started when he moved from the Mathematical Centre in Amsterdam to the Technological University (then TH) Eindhoven. After going to the TUE, Dijkstra experienced a writer's block for more than a year. Looking closely at himself he realized that if he wrote about things they would appreciate at the MC in Amsterdam his colleagues in Eindhoven would not understand; if he wrote about things they would like in Eindhoven, his former colleagues in Amsterdam would look down on him. He then decided to write only for himself, and in this way the EWD's were born. Dijkstra would distribute photocopies of a new EWD among his colleagues; as many recipients photocopied and forwarded their copy, the EWDs spread throughout the international computer science community. The topics were computer science and mathematics, and included trip reports, letters, and speeches. More than 1300 EWDs have since been scanned, with a growing number transcribed to facilitate search, and are available online at the Dijkstra archive of the University of Texas.[6]"

EWD1036 partially explains (pages 4,5) why we started at calculus :) Thank you Mr. Dijkstra!

Also of note:
"Computer science as taught today does not follow all of Dijkstra's advice. Following Dijkstra's earlier writings, the curricula generally emphasize techniques for managing complexity and preparing for future changes. These include abstraction, programming by contract, and design patterns. ....."
I wonder how that plays with the whole OOP vs. DOD topic.

Thursday, January 6, 2011

While doing some basic calculus exercises, I bumped into proving the expression below, that shows that the (Riemann) definite integral of x2 is independent of the choice of sampling number.

This is expected, but it is nevertheless very impressive how elegantly the algebra works out when get down to it, wow.

Tuesday, January 4, 2011

The plagiarize series - Felix Klein - Elementarmathematik vom höheren Standpunkte - 1908

...
"I can characterize its standing most clearly perhaps, by the somewhat paradoxical remark that anyone who tolerates only pure logic in investigations in pure mathematics must, to be consistent, look upon the second part of the problem of the foundations of arithmetic, and hence upon arithmetic itself, as belonging to applied mathematics."

...

"With the construction of the calculating machine Leibniz certainly did not wish to minimize the value of mathematical thinking, and yet it is just such conclusions which are now sometimes drawn from the existence of the calculating machine. If the activity of a science can be supplied by a machine, that science cannot amount to much, so it is said; and hence it deserves a subordinate place. The answer to such arguments, however, is that the mathematician, even when he is himself operating with numbers and formulas, is by no means an inferior counter-part of the error-less machine, "thoughtless thinker" of Thomae; but rather, he sets for himself his problems with definite, interesting, and valuable ends in view, and carries them to solution in appropriate and original manner, He turns over to the machine only certain operations which recur frequently in the same way, and it is precisely the mathematician - one must not forget this - who invented the machine for his own relief, and who, for his own intelligent ends, designates the tasks which it shall perform.
Let me close this chapter with the wish that the calculating machine, in view of its great importance, may become known in wider circles than is now the case. Above all, every teacher of mathematics should become familiar with it, and it ought to be possible to have it demonstrated in secondary instruction."

...


Saturday, December 18, 2010

Ferdinand Georg Frobenius, new giant of the 'week'.


I cannot have enough of Grigory Perelman's picture, but people have been complaining: the meaning of 'week' is being undeservedly stretched.

The new giant, with the mandatory beard, is Ferdinand Georg Frobenius.
I stumbled upon him during week 16, more specifically, while reading about the amazing history of the Grandi series, where you will find Frobenius at the last paragraph of: http://en.wikipedia.org/wiki/History_of_Grandi's_series


Going deeper underground.

Mathematical analysis draws me in like a black hole sucking light, but everybody argues: "why the hell do you need this", help!!!

I have written about sqrt(2) more than once, and how it provided many motivations in the past.
It turns out, you can also use it to motivate interest in 'mathematical analysis'.


Take a right triangle with 2 sides of length 1, and place it on a 2D coordinate system as show in the figure. Now let us try to estimate the length of the hypotenuse using limits.
We will cut the hypotenuse into tiny segments, which is a standard practice of estimating lengths of curves, and compute the total length of the segments. If we do this we end up with the answer of 2 and not sqrt(2)! What is wrong with this?
But Jad! you say, what you just calculated is the Manhattan distance and not the length of the hypotenuse. And you would be right. But, can't we make the same claim about this not working for our summation of small rectangles for definite integrals? what exactly is the difference? and how can it be formalized? Mathematical analysis can tell you.
For more fun examples, I recommend page 3,4,5 from: http://www.math.ucla.edu/~tao/resource/general/131ah.1.03w/week1.pdf


Another topic for this post is 'telescoping series'.
For discrete integrals, our current topic in the math project, sums of series becomes very important, it is also a brain enlarging topic and a lot of fun.
One technique for summing infinite series is called 'telescoping series'.
It works on sums of series where terms cancel each other out, and what is left is a finite and easy to calculate number.
The nice thing about this for me was that it ties to the discrete math toy problem of finding the sum of i's where i goes from 1 to n.
I have given a geometric proof of this I came up with in a previous post.
One can also do it by induction.

It turns out, it is also possible using telescoping as shown in the figure.
The interesting thing is that both induction and telescoping are very indirect, in that, if you wanted to find the answer to this problem, you would need intuition first, you would get the answer and THEN try to prove it.
The more we dig into math the more we see that this is how most of the important theories get discovered. This is one of the reasons why learning about this is great for one's brain.

Usually, one tries to proceed sequentially and directly from problem to solution, and that only works for the simpler problems. After a certain level, laziness is simply not an option anymore!

Richard Bellman had the following remark once:
"Each individual problem was an exercise in ingenuity, much like plane geometry. Change one small feature, and the structure of the solution was strongly altered. There was no stability!"


Thursday, December 16, 2010

Angular to linear speed

It is quite intuitive that the linear speed for a point rotating around the origin at distance R is wR if w is the angular speed.
Since we are very much concerned about proofs in our math project, here is a proof.
I found it interesting how such an intuitive equation actually passes through quite some transformations, most relevantly, it is the chain rule and the trigonometric derivatives that play a crucial role, a little bit less intuitive than one might think!






Tuesday, December 7, 2010

I found this very nice blog ...

the content of which I only barely understand, but that is exactly what we are working on ...

I also found this nice article:
"So in conclusion, we believe that the mental apparatus to perform "lightning fast" integer arithmetic calculations such as multiplication and division resides in us all, even though it is not normally accessible. The brain appears to perform something tantamount to arithmetic calculations (or analogously equipartitioning) for some unknown aspect of mental processing. The challenge now is to unravel which aspect."

Saturday, December 4, 2010

Who said that?

"Human reason, in one sphere of its cognition, is called upon to consider questions, which it cannot decline, as
they are presented by its own nature, but which it cannot answer, as they transcend every faculty of the mind.
It falls into this difficulty without any fault of its own. It begins with principles, which cannot be dispensed
with in the field of experience, and the truth and sufficiency of which are, at the same time, insured by
experience. With these principles it rises, in obedience to the laws of its own nature, to ever higher and more
remote conditions. But it quickly discovers that, in this way, its labours must remain ever incomplete,
because new questions never cease to present themselves; and thus it finds itself compelled to have recourse
to principles which transcend the region of experience, while they are regarded by common sense without
distrust. It thus falls into confusion and contradictions, from which it conjectures the presence of latent errors,
which, however, it is unable to discover, because the principles it employs, transcending the limits of
experience, cannot be tested by that criterion. The arena of these endless contests is called Metaphysic."

Monday, November 29, 2010

Bigfoot gets physical


Very busy with Killzone3, I had very little time to do some animation work,
but I still managed to add a couple of things to 'Bigfoot' in preparation for some motion retargeting experiments.

It now can analyze skeletons loaded from mocap files and split them into branches.
It can automatically assign masses to joints using a heuristic based on skeleton connectivity.
It also now contains a physics analyzer that can compute the position of the center of mass (C.O.M in video) it's velocity and acceleration for each frame, and the same for all other joints.

The results are actually pretty fun to watch, but the video came out with bad quality,
I have to adjust the resolution to fit youtube next time...

The blue trails and velocities correspond the center of mass.


Monday, November 15, 2010

The lost animation variable...



Uniqueness of inverses for Groups, by contradiction.

In mathematical groups, the uniqueness of inverses is almost a direct consequence of the definition of a Group. Yet I could not prove it in 10 minutes, was too lazy and looked it up here: http://planetmath.org/encyclopedia/UniquenessOfInverseForGroups.html.

It bothered me that I could not come up with this proof, I tried to discover why. One of the attempts I tried was proving it by contradiction which also failed, but looking at the proof, I can see I gave up too early.
After peeking, I wanted to at least try to still prove it by contradiction (unlike the proposed proof) which intuitively seemed like the way to go for me, because the proposed proof 'constructs statements from nothing', starting with an expression, expanding it for no very obvious reason at that point (but of course obvious later), then collapsing it.

It is interesting how doing it by contradiction shows a slightly clearer path through the infinite 'ocean of statements' and the infinite number of 'valid paths' between each 2 statements, because you always have the 2 sides of the inequality to visually look at.

Here is my proof by contradiction:


Given other proofs me and Tom have attempted in the last months, I am sure I would have solved it if I gave it a bit more time, but I knew it had to be short so I wanted to solve it fast, but I failed. All in all this was a good insight into my problem solving technique.
This one falls into the category 'so obvious that it blocks you'.

Wednesday, November 10, 2010

Differentiable is 'stronger' than continuous...


As a reference for the calculus part of our course, we are using the excellent book 'Calculus Lifesaver' from Adrian Banner. This book is accompanied by extremely useful free downloadable video lectures with very clear explanations. Sometimes, it is not as deep as we would like it to be, but there is plenty of sources to remedy that when it happens.

In section 5.2.11, one proof of 'Differentiability implies continuity' is laid down, There is a step (step 4) in the proof that involves using a not so obvious trick.

I wanted to try to prove it myself in a more straightforward manner.
I will let Tom review it and tell me what he thinks, hopefully it convinces him :)


Sunday, November 7, 2010

What is natural


At project-perelman, We have inevitably started delving into Cauchy sequences and real analysis because if you really want to believe calculus proofs and have enough genuine interest and analytical mind, you will discover very fast that there are missing foundations and hand-waving proofs all over the place if you do not go deeper. This is best expressed by Karl Hahn in his excellent website.

As an example, my (failed) proof (http://jadnohra.net/release/math/evt.pdf) of the Extreme Value Theorem does not perfectly work because I could not prove that my induction would cover the whole space of inputs. This can only be done by digging deeper than calculus.


"

There is a natural way to "add" or "multiply" two points in the Euclidean plane. By "natural" I mean that the definitions have turned out to be useful for many applications, and that the definitions are fairly simple"

It puts in words what we many times feel but cannot express, when something mathematical feels 'natural'. Worth memorizing!


To all of this, I will add this unrelated and brilliant quote that my lovely wife just sent me:
"...höre nie auf zu zweifeln. Wenn Du keine Zweifel mehr hast, dann nur , weil du auf deinem Weg stehen geblieben bist. .... Aber achte auf eines: Lass nie zu, dass Zweifel dein Handeln lähmen. Treffe auch dann immer die notwendigen Entscheidungen, wenn du nicht sicher bist, ob deine Entscheidung richtig ist. .... Paolo Coelho, Brida"

Saturday, November 6, 2010

Geometric proof of sum(1 to n)

Ah, geometric proofs, so graphic, so intuitive and clear, so fitting to the way our brain works. I remember that last year I spent some time doubting Pythagoras' proof of c2 = a2 x b2, it sent me on a survey for all existing proofs, many of the more graphical ones did not 'really' convince me, specially when they involved rotating or moving shapes and then made claims about them fitting somehow, Euclid's proof on wikipedia did a better job, one of it's 'less convincing' points being the triangle area lemma. When I look at it I am pretty sure it came out of intuition (like most good proofs) and then the 'formal' proof got put into pieces after having 'devised a plan for the solution' as George Polya would put it in his classic book: HOW to solve it.

Still, it made me like geometric proofs more than I used to -- and the reason I liked algebraic ones more, in retrospect is because of the history of my Math teachers -- and so I started scribbling... I came up with a couple of tiny nice geometric proofs.

The first one is proving that and that . The key idea is (like the start of Pythagoras' theorem) is to use area when multiplying numbers by each other, and then figuring out a relationship between the resulting shapes (in this case all rectangles) and writing it down:


Another, nicer proof is the one for the sum of 1 to n being equal to n(n+1)/2 :
There are many ways to proove this one, by induction per example, or geometrically as demonstrated in one of the discrete math video lectures I am using. However, the geometric proof used there involves having to rotate shapes and comparing them, I did not really like that, so I tried to come up with a clearer proof and I found out that it is possible, I have not seen a proof that did it exactly this way, so here it is:


The idea is that we know that the square in the figure has n x n 'dots' in it, we therefore know that cutting in half by the diagonal, we have dots. This 'almost' covers the total number of dots (the answer we are looking for) and might not even be an integer.
We can see that all the last dots are cut by the diagonal in half, and those halves are all what is missing to account for the missing rest, therefore, we add them.
We have n halves since we have n rows, so adding to , we get the final answer: . We did it without having to move shapes, rotate them or compare their lengths. And that is nice!