A Geometry Problem

The internet, and especially Youtube, are a vast resource for mathematics now. You find all sorts of problems, explanations, and tutorials, usually done by very talented people. I like to dig around in that pile and soon find some pearls like the following one. The problem has been presented by a buy named Presh Talwalkar. Some of them I knew already, but this one was new to me.

The problem is to determine the area of the quadrilateral with the question mark. Of course, no angles or side lengths are given. It took me a while to figure out a simple solution.

The first idea is to put all this in algebraic terms. To make things simpler, we would put the lower left corner to (0,0) and the lower right one to (0,a), and the third one to (b,c). The points on the left and right sides of the triangle can then be determined using algebraic geometry (depending on a,b,c) and thus the area in question. This looks tedious but is a really nice exercise. Do not forget the determinant formula for the area of a triangle. Let’s do it!

Euler Math Toolbox (EMT) happens to have a geometry package which can use Maxima to compute symbolically with geometric objects. It turns out to get more involved than expected. Trying to do this by hand seems to be really hard work.

>load geometry
 Numerical and symbolic geometry.
>A &= [0,0]; B &= [a,0]; C &= [b,c];
>P1 &= u*C+(1-u)*A; P2 &= v*C+(1-v)*B;
>&solve(areaTriangle(A,P2,B)=6,v), P2v &= expand(P2 with %)
                               [v = ---]
                                    a c
                           12 b   12      12
                          [---- - -- + a, --]
                           a c    c       a
>&solve(areaTriangle(A,P1,B)=7,u), P1u &= expand(P1 with %)
                               [u = ---]
                                    a c
                                14 b  14
                               [----, --]
                                a c   a
>lv &= lineThrough(A,P2v); 
>lu &= lineThrough(P1u,B); 
>D &= lineIntersection(lv,lu)
                   7 a  c + 84 b - 84 a     84 c
                  [--------------------, -----------]
                       13 a c - 84       13 a c - 84
>sol &= solve(areaTriangle(A,D,B)=4,[a,b,c])[1]  ...
>  with [%rnum_list[1]=s,%rnum_list[2]=t]
                        [a = ---, b = s, c = t]
                             5 t
>&expand(areaTriangle(A,C with sol,P2v with sol)) - 3
>&B with sol
                                [---, 0]
                                 5 t
>&C with sol
                                 [s, t]
>&P1u with sol
                                5 s  5 t
                               [---, ---]
                                12   12
>&P2v with sol
                             108   5 s  5 t
                            [--- + ---, ---]
                             5 t   14   14

The problem is that there is more than one solution. The triangle is not determined by those three areas! However, the area in question is always the same. This is quite a surprising fact of we start algebraically as above. On the other hand, it is not surprising if we assume that the problem can be solved at all. For any transformation (x,y) -> (kx,y/k) keeps the areas intact. Moreover, any transformation (x,y) -> (x+c,y) keeps the given areas intact. So if we have one solution, we can effectively get another solution where C is placed anywhere.

I took the values into C.a.R. (with sliders for s and t, and B,C,D,P1,P2 according to the expressions above) and here is one such triangle.


The computations seem to work, and moving the sliders shows that 7.8 is indeed the solution to our problem.

Isn’t there an easier and more intuitive solution? I have not watched the linked video yet. But upon discussion with a friend, the solution occurred to me. I will tell you Have a look at the following sketch.

The trick is to look at the triangle ABP1 and to see BP1 as its base side. Then divide the triangle into ADP1 and ABD. Those triangles have the same height upon BP1 and since the area is height times base over 2, we get (solving for the height)

\(\dfrac{4}{DB} = \dfrac{3}{DP1}\)

Now the same can be done in the CBP1. Thus

\(\dfrac{y+2}{DB} = \dfrac{x}{DP1}\)


\(\dfrac{y+2}{4} = \dfrac{x}{3}\)

Now we do the same with the triangles over the baseline AP2.  We get in the same way

\(\dfrac{x+3}{4} = \dfrac{y}{2}\)

Now we have two equations for x and y. The solution is

\(x = \dfrac{21}{5}, \quad y = \dfrac{18}{5}\)


\(x+y = \dfrac{39}{5}\)

To find such solutions is a matter of practice, combined with trial and error, plus a grain of stubbornness. The brain needs to have enough math tricks to look for, simply. Then you need to look around if anything looks familiar to you.

18. Juni 2019 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

Avoiding CO2 Emissions

Sometimes I wished people (including myself) would think a bit more before they write. Looking around for CO2 sins, it is fairly easy to point the finger to flying. Indeed, aviation has tax privileges which cover the true costs of this means of transportation. This should be stopped. But in terms of CO2 output, modern airplanes are not that bad. Only the railway and especially travel buses are better. A car must be packed with at least 3 persons to beat the most modern airplanes. And airplanes could be used on distances only where cars or travel buses cannot compete at all.

