Monday, 24 October 2022

Happy days - the undergraduate years

Looking back at the three years I was an undergraduate student, this was one of the happiest periods of my life. For the first time I could study only the subjects I chose for as long as I wanted. Yes, the dorms were basic, the food wasn't very good, not all the courses and professors were great. We had to study hard, prepare many assignments, final exams were sometimes hard and stressful. However, for the most part I enjoyed being a student and I was good at it.

My major subject was physics, with a minor in mathematics. Very quickly though I found myself drawn to mathematics much more than physics. The main first year courses were calculus, linear algebra, mechanics and electricity. The math courses were all new and exciting material and the teachers were really good, at least I liked them. In physics we mainly repeated the high school material, much faster and going into more detail. There were no surprising laws of physics I didn't know about, the main difference was to apply the same laws in more difficult settings, and this usually meant using advanced mathematical tools. 

The physics department was of course aware that the students needed tools that they were going to learn about much later if at all in regular mathematics courses. As a result there was a physics course called "mathematical methods for physicists". And so while we were getting to know the definitions of a vector space and a limit of a function in math courses, in physics we were already computing line integrals, solving ordinary and partial differential equations, and using 3-dimentional differential operators. For physics you needed to solve the technical problem, it rarely mattered if you understood what you were using, whether you knew why the solution is valid and under what conditions. In mathematics, exactly the opposite: definitions, conditions and proofs, solving a concrete problem was rarely important. 

I imagine the physics teachers were frustrated sometimes, because they had to get into mathematical details for the students to really understand what was going on. There is only so much you can do with hand waving about physical principles. It was sometimes awkward to hear about math concepts from physicists, especially if it happened after we learnt about them from mathematicians. For example a lot of the material in the 3rd year course we had on quantum theory depended on graduate level algebra, it was very difficult to really understand what was going on, and I doubt the teacher could teach the subject properly.

Physics had a clear advantage over mathematics regarding analysis and functions. When dealing with physical functions we could always assume they behaved properly: continuous, differentiable to any degree, defined wherever we needed. After all in nature reality dictates that everything is defined and smooth. In mathematics nothing was given, and you could construct functions that defied logic: a continuous function that is nowhere differentiable, a curve that fills a square, a monotonous continuous function that has a derivative 0 almost everywhere but manages to increase from 0 to 1. Analysis courses were filled with mathematical monsters that could make you fail exams if you weren't careful.

In the 1980's personal computers, cell phones and the internet were in their infancy, and the main source of information was books. All students had to use the library from time to time to find additional information beyond the course textbook or for special assignments. The physics books were in the general science library, a large place that was sometimes hard to navigate in, I tried to avoid it if possible. The mathematics department had a separate library, a main hall with big tables in the middle surrounded by book shelves on the four walls. This was one of my favorite locations in the university, I liked to sit there and read while absorbing the atmosphere. All the mathematical subjects were covered, from the elementary basics to the current research, from the old to the new, clearly divided into sections. I even found there was a side room for the applied mathematics section, which turned out to be physics with less hand waving.

I spent a lot of time reading about elementary number theory, the basic theory of integer numbers. This was a subject that required no prior mathematical knowledge, I could read textbooks and understand most of the material. I already encountered prime numbers as a child, now I learned that mathematicians have been asking themselves the same questions as me: what makes a number prime, how many prime numbers are there, how can you find the prime divisors of an integer. I learned about Fermat's little theorem, the Chinese remainder theorem, and quadratic reciprocity. I also realized that in number theory some statements are easy to understand but very difficult or impossible to prove. Famous examples are the Goldbach conjecture and Fermat's last theorem (with the infamous 'margin' remark, actually proved in 1994 by Andrew Wiles). Mathematicians have been working on some of these problems for hundreds of years, and a lot of new theory was created in these efforts.

