Skip to main content

Posts

Showing posts with the label simple math

I'm looking for an old school toy.

An energy company uses exponential power.

Question  In Rabbit city, Mr Fox generates electricity energy. One day, Mr Fox realized there is no one else generates the energy. So he decided  raise the price every year for 30 years since that year he retire. He met his uncle, who is working for the city hall. Mr Fox said his uncle, ``I would like to raise the price 10 Euro for currently 100 Euro paying rabbit.'' His uncle answered, ``It seems you don't know about economy. You should say, I will raise 10 % every year.'' Which statement of following is correct? Mark all apply. It's same raise when you start 100 Euro and 10 Euro every year and when you start 100 Euro and 10% raise every year. Since 10% of 100 Euro is 10 Euro. Therefore, 30 years later, how much raise the price is 10 * 30 = 300, and plus original price 100 = 400. It becomes 400 Euro after 30 years. Mr. Fox's uncle is correct. 30 years later, 10% every year raise is twice as much as 10 Euro each year's raise. The raised cost is a...

Pyramid (exponential) Power (2)

Here is the answer of my math question. A1.  Assume the 3rd and 4th levels are complete, Hitoshi can get the money: 40^2 * 1000 * 0.25 * 0.9 - 1000 = 359000 Euro. Hitoshi is rich! A2. Daniel is the same. Wait, Daniel needs the 6th level of the pyramid. To complete the 6th level, we need:     1+ 40 + 40^2 + 40^3 + 40^4 + 40^5 = 105025641 (around 100 million)> 2.5 million There is not enough people in Berlin for Daniel. He lost his 1000 Euro every month. and Hitoshi lost Daniel as a friend. ;_;  Actually German population is around 80 million, so, even if all the German people joined this, Daniel can not get the expected full payment. Actually next answer shows Daniel has absolutely no chance to get any Euro. A3.  Hitoshi needs total 5 levels.     1+ 40 + 40^2 + 40^3 + 40^4 = 2625641 > 2.5 million So Hitoshi's level needs a bit more than the people in Berlin. But if everyone is convinced in Berlin, even babies and children pay 100...

Pyramid (exponential) Power (1)

When I walked down a street, I was thinking about creating an exponent exercise for my math class. I sometimes just get inspired an idea when I walk down a street. My main purpose is to show how fast the exponential can grow. Hitoshi has no money, so he wants to join a pyramid system . The system asked to him to buy something 1,000 Euro every month from the company. But, if he has 40 people for his next level, and the next level has 40 people each, he can get some commission from 25% of two levels lower's people's purchase. When he got the money, he also need to pay 10% to the higher level. Berlin is quite new for this system, so there are only founder (level 1) and co-founders(level 2), 41 people are there. Assume Berlin has 2.5 million people. How much money Hitoshi can get every month? Assume Hitoshi can convince even everyone in Berlin. Hitoshi asked to join his friend Daniel, to be his next level person. How much money Daniel can get? How many people must be convinc...

Future work: Computational literacy

Future work: Computational literature I don't know how to call these kind of approach to natural languages, I might say, computational literacy, or something like that. As far as I know, there are some research of similar approach. For instance, some kind of spam filter using entropy based approach. Some people use statistical approach to finding an author of a document. In a Science Fiction novel, Asimov wrote a scene that a politician talked a lot, but people find out there is no information at all in the talk by an information analysis (The Foundation Series). We can extend the presented method more systematically way. For example, we can analyze famous widely available books, e.g., the Bible, some Shakespeare's, IKEA's catalogs, and so on. Also the translation of the Bible altered in the history, I would like to see the history of the information in it. If you know anything about research in this approach, please put it in the comment. Appendix 1: person + tree =...

Can we measure the complexly of natural language by an entropy based compression method? (6)

Conclusion When we wrote an article in different languages, the length of the document differs even the contents are the same. But, if we compress these files by a entropy based compression algorithm, they become almost the same size. Even we wrote it in German which has complex grammatical structure, or in Japanese with completely different character system. From this observation, I have a hypothesis: ``The complexity of natural languages are more or less the same.'' Of course this article tested only one document and only three different languages. Therefore, this cannot be any proof of this hypothesis. But still, I am interested in the result. We need more experiences, but, now I got some ideas of the applications if this hypothesis stands.  Comparison of news articles: Assume the news source is in English and it is translated into Japanese. If we compress these two articles and the compressed size differs more than 50\%, I suspect the quality of the translation. Som...

