Tag Archive: Mathematics

Plücker’s Conoid

On the same note as the previous post, here are some Scilab renderings of the slightly more interesting Plücker’s conoid.

Plucker's Conoid with n=1

Plucker's Conoid with n=5

Plucker's Conoid with n=20

Plucker's Conoid with n=500

And of course, here’s the code. Substitute N with the number of folds in the surface, where (quite obviously) the period of oscillation around the Z axis is given by 2π/n.

//Plücker’s conoid
stacksize (10000000);
num_points = 50;
u = linspace (0, 2*(%pi), num_points);
v= linspace (0, (1/2)*(%pi), num_points);
[U, V] = meshgrid (u, v);
x = V.*cos(U);
y = V.*sin(U);
z = sin(N.*U);
mesh (x, y , z);
surf(x, y, z,'edgecol','blu');

Pseudo Cross Cap

It’s been a while since I did something interesting with math on my blog, so I figured I’d go back to some old favorites. I’ve done the Cross Cap before, so here’s a variation — the Pseudo Cross Cap.

Pseudo Cross Cap

And of course, as always, here’s the code code to render them in Scilab. The code has been tested on Scilab 4.0. Enjoy!

//Pseudo Cross Cap
stacksize (10000000);
num_points = 50;
u = linspace (0, 2*(%pi), num_points);
v= linspace (0, (1/2)*(%pi), num_points);
[U, V] = meshgrid (u, v);
x = (1 .- (U.*U)).*sin(V);
y = (1 .- (U.*U)).*sin(2.*V);
z = U;
mesh (x, y , z);
surf(x, y, z,'edgecol','red');

The Fourth Quadrant: A Map of the Limits of Statistics

More Taleb, yes.  An excellent essay in the Edge Foundation’s Third Culture by Taleb on statistics, and how it is often misused.

And here is an interesting analogy from the essay, comparing a Thanksgiving turkey fed consistently until its unfortunate end, and IndyMac’s performance.

Oh my.

Bathsheba Sculpture

One of the things that I keep meaning to write about is Bathsheba Grossman’s amazing sculptures.

She creates some very interesting artwork and I have been a fan of her work for the longest time. For the most part, she creates sculptures that are inspired from math and science.

To that end, she has a math sculptures collection which features various “topologically-inspired” artwork. My personal favorite is the Soliton, which is simple, elegant and simply too beautiful to resist!

Bathsheba Grossman's Soliton Sculpture Bathsheba Grossman's Soliton Sculpture

And there is also her math models collection, which, as the name suggests, has various math models. And since I do have a thing for minimal surfaces, I really like her Schwarz D Surface.

Bathsheba Grossman's Schwarz D Surface Sculpture Bathsheba Grossman's Schwarz D Surface Sculpture

And as a (former, now dormant) graphics geek, I was also very impressed by her 120-Cell Sculpture. The only thing that could make that sculpture better is if one could play around and change the inner reference points for each inner layer.

Bathsheba Grossman's 120-Cell Sculpture Bathsheba Grossman's 120-Cell Sculpture

Other than these, she also has an impressive collection of science and math inspired 3d models etched inside glass crystals. All the models are inspired from math or science and are just as fascinating.

Bathsheba Grossman's Menger Sponge Sculpture

Sadly, my favorite (the menger sponge, displayed above) is no longer available; however she has made available that and several other models as downloads.

I am rarely impressed by a lot of art-work trying to portray science, but Bathsheba’s work is truly awe-inspiring. Of course, that could be because she is someone who studied mathematics but became an artist.

So all you fine folks now know what to get me for Christmas! :-)

3d Quaternion with Mandelbrot Pattern

Here is a 3d Julia fractal with a Mandelbrot pattern that I whipped up in POV Ray. I’ve done some 3d quaternions before, but I figured I’d try creating patterned ones and this is a starter piece.

3d Quaternion with Mandelbrot Pattern

And here is the starter piece on which I patterned this Mandelbrot from POV Ray’s documentation.

3d Quaternion with Mandelbrot Pattern

I do think that it needs a little smoothening and that there are some points that are disjoint from the central piece.

Back of the Envelope Calculations

Recently, during a not particularly interesting meeting I began graphing. First, I’d draw a line between (0, 9) and (1, 0), then I’d draw a line between (0, 8 ) and (2, 0), then between (0, 7) and (0, 3)…and so on till I had drawn a line between (0, 1) and (9, 0), which resulted in an aesthetically pleasing curve.

Hyperbola-like-thing

Soon, I began to wonder if, instead of simply drawing the curve, I could express it mathematically. For example, a parabola can be seen as the set of points which are equidistant from a focus and a directrix. Was there some similar way to describe the curve I had been drawing? I decided that the first step should be to see if I could represent my curve as a function in the form of y = f(x). Unfortunately, taking that first step has proven to be more difficult than I originally expected. For example, I can express the slope of any of the lines as:

