Archive for the ‘Uncategorized’ Category

Probability, Random Walk, and Invariant

April 25, 2008
First, let’s talk a little bit about some words.   

Probability
Everybody knows what a probability is, right? Well, in short, it is a numerical value of a chance that something will happen in an interested situation. We define 1 to be “always happen” and 0 to be “never happen.”

For example, what is the probability for one to pick 5 from set {5,10,15,20}? 
1/4 or 0.25 … easy enough … so let’s move on.

Random Walk
As its name, Random Walk (RW) is a mathematical formalization for random walking. Arr.. it means mathematicians want to study about someone on the street that is randomly walking – something like that.
They study the probability that this guy will walk to Apple Store on 5th Avenue if he start randomly walking (like a drunk man) at the Columbia University. They also study other things about this guy, but we’re gonna skip that this time.

Get an idea?

RW is a huge huge subject in mathematics, so we’re not gonna go through all of them. The one I pick out today is Random Walk on Graphs.

A Sample of Graph
The idea is that we generate some graphs. A graph consists of dots and lines. Dots represent objects, situations, people, or anything we want, and lines represent connections of those dots.
Random Walk on Graphs is a study of walking from dots to dots via those lines randomly.   

For example, we can calculate what is the probability that a drunk man will end up at the top red dot if he start at the green one on the bottom-right by the total of twenty moves.

I think we get an idea. Next…

Invariant
In mathematics, an invariant is something that doesn’t change under a set of transformation. We call “invariance” for the property of being an invariant.
It’s kind of confuse, I know. Let’s see an example then.

Let’s say that we pick any two integers – X and Y. I can say that the odd-evenness of XY(X+Y) is an invariant. It doesn’t matter how we choose X or Y. XY(X+Y) is always an even number.

Never change… invariant … never change … no matter what
I think you get an idea.

So…. what’s this all about?

A sample of a very simple life
Let each decision or situation in my life is a dot. Lines connect each decision or situation that leads to all another possible situation. We write down an arrow to indicate a direction to each line and, if possible, weight each line with probability. It will come out to be something like this.   

Idealistically, I can generate the whole graph of my life. I then can see the path I actually have taken from my birth to today, and see what is the probability of that.

What if we generate two sets of graphs? Then, we combine dots that represent intersections of those two lives together – in all possible way. After that, we generate two random walks, and see what is the probability that today those two walks are on the same dot. 

That’s pretty small, I believe. 

And then we see… to not-so-far future … there’s no such a dot.
And then we wonder … in further future … the system is too complex to see what’s exactly going on out there.

wonder…. if there will be such a dot again

But you know what?

It actually doesn’t matter.

because I know….

something is invariance.

TS50’s Board was Down!

March 9, 2008

Yes, it was down.

In the past Thursday night, Kie asked me to announce on the TS50’s Webboard that the college page was updated. I went to the webboard and posted the announcement. Accidentally, I clicked “post” while the announcement system was “close.”

BOOM!

All gone…

I kept refreshing the webboard. All I could see is an error massage. I cannot remember it exactly now, but it said cannot find something in a cache file.

Freaking out, I contacted Kie and Jeep. We had no idea how to correct this things. They were busy, so we decided to solve it later. I was busy too, actually, but I just couldn’t leave it. That night, ignoring my homework, I dug through the file system, looked through files. I didn’t understand the problem – what’s goin’ on here. Cannot do anything that night. My head was burning – ready to explode. I then went to sleep.

On Friday, I had two consecutive free periods. I came back to the webboard. I decided to look in the SQL database. Scanning through the database, I found that in the cache_system table, all data (430 data) is “เพื่อนๆ ครับตอนนี้หน้า College แก้ไข Major ได้แล้วนะครับ” WTF is that thing come from?

I then cleared cache. Then, I refreshed the site.

Yeah! It was back. Just one thing, all data was gone…

Luckily, I could log in to the Admin CP. I went to the system page and I found out the problem.

All system value was set to “เพื่อนๆ ครับตอนนี้หน้า College แก้ไข Major ได้แล้วนะครับ.” For example, in the box “How many post allowed per page?” it said ”เพื่อนๆ ครับตอนนี้หน้า College แก้ไข Major ได้แล้วนะครับ.”

I reverted everything back to default – manually – click by click. There were like 400 of them. Then I set everything back to what it had been.

Refreshed the site again… Yeah! It’s back!

Look like an easy track? Maybe… it took me at least four hours to solve it.

Math Field Day @ UM – Flint

February 27, 2008

February 26, 2008

It was a good day to skip the school – snow storm with but no snow day. I woke up at 6 am to be ready by 7. Then, we were heading off to the University of Michigan – Flint to join the 41st Math Field Day in the name of Cranbrook Kingswood School.

Basically it is the series of math competitions and games. Each team has five members, one has to be a freshman or a sophomore. There are two parts of competitions – an individual part and a team part. For the individual, there are Mad Hatter A, Mad Hatter B, Leapfrog, and Chalk Talk. For the team part, there are Team Essay, Huddle, Swiss Game, and Relays.

This is our team.