Can we measure the complexly of natural language by an entropy based compression method? (5)

Entropy of a document When I talked with Joerg, I recall my bachelor student time. At that time, I could not write a paper in English directly. Therefore, I first wrote a manuscript in Japanese, then, I translated it in English. The size of each TeX file differed, hoverer, when I compressed these files, I realized the compressed file sizes are similar. I found it interesting, but, I did not think further on that. It was around 1996, so I think I used ``compress'' program. At the Gruenkohl Party, I recall this story again. I also realized I have translated a few articles to three different languages. For example, Haruki Murakami's Catalunya Prize speech at 2011-6-11. Figure 1 shows the compressed result of the same contents, but the different language and different encoding scheme. Figure 1. The compression size result of three languages, but the same  content's documents. Even the original document size depends on  encoding methods, but the compressed sizes be...

Can we measure the complexly of natural language by an entropy based compression method? (4)

Size of books depends on languages My friend (and my teacher) Joerg once asked me that how large the Japanese translated books compared with other languages. Japanese uses Kanji (Chinese characters). Because these characters can encode several Latin characters to one Kanji, he inferred Japanese translated books are smaller or thinner than the original ones. For example, the character ``mountain'' is one character ``山'' in Japanese. But, Kanji usually needs higher resolution compared with Latin characters. I answered the books seems thinner than original ones. I have several Shakespeare's books, and I assume these translations are as accurate as possible. Some friends visited my place impressed how small Japanese books are. But, there are some other factors, for instance, a Japanese book might be made of thinner paper, the size of characters might be relatively smaller, and so on. This is an interesting point, but, we must consider many parameters.

Can we measure the complexly of natural language by an entropy based compression method? (3)

Complexity of language I recalled two ideas when we were talking about the difference of languages: Complexity of language,  Size of books depends on languages. My friend (and my teacher), Alexander has a hypothesis: the complexity of all the natural languages is more or less the same. His complexity of a language means the total complexity of a language. It includes number of vocabulary, grammatical structure, representation of writing (complexity of characters), pronunciation, anything. He told us that any language has some difficult aspects, but at the same time, there are some simple aspects also. If we can average all the aspects of each language, and compare them, complexity of natural languages might be almost the same. I have the same impression about language complexity with Alexander. Each language I have learned has some difficulty and also has some simple part. I also think the complexity of natural language is depends on human brain ability. Because any chi...

Can we measure the complexly of natural language by an entropy based compression method? (2)

Gruenkohl Party At January 20th, 2012, We had a Gruekohl party at Daniel's place. The gathered people were from Holland, Germany, US, Canada, and Japan. At a such international party, we often talk about own languages and compare their properties. For example, one told us how the Chinese pronunciation system is complex and almost impossible to learn that according to his Chinese course experience. German's Noun gender and article system is also a popular topic. A friend pointed me out, Japanese has special counting system.  When we count objects, how to count depends on what you count.  For example, how to count person and how to count paper are different, yet I explain we always uses units like English saying, two piece of papers and three pairs of jeans. Japanese has this counting system all the time. I usually heard many languages are so difficult to learn. However, I suspect it may be not complex as it sounds. People tend to pick the most difficult aspect of a lan...

Can we measure the complexly of natural language by an entropy based compression method?(1)

Many of my friends came from other countries.  We often talk about our own mother tongues. The discussion goes to which language is difficult or what kind of unique property each language has. German has a complex grammar system, Japanese has complex characters and unique counting system, and English has a huge vocabulary. I wonder ``What is the complexity of natural languages?'' and ``Can we measure them?'' Together with my friends I translated one Japanese text to English and German. Then we apply an entropy based compression method on them to see how much information each translated text has. This might tell which language is complex in a sense of entropy. Namely, I try to measure that ``If the contents are the same, how much information entropy differs depends on a language?'' I will write a few articles regarding with this topic.

