Stern-Brocot Trees

Since I was a child I prided myself on knowing arithmetic. I knew how to add fractions. I knew that 2/3 plus 1/4 is 11/12. Some kids around me were struggling and often summed it up the wrong way by adding numerators and denominators separately and getting 3/7 as a result.

As I grew older I found more reasons to ignore the wrong way. For example, the result of such addition depends on the representation of a fraction, not on the fraction itself, and this was bad.

Oh well. I was growing older, but not wiser. Now mathematicians study this wrong addition of fractions. They call such a sum a mediant of two rational numbers. To avoid the dependency on the representation of fractions, the fractions are assumed to be in the lowest terms.

Let us start with the sequence of fractions: 0/1 and 1/0. This sequence is called the Stern-Brocot sequence of order 0. The Stern-Brocot sequence of order n is generated from the Stern-Brocot sequence of order n − 1 by inserting mediants between consecutive elements of the sequence. For example, the Stern-Brocot sequence of order 2 is 0/1, 1/2, 1/1, 2/1, 1/0.

Where are the trees promised in the title? We can build a portion of this binary tree out of the sequence of order n in the following manner. First, ignore the starting points 0/1 and 1/0. Then assign a vertex to every number in the sequence. After that, connect every mediant to one of the two numbers it was calculated from. More precisely, if a number first appeared in the i-th sequence, its only parent is the number that first appeared in the sequence i−1.

There is beautiful theorem that states that every non-negative rational number appears in the Stern-Brocot sequences. The proof is related to continued fraction. Suppose a rational number r is represented as a continued fraction [a0;a1,a2,…,ak], where ak is assumed to be greater than 1 for uniqueness. Then this number first appears in the Stern-Brocot tree of order a0 + a1 + a2 + … + ak + 1, and its parent is equal [a0;a1,a2,…,ak − 1].

My PRIMES student, Dhroova Ayilam, was working on a project suggested by Prof. James Propp. The goal was to find out what happens if we start with any two rational numbers in lowest terms. Dhroova proved that as with the classical Stern-Brocot trees, any rational number in a given range appears in the tree. His paper Modified Stern-Brocot Sequences is available at the arXiv.

Share:Facebooktwitterredditpinterestlinkedinmail

Andrei Zelevinsky’s Problems

Andrei ZelevinskyI was afraid of my advisor Israel Gelfand. He used to place unrealistic demands on me. After each seminar he would ask his students to prove by the next week any open problems mentioned by the speaker. So I got used to ignoring his requests.

He also had an idea that it is good to learn mathematics through problem solving. So he asked different mathematicians to compile a list of math problems that are important for undergraduate students to think through and solve by themselves. I still have several lists of these problems.

Here I would like to post the list by Andrei Zelevinsky. This is my favorite list, partially because it is the shortest one. Andrei was a combinatorialist, and it is surprising that the problems he chose are not combinatorics problems at all. This list was compiled many years ago, but I think it is still useful, just keep in mind that by calculating, he meant calculating by hand.

Problem 1. Let G be a finite group of order |G|. Let H be its subgroup, such that the index (G:H) is the smallest prime factor of |G|. Prove that H is a normal subgroup.

Problem 2. Consider a procedure: Given a polygon in a plane, the next polygon is formed by the centers of its edges. Prove that if we start with a polygon and perform the procedure infinitely many times, the resulting polygon will converge to a point. In the next variation, instead of using the centers of edges to construct the next polygon, use the centers of gravity of k consecutive vertices.

Problem 3. Find numbers an such that 1 + 1/2 + 1/3 + … + 1/k = ln k + γ + a1/k + … + an/kn + …

Problem 4. Let x1 not equal to zero, and xk = sin xk-1. Find the asymptotic behavior of xk.

Problem 5. Calculate the integral from 0 to 1 of x−x over x with the precision 0.001.

I regret that I ignored Gelfand’s request and didn’t even try to solve these problems back then.

