Google

Blog Archive

Recent Comments

3/29/08

Difference between Myanmar and Tibet

The protests in Myanmar were peaceful. In contrast the Tibetans were rioting with a lot of violence resulting in considerable damages and lost of lives.

The Tibetans may claim to be followers of the Dalai Lama, but the Dalai Lama has always preached non-violence. He has never called for Tibetan cessation from China. His concern is for the preservation of Tibetan culture and traditions.

Here is what Phallop Thaiarry, secretary-general of the World Fellowship of Buddhists has to say:
"The monks who participated in the recent Lhasa riot should go back to the monasteries and restudy the doctrines of Buddhism,"
"Buddha taught us to show respect for people, live in harmony and conduct no violence," he said. "But I learnt from the media that some people in monk gowns smashed property, hurt people and burned buildings, which is not in conformity with the Buddhist commandments."

He believed "the majority of Tibetan monks strictly followed Buddhist doctrines, and only a few misunderstood and misused their identity during the riot."

3/27/08

New Findings on Loving Kindness Meditation

Benefits of meditation have often been reported, see e.g. Meditation increases grey matter in right hemisphere of the brain.

Benefits range from concentration, stress reduction, to increases in the brain's grey matter.

These results have been associated mostly with Vipassana or mindfulness meditation.

For Metta Bhavana (Loving Kindness Meditation) no such study has been made until recently, a group of neuro-scientists wrote a paper " Regulation of the Neural Circuitry of Emotion by Compassion Meditation: Effects of Meditative Expertise"

They used functional magnetic resonance imaging (fMRI) techniques to show increase activity in insula due to meditation training.

The result was also reported in the Scientific American article "Meditate on This: You Can Learn to Be More Compassionate"

It indicates that it might be possible for compassion and loving-kindness to be learned. Buddhists have always believe that we can develop our mental faculties, including compassion, like we build our muscles.

Metta Bhavana is one of the cornerstones of Buddhist meditation, in the Theravada and the Mahayana traditions. It complements Samatha and Vipassana meditation. Samatha aims at tranquility and leads to Jhanas, Vipassana leads to Insight and Purification. Metta Bhavana tenderizes the heart and develops good-will, it can be practiced separately or together with the other types of meditation. Many schools teach all three types of meditation.

Some Guided Metta meditation tapes:

  • Loving-kindness Meditation - Ven. Pannyavaro: loving1.mp3 714 KB Instruction, loving2.mp3 482 KB A Guided Meditation
  • Meta Meditation by Thubten Chodron in rm format
Related: When we wish happiness for all.....

3/25/08

The Mandelbort Set Was a Discovery of a 13th Century Monk

A retired Math Professor at Harvard University Schipke discovered that the Mandelbrot Set, named after Benoit Mandelbrot, who until now is recognized as the discoverer of the fractal object in 1976 when he was working at IBM, was actually discovered in the 13th century by a mediaeval Benedictine monk, Udo of Aachen. Udo is now nicknamed the Mandelbrot Monk.

On a holiday visit to Aachen cathedral, the burial place of Charlemagne, Schipke saw something that amazed him. In a tiny nativity scene illuminating the manuscript of a 13th century carol, O froehliche Weihnacht, he noticed that the Star of Bethlehem looked odd. On examining it in detail, he saw that the gilded image seemed to be a representation of the Mandelbrot set, one of the icons of the computer age.


Udo's original motivation for the fractal was to calculate who would go to heaven. In so doing he came up with an iteration z -> z*z + c in the complex plane.

Related:

  • Fractal FAQ
  • Schipke, R.J. and Eberhardt, A. "The forgotten genius of Udo von Aachen", Harvard Journal of Historical Mathematics, 32, 3 (March 1999), pp 34-77.

3/24/08

An Introduction to Hurst Exponent

As an example of an application of Mathematics to finance, we will look at Hurst exponents, omitting the technical details.

Given a time series, the Hurst exponent (H) of the mathematical object is a single number between 0 and 1. What can a single number tell us about the series?
It can be interpreted in many ways, one of them is that it measures the jaggedness or smoothness of the series.
It helps us classify time series. For example, one of the basic questions, is whether a time series is purely random (a random walk or Brownian movement) or not.
Many people have suggested that financial data such as stock prices are random, Hurst exponent helps explain that it is not.