Mnemonic for π

All the following poems describe a number. 産医師異国に向こう.産後薬なく産に産婆四郎二郎死産.産婆さんに泣く.ご礼には早よ行くな. Yes, I have a number. How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics. Sir, I send a rhyme excelling.In sacred truth and rigid spelling. Numerical spirits elucidate, For me, the lesson's dull weight. If Nature gain, Not you complain, Tho' Dr. Johnson fulminate. Que j'aime à faire apprendre un nombre utile aux sages! Immortel Archimède, artiste ingénieur, Qui de ton jugement peut priser la valeur? Pour moi, ton problème eut de pareils avantages. Wie, O dies π. Macht ernstlich so vielen viele Müh!  Lernt immerhin, Jünglinge, leichte Verselein.  Wie so zum Beispiel dies dürfte zu merken sein! The German version mentioned about the number --- π. These are all Mnemonic for π. Japanese uses sounds of numbers, but, other languages uses the number of words. From Yes(3), I(1) have(4) a(1) number(6), you can find 3.1416 (rounded)....

Introduction to Linear Algebra: Projection and a Simple Kalman Filter (3)

Simple Kalman filter In a sense, Kalman filter can predict a near future from the past and current condition. (Maybe this is a bit too much to say, there are of course only some extent and limitations.) Let's write it in a eqation.  x_{new} = x_{old} + f(x_{current}) This means that the future is somewhat the extension of previous state with a modification, and the modification is now hidden in the function f. OK, I am not an expert about Kalman filter, so, I will write down only a simple one that I could handle. In a simple Kalman filter, x_{new} is predicted by past x_i-s. The past data span a subspace of the data and the new value is just the best projection onto the past subspace. That how I understand it. (This might be wrong.) In the Strang's book, an interesting computation method is explained, but, it is just a sketch. Here I will write the overview of the idea of Strang's book. First, I need a preparation about 1/k. Therefore, We saw the last two blog en...

Introduction to Linear Algebra: Projection and a Simple Kalman Filter (2)

Linear algebra way In the linear algebra way, the best x is a projection of right hand side onto the column space of the matrix. Because the solution is only possible in the A's column space (means the solution is only represented by the A's column vector's linear combination), the best solution is the projection of b onto the column space. Figure 1 shows the geometric interpretation. The matrix A and b are: Here A is a vector, so the projected best x is: The result is the same to the calculus way. This is also the average. (If you are not familiar with projection matrix, see the Figure 1. In the Figure, e is perpendicular with A, i.e., A^T e = 0. You can derive it from here.) Figure 1. Project b to A's column space My interest is why these are the same. Minimization of quadric is a calculus (analysis) problem, and projection is more a geometric problem. Is this just a coincidence? Of course not. They have the same purpose. As in Figure 1, projection is t...

Introduction to Linear Algebra: Projection and a Simple Kalman Filter (1)

Introduction about linear algebra, calculus, and a simple Kalman filter I found interesting that the relationship among linear algebra, calculus, and a simple Kalman filter. So I will make a memo about this. Problem Given a simple observed data sequence (x_i), we can assume these are equally plausible and we can apply the least square method. In this simple setting, the outcome is just an average. You can find this topic in Gilbert Strang's an Introduction to Linear Algebra, chapter 4.2. For example, the observed data is [70 80 120]^T, if these are equally plausible,  x = 70  x = 80  x = 120. These euqations are strange. They look like, x is 70 and 80 and 120, simultaneously. Here, these are observed data, so they have some errors. But actually we observe the same data. The motivation is to find the best possible data we could  have from the observations. Therefore, the system is: There is no such x that satisfies the system. But, let us think about ...

Eigenvalue and transfer function (6)

Eigenvalue and Eigenvector Function case Interestingly, the same story is repeated again in function. (Well, ``interesting'' is just my personal feeling. So, many might not agree with this. I found this --- the same story repeated again, but in the different level --- interesting in mathematics. Like Hitchhiker's Guide to the galaxy's jokes have some mathematical structure.) So far, we apply an ``operation'' to a scalar or a vector. Then, we again apply an operation to a function. We want to know what is the substance of the ``operation'' instead of the each result of operation. We could not know the substance at once, but we could know the response of the function with an operation. Usually, a function is an operation to a scalar or a vector, therefore, it is a bit confusing to think about an operation on an operation. Let's see an example. Let's assume a function f and a scalar or a vector x , this function f can be an operation on x , ...

