My Academic Year in 2017-2018

My intent during my second year at OSU was to not make the same mistakes that plagued me during my freshman year; skipping class, constantly sleeping, missing homework submissions, skipping club meetings, etc. Sadly, I did not succeed in preventing those same mistakes. However, by working with counseling (both on and off-campus) towards the end, I was able to realize what I needed to do to be able to succeed in my next years. I started writing dates and schedules down as to not miss midterms or important deadlines. I started sleeping and waking up earlier (even without an alarm), as I’ve learned over the summer that I can do much more during the day compared to late night hours.

Granted, here in my third year, it hasn’t been perfect. I’ve missed some recent homework assignments and my habits are wavering back and forth between the old and new Sameed. But I think I’m capable of controlling it. The difficulty will be in compensating for my mistakes. Before I turn this into a year-in-progress post about my third year, let’s address my GOALS from last year:

Global Awareness:

This past year, my main form of global awareness came from my continued membership of OSU’s Kendo Club, as we have a handful of opportunities during the year to attend cultural events, such as the Japanese Student Organization’s Spring Festival. There we held a booth teaching people about the history and practice of kendo, while being able to visit other booths and watch performances on stage in the Ohio Union. In fact, I participated in a kendo demonstration with a friend, demonstrating what kendo sparring looks like. It was a great opportunity to meet Japanese-American members of the Columbus community, including some older individuals who used to practice kendo as young adults!

Original Inquiry:

This year I have continued my research with Dr. Ulrich Heinz in the Physics department, having worked with him since March of my freshman year. I was able to present our ongoing research at the Natural and Mathematical Sciences Research Forum, as well as the Denman Undergraduate Research Forum, where I received first place in the category of “Beyond Earth”! Over the summer I’ve been tasked with a new research project, and I plan on presenting it during the fall at OSU’s undergraduate fall research festival. Since I will be taking relativity and quantum mechanics classes, I also anticipate being able to more deeply understand my research in a more intellectually rigorous way, rather than from a mostly software engineering standpoint. Perhaps in the future, it will even lead to a thesis project.

Academic Enrichment:

I have structured my class schedule to reflect my desire to gain an introductory-graduate-student equivalent of knowledge in math and physics before applying to graduate school after graduation. This will entail completing most of my major requirements by the end of my fourth year, leaving room in my fifth year for finishing any electives, general education requirements, and graduate level courses that interest me in math and physics. Unfortunately, due to my bad motivation and dropping of certain classes the prior year, I’ve pushed myself a little behind schedule, but I think a fifth year (as well as some online summer courses), I will still be able to attain my goal.

Leadership Development:

As one of my extracurricular activities, I also served as the vice president of Kendo Club, where I helped manage membership lists, send out informative emails, and manage registration for tournaments. I anticipate this leadership experience to be useful as it helps me refocus on the responsibility I’ve so far neglected in my academics. In addition, I can use the management and collaborative experience to prepare me for a future in research, where working as a group, managing presentation dates and grant submissions, and reaching out to other individuals will prove to be important skills.

Service Engagement:

As an Eminence Fellow, the most significant service engagement in which I’m involved would be our class project Enlighten, a newly formed project aimed towards curbing activities that encourage human trafficking and removing the stigma from survivors of trafficking. We plan to continue our efforts through methods such as spreading awareness and providing legal advocacy, among other currently-developing methods. On a smaller scale, I participated in the Martin Luther King Jr. Day of Service with my friends Sara and Frank, where I learned how much work we as a community can accomplish if we all simply take a day of our time (or even 2 hours a week) to help out. It’s definitely an experience I plan on continuing this year as well.

G.O.A.L.S.