The arguments usually continue with a claim for more railway connections. This, of course, does only help if the railways are (1) driven by regenerative energies and (2) replace other means of transportation. If those conditions are not met more and cheaper railway connections only add to the CO2 footprint of mankind. The most efficient way would be to stop driving our own cars and using travel buses. Instead, we think that individual traffic can go on like now in the future world of eleven billion people. Another option is to reduce traveling before we are forced to do so. The means to achieve this are local economies and the net.

Moreover, traveling in total adds only 15% to the global CO2 emissions if my numbers are right. And flying is only a small part of traveling. By far the major emissions come from the industry, power plants and housing. And this will be rising due to the eleven billion people that will need basic resources to live. We should have stopped that growth earlier by education, fair chances, equal rights for women and shared welfare. But now my kids have to find a way to get the planet through this sickness called „mankind“. And there are ways to do it. We need new thinking and much more science, and a new awareness of the challenges we are facing. We don’t need a brutal business that ignores all warnings. And we do not need simple solutions which ignore all statistical truth.

17. Juni 2019 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

Mathematische Software – Geogebra

This is the Android Version of GeoGebra. It is a lot more cumbersome to use than the desktop version, but you can get used to it. Although I will be criticizing it a bit below it is a very nice software.  It can do far more than an average student would ever need. If you do not know the power of GeoGebra, have a look at its home page. My own programs Euler Math Toolbox or C.a.R. and others in the same category may be more powerful on many areas and more versatile. But GeoGebra offers an all-in-one package with teacher support and a world community. Over the years, they completed the program and added missing features. They even included 3D constructions and augmented reality. For this, we had to use specialized programs like Archimedes 3D or Cabri 3D, both payware. Moreover, they added JavaScript support on webpages so that constructions can still be embedded after Java has been killed in the browser. This free package is to be recommended.

Instead of writing a review, let me point out the shortcomings of CAS with regard to the learning process. No, I won’t be arguing that software hinders the process of acquiring mathematical skills and math has to be done with pencil and paper. Rather the contrary is true. I will be arguing for more software usage. But it needs to be used in an intelligent way. For that, we need intelligent teaching.

Have a look at the example in the image above. It was the first example I tried on my Android device. We are discussing the function

\(f(x) = e^{5x} \, \sin(x)\)

We want to learn its behavior. It is very difficult to get a really good impression on the Android device. You can try to zoom in and out. But without further information, you will not be able to grasp its structure. The software uses the nicest feature of touch screens, the pinch zoom. So you can zoom right into the interesting region as in the image above. Even then, it looks as if the function was zero left of -1.5.

If you zoom out further you see the following.

One can only understand this image if one knows how the two factors look like and have ever studied a dampened oscillation before. So the plot does not really help without the mathematical background. But, on the other hand, if you have the background the plot can be a huge help in asserting the knowledge and confirming it.

Next, I tried to find the first local minimum on the negative axis. You can solve that numerically in the program by touching the graph in the minimum. The software will then display one of these black dots showing all special points of the plot, and you can read the coordinates below the plot. I think this is a very nice way of grasping math and something EMT cannot do that easily. Of course, you can do it on the command line.

>function f(x) &= exp(5*x)*sin(x)
                               5 x
                              E    sin(x)

But let us talk about the CAS aspect of this solution. GeoGebra produces a very interesting solution to this problem.

\(\{ x = 2 \tan^{-1}(\sqrt{26}+5), \, x=2 \tan^{-1}(-\sqrt{26}+5) \}\)

There is a switch to evaluate this numerically. If it is pressed four surprising values appear: -191.31°, -11.31°, 168.69°, 348.69° (rounded). The degrees can most likely be avoided by setting the program to radian mode. The values are correct.

>fzeros(&diff(f(x),x),-200°,360°); %->°
 [-191.31,  -11.3099,  168.69,  348.69]

What do we make of all this?

First of all, the computations, algebraic or numerical, do not make much sense without proper explanations and without the mathematical background. The zeros of the sine function and consequently of the function f simply are the multiples of 180°. Between each zero, the function has at least one extremum, alternatingly a minimal and maximal value. So much is easy to see with the naked eye. In fact, there is exactly one extremal point in each interval. This is harder to see, however. By computing the derivative, we get the extremal points as the solutions of

\(\tan(x) = – \frac{1}{5}\)

Every book about trigonometry contains a plot of the tangent function like the following.

I added the line y=-0.2. So you can easily see that the extremal points repeat in distances of 180°. Problem solved.

Why does GeoGebra produce such a complicated answer involving the square root of 26? That is a mathematical problem in itself and well above the capabilities of high school students. The reason may be connected to replacing sine with 1 minus cosine squared and solving a quadratic equation.

And why does it only show four of the infinitely many solutions? I do not know.

We learn from all this that numerical or algebraic software or plots can be useful. But without mathematical background they are useless.