Drei Gäste im Restaurant

Now my favirite quiz is in German (help with Isabelle, thanks). Drei Gäste im Restaurant Wir (ich, Isabelle, und mein Freund) waren in einem Restaurant.  Wir nahmen ein Menue. Es kostete 300 Euro. Der Kellner kassierte das Geld von uns und ging in die Kueche zurück, dann sagte der Chef: ,,Heute ist der Jahrestag des Restaurants, also kostet das Menu nur 250 Euro''. Der Kellner kam an den Tisch zurück, aber er dachte: ,,Man kann 50 Euro nicht durch drei Personen teilen''. Dann sagte er: ,,Heute ist unser Jubilaeums Tag, also bekommen Sie 30 Euro zurück''. Jeder bekam 10 Euro. Wir dankten dem Kellner und gingen nach Hause. Der Kellner fühlte sich ein bisschen schuldig, aber er entscheied es zu vergessen. Aber, er bemerkte etwas seltsam. ''Jeder bezahlt 90 Euro, also ist die Summe 270. Ich habe 20 Euro von ihnen. Die Summe ist 270 plus 20 gleich 290. Aber zuerst bekam ich 300 Euro.'' Der Kellner schrieb:    Jeder bezahlt 90 x drei = 270 + Ich...

A 6σ Woman (3)

Let's visualise how a someone is special in the Figure1. In Figure 1, the area filled by blue region is x <= +- 1σ people. Again, in the Gauss distribution, the center is the average. People are apart from the average, then number of such special people rapidly decreases. The red area of Figure 2 shows the people who are not in the area of x <= +-1σ. Figure 1: Inside of sigma 1 region. Figure 2: Outside of 1sigma region. Gauss choose the parameter to make the total area of the curve to one. So, we can just compute any area of this graph, then we know the degree of speciality from the area. If you are in the area 0.7, you are in the range of 70% people. Great job, Gauss! I cannot compute this area by hand, therefore I asked a clever program. That answered me that the blue area of Figure 1 is 0.6827. This means, 68% people is in 1σ (more accurately +-1σ). By the way, some statistics defines the ``normal person'' living in between +-2σ (95.4%) or +-3σ (99.7...

A 6σ Woman (2)

Average and variance of salary/month The story started with variance, I should have told you also another important concept --- average. If you heard a company A's average salary for a month is 25,500 Euro, you might interested in to join the company. But, this company has only two people, a president and an employee. The president gets 50,000 Euro/month, and the employee gets 1,000 Euro/month. Now you see how average can deceive you. A company B is also two people company, but the president gets 30,000 Euro/month and the employee gets 21,000 Euro/month. CompanyA salary of president 50,000 Euro/month salary of employee 1,000 Euro/month Average of salary 25,500 Euro/month CompanyB salary of president 30,000 Euro/month salary of employee 21,000 Euro/month Average of salary 25,500 Euro/month The averages are the same! If I can choose one of them as an employee, I will choose B. But, if they can provide only average, I can not see the difference. That's bad!...

A 6σ Woman (1)

Originally, I would like to continue to talk about the determinant, but, for a while, I would like to write about sigma story. And I will come back to the determinant again. Starting with a question Have you ever met a 6σ person? What is 6σ? When I lived in Saarbruecken, I saw a huge woman working in the Karstadt. I believe it's not true, but a rumor said, she stacked in a register seat when she was working. But I cannot say that is not a true... It is hard to find such a person in Japan. The distribution of Japanese's height or weight seems narrower than Germany's one. I feel the distribution of USA people is wider than those two countries. It means, large people are larger than others in USA, I think. 'Average' is an important concept in statistics, and this 'distribution' is the second important concept in statistics. The distribution, i.e., how the people have different weight, or how the people are close to their average weight. In mathemati...