Global Awareness: As the son of two Pakistani immigrants, the importance of global awareness is not lost on me; every individual draws some sort of identify from their cultural background, and without taking the time to digest the differences between cultures and truly appreciate such distinctions, it is hopeless to claim to be a global citizen. In attempting to become more globally aware and sensitive to other cultures, I plan on sating my hunger for learning about new cultures by studying topics in foreign literature, whether that encompasses the works of those living in other nations, or those living in cultures at home yet unknown. In fact, my progress in increasing my cultural awareness has already begun, as I have recently joined the Ohio State University Kendo Club, providing me an opportunity to learn about Japanese culture and meet many individuals from other communities and cultures.

Original Inquiry: Perhaps my primary motivation for attending college, save for the wealth of information and abundance of opportunity, would be the ability to conduct cutting-edge physics research. One of my original reasons for pursuing physics education was to help address energy concerns after experiencing firsthand the lack of suitable energy infrastructure in Pakistan. While the same concerns resonate with me still, I’ve recently found my desire to pursue theoretical research (on its own merit) to be more personally appealing. As such, I’ve been working with Dr. Ulrich Heinz in the Department of Physics on computational relativistic heavy ion physics since my second semester. If you happen to see me around campus, I would be more than happy to oblige you in a conversation about my work (as my friends can surely attest!)

Academic Enrichment: In pursuing my honors double major in Mathematics and Physics within the College of Arts and Sciences, I have begun to build a foundation onto which I can carefully build with new knowledge gained from advanced courses in my intended majors. By electing to stress myself a little more during my first year by skipping a few course sequences, I set myself on a path to study graduate level topics in mathematics and physics: two intense and interesting studies that display a kind of symbiosis in how well they play into each other. As a result, by the end of my four years I should have hopefully developed a rigorous foundation unto which I can specialize even further through graduate studies in the years after. My general education classes, then, will serve to broaden my horizons and serve my interests in topics such as classical literature and foreign cultures.

Leadership Development: Much of my anticipated journey throughout post-secondary education will entail taking new leadership responsibilities upon myself in extracurricular clubs and activities elsewhere. My prior experience as an Eagle Scout should hopefully have prepared me enough to tackle new leadership tasks, such as working with the other Eminence Fellows of my class to develop and coordinate a service project for the Columbus community that shall stand for the duration of our time on campus and beyond. Additionally, my responsibilities in future lab environments and clubs to which I plan on committing more time, such as Kendo, will also require me to go beyond my past requirements in leading others and serving as an example. Regardless, I am no less than excited for the opportunities that await.

Service Engagement: To help other people at all times. As a boy scout, such a phrase was repeated by every individual at our weekly meetings to remind us of our obligation to our community. As such, I intend to pursue service opportunities as part of extracurricular club service events, as well as perhaps my largest anticipated service engagement during my time at the university: the Eminence Fellowship service project. With my 26 fellow classmates, I plan to help develop and execute a service project within the Columbus community meant to do more than simply resemble routine volunteer work. However, the first and most important part still remains for us to tackle developing a feasible yet substantial idea for a project.

About Me

users.each {|user| puts "Welcome, #{user}!"}

My name is Sameed Pervaiz and I have the privilege of studying Mathematics and Physics (with a little bit of Comp Sci) at the Ohio State University as an Eminence Fellow of the Class of 2020! .

I grew up in North Canton, Ohio, where I attended Jackson Local Schools for (nearly) my entire education. I always preferred math and science in school, but it wasn’t until high school when I seriously started gravitating towards physics (pun unintended) as I took various AP classes at Jackson. Having been introduced to computers by my older siblings as a young child, I also like to tinker with programming and neat software tools — perhaps you’ll see some of my blog posts migrated from my other blog to here! In a stroke of luck, I even managed to find an opportunity do combine all my interests in my research, where I currently study the parallelization of high energy nuclear theory simulation packages under the supervision of Dr. Ulrich Heinz.

