Illustration for “In memory of Evgeny Pankrat'ev”

In my school years I met a lot of bright and interesting people. Each of them was unique and definitely worth mentioning. Problem 62, which I mentioned a few days ago, brought back precious memories.

Probably it's a nice tradition for Russian physics and mathematics schools to be unpredictable, beautifully chaotic places. Mine was School 54, on Dovator Street between Sportivnaya and Frunzenskaya. Most of our teachers - professors from Moscow State University - came to us, but for computer science we travelled to the 13th floor of the magnificent Stalin building. I can visualize the yellow oak doors of room 1305, rows of ancient VAX computers with green letters on them.

And there I met him. Evgeny. A very gentle, very kind man. The father of the Soviet programming contest tradition. I don't know why I didn't use every moment to learn, to ask, to read, to ... whatever... I have no regrets. But testing out of this course was one of the dumbest decisions of my life.

I can clearly see in my head a brown sheet of A4 paper covered in typewritten text - the statements of the problems we solved in our computer science lessons. Probably this piece of paper was burnt on one of the summer evenings at our dacha. I can't recall many of these problems. Probably they were typical ones, like "find the minimum of an array", maximum, GCD, LCM, etc. But there were some problems which are still vivid in my memory. Here they are.

  • There is an iterator. For example, get() and is_empty() functions. You don't know how many elements there are. In one pass, with M=O(1), you have to:

    • calculate the variance of the numbers

    • the first number is x, then the polynomial coefficients. You have to calculate the polynomial and its derivative. T=O(n), M=O(1)

      • a) the coefficients go from the lowest power of x to the highest
      • b) the coefficients go from the highest power of x to the lowest
  • There is an array. You have to replace each number with the sum of its neighbors, in place, M=O(1)

  • print the n-th row of Pascal's triangle, T=O(n), M=O(1)

This task about polynomials is dear to me because I spent a week writing down different expressions on sheets of paper. When I finally wrote down the right expression, it was a jolt of joy which I can clearly remember now, 30 years later. To write these problems down now, from memory, is to build a bridge back in time to the years when I had the priceless experience of being a student of the humble genius Evgeny Pankrat'ev.