26. Mai 2019 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

Durchschnitt und Median

Es ist unglaublich! In der offiziellen Antwort der CDU auf den Youtuber Rezo findet sich die altbekannte Stammtisch-Parole, dass der Zuzug von Jeff Brezos viele Menschen unter die Armutsquote treiben würde, weil sich ja das Durchschnittseinkommen dadurch erhöhen würde und daher die 60% des Durchschnittseinkommens, die Armut definieren, ebenfalls. Muss man sich noch wundern, dass die CDU den Unterschied zwischen Durchschnitt und Median nicht kennt? Dieses einfache Faktum sollte doch irgendjemand bekannt sein, der die Stellungnahme vor der Publikation gelesen hat. Die CDU bestätigt damit auf geradezu eindrückliche Weise die Behauptung Rezos über die Inkompetenz der in dieser Partei agierenden Politiker.

Übrigens wird auch noch das ebenso dämliche Argument von der Nachkriegszeit gebracht. Dort hätte es keine Armut gegeben, weil ja alle gleich arm gewesen sind. Ich bezweifle, dass das von den Zahlen her über die 10 Jahre nach Kriegsende grundsätzlich stimmt. Auch damals gab es schon gut Verdienende und sogar Reiche. Das gleiche gilt auch für den von der CDU angenommen Sozialismus, in dem angeblich jeder gleich viel hatte. Spätestens in der Endphase der Sovjetunion habe ich da Zweifel, ob nicht doch zahlreiche Arme zu finden waren, und zwar im Sinne der Armutsdefinition am Median. Aber das ist irrelevant. Denn Armut bemisst sich auch relativ zu den Lebenskosten. Es sind steigende Mieten, steigende Fahrtkosten, Schulkosten und andere Dinge, an denen Arme scheitern.

Noch blöder ist das Argument, man könne sich heute doch viel eher einen Fernseher leisten als früher. Das wurde schon in den Nachdenkseiten auseinander genommen, und ich muss hier nicht mehr dazu sagen. Bitte nachlesen!

24. Mai 2019 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

Mathe-Abitur – too difficult?

Maybe I should write this in German. But why not in English? After all, we need more European standards in education. And the discussion may be of interest to students in other nations. Be aware, however, that the levels of mathematics in schools are quite different between countries like India, China, Germany or the USA. But all have something in common. And that will be the point of this posting.

Currently, we have an uproar about the 2019 mathematical test for the German Abitur. In case you are not familiar with the German system, the Abitur is a final examination of the highest level of school education in Germany. It is usually written at the age of 17/18 after 12/13 years of school life and qualifies for an entrance to the Universities. The test contains centralized elements now for all of Germany to guarantee the same level for all states in Germany (the Bundesländer). By law, each state is responsible for education in its schools. The teachers have to select sets of problems from this pool to make the results more comparable.

The students claim that the test was much more difficult than last year, and contained unexpected problems. The final word about this will be out soon when the grades of this year and last year can be compared. However, petitions were signed by thousands of students to lower the requirements this year. Obviously, not only participants in the test signed. This shows the public interest in the matter, and also the problems with mathematical education in the general public.

A typical example of this attitude I heard in a radio interview with a mathematician who organizes the Mathematical Olympiad in Germany. The question was: „If the math test in the Abitur was already that difficult why do we need mathematical Olympiades?“ It simply reflects the general tenor of „Who needs mathematics?“. The interviewed mathematician replied very politely, where I would have been much more direct and would have asked: „Why do we need a high jump?“ The interview goes on with asking if the math problems of the Abitur could be used for the Olympiade. Again, the answer was polite, but a bit off in my opinion: The Abitur is more on reproducing known techniques, and the Olympiade is on creating ingenious solutions. This answer made me write this posting. I think it is wrong and misleads the public view on mathematics.

The truth is that the successful participants of the math Olympiad all practice quite a lot. They have meetings, they read books, and they study old problems. I once hosted one of their sessions and saw how serious they take mathematics. They have a lot of tricks up their sleeves that the innocent student has never heard of. Practicing is the secret to success. It is the same as in all other competitive activity, including the Olympic Games. You do not expect a high jump professional to be excellent in table tennis. It is not what he learned and improved with thousands of repetitions. And being an expert in Algebra does not make you a brilliant applied mathematician, as well as the other way around. Human intelligence relies on learning and recognizing, and not on brilliant extraordinary ideas. Those happen only to the ones that have studied the most.

Getting back to our „Mathe-Abitur“, we have to face the truth that we have to teach the necessary skills before we can ask students to apply them. There is no principle difference between reproductive tasks and so-called transfer tasks. It is just so that the easy problems make it obvious which skills have to be applied, and the difficult problems hide this and may require more than one skill. The student needs to learn to sort out the mathematical content from the given text and see how he can apply the learned material to the problem. This is a skill of its own.