I didn’t have any photo of Andrei, so his widow, Galina, sent me one. This is how I remember him.

Share:Facebooktwitterredditpinterestlinkedinmail

My Sleep Study

I recently had a home sleep study. I was given a small box which I attached to my chest. I also had to attach a thingy to my finger and put small tubes into my nose. It was relatively easy. Now I have my report:

The total time in bed is 468 minutes. Overall AHI is 37 events per hour. The supine AHI is 58 events per hour. The oxygen saturation baseline is 91%. The hypoxemic burden is 58 minutes. The oxygen saturation nadir is 63%. The heart rate ranges from 76-118 beats per minute.

I didn’t have a clue what all that meant so I hit the Internet. AHI means Apnea–Hypopnea Index, and a normal score is below 5. Anything above 30 indicates severe sleep apnea. Because mine is 37, I now have my diagnosis. My 63% oxygen saturation scared me the most. Wikipedia says 65% or less means impaired mental function. I do not need mental function when I sleep, but Wikipedia also says that loss of consciousness happens at 55%. What would happen if I lose consciousness while I sleep? Can I die? Will I wake up?

Overall the sleep study was a great thing. Now I know the diagnosis and there are ways to treat it. So I am looking forward to my improved energy and health.

But there was something in this report that would bother any mathematician. As you can see apnea gets worse when people sleep on their backs. (Thanks to this study I learned a new English word: supine means lying on the back.) The apparatus that I had to attach to my chest prevented me from sleeping on my stomach, one of my favorite sleep positions.

This report doesn’t say anything about my average AHI when I am not supine. If this average is low, then the solution might be to learn to never sleep on the back. It also means that the oxygen saturation nadir number is not very meaningful. It shows how bad it can be if I am forced to sleep on my back. It doesn’t say much about my standard sleep situation.

When I next see my doctor, I hope she’ll have answers to all my questions.

Share:Facebooktwitterredditpinterestlinkedinmail

Puzzling Grades Resolved

This story started when my student asked for an explanation for his grade B in linear algebra. He was slightly above average on every exam and the cut-off for an A was the top 50 percent of the class. I wrote a post in which I asked my readers to explain the situation. Here is my explanation.

The picture below contains histogram for a typical first midterm linear algebra exam.

First Midterm Histogram

The spike in the lowest range indicates zeros for those who missed the exam.

The mean is 74.7 and the median 81.5. As you can see the median is 7 points higher than the mean. That means that if a student performs around average on all the exams, s/he is in the bottom half of the class.

But this is not the whole story. In addition to the above, MIT allows students to drop the class after the second midterm. Suppose 30 students with lower grades drop the class; then the recalculated median for the first midterm for the students who finish the course goes up to 85. This is a difference of more than 10 points from the original average.

If this was a statistics class, then I could have told the puzzled student that he deserves that B. Instead I told him that he didn’t even have the highest score among those with Bs. Somehow that fact made him feel better.

Share:Facebooktwitterredditpinterestlinkedinmail

My Number

Here is my new logic puzzle.

I thought of a positive integer that is below 100 and is divisible by 7. In addition to the public knowledge above, I privately tell the units digit of my number to Alice and the tens digit to Bob. Alice and Bob are very logical people, but their conversation might seem strange:

Alice: You do not know Tanya’s number.
Bob: I know Tanya’s number.

What is my number?

Share:Facebooktwitterredditpinterestlinkedinmail

The Emperor and His Wizards

I recently posted a cute puzzle about the emperor and his wizards from 2015 Moscow Math Olympiad. It is time for the solution and two new variations. But first let me repeat the puzzle.

The emperor invited 2015 of his wizards to a carnival. Some of the wizards are good and others are evil. The good wizards always tell the truth, whereas the evil ones are free to say anything they want. The wizards know who is who, but the emperor does not.