H = 1/2 is a random walk with no memory of past states, H between 1/2 and 1 is a persistent time series, where the series has long term memory, and H between 0 and 1/2 is an anti-persistent time series (the persistence works in a negative way). A mean reverting series for example is anti-persistent, but the converse is not always true. In common parlance, "what goes up must come down, and vice versa" applies to reverting series.

Geometrically, anti-persistent series are more jagged than a random walk. Persistent series are smoother than a random walk.

In the extreme case of H very close to 0, the series is almost like a space filling curve.
If H is close to 1, the series is a single line (can be broken and curved).

From this, we can understand that H is also measuring the fractal dimension D. The relation can be shown to be

D = 2 - H
H is also related to the color of noise, white noise has H=1/2, brown noise H=0, and pink noise has H between 0 and 1/2.

H was first introduced by H.E. Hurst, a hydrologist who studied data of river overflows of the river Nile. He wanted to know whether the overflows occurs randomly or not. In so doing he had a wonderful idea, defining H by rescaling (or normalization).

Let the original series be x1, x2............ xn We divide the series into p buckets, each of size m, with n = m.p For each bucket, we calculate the mean and the standard deviation S.

For each bucket, define a new series y1, y2, ...yj.....ym, where yj is the cumulative sum of all (x - mean) from index 1 to j in the bucket.

Define R for the bucket as the largest minus the smallest yj. R will always be positive.
Then divide R by S: R/S. R/S is defined for each bucket 1,2, ...i,....p. Take the average of R/S for all buckets, called this the R/S for the bucket-size.

Now vary the bucket-size and calculate the corresponding R/S.

Hypothesize that (R/S) obeys a power law in the bucket size b, so that

(R/S)b = c. bH
with c a constant.

The Hurst exponent is the power in the power law relation above. When H = 1/2, we have Einstein's formula for Brownian movement.

To calculate or estimate H, take the log of the power law equation, and H becomes the slope of the line. The precise algorithm in C++ for estimating H can be found in here.

Some of the attraction of the Hurst exponent, is that it is related to many fields of Mathematics, fractals, chaos, wavelets, spectral analysis, statistics, etc. Accordingly there are many ways of estimating H, unfortunately they don't always give the same answer.

Hurst used the definition to investigate time series data from river discharges, tree rings, rainfalls, and others. He found they have H between 0.6 and 0.8 indicating persistent series with long term memory.

Edgar Peters introduced H into the financial world with his Fractal Market Hypothesis, see e.g. his book Fractal Market Analysis, applying chaos theory to investments and economics.
Peters applied H to stock and bond returns, forex exchange, and their volatilities.


Here is an example of a 5-day return of GBPUSD exchange rates:


I estimated H using Karagianis et.al. software called SELFIS

The result is H = 0.645:

The data uses 5-day returns, as it happens, longer day returns have more persistence than short term returns.

Despite its application to finance, Hurst exponent is not, perhaps to the disappointment of many, a forecasting tool, it shows theoretical predictability, but it is not a prediction method.

3/17/08

Open Source Mathematical Software

The label open source is normally associated with software. Open source mathematics is mathematics done with the help of open source mathematical software.