In summary, we cannot really judge the difficulty of an exam without knowing the details of the teaching that prepared for the exam. The only other way is to study previous exams. Clever students do, of course, look at these on their own. For most students, this must be part of the teaching. At this time, the only way to convince me that the problems were too hard would be a petition by the math teachers. They are the experts. A serious drop in the grades would also need an investigation, with input by those that really face the students, the math teachers.

13. Mai 2019 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

EMT – Simulation of the Two Child Problem

The two child problem is a problem in probability theory with a solution that seems paradox on first sight. I wrote about that problem before. Let me repeat the explanation and do a simulation to convince everybody that the solution is really correct. You can find information on that problem on Wikipedia.

The first simple version starts with this story: You meet a man in a bar and he mentions his daughter. You ask him about his children and he answers that he has two kids. The question is: What is the probability of the other kid (the one he was not talking about) to be female?

The answer depends on some important details. But let us assume you have no information if the other kid is younger or older, or any other special information about the daughter and the man is just a random man from the population. These details will turn out to be important! Then the intuitive answer to our question 1/2 is wrong, or rather, it does not make sense. The correct answer is 1/3.

In my opinion, each probabilistic problem makes sense only if we can devise an experiment that would in theory or in practice simulate the problem. Our computation should predict the outcome of the experiment. Problems that cannot be simulated in any way are not interesting to me. This includes most problems in probability or measure theory which need the help of the axiom of choice.

But our problem can easily be simulated. And setting up the simulation gives great insights into the meaning of our question and the terms „probability“ and „randomly selected“. Let us do it in Euler Math Toolbox (EMT). What we do is a Monte-Carlo simulation. We need to make the following assumption: The man has two kids with random gender, one of which is female, and the probability for a kid to be either gender is 1/2 (no diverse genders in this posting). So we draw 1000000 pairs of kids with random gender. Then we count the proportion of two female kids among all pairs with at least one female kid.

>n = 1000000
>K = intrandom(2,n,2)
 Real 2 x 1000000 matrix
             2             1             1             2     ...
             1             2             2             2     ...
>i = nonzeros(K[1]==1 || K[2]==1); ni = length(i); ni/n
>sum(K[1,i]==1 && K[2,i]==1) / ni

The syntax may seem cryptic, but it is intuitive if you understand the Matrix language. K contains a pair of kids in each column (n=1000000 columns). „K[1]==1“ returns a vector of 0/1 with 1 (true) on each position where the vector K[1] (the first row of K) is 1. I.e., a vector indicating the pairs where the first kid is female. „||“ is short for „or“, and nonzeros() returns the indices of the non-zero elements of a vector. Thus „ni“ is the number of pairs such that either kid is female. As expected, „ni/n“ is approximately 3/4. There are four cases, and one case (tow boys) is wrong.

In the final line, we count the numbers of pairs in the „i“-columns, where both kids are female, using sum() which sums up the ones and compare that to the total number of right cases „ni“. The answer is approximately 1/3.

This should not surprise us since there are three cases in the „i“-columns: (1,2), (2,1), (1,1). Only one of these cases is the correct one.

Why does the problem depend on the details? For this, we assume that it is Tuesday and the man in the bar has her birthday today. Surprisingly, this changes the problem completely! Even if we only know that the daughter is born on a Tuesday the problem changes drastically.

Let us start with the Tuesday problem. We simulate the same now by randomly selecting weekdays for the birthday of both kids.

>n = 1000000;
>K = intrandom(2,n,2);
>D = intrandom(2,n,7)
 Real 2 x 1000000 matrix
             7             4             6             4     ...
             7             2             5             5     ...
>i = nonzeros((K[1]==1 && D[1]==2) || (K[2]==1 && D[2]==2)); ni = length(i); ni/n
>sum(K[1,i]==1 && K[2,i]==1) / ni

The code did not change very much. But the „i“-columns now contain only columns with one Tuesday girl (2 means Tuesday above). The probability for this much lower, of course. We have 4*49=196 cases in total (4 gender pairs, 7 days for each). Of these, only 13 contain a Tuesday girl. There are 6 with the first kid a Tuesday girl and the other a girl born on another day, and 6 with the younger in the same way, and one with two Tuesday kids, plus 14 cases with one Tuesday kid and a boy. This is 27/496~0.13775.

Out of these 27 cases, we have 13 cases with two girls, as computed above. We have 13/27~0.48148. The simulation works as good as it can. The accuracy of a  Monte-Carlo simulation is only about 1/sqrt(n)=1/1000.

If we know that the birthday is today we can just take the probability as 1/2. In this case, the pick of the other child is almost independent of the pick of the first child in contrast to the original problem. And that is the true reason for the confusion. If we had known that the girl is the elder one the pick of the other child is independent and thus female with probability 1/2. But we only know that one of the kids is female. That changes the situation completely and both picks depend on each other.

