Putnam 2019

For some time I doubted if I am still going to write about the process of writing a math contest, but since I need some effort to revive this writing page…here it is! (Warning: this is gonna be long)

Screen Shot 2020-03-21 at 7.58.08 PM
The session A problem as taken from AoPS

Session A

Part 1 – the warm up

As usual the strategy is to start from the easy problem so I looked at A1, which, unfortunately, wasn’t that easy at its first glance beyond the fact we can factorize the expression into (A+B+C) x (sq(A-B) + sq(B-C) + sq(A-C))/2 (where sq means the square function), which means if A=B=C=0 we get a 0. A few more experimentation: substituting (1, 0, 0) and (1, 1, 0) means we get the value of 1 and 2, respectively. This isn’t taking me anywhere…let’s try A2. Turns out, A2 was quite routine (I was a trigonometry-trick enthusiast back in the IMO times, remember?) To make things more systematic:

  1. Notice that the incenter I cuts the angle bisector from C into 2:1,
  2. Drop the perpendicular from I to AB to make good use of the arctan condition,
  3. Draw parallel to AB from C that intersects the perpendicular line above at D, calculate AD based on the angle beta (double tangent angle formula needed here)
  4. Finish off by concluding that alpha = 90 degree

There goes A2 and time to revisit A1. Remember the factorization earlier on? That wasn’t in vain as it turns out: if we make the some of square stay constant at 1 (achievable whenever (A, B, C) are either (k, k, k+1) or (k,k+1, k+1) then we have all the cases for 3k+1 and 3k+2. This idea inspires another solution of 9k via (k-1, k, k+1) and we could just finish off by showing that this expression must be divisible by 9 OR cannot be divisible by 3 (though I should have shown that it must be nonnegative — reason why I lost 2 marks).

Part 2 — strategy and decision

It wasn’t as easy as it sounds because the next candidate wasn’t clear. A6 was out, A4 (differential geometry) wasn’t well under my radar (I was convinced that the answer was no, but no obvious counterexample popped into my mind), so the only clear choices are A3 and…A5? Yet there wasn’t a clear strategy on how to tackle A3 either (for god’s sake how is this an A3?) The only way I could get out from was to invoke AM-GM inequality (M_1)^(2019) >= b_(0)/b_(2019) >= 1/2019 (i.e. this will practically be our lower bound, lol).

There was only around 1 hour and 30 minutes left, so I took a flight instead of a fight and glanced at A5. I tried p=3 (ans=1), p=5 (ans=2) so it looks like the answer has to be (p-1)/2 using the fact that:

  1. The i-th derivative of x^k is k(k-1)…(k-i+1)x^(k-i)
  2. The highest power of n with (x-1)^n dividing q(x) is the biggest possible M such that q(1), q'(1), …, q(M-1 derivative)(1) are all 0.

But I wasn’t too sure about 2 as it works only for the complex field: who on earth have the expertise on a finite field?!?!?! Chill man…we could very well just verify that: turn out we are all good as long as n < p because (x-1)^p has derivative 0 in prime field. That’s it: for the i-th derivative evaluated at 1 we will just take the following sum:

a_k k(k-1)…(k-i+1)=k^((p+1)/2)(k-1)…(k-i+1)

for k = 1, …, p-1. Finally we remind ourselves that this is a sum of b_i(1^i+…+(p-1)^i), which is divisible by p unless the exponent i is divisible by p-1 (hint: primitive root). Therefore the maximum i we can permit is (p-3)/2 (and therefore the answer is (p-1)/2).

Cool, back to A3. We got the previously-mentioned inequality, we need |z| to be the same for all the roots. There’s how we got the inspiration:

x^(2019)+…+x+1=(x^(2020)-1)/(x-1)

so all roots have size 1. So all it needs to make z=Mx (or is it x/M? Whichever works) and we’re done.

(There’s no part 3, 30 minutes left and I think I better check my work instead of trying A4 or A6).

 

Session B

Screen Shot 2020-03-21 at 8.50.28 PM

Part 1: Settle the easy ones first

Contrary to Session A, I looked at the second one (B2) first. The structure of the denominator suggests the use of partial fraction, why not give it a try? And we need the formula:

sq(cos A) – sq(cos B) = (cos A – cos B) (cos A + cos B)

= 4(sin (A+B)/2)(cos (A+B)/2)(sin (B-A)/2)(cos (A-B)/2)

=sin(A+B)sin(B-A)

so each term now becomes 1/sin(pi/2n)(1/sq cos(k pi/2n) – 1/sq cos((k-1) pi/2n)) which gives the convenient telescoping sum, yielding 1/sin(pi/2n)(1/sq(sin pi/2n)^2 – 1) and therefore the limit 8/pi^3 (just take sin(pi/2n) as pi/2n )

Back to viewing B1. It makes an intuitive sense on how to proceed by trying small cases (use infinite descent to show that the points are all in the form (2^m, 2^m), (2^m, 0), (0, 2^m) with its negatives), and I’m 99% sure that the square must either be axis-aligned or have 45 degree difference but proving that became a total nightmare (The most straightforward way is to brute force using “same length” and “perpendicular” criteria but…uh…nobody got time for that).

Part 2: Fight or flight? 

Desperate, I looked at the other problems (3-6) but none seemed too easy (in hindsight it was a mistake not to try B6 since it turned out to be easy). A few scribbling on B3 took me nowhere, so I decided to give B5 a go via small cases (replacing N=1008 with N=2, for example), which gives the next value (after 1, 2, 5) as 10 (because the difference of polynomial degree n is a polynomial degree n – 1), And hey, why can’t we apply the idea to the general case N=1008? What follows is a lot of writing in justifying this argument, finding an expression, and finally, simplifying into what’s required by the problem (which turned out to be F_{2N+2}-F_{N+2}). This last step required a bit of investigation but not too hard after some pattern finding and proof by induction.

Having done B5, the only sensible thing is to revisit B1. It’s an honest struggle, at best, but I finally came up with an argument: if we rotate by 45 degree and shrink It by a factor of sqrt(2) then we’re basically reducing all points from P_n to P_{n-1} and therefore we can continue doing this until at least one point is in P_0 (excluding the origin). Manual check + parity argument means there are only 5 such configurations, and therefore f(n)-f(n-1)=5 for all n. Elegant idea, but my writeup was messy that I was kinda disbelieved to receive a 10/10.

Part 2.1: the final struggle

The last 30 minutes should better be devoted to the problem that I have the strongest feeling about: B3. At this point I couldn’t remember much but all I could remember writing on the solution sheet was pure gibberish . Times up. I gave up.

Updates (again)

I have to admit — the past months have been hectic due to schoolwork and a part time research project, which explains why this site has been dormant for a whooping 6 months (or is it just a cover-up of the fact that I lack writing inspiration?) The fact that I’m not attending school (physically) should then mean that I better get my writing muscles on again, so here we go as a warm up:

  1. The COVID-19 pandemic that dominated the headlines of my news feed affects every single one of us: in particular, universities suspend in-person teaching and students are to continue their studies online. While the restructuring of the course outlines implies a significantly slower pace of workload, we’re all overwhelmed by the immense uncertainties amid keeping ourselves abreast of the current situation that evolves rapidly.

    Endless monitoring on the official site aside, we students need to cope with the many things that will no longer go along with our plan (e.g. the cancellation of a scheduled GRE test), the adjusted routine that minimizes the frequency of leaving my hostel, and more important, the well-being of people around us (friends, families, and ourselves). It’s only wise if I can use this opportunity to do things that I almost never have a chance to do regularly (like reading), and figure out the directions of my life (academia vs industry, math vs CS) that has been abandoned in the middle of schoolwork.

  2. Adding to the previous point: I originally have an internship lined up in the States but the travel ban imposed by both Canada and US necessitates some change in this plan (as minimal as “working remotely”, hopefully). I’m not alone. We’ll have to wait for things to unfold for the weeks to come.
  3. Fall 2019 term. The beginning of the term saw me pulling two all-nighters for the 2019 Hack the North, which I wowed to be the last hackathon that I would pour all my soul in for more than 24 hours in a row. Due to the part time research and the heavy nature of one course (Operating System), I reduced my course load from the my 6 to 5 (though a friend said “come on 5 is the usual not 6!” 🤣). I did well in those courses, those in retrospect I wish I spent more time to actually understand the content of certain courses instead of finding the “most efficient” way to gain good marks, and to produce more for my research during that period.

    Screen Shot 2020-03-21 at 11.05.31 AM
    A note from my instructor on the algorithm course 🙂
  4. Winter 2020 term (to-date). My part time research continues, and I think I did better with better direction and knowledge in machine learning (though the output still fell short of what’s required to make a conference submission, alas). I think I enjoyed the courses better than last term’s, though it might have to do with the theoretical and mathematical nature of the courses too.
  5. Contests. I have to admit I’m getting increasingly less obsessed with math and programming contests (there’re other more important things like school, jobs and research, aren’t they?), but I’d do it for the pure sake of having fun. Without intensive practice, I probably won’t see a phenomenal increase on my Codeforces rating for time being like what happened over the 2018 summer (in fact I can’t even secure the orange rating right now :/ ). The miracle of doing well on the 2018 Waterloo ACM locals and ECNA regionals did not re-occur in 2019 either. I’m simply happy, though, to score another Honorable Mention on the 2019 Putnam competition, with a respectable ranking. 😀

    Screen Shot 2020-03-21 at 11.45.23 AM
    Screenshot of my score
  6. Activities. Currently, travelling has become a luxury. This makes the 2019/20 Boston vacation more memorable where I finally checked off the MIT/Harvard visit off my bucket list and enjoy the great seafood over there! (More details on vlog, stay tuned!) Earlier in the term I had the pleasure to travel to Ottawa and Gattineau park, and this winter (before COVID-19 became a pandemic) I visited a local ski resort at Waterloo as part of my indulgence for winter activities.

    IMG_3203
    Just learned skiing, really

TL;DR the past 6 months were great, thanks to the people around me: research project colleagues, the Data Science club execs (including both the activities and socials), Malaysian society for the informal potluck and end-of-term celebrations, and several schoolmates that I’ve known since the start of my undergrad. Now it might be in our best interest to stay away from each other physically and connect via electronic media to practice #socialDistancing

Updates

Writing stuff has always been enjoyable. Unfortunately, it has been relegated to the bottom of my to-do list ever since I started my undergrad here (with the exception of Summer 2017 period when I had more free time). This is the only thing I could do to rectify this situation: the update before school starts.

  1. I’m back from a month-long summer break in Malaysia! Thanks to my co-op program at Waterloo, summer break really isn’t a thing for me as all school breaks are at most 2 weeks in length. Getting home is therefore rendered impractical considering the time and money spent on the flight. This time, though, I had a month off this time (thanks to my employer for the flexibility in adjusting my work term length!), so I seized the opportunity to go home. Being able to spend time with my family, catch up with some old friends, and relish in the local food made every second spent in my city worthwhile, and this one month would be one of the most memorable moments in my undergrad life.
  2. Summer in Toronto had been amazing, replete with activities and entertainment ranging from watching the live Raptor’s show in the bar and watching the victory parade, to cycling around the Toronto island or simply jogging around the town. My summer internship had been an enriching one — now I have a better sense of how working at a trading firm would look like.
  3. Hobbies — I lost the penchant to do a complete writeup on the process of me solving the IMO (simply because I had retired from the participation in this contest for a good 5 years), but I do have my solutions uploaded here (first time having 6 problems solved, though problems 3 and 6 are probably considered out-of-contest-time solutions and I only got problem 3 after reading some comments on AoPS). Solutions to other contests are also in the same repo, just to showcase my love for math Olympiad 😉 .

    Codeforces — this is the only competitive programming that I’m actively doing till now. Until last August, I had been steadily marching from cyan / blue to purple rating (except a downfall), surpassing the purple bar with an astonishing 35th place on a Division 2 contest. The journey to the next rating band (orange) steepened significantly after that, however (despite it’s being only < 150 points away) with me hovering between 1953 to 2014 rating points consistently for the next 10 contest, only to breakthrough with a lucky #75 later on before crawling slowly to scrap by the orange bar. Regardless of how long I can maintain this, I am happy to unlock this achievement, at least for once.

    cf_rating

  4. How about school? “Oh no I haven’t gone to school for 8 months!” While this is not the correct way to convey this fact, but it’s true. I will be starting my Fall study term in two days (after 7 months of internship + 1 month of vacation), so stay tuned!

That’s all, for now. 🙂

Dear Winter

Just face it — time flies, and it’s the end of April of the year 2019. Following UWaterloo’s calendar, this also signifies the Winter 2019 term has reached the end. In the past two years, this brought me the relief of finishing yet another academic year, especially in 2017 when the internship search and academic workload have been tumultuous. Consequently, the new non-academic life style in Spring has always been something I was looking for. Now, instead of celebratory, there’s a sense of emptiness lurking in my heart. The previous anticipation of the end of the April final exam season has since been replaced by the reluctance to accept the fact that the term was really over.

Contrary to the past Winter terms, I spent my term interning in the Uber’s Advanced Technologies Group. The learning curve at each research internship just got steeper each time, with this me facing a brand new challenge this time: machine learning. Amid the rewarding experience of learning something completely new, there’s always the self-doubt of where I’m working hard enough to contribute meaningfully to this internship. There were so much to be done that my coworkers actually described 4 months as too short; it’s only towards the end of the term did I feel it — I was ultimately swarmed by the ambivalence of both the excitement by the new interesting direction and opportunities the project was leading to, and the anxiety that time was running out. How I wished there were more time to work on it!

Several coding explorations filled the first half of my Winter term, ranging from algorithmic (CommuniTech Code & Win, and the Terminal AI challenge) to hackathons (Hack the Valley, Acorn Talent, and LunarHacks). Excited by the prospect of these hacking opportunities and the free weekends from the co-op terms, I turned myself into these hackathons with the intent to learn skills needed for application development. These five programming contests / activities were tinged with the nights we pulled our lethargic selves for all-nighters just to get stuff done, shivers as we were racing against the submission deadline to add our desired features, and the hilarious moments when we had to package our project as if it’s something “useful” during the pitching session. Eventually, I came to the point of deciding that I should halt these intensive exploration and focus on ML- or algorithmically-related aspects of CS. Nonetheless, the time luxury that made these explorations possible was something I would always appreciate. (Note: I travelled to Portugal as a supporter of the Waterloo’s ACM-ICPC team at the World Finals event, but I will save this to a later post I guess. 🙂 )

Screen Shot 2019-06-08 at 10.58.17 PM
One hackathon project: the image denoiser

The winter term was the first time I broke myself away from the tranquil university town (Waterloo) to a metropolitan that accommodates one-sixth of Canada’s population (Toronto). Interns event (Escape Room and Axe Throwing) by ATG aside, the vibrant Toronto atmosphere incentivized me to self-explore several places, ranging from the repeated visits to the Toronto Symphony Orchestra performance and the skating rinks, to several winter-exclusive events like the Light Festivals. Other times, strolling around the downtown area itself (when weather permits) or inside the Eaton centre served just in time to take a break from exhausting my brain after a day of work, or simply a gruelling Codeforces contest. Roaming around the city definitely became easier with weather turning warmer, but the winter-exclusive activities like skating and the light festivals, and the Toronto winter vibes in general, remain the moments that I wish I could live again.

WhatsApp Image 2019-03-24 at 14.58.13
Another exploration in the term: the Illusion Museum 😛 (creds to the hangout buddy)

With a few months left in Toronto before heading back to Malaysia for vacation, I hope to seize the opportunity to relish in the urban atmosphere where the weather is welcoming enough to make people stay outdoors. Nevertheless, this winter term will most likely be one-of-a-kind experience throughout my undergraduate journey, and will therefore be deeply ingrained in my memories. 🙂

Ps: thanks to my hangout buddy (schoolmate / friend who happened to be in Toronto with me in the term) for joining me for the in-city travel, and dragging me to places in return!

 

Pi Day Reflection

It’s Pi Day again, which reminds me of the MIT decision date (I always loved enjoying their decision trailer because it’s incredibly entertaining. One thing I couldn’t help thinking of, however, was what would happen if I were to choose MIT on April 30 three years ago? I still remember the Pi Day when I logged into decisions.mit.edu, thrilled at the sentence “it’s our pleasure to offer you…”, yet an awkward ambivalence arose when I sensed that I wasn’t likely to commit to MIT (and no, I didn’t choose MIT, obviously).

This thought led me to the whirlwind of memory lane between December 2015 and August 2016: arguably one of the best moments I have in life. Just fresh from completing my A-Levels exam, I was on full course to complete my university application processes: the Regular decision of US colleges, and several others in Hong Kong and Canada. I was first threw a surprise admission offer by Princeton, then by Cambridge and MIT itself (on the Pi Day!), along with some full scholarship offer at other colleges. It feels like hard work from the IMO, A-Levels and SAT preparation that together took me years to prepare finally paid off, and the power is with me to make a choice.

Thereafter, gone were the days of idling (beyond teaching math Olympiad and picking up programming), and I were set to attend Waterloo. The romanization of life in another continent, and the warm Residence Welcome video stole my hype for this Canadian university. Only after settling down here did I realize the stress piling up when exams and interviews started, and the fantasy started transformed into anxiety. Perhaps this made me think of the same question again: how would I be if I were to be placed in MIT (or similar)?

It’s been three years, and however stressful life at Waterloo could be, I am grateful that the rigorous curriculum in math and computer science, and also the internship program made me a person that I want to be (though, there’s still a long way to go). And all these are attributable to the people around me — being in an environment where people around you are working on improving they appearance on resume definitely motivated me to work hard on that. On a not-so-serious remark, choosing a school in Canada also enabled me to blend into the life of the Canadians, ranging from embracing the Canadian hobbies (like skating and skiing) to simply exploring the cities and neighbourhoods around me. Perhaps, the only thing I would long for is the balance between a tech-focused environment and a multi-disciplined interests like humanities and physical sciences: something I did in the A-Levels and worked hard on (Physics and Economics). And this is something I envision to be something the Ivies look seriously on.

“Stay well and thrive”, a note to self as I continue along the Waterloo journey (which was also something I wrote three years ago).

#10yearreflection

Context: the 10-year-challenge campaign started by Facebook .

The craze for this 10-year challenge among my friend circle became evident as I scroll through Facebook or Instagram wall. The vicarious fun of entertaining oneself of the contrast between numerous pairs of before-and-after photos almost attracted me to join the squad, only to be held back by my self-conscience of preventing myself from being to obsessed with being present unnecessarily on social media. Nevertheless, in this writing space that’s more personal, it’s worth reflecting what had happened to me over the last 10 years.

Perhaps it’s such a coincidence, Jan 2009 was also the time I entered my middle school: the so-called elite high school in my hometown. This ‘status upgrade’ and the simplistic mindset in me gave me an illusion that the value of “following parents’ order” that Chinese have held sacrosanct doesn’t have to be followed closely; I should be now entitled with my own thoughts. While puberty gave me the audacity to speak out my thoughts, disagreements and demands, it failed to install me the skills to professionally voice them and to exercise my discretion on knowing what to do. This explains why I thought it’s okay to relentlessly query people about their marks: for the purpose to gauge my class ranking under the competitive (and somewhat toxic) environment, without knowing that these numbers could be privacy or taboo to people. Fast forward to college, I became way more well-received among my classmates. Being in the cohort of like-minded folks definitely helped; other than that, it’s only because I only learned how to interact with people at the age of 18. Perhaps that’s also why Prof. Arsmah (the former Malaysian IMO chairperson) texted me “You have grown up” along with a reunion photo in 2016, as compared to 2011 when she insisted me to tell her myself on how did the IMO go — “to improve your communication skills”, she said.

One lucky thing happening to me in the first half of the 10 years was the discovery of who I am: someone who loves math. If not because of the opportunity to get into the IMO training camp, I wouldn’t realize that I can spend my thoughts on a single math problem for a few hours just to taste the sense of accomplishment after solving it. Amid my practice of math problems and following the IMO training regime, alchemy happened as I advanced into the IMO team: something my parents and I thought it was impossible given the fierce competition in the selection process. That’s when math problem solving, turned from merely an exploration to a commitment and a habit. This habit perpetuated beyond the 2011 IMO despite being severely hit by the failure, even though it wasn’t clear if the hard work and sacrifice was worth it. Fortunately, achievements came along with my continuous practice, and my IMO career ended with the pinnacle: one and the only gold medal in IMO 2014. My full scholarships from Waterloo and HKUST, and the acceptances into other elite universities definitely served as great rewards and ramification to my achievements before, but what’s more heartening was the immense comfort before most pure math courses in Waterloo — simply because I have the motivation to deal with them.

The second half of the 10 years saw me entering the A-Levels programme, which also saw how my dreams were shaped. As glamorous as it sounds, the Malaysian IMO ‘ancestors’ often ended up in great colleges like Oxbridge and the Ivies, so I thought I would be the same as them one day. But it’s not until the college application period did I realize that I had to earn the respect of the admission officers through means other than the IMO. Luckily, my bursary from the SPM (Malaysian Education Certificate) also placed me to mix closely with people with the similar mind, sharing the similar dream: to get into one of the top 20 universities. For the first time, my motivation to work hard came from something other than merely to make my transcript look beautiful. For the first time, I became able to think of what I wanted to pursue in the future, and what were my areas of interest (and not-so-interest). The admission offers from 11 universities justified my hard work, eventually. But what’s matter was how the process shaped me into someone who’s dare to be more productive to chase for his dream.

The last quarter of the 10 years span was spent in the university, which was what I called the pivotal point of my life. In September 2016, I left behind people around me to embrace a new environment, in a new country, with new set of people around me. It’s this environment that I picked up programming and tuned myself towards a better self when comes to the WaterlooWorks Hunger Games period. It’s this place that I saw the weather around me turning from green to red to white, before turning green again. As I braved through the unprecedented challenge of job hunting season, I started realized what differentiates myself as a student and as a person: someone who doesn’t vs does care about skills other than those needed to get the good grades. The struggle to mould myself to someone who’s ready to contribute to the industry while still maintaining the other aspect of my life (school and work-life balance) gradually prepared me for the challenges I may face upon the adulthood, which is also a step towards maturity.

With that, what would happen in the next 10 years?

My 2018 ‘Sonata’

screen shot 2019-01-04 at 10.08.03 pm
Countdown at Montreal (2018->2019)

“It’s the time of the year again”: to look at what I have been through, ranging from switching into Computer Science to doing another math research, and how I broadened my tentacles from math competitions into regionals programming contest. It’s also a change of perspective, somewhat.

First Movement: Winter 2018 (Allegro vivace)

Quick, light, lively, which somewhat characterizes the Hackathon adventures amid my adaptation as a CS student. The closing section was preceded by a heavy-duty passage ending with a 7-note-chord at fortissimo (staying up late for a group project), but nothing else extraordinary that deviates from the usual pattern. 

It’s the first term after I switched into the Computer Science department, in the hope to explore a variety of courses that I would crack my head out just to get the course admission. This also means that, instead of diving under the infinite mathematical odyssey indefinitely, I would have to frequently get my head up and breathe the air of programming. As a fish who’s so accustomed in this mathematical sea, taking the Object Oriented programming course propelled me out of my comfort zone — that was the course that took me a disproportionate amount of time in completing the assignments and studying for the material. As I thought that the workload might be lighter as the term passed by, no– I had to gave up a few nights sleep just to complete our group assignment project, the chess engine. Only after seeing the ensuing success could I pat myself on my back for what I have done.

screen shot 2019-01-04 at 4.20.37 pm
Reversi game: snapshot of our homework

The second aspect of my adaptation as a CS student was my exploration and experimentation of programming competitions, which were the Communitech Code and Win Finals, Google Games (again), Citadel’s the Data Open, and the UOttaHack. Sleep deprivation became real after almost every single such event (all-nighters), but thinking of the new skill gained, it’s worth it.

IMG-20180217-WA0003
#repost: skating as part of UOttaHacks (oops I mean…the Lifelog chrome extension we made)

The sweet spot behind every single coding struggle was that I am still able to immerse myself in the mathematical odyssey and swim as vigorously as I want in this infinite ocean. Contrary to the CS courses, the few pure math courses I took challenged me with the rather obscure concepts and identities. It’s also, however, these challenges that opened to me one of the most beautiful gem in the mathematical world (like the unsolvability of quintic polynomials).

Second Movement: Spring/Summer 2018 (Andante)

This movement is slower than the rest, probably because there’s no academic workload to bind me during a non-school term. But the cadence (i.e. chord progression) of this movement is difficult to predict: it can make a detour that leads to a I-IV-V-VI-V(7)-IV-I instead of a more straightforward I-IV-V-I (well, research outcomes are often unpredictable, right?). Another symbolization of the unresolved mysteries was the use of the modulation into the dominant key in the first section, which was then resolved in the later section by the tonic modulation except that one last part. Oh well…the only way to get around with it was the closing cantabile section. 

“That’s the one”, I monologued before Prof. David Jao’s profile, being captivated by his research focus on number theory and cryptography. Subsequently, I applied to work for him under the Combinatorics and Optimization research program, and got the offer a few days later.

It all started with “Crypto 101”: mindblown by the array of fundamentals (elliptic curves and their isogeny mappings, ideal class groups and binary quadratic forms, and the most dreaded yet the most quintessential quaternion algebra), and the intensive study and summarization of recent works and optimizations in post-quantum cryptography. Thereafter, I went into the scavenger hunt (as quoted from my prof) on the optimization sweet spots, bearing in mind on the future beast-in-development: the quantum computer attack, before deciding on the project to go forward: to implement a signature scheme using sagemath.org. There I went, starting to understand the pseudocode and the theory behind it, only to be obstructed by logic that hardly made sense to me, objects that I wish there’s built-in functions (but no), and one-liner sub-procedure that left me to figure its implementation details. Amid the clueless sessions of me trying to merely get its syntax correct, some room of optimization (for some auxiliary algorithms) appeared afloat upon the discussion with my professor. I rushed to my laptop and swiftly started the implementation process, and delightfully see that this optimization worked out. But the overarching problem was still there: how should I fill in the gap and make everything completely correct?

screen shot 2019-01-04 at 4.27.41 pm
Part of my sage math.org experimentation (hint hint: my full code has 600+ lines)

Complementing the research experience was the side project development, one of which was inspired by the research itself: the Big Integer Library in C++. Having the object-oriented principles fresh in mind after CS 246, I strived to maintain these principles in mind while maximizing optimizations simultaneously. This involved some efforts like learning the Fast Fourier transform and minimize compiler-specific redundancies, but when my running time improved from 4 minutes to 0.2 seconds, the pain is worth it. Another side of my coding was the practice on Codeforces, which saw me improving from cyan to purple within 7 contests. Unwilling to succumb to the fact that I was new to coding, I allocated time practicing on this competitive programming platform, in the hope to achieve a respectable rating and get that sense of vanity. While a few initial leaps in rating boded well on my mission, this effort was once hampered by a 90-point plunge, no thanks to my inability to cope with time constraint and a failed verdict by system test. Served as a wake-up call to restructure my contest strategy, I aced the two subsequent contests and eventually reached my lofty purple rating.

screen shot 2019-01-04 at 4.38.09 pm
Top 50 -> promotion to purple!

Rounding up those were the blessing of having friends around me to had great leisure activities, the most important of which was cooking. Being able to learn the arts and crafts of culinary that returns you with great gastronomical rewards have never been boring. The periodic gathering with mates over meals also served well to relieve the stress and tension from my work, sometimes made more mirthful by the atmosphere of birthday celebration (including mine in the piano room 😛 ) and brief vacation.

screen shot 2019-01-04 at 9.37.49 pm
Failed duo attempt during my birthday party XD
dav
Picnic @ Toronto island during Canada Day!

Finally, thanks to my research prof I was given the privilege to travel to Santa Barbara to attend the Crypto 2018 conference. Relishing in the rustic campus view by the Pacific Ocean aside, I also had the opportunity to broaden my cryptography horizons well beyond what I was doing in my research through listening to the presentations. This marked a great closing to the Spring 2018 term. 🙂

screen shot 2019-01-04 at 9.47.30 pm
Crypto 2018: ft the opening speech and the sunset view I captured 😉

Third Movement: Fall 2018 (Presto)

The relatively relaxed opening seemed to belie the nature of this movement: it actually serves to build up the mood for the main theme. Thereafter, it’s just a healthy mix of running notes in semiquavers and 7-note chord in this movement, with the right hand becoming fugue-like in the middle section (i.e. multitasking between 7 courses and interview). The whole intensive nature lasts throughout the piece (except the last few bars: Christmas break). Not for everyone, tbh. 

The beginning of the term was characterized by extracurricular activities like the Velocity bootcamp, Hack the North, and the PennApps. But soon, the effect of taking 7 courses instead of 5 began to crystallize when the assignments started to pile up to the extent of me having up to 6 of them due in the same week. The study term then became a relay race of me with those homework, one after another, like an infinite relay week after week. Adding to these were the planned hurdles: the midterms, which sometimes came when part of classroom material still remained conundrum to me.

screen shot 2019-01-04 at 9.35.48 pm
Sneak peek on the classes I took ahem

Come mid-September, the WaterlooWorks recruitment season for Winter 2019 began. Having started my internship application and interview process since July, I should reassure myself that the process was going to be smooth. No, it didn’t happen. Still being fresh into the Computer Science major, the struggle of cherry-picking mutual interests from the thousands of job postings was tangible — I had grave trouble filtering jobs out of my shortlist. Following the submission of my applications was the great fluctuations of my feelings: fear, both because of the initial “no job” paranoid when interview never came in the first week, and of the “can’t cope” spectre when interviews and midterms started sandwiching each other; underwhelmed, every time after a sub-par interview performance, and after a rejection by a position that I had been dreaming for long. Only during the unfolding of the position offers towards the end of the recruiting period could I catch a breath out of my hectic schedule: I am rewarded with 3 offers.

screen shot 2019-01-04 at 4.39.40 pm
Sneak peek into my schedule in the busiest week (oh not included the self-note on what I should do)
screen shot 2019-01-04 at 9.56.30 pm
Onsite interviews I had in New York and Chicago 😉 (travel first, sweat later)

Embellishing my already packed schedule was my participation in the ACM-ICPC North American regionals, qualified through my rather unexpected placing of the top positions in the Waterloo local contest. As an amateur competitive programmer, the practice sessions offered a new perspective into competitive programming–the combination of teamwork, speed and accuracy. It’s therefore a great privilege to learn from the more experienced teammates and work with them during the contest, which resulted in our victorious placing of the 2nd place in the contest. Later in the term, come the Putnam contest that I have been enjoy writing every year. Though the extreme workload rendered any Putnam practice almost impossible on my own, cracking at mathematical problems have never been less enjoyable for me.

img_2220[1]_792x528
Second place at the regionals!
The routine of the term made me resonate with the third movement of the Moonlight sonata, prompting me to take some break from my routine and self-learn the piece (still in progress). Arms weary after each practice, this piece nevertheless gave me an avenue to express my feeling about my extra-hectic life during this 4 months. Luckily for me, this isn’t the only leisure I had: I had several short gathering over meals with several friends that were quintessential to my uni life, as well as some brief explorations over sports like archery, badminton and squash. This leisure went to a pinnacle at the end of the academic term as I travelled to Montreal again, this time with the bold try of skiing without really going through the 101’s, and finally a countdown there. 😉

screen shot 2019-01-04 at 10.05.43 pm
L: “three idiots” (a.k.a. travel companions); R: my fall from the (dis)grace during my first ski
bty
Can’t be complete without my photo with Einstein!

Final remarks

2018 is a year characterized by adventure, mainly marked by my switch into CS and the ensuing change in my course structure and the commitment to side projects and hackathons. Perhaps, time to give credits to the following people (shamelessly citing from my Facebook post)

  1. people who offered me help and advice out of their initiative — even without me asking first
  2. those who offered constructive criticism when I need them the most, sometimes harsh enough for a wake-up-call
  3. those who disseminated their passion in different fields, encouraged me to try them out, and patiently provided guidance to those, even though I could be extremely intractable in those fields
  4. my comrades who struggled together with me, be it a group assignment, a hackathon project, or even when applying jobs together
  5. my family who continuously provide support and advice even from the other side of the globe

Thanks to these people I dare to make these adventure, not only in venturing into the CS field which I previously lack confidence in, but also trying new things out (like skiing and side projects). Having them around me simply alleviates me from the stress over my routine — even if it’s a simply discourse over life.

“May things happen in the way they should be, even though it won’t necessarily go in my favour”, here I wish, for 2019.

49211301_218820045688138_4308646784017629184_n
Annual tribute to my tech squad 😛

Lastly, photo credits to the following: A. Chan, J. Lim, Y. Li, S. Lin, F. Chen, Z. Low, the ACM official photographer. Apologies for using them unabashedly without your permission 😛