Posts

Thought Experiment

If you could ask the universe any three yes/no questions, what would they be? I came up with this thought experiment last week while in my introduction to philosophy class. What questions would further our knowledge of science the most? Which questions would benefit society the most? What are the potential consequences of the answers? In this thought experiment, you can accept the answer to each question as an axiom of the universe. That is, you know the answer is a law of nature. Further, you can assume that a "quantum" answer (i.e., yes and no simultaneously) is not possible. The first question I would think to ask is Does God Exist?. Humans will never be able to prove or disprove the existence of God, so the answer would give information that we would not be able to find otherwise. The answer to such a question completely change society as we know it (assuming everybody on the planet accepted the answer). The second question I thought of was Are we alone in the Unive...

Simplifying the Expected Value Formula

Probability theory is by far my favorite field in mathematics. I am particularly interested in expected value problems over a discretized domain. I often find myself thinking up and solving expected value problems that may or may not have any actual relevance. After working on an expected value problem that I had thought up, I derived a very interesting and useful identity for computing the answer to expected value problems more easily in certain situations. My derivation is easiest to understand when the sample space is the set of natural numbers (i.e., $1, 2, 3, \dots$). In situations when the sample space of a random variable is the set of natural numbers, the expected value is defined by this formula: $$ \mathbf{E}(X) = \sum_{k=1}^{\infty} k \cdot P(X = k) = P(X = 1) + 2 \cdot P(X = 2) + 3 \cdot P(X = 3) + \dots $$ In some cases, this summation may be difficult to evaluate directly. However, if you represent the sum in a special way, a simple but powerful simp...

A Simple Derivation of the Quadratic Formula

Image
In this blog post, I will talk about the famous quadratic formula - a formula for finding the zero(s) of a polynomial equation of degree 2. I first learned this equation in Algebra, but I had always thought of it as a mathematical truth, without actually knowing how it came to be or why it's justified. Now, I have the tools to show that it's correct and to actually derive it using simple algebra. The quadratic formula is a formula used to solve for the zero(s) an arbitrary polynomial in the form $y = ax^2+bx+c$.  Here it is in it's standard form: $$ x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a} $$ My proof of this formula relies on an algebraic trick known as completing the square, which is another useful technique to solving equations of this form. While I personally prefer the completing the square method because it's faster, many people prefer using the quadratic formula because it doesn't require much thought or intuition; it's straight plug-and-c...

High School Computer Science - Part 2

There are a few non-profit organizations that work to improve high school curriculum's by helping incorporate Computer Science. One such organization is Partner4CS.  Partner4CS is a non-profit organization centered in Delaware trying to bring a high quality computer science classes to middle schools and high schools. This program hopes to broaden participation in computing, increase awareness of computer science and its impact on the world around us, and increase enthusiasm for computer science. During the fall of my sophomore year, I participated in a 1 credit seminar in which I learned about teaching CS to students in a fun and exciting way while still getting core principles across. I collaborated with professors and other undergraduates to help facilitate an after school program at the Newark Charter School called Scratch Club. For those that are not familiar with Scratch, it is a powerful and easy to use programming language that has many abstractions already built in. It i...

High School Computer Science - Part 1

Albert Einstein once said, “Education is not the learning of facts, but the training of the mind to think.” This fundamental idea should be at the heart of every high school curriculum. Unfortunately, schools are more concerned with test performance than student growth. Due to this intense focus on test preparation, many high schools overlook computer science and omit it from the curriculum. A high school computer science implementation will not only give students the technical skills they need to enter the job market today, but it will also provide students a new level of academic rigor that will help prepare them for challenging college courses. Computer science is an important subject because it requires logical reasoning and creativity, which are skills that all successful college students need to have. Computer scientists have the rare ability to turn an idea into reality. Designing a computer program is a multistep process that requires the programmer to express solutions to s...

Implementing a Minesweeper Bot

Image
A few weeks ago I wrote a minesweeper bot. It was a great exercise and the complexity of the algorithm was not unlike the Project Euler problems that I solve. For those that are interested, I am posting a video demonstration, as well as the implementation details at the bottom of this post.  I had two main motivations for coding this bot: To learn about JNA To create a computer program that can play minesweeper better than myself JNA is a java API that is useful for interacting with the Windows OS. I used it to gain information about the minesweeper board. I wanted to learn it so I can write more automated programs that can interact natively with applications on my computer. This isn't the first time that I've devised a program that can play a game better than myself, but it's the first single player game that I've solved. I've also done work with Nim, Farkle, and BlackJack.  I find it fascinating that a computer program can be more intelligent than the pr...

Summer Internship at JP Morgan Chase & Co.

This summer I worked at JP Morgan Chase & Co. as an summer intern. I was recruited by JPMC as a freshman after attending their Code For Good Challenge. For those that are interested in getting an internship, attending a hackathon is a great way to get on a companies' radar. I worked as a technical analyst on a database administration team. I was tasked with creating a web application that helped manage database space. While I can't go into details due to JPMC's code of conduct policy, I will say that it was an excellent experience. I went in knowing about most of the tools that I needed (java, web development, tomcat, sql, etc.) so I was definitely well prepared. From a technical point of view, learning about JPA and Hibernate was the best thing I got out of this internship. JPA is an industry standard that allows for easy conversion between SQL rows and java objects. Hibernate provides the implementation of the ORM (Object Relational Mapping). It's very elegant a...