I recently saw a Youtube video which I do not link here because it only adds to the confusion. The video could not explain why it makes a difference between knowing that the girl has a birthday, and knowing the precise birthday. This is easy to explain if you think of an experiment as above. Drawing a man with two kids, one of them being a daughter, is a different experiment than drawing a man with two kids, one of them is a daughter born on a Tuesday.

30. April 2019 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

Ellipse Geometry – a Problem

I found the following nice problem in my Facebook account. Facebook, however, is a miracle to me and I am always unable to find a posting a second time. Unless you answer something silly like „Following“ it is lost. The best I could find was this link.

The problem is to prove:

The intersections of two perpendicular tangents to an ellipse form a circle.

Of course, this can be computed by Analytic Geometry and I carry this out below. It is no fun, however. E.g., you can find the radius of the circle if the claim is correct, take a point on the circle, compute the two tangents to the ellipse and check that they are perpendicular.

Let us find a more geometrical solution! At first, there is a well known „construction“ of ellipses folding a circular paper. You can do it with actual paper. Cut a circular paper. Mark a point A inside the circle. Then fold the paper, so that the boundary lies on A. I.e., the point P is reflected along the folding line to A. The line is the middle perpendicular of AP. If you do that often enough the folds will outline the green ellipse. There are even videos on Youtube showing this.

For the proof, you need that ellipses are the set of points where the sum of distances to A and M is constant. In our case, it is „obviously“ constantly equal to the radius of the circle. We have the following.

The set of all middle perpendiculars to a fixed point A and points P on a circle is the set of tangents to an ellipse.

Now you know how to get two perpendicular tangents. In the following construction, I did just that. The four blue lines are four middle perpendiculars. They are constructed by selecting a point P on the black circle, the line PA and a rectangular to that line. Then the blue lines are the four middle perpendiculars on A and the four intersections of our green lines with the circle.

We have to prove that

  • the midpoint Z on AM is the center of the rectangle
  • and that the rectangle has the same diameter, independent on the choice of P on the black circle.

Then the corners of the blue rectangle will always be on the same circle.

Now, we stretch the blue rectangle by a factor 2 from the center at A. The point Z will be stretched to the point M then. The blue rectangle will become a rectangle through the intersections as in the following construction.

It is now „quite obvious“ that M is the center of the blue rectangle. Thus Z was the center of the 1/2 times smaller rectangle. This proves our first claim.

For the second claim, we need to show that the length of the diagonal of the large blue rectangle does not depend on the choice of the red point. The diagonal has the length


by Pythagoras. Now we have another claim.

The sum of the squares of the lengths of each two perpendicular secants of a fixed circle that meet in a fixed point inside the circle is constant.

To prove that have a look at the dashed rectangle with diagonal AM. Using this rectangle and Pythagoras you can „easily“ express the diagonal of the blue rectangle by the length of AM and the radius of the circle. This proves the second claim.

The images in this posting have been done with C.a.R. (Compass and Ruler), a Java program developed by the author. It allows beautiful exports of images and the automatic creation of polar sets for sets of lines. That feature was used to compute the ellipse in the second image. The first ellipse was done using the two focal points. C.a.R. has also ellipses defined by 5 points, or even by an equation or a parameterization.

I promised to compute the problem using Analytic Geometry. I am using the Computer Algebra system Maxima via my Euler Math Toolbox for this.

The first method computes two perpendicular tangents to the ellipse with the equation

\(x^2 + c^2 y^2 = 1\)

To find a tangent perpendicular to a vector v, we can maximize the expression

\(v_1 x + v_2 y\)

on the ellipse using the method of Lagrange. If the vector v has norm 1 the value of this maximum will be the distance of the tangent from the origin. The Lagrange equations fot his are

\(v_1 = 2 \lambda x, \quad v_2 = 2 \lambda c^2 y, \quad x^2+c^2 y^2 = 1\)

After solving this, we get

\(v_1 x + v_2 y = 2  \lambda (x^2+c^2y^2) = 2 \lambda\)

Then we do the same with the orthogonal vector, i.e., we maximize

\(-v_2 x + v_1 y\)

We then show that the sum of squares of these two values is constant.

In EMT and Maxima, this is the following code.

>&solve([v1=2*la*x,v2=2*la*c^2*y,x^2+c^2*y^2=1],[x,y,la]); ...
>  la1 &= la with %[1]
                                  2    2   2
                           sqrt(v2  + c  v1 )
                                  2 c
>&solve([-v2=2*la*x,v1=2*la*c^2*y,x^2+c^2*y^2=1],[x,y,la]);  ...
>  la2 &= la with %[1]
                                 2   2     2
                           sqrt(c  v2  + v1 )
                                  2 c
                            2         2     2
                          (c  + 1) (v2  + v1 )
                                  4 c

Thus the circle of intersections has the radius

\(r = \dfrac{\sqrt{1+c^2}}{c} = \sqrt{1 + \dfrac{1}{c^2}}\)