The Team

From left to right,

  • Well, I – team up with Max, I was the representative on the Leapfrog.
  • JP – he was for the Chalk Talk
  • Mr. Mathieu – Math Club adviser, and a driver :P
  • Kevin Wu – a genius, sophomore, he has to go on Mad Hatter B
  • Yong – math club co-president (with JP actually). He was there for Mad Hatter A
  • Max He – the most attractive Chinese in CK, seriously seriously seriously. Leapfrog.

After finished our individual parts, we teamed up and went on our battle. First, we started on the team essay. UM gave us a classroom (with a chalkboard – yeah!) and gave us a pile of questions. This year it was about the Fibonacci Sequence. We had to learn something new (not actually hehe) then prove something. We finished all of them in the last minute.

Then we went on the Huddle. It was four easy question. We had to finish them in four minutes. The next one was real fun – the Swiss Game. Two teams are compete each other. Members sit in a row partitioned by another team members. The proctor then gave sixteen values of x, then, gave first four values of f(x). We had to find f(x) of the rest twelve numbers. The proctor would ask us to answer person by person – team by team.

There were four rounds. The functions were ridiculous at all. You can take a look. By the way, it was my day. I was so lucky that I got all of the functions. Then we went on the Relays. I screwed the team up this time. Instead of answering 2k, I, confusingly, answered k/2.

dscf7255_resized.jpg

The result:

  • Max and I got a perfect score on the Leapfrog. However, there were another two teams got perfect too. So, UM will send us the medals later.
  • Our team got the second overall performance award in large school division.

The Interest

February 21, 2008

Last week, I got an email from my dad. As usual, he made a weird loan system for the cooperative – well, not so weird actually.

Suppose that you borrow A $ from a bank with k% interest. Generally the bank take k% of A $ then divided it into N times of payment. For example, you borrow 10000 $ with 12% per year interest. You will pay back every month in two years. Therefore, you have to pay the bank 933.34 $ each month.

The cooperative has the main purpose to help members in finances. Hence, the cooperative needs less money than banks do.

Here is his loan system.

The same system, but this time, the interest won’t be calculated first. Each time you pay, the interest is decreased due to how much the capital is left. You will pay back in the same amount of money each time, however. Therefore, each time you pay, the capital part is getting larger and the interest part is getting smaller.

Confuse? Well, I’m confuse. Let’s see the example.

Suppose that you borrow 399000 $ from me. (I don’t have that much money actually. haha) We agree that you will pay me back in 84 months with 5% interest per year (or 0.4167 % per month) with my dad’s system. From the calculation, you have to pay me 5639.43 $ per month.

First month, I take 0.4167 % of 399000 $ which is 1662.5 $. You pay me 5639.43 $ which is 1662.5$ interest and (5639.43-1662.5) = 3976.93 $ capital.

Next month, I take 0.4167% of (399000 – 3976.93) = 395023.07 $ which is 1645.93 $. You pay me 5639.43$ which is 1645.93$ and 3993.50 $ capital.

and so on

in last month, you will pay 5639.43$ as usual, but it will be about 23.4$ interest and 5639.40$ capital.

I think we get the system now.

The problem is how can we calculate ‘how much you have to pay me each month in order to pay me back all the money included interest by the last payment – exactly.’

So my dad asked me this problem. He asked for a formula to calculate ‘the amount of money the borrower needs to pay each month’ when the amount of capital money, the interest rate, and the number of payments are given.

It took me such a long time for this problem because I tried to figure out how he came up with 5639.43$ at first. (Later on I found out that he adjusted it by hand.) First, I tried to find a recursive relation between each payment. I, however, could not see an easy pattern from its recursion.

I then assumed the amount of each payment to be X. Then I wrote out everything that would happen each payment in variables. Bang! I saw a pattern. I then summed up and solved the equation. I came out with a formula in the end.

I think this might me an interesting problem for somebody who is finding something to think in his/her leisure.

Here is the answer I got.

Let;

borrowed money = A
interest per payment = k
the number of payments = N
an amount of money would be paid each time = X

Define

untitled-1.gif

then, X=AG
the sum of interest (I) ; I=(NG-1)A

The result comes out pretty cute, isn’t it?

My First Attempt on LaTeX

February 20, 2008

LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation.

I started to want to learn how to use LaTeX three years ago, maybe, but I had never done it. After installing a full TeX package on my Mac three months ago, I started reading The Not So Short Introduction to LaTeX 2e last week.

I know that LaTeX will be significantly important to my education and career in the not-so-far future. Better learn it now!

My first trial is the abstract of my childish research, the Relation of Multinomial Coefficients on the Forming of Multidimensional Simplex. By the way, this is the first publication of the research on the Internet.

The Relation of Multinomial Coefficients on the Forming of Multidimensional Simplex : Abstract

Hello World!

February 20, 2008

Hey World,

I think that I should write a blog. I have spent too much time which one should I use. First, I thought that I would choose the one that I can modify its theme as I want. Finally, I chose WordPress because its simple but beautiful original theme. For me, it looks so Mac. Now, the header is Aqua.