Slope = (n – MAX) / (n + 1)

and I can express the y intercept of any of the lines as

Y Intercept = MAX – n

With those two equations, I can find a general form of yn = f(x) for any of the lines. Specifically,

yn = x(n – MAX) / (n + 1) + MAX – n

Armed with that, I can find the point where line n crosses line n + 1, that is, the point where yn(x) = yn+1(x). Specifically, by using the formula for yn above, I get:

x(n + 1 – MAX) / (n + 2) + MAX – (n + 1) = x(n – MAX) / (n + 1) + MAX – n

which, when I manipulate it as follows:

=> x(n + 1 – MAX) / (n + 2) – (n + 1) = x(n – MAX) / (n + 1) – n
=> x(n + 1 – MAX) / (n + 2) = x(n – MAX) / (n + 1) – n + (n + 1)
=> x(n + 1 – MAX) / (n + 2) = x(n – MAX) / (n + 1) + 1
=> x(n + 1 – MAX) = x(n – MAX)(n + 2) / (n + 1) + n + 2
=> x(n + 1 – MAX)(n + 1) = x(n – MAX)(n + 2) + (n + 1)(n + 2)
=> (xn + x – MAX(x))(n + 1)
=
(xn – MAX(x))(n + 2) + (n + 1)(n + 2)
=> xn2 + xn – MAX(x)(n) + xn + x – MAX(x)
=
xn2 - MAX(x)(n) + 2xn – 2MAX(x) + (n + 1)(n + 2)
=> xn – MAX(x)(n) + xn + x – MAX(x)
=
-MAX(x)(n) + 2xn – 2MAX(x) + (n + 1)(n + 2)
=> xn + xn + x – MAX(x) = 2xn – 2MAX(x) + (n + 1)(n + 2)
=> x – MAX(x) = – 2MAX(x) + (n + 1)(n + 2)
=> x + MAX(x) = (n + 1)(n + 2)
=> x(MAX + 1) = (n + 1)(n + 2)
=> x = (n + 1)(n + 2)/(MAX + 1)

Gives me the relatively simple statement that

yn(x) = yn+1(x) => x = (n + 1)(n + 2)/(MAX + 1).

Looking back at my notes (which were originally made on the back of an agenda and continued on a hotel notepad), it seems that I decided this would be a good time to go on a snipe hunt and find the distance for which any particular line was on the frontier of the curve. Using a bit more manipulation (which I may set forth in a future post), I found that, as MAX goes to infinity, the length of the longest line segment on the frontier approaches 2, while the length of the shortest line segment approaches 2.5. This was actually something of a surprise, and it’s a result I’m glad I reached. However, it still didn’t answer how to express the curve in the form of y = f(x). My next thought for how to continue down that path is write an equation which will show which line segment I’m actually on at any point x. My guess is that it should be doable based on the formula for the crossing point of lines n and n+1 given above, though I haven’t actually done it yet. Am I right? Is it actually doable? Will it lead me to the desired y = f(x)? Only time will tell…

As a note, I normally blog about the law surrounding data privacy and information security here. Since I already have a blog devoted to those topics, my posts here will cover anything else that comes to mind.

Barista Randomness

Today, I was hanging out with some of Beck’s friends (who, ironically enough, are detectives at the Cincinnati PD) and I absent-mindedly forgot my copy of Fooled by Randomness at the local Starbucks.

I went looking for it and asked the people at Starbucks if they’d seen it around. Sean, the ever-insightful barista, returned the book with a quip –

“You’ve gotta watch out for that random chance when things go wrong, man.”

Indeed.

Fooled by Progressive Betting

Is it me or does it seem like there is something to be said about Taleb’s rants against the traditional practices of Wall Street traders and progressive betting in Blackjack?

The fact that progressions cannot overcome expectation is also rather interesting, given the way some institutions work.

Fat Tails & Skinny Returns

While normal distributions are nice and wonderful, they aren’t really feasible in the world of finance. This is because the market can be so volatile and fickle that variances become meaningless.

So, enter fat-tailed distributions. These are distributions where events deviate significantly from the mean in comparison to normal distributions. What this means in terms of the stock market is that assets and investments are prone to jumps (in either directions).

Fat tailed distributions

On this topic, Paul Kedrosky links to an interesting presentation on Fat Tailed distributions by Northfield, the guys that make analytical and investment software.

It’s quite interesting and talks about some work that’s being done in this area.

On a related note, another area of application for Fat tailed distributions is the CRM arena. Contact-centers and self-service applications (i.e. IVRs) receive millions of calls a day, and there is just as much variation in C-sats, agent performance, AHT and so on.

It would be interesting to apply some of these tools and techniques to call-center analytics and see how well those work.

The World of Quants (Part I)