This is confirmed by the special case of tangents parallel to the axes.

There are several other methods. One is to construct the tangents using tangents to a circle. For this, the ellipse needs to be stretched by 1/c into y-direction. It will then become a circle. We need to compute points on the image of our circle with radius r under this mapping, then take the tangents to the mapped ellipse and map back. Below is the plan of such a construction.

The computations are very involved, however.

Another method to find both tangents is the following: We look at all lines through a given point (e.g. determined by their slope) and find the ones that intersect the ellipse only once. The product of the two slopes that solve this problem should be 1. Again, this is a complicated computation.



01. März 2019 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

Yahtzee Waiting Times

I recently was asked about waiting times in the game of Yahtzee. If you do not know the game it suffices to say that you throw 5 dice, and one of the goals is to get 5 dice with the same number, a Yahtzee. I wrote about waiting times a long time ago. But let me repeat the main points.

The trick is to use a number of states S0, S1, …, Sn, and probabilities P(i,j) to get from state Si to state Sj. S0 is the starting state, and Sn is the state we want to reach, in our case the Yahtzee. For a first attempt, we use the number 6s we have on out 5 dice. Then we have 6 states, S0 to S5. With a bit of combinatorics, we can compute the probabilities P(i,j) as

\(p_{i,j} = p^{j-i} (1-p)^{n-i-(j-i)} \binom{n-i}{j-i}\)

If we compute that with Euler Math Toolbox we get the following matrix P.

>i=(0:5)'; j=i';
% This is the matrix of probabilities to get from i sixes to j sixes.
 0.4018776 0.4018776 0.1607510 0.0321502 0.0032150 0.0001286 
 0.0000000 0.4822531 0.3858025 0.1157407 0.0154321 0.0007716 
 0.0000000 0.0000000 0.5787037 0.3472222 0.0694444 0.0046296 
 0.0000000 0.0000000 0.0000000 0.6944444 0.2777778 0.0277778 
 0.0000000 0.0000000 0.0000000 0.0000000 0.8333333 0.1666667 
 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 1.0000000

This matrix allows us to simulate or compute results about probabilities for 6-Yahtzees.  E.g., we can start with no 6 in S0. After one dice throw, the first row of P yields the distribution of the expected states. We can do dice throws by applying P to the right of our distribution vector.

 0.4018776 0.4018776 0.1607510 0.0321502 0.0032150 0.0001286 
% After two more throws, we get the following.
 0.0649055 0.2362559 0.3439886 0.2504237 0.0911542 0.0132721 

This tells us that the chance to be in state S5 after three throws is just 1.3%.

How about the average time that we have to wait if we keep throwing the dice until we get a 6-Yahtzee? This can be solved by denoting the waiting time from state Si to S5 by w(i) and observe

\(w_i = p_{i,n} + \sum_{j \ne n} p_{i,j} (1+w_j)\)

where n=5 is the final state. Obviously, w(5)=0. Moreover, the sum of all probabilities in one row is 1. Thus we get

\(w_i – \sum_{j=1}^{n-1} w_j = 1\)

Let us solve this system in Euler Math Toolbox.


The average waiting time for a 6-Yahtzee is approximately 13 throws. If you already got 4 sixes, the average waiting time for the fifth is indeed 6.

We can interpret this in another way. Observe

\(w =  (I-B)^{-1} \cdot 1 = (I+B+B^2+\ldots) \cdot 1\)

The sum converges because the norm of B is clearly less than 1. So we interpret this as a process

\(w_{n+1} = B \cdot (w_n + 1)\)

Suppose a waiting room. We have w(n,i) persons in state Si at time n. Now, one more person arrives at each state and we process the states according to our probabilities. On the long run, the number of persons in state S0 will become the waiting time to get out of the system into the final state.

Unfortunately, the probabilities are not that easy to compute when we ask for a Yahtzee of any kind. E.g., if we have 66432 we will keep the two sixes as 66. But we may throw 66555 and switch to keep 555. There is a recursion for the probability to get from i same dice to j same dice. I computed the following matrix which replaces the matrix P above.

 0.0925926 0.6944444 0.1929012 0.0192901 0.0007716 
 0.0000000 0.5555556 0.3703704 0.0694444 0.0046296 
 0.0000000 0.0000000 0.6944444 0.2777778 0.0277778 
 0.0000000 0.0000000 0.0000000 0.8333333 0.1666667 
 0.0000000 0.0000000 0.0000000 0.0000000 1.0000000 

Note that I have only the states S1 to S5 here. With the same method, I get the waiting times.


Thus we need only about 11 throws to get any Yahtzee. The probability to get one in three throws is now about 4.6%.

 0.0007938 0.2560109 0.4524017 0.2447649 0.0460286 


28. Januar 2019 von mga010
Kategorien: Euler | Schreibe einen Kommentar