During the carnival, the emperor asks every wizard a yes-or-no question. Then he expels one of the wizards from his kingdom. The expelled wizard leaves through a magic door, which allows the emperor to discover what kind of wizard s/he was. After that the emperor starts the next round of questions and expels another wizard. He continues the rounds until he decides to stop.

Prove that it is possible to expel all the evil wizards, while expelling not more than one good wizard.

Solution: Suppose the emperor knows one good wizard. Then he can create a chain that leads him to an evil wizard, as follows: Suppose Alice is the known good wizard. The emperor chooses some other wizard, say Bob, and asks Alice “Is Bob evil?” (which question Alice, being good, will answer truthfully). If Bob turns out to be evil, the emperor can expel him, and repeat this (starting with Alice) next round. If Bob turns out to be good, the emperor can continue, asking Bob about Carl, etc, until he either reaches an evil wizard or determines that all remaining wizards are good.

The above means that, if the emperor can find a good wizard sacrificing at most one (other) good wizard, the emperor will succeed. Here is one way to do this: Let the emperor pick Anne and ask everyone else whether Anne is good. Suppose at least one wizard, say Bill, says that Anne is good. The emperor expels Bill. If Bill is revealed to be evil, then nothing is lost, and the emperor can try again next round. If Bill is revealed to be good, then the emperor knows for sure that Anne is good and can proceed to expel all the remaining evil wizards with the chain method above. If, on the other hand, no one says that Anne is good, then the emperor expels Anne. If Anne proves evil, the emperor didn’t lose anything and can conduct another trial next round. If Anne proves good, then everyone else is evil, and the emperor can expel them all without asking any more questions.

I like the mathematical part of the puzzle, but I hate when innocent people are punished. So I couldn’t stop thinking about the puzzle until I found a variation where no good wizard need be expelled (the magic properties of the gate are redundant now, since the emperor only ever sends evil wizards through it):

The setting is the same as before, except the emperor knows how many evil wizards there are. He wants to expel all the evil wizards without expelling a good one. For which numbers of evil wizards can he do that?

In addition, my reader Leo Broukhis couldn’t get through my CAPTCHAs to post a comment (I think there’s something wrong with the plugin) but sent me a variation of the original puzzle by email:

There is again an emperor with a magic gate plagued with a superfluity of evil wizards, but this time the carnival is not very long, so the emperor does not have the luxury of asking the wizards many questions. In fact, he is restricted to asking all of them the same single question, after which he will conduct a series of expulsions that must rid the empire of evil wizards while expelling at most one good one. The one saving grace to this difficult situation is that the question need not be limited to “Yes” or “No” answers—an unbounded (single) integer is permissible.

Share:Facebooktwitterredditpinterestlinkedinmail

2015 Moscow Math Olympiad

My favorite problem at the 2015 Moscow Olympiad was about an emperor and his wizards.

8-10th grade. Designed by I.V. Mitrofanov. The emperor invited 2015 of his wizards to a carnival. Some of the wizards are good and others are evil. The good wizards always tell the truth, whereas the evil ones are free to say anything they want. The wizards know who is who, but the emperor does not.

During the carnival, the emperor asks every wizard a yes-or-no question. Then he expels one of the wizards from his kingdom. The expelled wizard leaves through a magic door, which allows the emperor to realize what kind of wizard s/he was. After that the emperor starts the next round of questions and expels another wizard. He continues the rounds until he decides to stop.

Prove that it is possible to expel all the evil wizards, while expelling not more than one good wizard.

Two other problems at the Olympiad were noteworthy—because no competitor solved them:

11th grade. Designed by O.N. Kosuhin. Prove that it is impossible to put the integers from 1 to 64 (using each integer once) into an 8 by 8 table so that any 2 by 2 square considered as a matrix has a determinant that is equal to 1 or −1.

9th grade. Designed by A.Y. Kanel-Belov. Do there exist two polynomials with integer coefficients such that each of them has a coefficient with absolute value exceeding 2015, but no coefficient of their product has absolute value exceeding 1?