PD recently recommended two excellent books by Nassim Nicholas Taleb (homepage), the mathematician turned philosopher turned epistemologist. I am half way done with one of them, Fooled by Randomness and I have a brand new copy of The Black Swan sitting right here on my desk.

While I was reading the books, one thing that stuck me was this — within a given system, how many such quant funds (such as Taleb’s old firm, Empirica Capital LLC) does it take for Taleb’s risk-based hedge funds to succeed? Or inversely, how many is too many that would cause the system to fall down upon itself?

To find a way to answer these questions, I am interested in starting with finding out the possible success rates for these firms.

Let me explain myself. Let us assume that there are 100 quant firms that invest the way Taleb’s old firm did. This would mean that you have a hundred firms slowly bleeding to death, waiting for that one Black Swan, when things work out for them.

x=100

Now, for the sake of argument, let us assume that only half of these firms are going to succeed to some extent while the other half are going to fail.

y=0.5 * x = 50

The probability of all fifty of these firms having the exact same degree of success is quite low. In fact, it is more likely that within their given domain, these fifty firms have some sort of distribution of success-rates.

Let’s assume that two kinds of distributions are possible here — the first, obviously, is a Bell-curve, assuming a normal distribution. Going this route, we could try and apply the 68-95-99.7 rule and get the following distribution (courtesy Wikipedia):

Normal Distribution Empirical Rule

So, let us assume that 68.2% of the quant firms are good enough for us to work with. This would leave us with:

y_n = 68.2% * 50 = 34.1 \approx 34

This leaves us with about 34 firms which may perform well enough. Of course, the other interesting thing would be to see how much longer they can bleed themselves (assuming a decaying function) and seeing what percentage of these 34 companies actually “decay” themselves out. But that’s for later.

Now going back to our problem, the second distribution is more interesting. What if we had a log-normal distribution? Or better yet, let us assume a Log Levy distribution, which is more indicative of financial models (and of the stock market). This would be one where they have sharp peaks (for success) and long-tails (for the long periods of failure).

Since the stocks themselves are likely to show a Levy distribution, it would not be wrong to assume that our quants mirror this pattern.
If that is the case, our graph for a stable Levy distribution would look something like this (courtesy Wikipedia):

Levy skew alpha-stable distribution

Now, we have a few cases to consider. If we consider \alpha=2 then it becomes a normal distribution, which we just talked about. On the other hand, for all other values of \alpha, we could have heavy-tailed distributions.

So, here are my questions –

  • What would be a logical assumption among the various values of alpha for our Levy distributions?
  • What does this entail for our “functioning quant firm” numbers, i.e. where does that leave \small y_\alpha?
  • Assuming a standard decay rate for both normal and Levy distributions, which would be more effective (i.e., a better density function)?

Quite obviously, I am trying to back-track from a series of assumptions to evaluate the feasibility of having more than an optimal number of quant-based hedge funds. And I am also interested in evaluating the success and failure thresholds for such numbers.

Finally, I am looking for the Black Swan that will throw these numbers into quant hell.

(Yes, I am quite well aware that this post has a lot of inconsistencies and assumptions, and that I have completely ignored the injection of new blood into the system — quite obviously, this is an exercise in theory, so forgive me while I meander.)

Klein Bottles

In topology, a Klein Bottle is a kind of non-orientable surface, first discovered by the German mathematician Felix Klein.

Rendering of a Riemann Sphere

Here is a high-resolution, colourful rendering of the loxodromic representation of a Riemann Sphere. I’ve talked about Riemann spheres in some of my earlier posts.

Click on the image to view the larger version. Enjoy!

Rendering of a Riemann Sphere

This has also appeared in the Wikipedia Selected Article for the Algebra Portal.

Costa’s Minimal Surface

I recently wrote a very short article on Wikipedia on Costa’s Minimal Surface.

I have been meaning to add a few renders and discuss the detailed topology, but haven’t had the time yet. However, here is a cool render of the CMS for now. Click to view the larger version.

Costa's Minimal Surface

Homotopy of Roman and Boy Surfaces

More topological madness! Here are some pictures depicting the homotopy of the transformation to and from Roman and Boy surfaces.

Homotopy between a Roman surface and a Boy surface

Riemann Spheres

Here are some visualizations of the Riemann Sphere, done in Scilab. The code is given below.

Riemann Sphere with U (-10, 10)

Rendering of a Roman surface

Here is a rendering of three intersecting Roman surfaces (one of the many interesting Steiner surfaces). Sorry about the bright colours, I wanted something that helped discern regions of intersection. Click on the image to view a fairly high-res version.

Rendering of a Roman surface

Update: I have also added a new section titled Topological Constructs with more interesting Roman surface and Whitney umbrella renderings, as well as some code on rendering certain Non-Orientable Surfaces. Enjoy! :)

Thanks muchly to Alamandrax in helping me debug an uneven render and props to his Matlab skills.