Author: freeCodeCamp.org

Transcript:

In this video, I will be explaining what Discrete Mathematics is, and why it’s important for the field of Computer Science and Programming. Discrete Mathematics is a branch of mathematics that deals with discrete or finite sets of elements rather than continuous or infinite sets of elements. Imagine trying to run a program that requires an infinite number of executions to complete a task. It’s obvious to say, that the program would run forever and the task would never be completed because there is an infinite number of executions. In order to avoid this problem, we approximate the continuous sets with discrete sets. Now you may be thinking, I never use math that involves infinite sets, but I promise that you do. The simplest example is with a circle. A circle by definition is an infinite number of points equally distant from a fixed point. The problem with this is that if we try to write a program that prints out all of these points, it will run forever because there is an infinite number of points and therefore an infinite number of executions. So, this is physically impossible, that’s why if we zoom in here, you can see that when you come down here, there is all these points, but in reality we should have even more points between these points. And if we zoom in on those, we should have more points between those points, and we can never complete the task. Now we’ve all seen circles on computers, how is this possible, because we just established that it’s impossible. The answer is, is that there is approximations. For example, consider regular polygons. Regular Polygons, like a triangle, or a square, or a pentagon. They don’t really look like circles. However, if you keep increasing the number of vertices. Eventually you will get hexagons, octagons, decagons, hexadecagons, icosagons. You can see that these regular polygons, the more and more you increase the number of vertices, which the vertices are equally distant from a fixed point, they will eventually approximate a circle, and eventually they will be indistinguishable to the naked eye and will look identical to a circle.

We’re busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.

Join our community at https://freecodecamp.com

Follow us on twitter: https://twitter.com/freecodecamp

Like us on Facebook: https://www.facebook.com/freecodecamp

Follow Quincy on Quora: https://www.quora.com/Quincy-Larson .

Video source Youtube