David Joyner and William Stein argued in a American Mathematical Society publication, that mathematical proofs, like the proof of the Four Color problem, are sometimes very lengthy and involve use of mathematical software. Whereas ordinary mathematical proofs can readily be inspected by others using only paper and pencil, computer aided proofs can only be verified if the verifier has the same mathematical software (usually commercial products such as Wolfram's Mathematica and MathLab).
But who can guarantee that the mathematical software is correct and bug-free? If the mathematical software is open source then in principle anyone can also verify the correctness of the software.

William Stein created Sage (www.sagemath.org) with this in mind. It is not the first open source mathematical software, but probably the most extensive. It "can do anything from mapping a 12-dimensional object to calculating rainfall patterns under global warming."
Indeed it can be used for
algebra, calculus, elementary to very advanced number theory, cryptography, numerical computation, commutative algebra, group theory, combinatorics, graph theory, and exact linear algebra.

Sage is written in Python, confirming yet again the versatility of the Python. It is browser based. It makes use of many other open source software including
GAP, GNU Multi-Precision Library, GNU Scientific Library, Matplotlib, Maxima, Mwrank, NetworkX, NTL, Numerical Python, PARI, and Singular.

This is the strength and the weakness at the same time. To install Sage, you can choose to install Sage with all the dependencies, or you can have everything bundled as one package (VMWare on Windows). The VMWare package is 642M.

Here is an example of building a car using Sage:
Related:



3/9/08

Braess's paradox: When More is Less

Dietrich Braess's paradox is a good example of Mathematics which is simple and easy to understand. The result is however, surprising to most people, and counter-intuitive. It shows that adding new roads can make traffic slower! More is less. It is rather similar to the more well known Fred Brooke's law (The Mythical Man-month), "Adding manpower to a late software project makes it later." The following is a simplified example of the paradox.
Assume all cars going from A to D, with the choice of either ABD or ACD. The distances are given below.
A car can travel at maximal speed of 100 km/h, when the number of cars is less than or equal to the road capacity.


path

AB

AC

BD

CD

ABD

ACD

distance(km)

10

50

50

10



capacity

1000

3000

3000

1000



cars

3000

3000

3000

3000



travel time(h)

0.3

0.5

0.5

0.3

0.8

0.8



When the number of cars is greater than the road capacity, the speed decreases by the number of cars divided by capacity. For example, AB has 3000 cars, capacity 1000, distance 10 km. The speed becomes 100/3 km/h and the traveling time is 0.3 h.

Assuming there is no preference for ABD or ACD, the travel time is equal for both paths, namely 0.8 h.
This is an equilibrium, if instead only 2000 cars go the path ABD and 4000 chose ACD, then the travel times are 0.7 and 1.067 h each. Drivers will notice, and more will go ABD until the equilibrium is reached.

Now some road planner has decided to add the stretch BC with the capacity of 2000 cars and distance 20 km.
Let us see what happens:

path

AB

AC

BC

BD

CD

ABD/

ACD

ABCD

distance(km)

10

50

20

50

10



capacity

1000

3000

2000

3000

1000



cars CASE I

4000

2000

2000

2000

4000



travel time(h)

0.4

0.5

0.2

0.5

0.4

0.900

1









cars CASE II

3500

2500

1000

2500

3500



travel time(h)

0.35

0.5

0.2

0.5

0.35

0.850

0.9









cars CASE III

3250

2750

500

2750

3250



travel time(h)

0.325

0.5

0.2

0.5

0.325

0.825

0.85









cars CASE IV

3000

3000

0

3000

3000



travel time(h)

0.3

0.5

0

0.5

0.3

0.800

0


In case I, the distribution of cars is assumed to be ABD (2000), ACD (2000) and ABCD (2000). Path ACBD is omitted, because obviously nobody will select it. The times are worse than before the road BC was built.

In cases II, III we have different car distributions, but again the times are worse than 0.8 h. However, you notice that the times are better, the less cars uses the new road BC.
Case IV is the case when the new road BC is simply ignored, which is really the best.

This result is not related to the systems thinking discussed in Systems Thinking meets Traffic Jams.
There we discussed how new roads can lead to more congestion because the roads will open up new areas of activities, and/or people will buy more cars.
In contrast, in the Braess's paradox, the number of cars is fixed.

Links:

3/7/08

Germany Declares 2008 Year of Mathematics: You Know More Math Than You Think

The year 2008 has been declared the year of Mathematics in Germany, with the motto "Everything that counts".

It followed, from 2000 to 2007: the year of Physics, year of Life Sciences, Geo Sciences, Chemistry, Engineering, Einstein year, Informatics year, and the Humanities year.

As a mathematician, I find the planned activities of the year of Mathematics very laudable. It seems that their main theme is "you know more Math than you think". They avoided abstract Math and the remoteness of Mathematics in ivory towers, and instead stresses how near Mathematics is in our everyday life. We use and know Mathematics, sometimes unconsciously, more than we realize.

When we hear mp3, we do not realize that Math is involved in the compression algorithm. We use cell phones all the time, but we do not think of the Mathematical problems of the allocation of frequencies. Each time we deliberate in making our decisions, we employ probabilities and optimization. The world of finance is now unthinkable without Math. Parking cars involve some geometry of curves. In the medical world, Math plays a great role in the calculations used in the computer tomography imaging. Game theory and Mathematics of Voting are some of the newer branches of Mathematics with many applications in everyday life.
And so it goes on. See more of it here, What moves Mathematics, and Mathematics in life.

Popularizing Mathematics is sometimes done by showing the fun side of Math, puzzles, tricks, curiosities, and entertainment. I am glad that in the year of Mathematics program, the fun side is there, but emphasizing applications is more important than just frivolities.

Earlier: