Computational runtime: the concept silently constraining our lives

academics computer science

You may be surprised to hear that I declare computational runtime to be the silent constraint on our lives (compared to, say, money or conventional understandings of time). But much of the technology on which our modern world is built relies heavily on concepts of runtime. 

In computer science, one way that we try to understand runtime conceptually is called Big O notation (because, well, there is an upper-case letter O). The principal idea here is that, as the size of the data in our tasks grows—let’s say to infinity, we can abstract out some sort of relationship between that size and the eventual runtime. As part of this process, any one-time “costs”—what in manual terms could be setting up the computer or in more technical terms could be additional tasks to set up or run the analysis—fade to the background. We are left with a raw understanding of how long on the order of magnitude the task will take. 

To give an even more concrete—if simplistic—example, how long does it take to find an element in a sorted list? 

If we have a list that’s sorted, with say n elements, the first thing we can do is look at the element in the middle. If the value we’re looking for is bigger, then we know we need to search the right half (and vice-versa if smaller). We can repeat this process. Every time, we are getting rid of half of the section that we are looking at. The amount of times we can do this is severely limited: if we have a list of length n, the partitions will be of size n/2, then n/4, then n/8, then n/16. In essence, we can only do this about log(n) times, plus or minus a few, before each partition only has one value (which we can compare). We call this operation O(log(n)), meaning the runtime is related on the order of magnitude of the log of the size of the input list, n. 

When thinking about runtime, a huge constraint is called exponential runtime. In short, exponential runtime means that as the size of the data increases, the runtime is increasing exponentially (say, O(2^n)). What this also means is that, eventually, if the size of the data is big enough, exponential runtime will not finish in our lifetime. This could be very helpful for certain applications (think: security). But if the task is beneficial, this can be a huge hindrance and many heuristics exist to circumvent these runtime constraints.

Christopher is pursuing a Master's in Urban Planning at the Harvard University Graduate School of Design (GSD). Previously, he graduated from the University of Pennsylvania with a Bachelor's in Computer Science. He completed his MS in Engineering in Data Science at Penn as well.

Comments

topicTopics
academics study skills medical school admissions MCAT SAT college admissions expository writing strategy English writing MD/PhD admissions LSAT physics GMAT GRE chemistry academic advice graduate admissions biology math interview prep law school admissions ACT language learning test anxiety personal statements premed career advice MBA admissions test prep AP exams homework help creative writing MD study schedules mathematics computer science Common Application history research summer activities secondary applications philosophy organic chemistry economics supplements admissions coaching dental admissions 1L grammar statistics & probability PSAT psychology law legal studies ESL reading comprehension CARS PhD admissions SSAT calculus covid-19 logic games engineering USMLE admissions advice medical school mentorship Latin Spanish biochemistry parents AMCAS English literature case coaching verbal reasoning DAT STEM adjusting to college dental school excel genetics political science skills French Linguistics MBA coursework Tutoring Approaches academic integrity astrophysics chinese classics freewriting gap year letters of recommendation mechanical engineering technical interviews units Anki DO Social Advocacy algebra amino acids art history artificial intelligence business careers cell biology cold emails data science diversity statement finance first generation student geometry graphing kinematics linear algebra mental health pre-dental presentations quantitative reasoning revising software engineering study abroad tech industry time management work and activities writer's block 2L AAMC DMD IB exams ISEE Japanese MD/PhD programs MMI Sentence Correction algorithms analysis essay argumentative writing athletics business skills executive function fellowships functions genomics infinite information sessions international students internships logic networking office hours outlining poetry proofs reading recommendations research fit resume scholarships science social sciences statement of purpose trigonometry 3L ADHD Academic Interest ChatGPT EMT FlexMed Fourier Series Greek Health Professional Shortage Area Italian JD/MBA admissions Lagrange multipliers London MD vs PhD Montessori National Health Service Corps Pythagorean Theorem Python Shakespeare Step 2 TMDSAS Taylor Series Truss Analysis Zoom acids and bases active learning architecture art art and design schools art portfolios bacteriology bibliographies biomedicine boarding school brain teaser burnout campus visits cantonese capacitors capital markets central limit theorem centrifugal force chem/phys chemical engineering chess chromatography class participation climate change clinical experience community service competitions constitutional law consulting cover letters creative nonfiction curriculum dementia demonstrated interest dimensional analysis distance learning econometrics electric engineering electricity and magnetism embryology entropy escape velocity evolution extracurriculars fundraising harmonics health policy history of medicine history of science hybrid vehicles hydrophobic effect ideal gas law immunology induction infinite series