Share:Facebooktwitterredditpinterestlinkedinmail

Fear of Alzheimer

I am scared of that old German gentleman. Forgot his name. Oh, yeah. Alzheimer.

I started to lose my brain processing speed a long time ago. By my estimates I am about 100 times slower than I used to be. From time to time someone gives me a puzzle I remember I solved in 30 seconds years ago, but now it takes me 30 minutes. And it is getting worse. When I moved to my new apartment recently, it took me a year to remember my own phone number.

On the positive side, I feel quite famous, according to one of the signs of success. I am often greeted by people I don’t know.

My moment of action came when I was in my basement doing my laundry and couldn’t remember how to turn on my washing machine. This is after 10 years of heavily using this damn machine. I started to look for the button to push, but there were no buttons. There were only knobs, and I couldn’t find the word “on” anywhere. After struggling with my memory and with those knobs, I pulled out one of the knobs, and the machine started.

I panicked. I am afraid of Alzheimer’s Disease. I do not want to become demented. I do not want to forget how to count or to stop recognizing my children. I do not want to become a drain on my children’s time, emotions and money.

I had complained about my memory to my doctor before, but the only thing he ever found was anemia. This time I was more insistent. I had an MRI that ruled out tumors. I had more extensive blood tests that confirmed anemia and showed a Vitamin D deficiency. But then he sent me to a neurologist who suggested a sleep study. Finally I got a diagnosis of severe sleep apnea. I am so happy now. I might not have Alzheimer’s Disease. In the worst case scenario, I might die in my sleep. In comparison, this doesn’t sound so bad.

Share:Facebooktwitterredditpinterestlinkedinmail

A New Question about Old Coins

I want to come back to a middle-school Olympiad problem I posted a while ago.

Streamline School Olympiad 2000 (8th grade). You have six bags of coins that look the same. Each bag has an infinite number of coins and all the coins in the same bag weigh the same amount. Each different bag contains coins of a different weight, ranging from 1 to 6 grams exactly. There is a label (1, 2, 3, 4, 5, 6) attached to each bag that is supposed to correspond to the weight of the coins in that bag. You have only a balance scale. What is the least number of times you need to weigh the coins in order to confirm that the labels are correct?

The answer is unpretentious: one weighing is enough. We can take one 5-gram coin, two 4-gram coins, three 3-gram coins, four 2-gram coins and five 1-gram coins for the total of 35 grams. This number is not divisible by 6, so we can add one more 1-gram coin and weigh all of them against six 6-gram coins. I leave it to the reader to show that this solution works and to extrapolate the solution for any number of bags.

My new challenge is to find a weighing for the above problem using the smallest number of coins. What is the number of coins in such a weighing for a given number of bags?

I manually calculated this number for a small number of bags, but I would like to get a confirmation from my readers. Starting from 6 bags, I don’t know the answer. Can you help me?

Share:Facebooktwitterredditpinterestlinkedinmail

PRIMES Dominates High School Research

The 2015 Intel Science Talent Search results are out. This year they divided the prizes into three categories: basic research, global good, and innovation. All three top prizes in basic research were awarded to our PRIMES students:

  • First place: Noah Golowich, Resolving a Conjecture on Degree of Regularity, with some Novel Structural Results
  • Second place: Brice Huang, Monomization of Power Ideals and Generalized Parking Functions
  • Third place: Shashwat Kishore, Multiplicity Space Signatures and Applications in Tensor Products of sl2 Representations

PRIMES’ success in this year’s Siemens competition is even more impressive. Unlike Intel, Siemens didn’t divide the projects into three groups. We took the first and second overall individual prizes.

  • First place: Peter Tian, Extremal Functions of Forbidden Multidimensional Matrices
  • Second place: Zoseph Zurier, Generalizations of the Joints Problem

PRIMES is the place for high school math research. Congratulations to all our students—and to me (and my colleagues) for a job well done!

Share:Facebooktwitterredditpinterestlinkedinmail