Wie funktioniert Mathematik?

Ich kam kürzlich auf einen Blogeintrag von „Halbtagsblog“ über das Mathematik. Dort wird ein Bild gezeigt, dessen Inhalt man erst nach geraumer Zeit erkennt, weil er durch eine Schwarz/Weiß-Filter verfremdet ist. Die meisten sehen das Dargestellte erst, nachdem man Ihnen gesagt hat, wonach sie suchen sollen. Der Blog ist auch ansonsten ganz interessant, insbesondere für einen, der die Früchte des Schulunterrichts vor sich sitzen sieht.

Ist Mathematik wie das Erkennen von Mustern in scheinbarer Unordnung? Der Gedanke wirkt verlockend. Es ist nicht von der Hand zu weisen, dass beides Beharrlichkeit und Geduld (engl. persistence) erfordert. Er scheint auch zu erklären, warum manche in Mathematik talentierter sind als andere. Sie haben einfach das bessere Auge. Was mir daran gefällt ist, dass es somit möglich erscheint, durch Wiederholung und mit der Zeit Erfolge in Mathematik zu erzielen. Das ist ohne Zweifel ein guter und positiver Gedanke.

Dennoch möchte ich widersprechen. Beharrlichkeit und Geduld sind nämlich für alles Lernen notwendig. Das gilt für das Tennisspielen oder den Spracherwerb ebenso wie für das Trompete Blasen. Damit wird es als Leitfaden speziell für die Mathematik untauglich. Eigentlich ist es insgesamt zu sehr eine Binsenweisheit als dass es nützlich wäre. Die Weisheit von Hollywood-Filmen „You can reach everything you really want!“ ist schon zweifelhaft.  Als didaktische Richtschnur für Mathematik hilft sie nicht viel.

In Wahrheit ist Mathematik eine Sammlung von Techniken, mit denen wir versuchen, die Welt zu erklären. Dieses Grundmuster beginnt beim 1,2,3-Zählen und zieht sich bis zur Quantenmechanik. Wir bauen dabei immer auf dem auf, was wir von den Alten übernommen haben. Beharrlichkeit und Geduld, gewürzt mit ein wenig Kreativität, helfen uns, neue Möglichkeiten zu entdecken. Dadurch entwickelt sich die Mathematik fort. Die besten Mathematiker sind die, die das umfassenste Wissen auf ihrem Spezialgebiet mitbringen, gepaart mit dem Drang, dieses Wissen auf Neues anzuwenden und anzupassen. Bloses Warten auf einen Einfall hilft meist überhaupt nichts.

Für den Lehrer bedeutet das, das er Mathematik als Technik darstellen soll, mit der man etwas anfangen kann. Wenn das nicht gelingt, verlieren die Schüler das Interesse. Oder, besser gesagt, das Interesse beschränkt sich auf das in den Tests Benötigte.

Was aber kann man mit der Mathematik anfangen? Hier sind wir bei der entscheidenden Frage für einen guten Unterricht. In einem Mathe-Wettbewerb zu brillieren oder später selber Lehrer zu werden, kann nur eine Teilantwort auf diese Frage sein. Ich habe an anderer Stelle so viel über Mathematik versus Welt geschrieben, dass ich hier nicht darauf eingehe. Aber ein Lehrer, der darauf keine überzeugte Antwort zu geben weiß, wird niemals ein guter Lehrer.

20. Dezember 2018 von mga010
Kategorien: Uncategorized | 2 Kommentare

Smartphones, Schulen und Digitale Initiative

Die Bundesregierung plant angeblich eine digitale Initiative, um die im Vergleich zu anderen Ländern an deutschen Schulen zurückliegende digitale Infrastuktur zu verbessern. Zumindest taucht eine solche Initiative immer wieder in Sonntagsreden auf, mit dem Hinweis darauf, dass Deutschland für die „digitale Zukunft fit gemacht werden soll“. Es ist auch nicht überraschend, dass die Freunde der deutschen „Wettbewerbsfähigkeit“ sich kräftig einmischen, die von neuen Schulen träumen, an denen die Schüler für die „Arbeitswelt von Morgen“ fit gemacht werden.

Auf der anderen Seite stehen die altbekannten Bremser. Viele Lehrer und Eltern scheinen sich Sorgen zu machen, dass „Kulturtechniken“ verloren gehen. Als Beispiele werden oft das Rechnen und die Rechtschreibung genannt, gerne auch das handschriftliche Schreiben und die schöne Schrift. In den Chor mischen sich die Anhänger der sprachlichen Ausbildung in Latein und Griechisch, den Grundlagen des christlich-römischen Abendlandes und des logisch, analytischen Denkens. Das Internet mit der vorherrschenden Sprache Englisch und dem Video als Hauptmedium ist das grasse Gegenteil dieses Erziehungsentwurfs.

