CS 100 (Learn)CS 100 (Web)Module 01


Discrete vs. Continuous Quantities

(direct YouTube link)

NOTE: If your internet access is restricted and you do not have access to YouTube, we have provided alternate video links.

TRANSCRIPT

In this video, we want to distinguish between discrete and continuous quantities.

The easiest way to illustrate the differences is to look at two different types of numbers: Integers are discrete and real numbers are continuous.

With continuous numbers (or real numbers), there exists a smooth transition between any two values. That "smoothness" is why they are called continuous.

There are actually an infinite number of values between any two real values. What do we mean by that? Consider any pair of values such as three and four. The real numbers that exist between those two numbers include three point five, three point one, three point zero zero one [3.5, 3.1, 3.001] and so on. There are even an infinite number of real numbers between three and three point zero zero one [3.1, 3.01] There is three point zero zero zero nine, three point zero zero zero one [3.0009, 3.0001] and hopefully you can see where this is going.

If you were to imagine moving from the numbers three to the number four continuously, it would be a smooth transition. If you are on an elevator and you are travelling from the third floor to the fourth floor, you want it to be a nice, gentle ride between the floors.

The transition between integers is not smooth. The quantities "jump" from one value to the next. It's more of a jerky movement. That's because integers are discrete.

For example, let's say that we want to count how many people are in a room. If there are currently three people in the room and someone walks into the room, it instantly jumps to four people. There's never a moment in time when there are three point five [3.5] people in the room. This example is intentionally vague as a thought experiment. Someone could argue that someone standing in the doorway is halfway in the room, but that's not how it works. That person must be either inside or outside of the room. You cannot have half of a person: even an annoying person who spoils your favourite TV show is a full person.

Returning to the elevator example, the number of buttons in an elevator will be an integer. In other words, you have a discrete number of choices. Furthermore, the display that shows which floor you are on is discrete: it will suddenly jump from floor three to four. However, the path that you take is continuous: you will smoothly move between the floors.

A good visualization of the difference between continuous and discrete quantities is the second hand of a clock. Some clocks have continuous second hands that are smooth. Other clocks have discrete second hands that tick and jump every second.

The key concept to think about here is that some quantities in the world are continuous, and others are discrete.

Integers are discrete, but discrete quantities do not necessarily have to be integers. As long as there are a fixed number of decimal places (or a fixed denominator) the quantities are discrete.

Money (or currency) in Canada is discrete at the penny, or the one one hundredth [ 1/100 ] level.

Shoe sizes in Canada are discrete and typically jump in halves (for example, from size eight to eight point five to nine [8, 8.5, 9].

Technically, discrete quantities don't even have to be numbers (although they usually are). The current date is discrete: the date will jump instantaneously from April 30th to May 1st. Even though dates are discrete, time is continuous and flows smoothly from one moment to the next.

One final way to help think about discrete quantities is that they are easily countable. If you can theoretically count something on your fingers, like the number of people in a room, or which floor of a building you are on, then it is discrete.

So now you should be able to distinguish between discrete quantities and continuous ones. You can think about this the next time you order a coffee at Tim Horton's: the serving size is discrete (small, medium, large, extra large) but the volume of liquid in that cup is continuous.