(While writing this entry I realized I don't remember how to prove quadratic reciprocity. For a few days I read up on the subject and followed this proof. It was good to be in the presence of the greatness of Euler and Gauss that contributed to the original proof. This is the kind of mathematical proof that I like, a clever way to compute something directly without using any modern and abstract structure. On the other hand such a proof does not give an answer to 'why is this true'? other than 'because that is the result of the computation'. You expect a more profound reason for such a fundamental result. Perhaps this is why mathematicians kept coming back to quadratic reciprocity, Wikipedia claims there are hundreds of published proofs.)

At first I found all math courses equally interesting and exciting, but over time I developed preferences. There were many courses related to analysis: calculus, functional analysis, differential equations, probability-measure theory. These subjects had a practical aspect when used in physics, but I found that I was less interested in the theoretical questions that were discussed. I was more drawn towards algebra, definitions of the various algebraic objects and the rich structures that are the result of these definitions.

We had three semesters of linear algebra where we studied vector spaces. In physics vectors in two or three dimensions were used all the time as quantities with size and direction, such as forces or velocities. In mathematics vector spaces were abstract, consisting of objects that could be added and also had a scalar multiplication, with scalars from any abstract field and not just the Real numbers. Using the concept of linear dependence we proved the existence of a basis, and that any basis has the same size - the dimension of the vector space. Thus any abstract vector space is identical to n-tuples of field elements. We learned about homomorphisms (=structure preserving mappings), sub-structures and quotient structures. We learned to represent homomorphisms by matrices, I was fascinated by matrix multiplication which was the first time I encountered a non-commutative operation (AB not equal to BA). There was a lot more to know, linear algebra has many practical aspects that were important for physics and other math subjects. It is still useful to me in my professional life outside the university.

There were only two more algebra courses. In field theory we learned about field extensions, Galois theory and how it is related to solutions of polynomial equations. My favorite though was group theory. To define a group you need a multiplication operation, not necessarily commutative, and that's it. The wealth of possible structures is incredible: permutation groups, matrix groups, free groups, symmetry groups, to name a few. When I learned about the Sylow theorems I got excited: if a prime power divides the size of a finite group, there exists a subgroup of this prime power size. Prime numbers were important for the structure of finite groups, wow! Groups also have a composition series, with factors which cannot be broken up further called simple groups. Commutative simple groups are just cyclic of prime size (i.e. addition modulo p), but there are also non-commutative simple groups. The classification of finite simple groups was more or less completed at the time, a joint effort of many that took decades and spans thousands of pages of published articles. One of the famous steps was the fact that a group of odd size could not be simple and non-commutative, easy to state but very difficult to prove. All this was mind-boggling for me then, still is now.

Not everything was about studying in those years. For the first time in my life I was surrounded by people with similar interests, and some became my friends. There was no television or computer or tablet or phone in my room, I read a lot, saw movies in the cinema and listened to music on a small boombox playing cassettes. One book became important to me, "Godel, Escher, Bach" by Douglas Hofstadter. My brother had this book and I tried reading it when I was in high school, but only after I learned mathematics I could really understand and enjoy it. Escher's drawings were familiar to me from home, they are not a main subject in the book but it is amusing when Hofstadter puts characters inside such an impossible reality. I really liked the use of Bach's music in the book, in particular the dialogues that illustrated musical concepts verbally (e.g. a recurring theme or a canon). I became a huge Bach fan ever since. The Godel incompleteness theorem is explained in half of the book, after learning basic set and model theory I understood most of it. The book raises many questions: is the brain a finite state machine, what is consciousness, how can machines learn, are humans more than machines since they understand Godel incompleteness. A lot has happened in the field of machine learning since then, some of the book seems archaic but still very interesting stuff. Above all, the humorous word play, all the intertwining concepts coming together in unexpected ways, I consider this book a truly great achievement.


Thursday, 31 March 2022

Amateur or professional

After leaving the university I quickly found a job in a biotech company. I knew some of the people who worked there from the years before I was a PhD student, the company was expanding and they were happy to have me. I knew very little biology then, but these were exciting times when more and more genomic sequences were being published. Biologists needed computational help and I liked the idea of being a part of it. 

On arrival I was assigned to a new and ambitious project team, to write software that would put some order in the company's research and data. The language of choice for the project was C++, an object oriented expansion of C, which was popular then (Java was still young). I was a junior programmer, new to the project and the company, and the last time I wrote some code was 5 years before in C. I knew nothing about C++ or object oriented programming in general. The project leader decided to send me to an external crash course in C++. The course available was not for beginners, it assumed you knew the basic ideas in the language and taught more advanced subjects like inheritance, templates and design patterns. It wasn't too hard though, my previous knowledge of C helped, in the end I managed to learn enough of the principles so I could start coding in C++.

All this is just the preface, to understand the setting of the following scene. In one of the days  in the course I heard the lecturer say the following:

"We are all professionals here. To solve a problem we recognize patterns and use ready made solutions. We don't try to think about the problem or reinvent the wheel like amateurs". 

Not an exact quote but you get the idea. This really shook me up, my immediate reaction was to reject this completely and to cry out "That's not me !!!" (in silence, the lecture continued without interruption). Since then I've had time to formulate my response in full, and I consider it an important part of how I see myself.

I see the logic of the argument and I agree that these so called professionals are necessary and important. Think about building a house, an airplane, or writing a software product: the process is much more efficient when you stick to known and proven methods, and this also lowers the chance of a mistake that may result in a disaster. I think of such people as engineers, but I don't put myself in this group. When I face a problem I want to think about it, understand it and try to find a solution myself. Telling me this problem has a solution is a big turn-off for me, if you know there is a solution then use that, why ask me. Finding a solution myself is always more satisfying than reading about it.

I'm also against the use of the words "professional" and "amateur" in this argument. Describing someone as a professional is usually positive, a compliment, you know what you are doing and good at it. An amateur, on the other hand, sounds less appealing, somebody who is not serious enough, can't be trusted to succeed. However, a professional problem-solver / researcher needs to be creative, always trying to use known "wheels" in new ways and to invent new "wheels".

Over the years I've come across many professionals, people who were exceptional in their field, mathematicians, musicians, biologists, computer scientists. I've always admired these people, but I don't think I can be one myself. Perhaps I dreamed about being a professional mathematician when I was studying in the university, maybe I stopped trying when I left the university and started working for a living. Or perhaps I was never going to be good enough, now it seems to me that being a professional in any field is just too big an effort. As I got older I embraced being an amateur. I enjoy having many interests, with more knowledge and experience than ordinary people in these fields but far from the real professionals. 

I'm an amateur:
  mathematician - with a broad background but no real understanding of modern ideas.
  choir singer - quite good, when compared to other amateurs
  data scientist - adequate knowledge of statistics and data handling
  computational biologist - experience with many data types and biological queries
  physicist - university degree but very low level
  programmer - experience with many languages, not for writing large projects


Sunday, 22 August 2021

Math childhood memories

I wasn't born a mathematician, who is? It's not something I picked up at home either. My mother was an English teacher (for non English speaking children). My father was a university professor in the Zoology department, whose research was in population genetics and insects. Though it is true that he was in charge of teaching statistics to Biology graduate students, as a child I was influenced by his love of nature and wasn't really aware of his statistical expertise. I remember us talking about these topics only much later when I was already using statistics myself.

Genetics may have played a role, though I have no direct evidence. I was told that my maternal grandmother was good at math in school, but did not pursue this since it was not considered practical for a young woman back then. My father said he found math hard in school, as he made many mistakes in calculations and didn't get the right answers. He became an expert in practical statistics much later in life. My older brother received similar genes, he too was drawn to the exact sciences at school and became an expert in computers and network security.

As a child I was good at math, I enjoyed riddles and logic. I always felt more comfortable around numbers than around people. However I did not dream about becoming a mathematician, I didn't think of this as a goal until much later. I don't have a lot of childhood memories, I tend to forget most of what happened. I do have several mathematics related memories, looking back I can see the path even though I was not aware of it then.

………

On summer vacations my father would sometimes take me to work, so that my mother would have some time for herself, I suppose. In the lab I remember looking through a microscope, using complicated scales to measure small weights. I liked the desk calculator with orange tubes displaying digits. My favorite toys were field counters, mechanical devices that counted how many times you pressed a button, useful for counting things as you see them without remembering the current sum. There were more sophisticated counters that had several buttons, for counting several types of events at the same time, giving independent counts for each event as well as a total for all events. I spent hours pressing the buttons and looking at the digits move, you needed to push harder when moving several digits mechanically, changing 199 to 200 for example.

………

When I was 8 years old my family moved to England for a year, my father was on a university sabbatical. I could not speak English beyond a few basic sentences ("my name is…") and it took a few weeks for me to communicate at school. The teacher found out that she could give me math workbooks to keep me busy.

………

I had a set of playing cards of passenger airplanes, each with a picture and a few numeric parameters such as maximal speed or wingspan. I don't remember the rules of the game, whether it was a variant of Go Fish or War, but the parameter values could be used to decide which card was better. I used to sort the cards according to each parameter, finding the rank for each card. Some cards were clearly better than others in all parameters, while other cards were generally weak but had a surprising strong parameter - important to know when playing.

………

When I was sick I would stay at home, which meant I had the apartment to myself and could watch TV all morning. There was only one channel to watch, and the morning shows were educational – sometimes used as lessons in school. There were many shows I enjoyed, one of these was a cartoon series about math. Each episode used a short animated story to explain a concept. The one I remember the most was about a village of fractions that had to deal with a criminal (thief perhaps?). It turned out that the thief was 1/2, and he used disguises such as 3/6 or 4/8 to avoid being caught.

(Actually I found this on YouTube, it's called The Weird Number and it is a part of a series called Exploring Mathematics created by Xerox, would you believe it. I was close, it was a village of Integers and the thief was 2/3)

……….

Another show I used to watch on TV as a child featured a police detective that used math to solve crimes, always committed by the archvillain Dr. No. There were only a few episodes, with subjects such as prime numbers, polyomino combinatorics and Eulerian paths (drawing without lifting the pen, a link to the episode in Hebrew). They even published a companion workbook to the series which I bought and filled in. I probably still have it somewhere. 

………

I had a board game that was centered on the concept of sets. The board was divided into regions corresponding to subsets of a set of 3 or 4 elements (e.g. {1,2}, {1,3}, {2}, {1,2,3}, etc.) and you moved or placed pieces according to... something... perhaps related to unions or intersections? I don't remember and the whole idea seems unbelievable. I couldn't find people to play with me, understandable, and I moved on. However, the important thing was that the game came with a rather thick workbook. I don't remember much about what was in it, I think a lot of it was material that was not related to the game at all. I do remember working hard on the exercises and trying to understand.

………

As a child I took some tests and was identified as gifted, for a year or two I participated in after school classes on various subjects. I remember very little from this experience, it was a long bus ride once or twice a week, I didn't like it enough to continue going. One thing I remember is a young lecturer trying to explain symmetries of a triangle and permutations on the 3 vertices. 

………

Around 8th grade I remember being given a set of books about basic Euclidean geometry from school. I think it was more advanced than the usual school material, and definitely written in a more serious tone than my usual books. I suppose it was some experimental educational program. I have no idea if other children in my class also got this material, I have no recollection of talking to other children about this, nor talking to the teacher. Did someone follow my progress, was there a schedule, I don't know. I do recall vividly working hard on these books, practicing ruler and compass constructions and proving triangle congruences. I worked alone for hours and wouldn't stop until I completed a chapter and all its exercises.

………

In grades 8-9 I would sometimes have free periods in school, and I liked spending them in the school library. Besides reading science fiction books and magazines I liked finding textbooks that were not used in class. I remember a book about the basic concepts of topology: open and closed sets in the plane, unions and intersections of open and closed sets, propopsitions and proofs, etc. Must have been another experimental program, I seriously doubt this was ever used in a normal class. The book tried to prove the Brouwer fixed point theorem for a circle in the plane, I don't think I understood this material completely at the time.

………

Growing up in the 1980's I witnessed and pariticipated in the personal computing revolution. My father would sometimes use the university mainframe, and I got to see this monster in its large room. You could feed it with boxes of punched cards containing your Fortran program, and then get an output on continuous paper and find out you had a bug somewhere... Then various personal computers became available. My first one was a Sinclair ZX81, with 1K RAM. This was quickly replaced by a ZX Spectrum with an extension to 48K RAM. I had to learn BASIC and I started to write simple programs. I got to know more about how computers work, using simple peripheral hardware such as a display (an old black and white TV) and an external disk (cassettes and a cassette player). Some of my friends had other computer models, such as the Commodore 64, Dragon 32, TI-99 and Apple IIe. Eventually we all used these computers to play games, much as is done today. It didn't turn me into a real programmer, but I definitely learned the fundamentals and made my first steps in understanding and solving computational problems.

………

When I was in high school my older brother started to think about university. He wanted to study computer science, and back then it was still a part of the math department. The first year material was mostly calculus and linear algebra. When he wasn't around I would read his textbooks. This was my first encounter with real mathematics subjects, written for grownups and not trying to avoid the hard issues. I couldn't really understand and follow the material by myself. I did see the contrast between these textbooks and the simplified versions I was taught at school. Mathematics was much more than just number manipulation, speed and distance problems, using a formula to find a derivative, or trigonometric identities.


Sunday, 18 July 2021

Why start a math blog?

That's a very good question, and I will try to answer it as best I can.

A bit about me

In high school I was drawn to the exact sciences. In the years 1986-1999 I was a student in the Hebrew University in Jerusalem. As an undergraduate student I majored in physics with mathematics as a minor subject. Halfway through I realized that math was what I was really interested in, and after completing my BSc I continued to graduate studies in mathematics. My advisor was Prof. Alexander Lubotzky, and my research subject was p-adic groups. I was only a part time student at the time and it took 4 years to complete my MSc. Then I became a full time PhD student, my new advisor was Prof. Ron Livne, and I studied number theory, modular forms and quaternion algebras. After a while I managed to do some original work in the field, though not what was planned. However, I became increasingly frustrated with my inability to write down the results. After 5 years and with no end in sight I stopped my studies and left the university. I got married, found a job in the biotech sector and eventually became what is now known as a data scientist. For a while I tried to continue working on a thesis but gradually stopped. Mathematics became more of a hobby which I come back to from time to time.

What will I write about?

My plan is to write mainly about two general topics. The first is my experience as a math student, observations and conclusions regarding math, the university, in general and in relation to me. The second is my work, what I learned, what I tried to do, what were my plans and what is not finished. This may be more technical, though I will not publish research papers here.

Who is it for?

First of all, myself. I tend to forget many things, more as time goes by. I will enjoy reading this after I forget that I wrote it.

I hope my family and people who know me will find the personal material interesting. These are subjects I rarely talk about to anyone but are an important part of me. The more math oriented material may be of interest to people who were in similar situations and faced similar dilemmas as university students and assistants.

Why am I writing? Why now?

Somehow my math connection stays with me, and I feel that if I write about it I will be able to let it go, and/or I will find a way to get back to what I started and perhaps do a better job this time.

As to the timing, I can't say for sure. Perhaps it is the Covid pandemic that we are facing for over a year. Perhaps the fact that my father died in the past year, as well as two people my age who were my friends many years ago. Ever since I left the university there is an inner voice that tells me I should publish my work, since that's the way science progresses. I haven't been able to do it, to my frustration and shame. Now I hear a second voice saying that I need to share other things about my university experience, non-technical stuff. When I thought about it I had many ideas and topics I could write about, things I kept inside for many years.

I've been blogging about the TCEC chess engine tournament for a few years now, and I'm comfortable with this platform. So, I think I'll give it a try and see if I can keep it going. It won't be easy, but at least I'll have an open channel for whenever my math urge returns.


Happy days - the undergraduate years

Looking back at the three years I was an undergraduate student, this was one of the happiest periods of my life. For the first time I could ...