Auf dieser Basis ist es sehr schwer, über eine Einbindung des „Digitalen“ in die Schule vernünftig zu diskutieren. Ich würde raten, erst einmal verbal und emotional abzurüsten. Weder ist ein Tablett im Unterricht der Untergang des Abendlandes, noch kann ein Unterricht rein über vernetzte Medien gelingen. Wie immer liegt die Wahrheit doch in der Mitte.

Wer Jugendliche im Netz beobachtet, sieht doch, dass sie die Möglichkeiten der neuen Geräte im Wesentlichen zur sozialen Interaktion nutzen. Das Surfen ist eben nicht gleichzusetzen mit dem Fernsehkonsum. Smartphones sind deswegen so beliebt, weil man Nachrichten senden und empfangen kann. Die überwiegende Zeit verbringen Jugendliche in sozialen Netzen wie WhatsApp oder Facebook.

Also ist es offensichtlich, dass ein Smartphone im Unterricht stört. Es ist einfach gleichzusetzen mit dem Schwätzen, einer unvermeidlichen Unsitte, mit der Lehrer seit Urzeiten kämpfen. Die Schüler nutzen ihre Smartphones auf genau diese störende Weise im Unterricht, wenn man es nicht ausdrücklich untersagt. Sie nutzen sie auch als Ablenkung von den Hausaufgaben. Diese Trivialität des guten Lehrens und Lernens wird gerne hergenommen, um Smartphones in Bausch und Bogen zu verdammen. Wir sollten statt dessen dahingehend wirken, dass die dauerende soziale Interaktion über ein Netz da unterbleibt, wo der Kontakt mit dem Gegenüber oder die Konzentration auf eine Sache wichtiger sind.

Die Anhänger des händischen Rechnens und der Beherrschung eines korrekten Deutsch sollten über diese Lernziele durchaus einmal nachdenken. Rechner und Schreiber waren in den ganz alten Zeiten zwar angesehene, aber dennoch rangniedrige Spezialisten. Heute ist der allgemeine Erwerb dieser Fähigkeiten allerdings eine Grundlage für unser modernes Arbeits- und Gemeinwesen, also die Voraussetzung für ein funktionierendes Bürgertum. Ohne Lesen und Schreiben zu beherrschen und mit Zahlen umgehen zu können, ist eine höhrere Ausbildung nicht möglich. Die Ausbildung aller Bürger in diesen Techniken ist also absolut notwendig für die Gesellschaft, in der wir leben.

Nun schreitet aber die Technik voran und auch die Welt als Ganzes. Ich habe selbst als Berufsmathematiker seit 40 Jahren keine schriftliche Division oder Multiplikation mehr durchgeführt. Mein Latein, das ich in neun langen Jahren erworben und verfeinert habe, brauche ich sehr selten und nur für Hobbies, und mein fünfjähriges Altgriechisch habe ich komplett vergessen – bis auf die Buchstaben, weil sie in der Mathematik verwendet werden. Meine Rechtschreibung habe ich im Wesentlichen nach der Schule verfeinert und ich schaue auch gerne mal im Online-Duden nach. Ein wesentlicher Teil der Kommunikation findet in Englisch statt, einer Sprache, die nolens volens (die Eliteerziehung schimmert immer durch) die allgemeine Sprache einer zusammenwachsenden Welt geworden ist. Meine altsprachliche Ausbildung behindert mich im Englischen nur. Übrigens ging sie auch auf Kosten einer naturwissenschaftlichen Bildung. Auch schreibe ich fast nie mit der Hand, und wenn, dann unleserlich. Tafelvorlesungen versuche ich mit Druchbuchstaben zu schreiben. Das geht genauso schnell und ist leserlicher.

Man schüttet natürlich nicht das Kind mit dem Bade aus. Selbstverständlich ist die Grundschule dazu da, die Grundlagen dieser Kulturtechniken zu erwerben. Es geht nicht ohne. Es ist lediglich so, dass wir uns überlegen müssen, was uns wichtiger ist. Wollen wir weiterhin stupide Techniken einüben, die in der Welt „draußen“ später nie benötigt werden? Oder wäre es da nicht besser, die nutzbringende Anwendung der zur Verfügung stehenden Techniken zu lehren? Damit ich nicht falsch verstanden werde, füge ich hinzu, dass für Kunst, Musik und zum Beispiel so etwas Exotisches wie Kaligraphie in der Schule Platz sein muss. Wir müssen auch das wertschätzen lernen. Aber gerade deswegen sollten wir Inhalte aus dem Unterricht entfernen, die nur Zeit verschwenden.

Und sobald man diesen Schritt vom Arbeits-, Schreib- und Rechenknecht hin zu einem selbständig denkenden, suveränen Menschen gemacht hat, wird klar, dass die digitale Umwelt Teil der Schule werden muss.

31. Oktober 2018 von mga010
Kategorien: Uncategorized | Schreibe einen Kommentar

← Ältere Artikel