I so wish I could say academics use up all my time, but some of my other hobbies also see their share of its use! I took up Kendo as a hobby my freshman year, and I practice weekly with others in OSU’s Kendo Club (shameless plug: come try it out on Sundays from 12-3!). If you hear a group of people screaming and the sound of earthquakes inside the North Rec Center or the PAES — yep, that’s us! I also enjoy playing trumpet and viola (though I’m arguably much better with one than the other), and occasionally play in a university group. You also might find me playing video games with friends, or having heated discussions with my friend Akshay about math, physics, and productivity (I’ve not quite determined which of the two is less productive).

While I do enjoy my hobbies, I have plenty of time to meet new people! If you see me around campus, go ahead and give me a shout, I’d be more than happy to chat — hope to see you up and about!

Code Golf: Enterprise Edition

Note: This article was written around September 2016, but I didn’t end up publishing it until this summer 🙂

Around July 2016 I was intrigued by a certain code golf problem that my online friend winny introduced to me. The problem involved testing the primality of the indices of a given array in a computer program and traversing the array in various ways, depending on the test outcome. The final goal was to either escape the array and report the number of steps required to break free, or fail with an error that meant escape could not possibly be achieved.

Logically speaking, the premise of the problem is rather simple; we can formulate it as so:

Imagine you have a function is_escapable() that takes two arguments: a zero-indexed array and a starting index. If you’re on a prime index n, you’re going to move back array[n] indices, and if you’re on a non-prime (note: not equivalent to composite) index n, you’re going to move to the index array[n]. From here you keep repeating until you either make it out of the jail (access an invalid index) or realize that escape is impossible.

So one of the two big questions is how you determine if it’s impossible to escape. It turns out to have a beautiful answer — if we fix our array (i.e. make it constant) we realize that our next location is a function of only our current index — our current state.
So if you revisit an index before you make an escape, you realize that it’s impossible to escape at all, because you’re going to keep looping indefinitely. Another way to visualize this is to imagine each index jump as a new recursive function call of is_escapable() using the same array but a new index. If you see the same function call as your starting call, you know the call stack will just keep enlarging.

The next big question is how to write a primality test in a terse way. This is significant because the entire premise about code golf is solving fun little problems in the least amount of bytes of source code as possible. As a result, people have made entire programming languages with built-in features designed to solve certain common tasks in terse ways (just as iterative constructs in general-purpose languages do for us).

Regardless of language, however, we still need to find some mathematical theorem or formula that lets us check primality in a simple way. Note that this does not require us to have an arbitrarily fast solution, so exponential (or even factorial!) time algorithms are okay to use. A common solution that almost everyone uses for this is Wilson’s theorem, a theorem stated in 1770 by mathematician John Wilson but proved by Lagrange in 1771 (funny how naming theorems works). The theorem states that


A natural number n > 1 is prime iff (n-1)! == -1 (mod n)

Upon the discussion of computational complexity and code-golfiness, I decided it would be a fun (and silly) exercise to embody everything wrong about code golf while also ignoring the true goal of code golf. I wanted to write insanely bloated and slow code to demonstrate exactly what *not* to do, but I only focused on one part of the problem at hand: the primality test.

Specifically, I wanted to write a slow implementation of the gamma function, which for positive integers is conveniently equivalent to (n-1)!, the expression we would want to calculate for Wilson’s Theorem. However, to calculate the gamma function, we were going to have to calculate partial products for Euler’s infinite product definition of the gamma function until successive terms were sufficiently close to each other. So our gamma function looks like this:


#include <cmath>
#include <limits>

long double apprx_gamma(long double t) {
    long double last_gamma {0.0};
    long double current_gamma {1.0/t};
    for (long double n {1.0}; std::abs(current_gamma - last_gamma) > 10 * LDBL_MIN; n += 1.0) {
        last_gamma = current_gamma;
        current_gamma *= std::pow(1 + 1/n, t) / (1 + t/n);
    }
    return current_gamma;
}

(Note that our method does not actually satisfy the definition of convergence for infinite products)

This solution pretty much grinds to a halt before you can even calculate 15!, so it’s probably not production-ready yet 😉