Coding to Promote Problem Solving and Logical Reasoning

Ada Lovelace (1815-1852)
Ada Lovelace (1815-1852)

An excellent article, by Scott G. Smith, appeared in the August 2016 edition of MATHEMATICS teacher and published by the National Council of Teachers of Mathematics, got me thinking about how I might use simple coding activities in math classes to promote problem solving and logical reasoning. The author discussed how he used simple coding activities with the TI-84 Graphing Calculator to teach generalization, problem solving and logical reasoning in his algebra 2 classes. Smith provided numerous TI-84 program listings along with explanations.

The purpose of this post is to show how to use an Excel spreadsheet and the TI-BASIC programming language to solve a problem that would be suitable for a high school math class. I chose a spreadsheet solution of the problem because educated adults in a modern economy are expected to have working knowledge of spreadsheets. Then, I chose a TI-84 solution of the problem because programmable calculators are ubiquitous in the modern math classroom.

In a previous post, I discussed algorithms for finding the day-of-week when given a Gregorian or Julian calendar date. If you have not read my post How to Find the Day of the Week for a Given Date, I believe you will find it helpful to read it before continuing because the floor function and mod operator are fully explained. The algorithm for finding the day-of-week given a Gregorian calendar date is given below. This algorithm was also selected for this post because it’s relatively easy to implement in Excel or the TI-BASIC programming language. In my opinion, it’s important that high school students learn the basics of how to use these powerful tools.

coding_fig1

The source code of the TI-BASIC program that implements the Gregorian calendar day-of-week algorithm is given below. I indented some lines of code to make the structure of the program easier to understand, but code lines in the TI code editor are left justified. Notice that each line of code starts with character ‘:’ which is automatically inserted by the code editor with each new line of code. After a bit of study, one can easily learn how to translate many algorithms into TI-BASIC code; almost line by line. There are abundant online resources where one can learn how to program in TI-BASIC. In fact, I had to do a bit of research to write this post.

coding_fig2

Shown below is the program input and the resulting output after a single run of the TI-BASIC program above. The bold face text is the input the user would enter for the date 12 February 1809. After carefully studying the day-of-week algorithm, the TI-BASIC source code, and a single run of the program, the TI-BASIC code makes perfect sense.

coding_fig3

An Excel spreadsheet implementation of the Gregorian day-of-week algorithm is shown below. Note that the text in column B cells of the spreadsheet only serve to clarify what the spreadsheet is about, and to describe what the cells C4 through C13 represent. The spreadsheet formulas (invisible in this view) in cells C7 through C13 generate the numerical and text cell values the user sees. When cells C4, C5 or C6 are changed, cells C7 through C13 are automatically updated.

coding_fig4

The reason spreadsheets are so powerful is that cells can contain very complex formulas that determine the numeric or text content of the cell that contains the formula. Shown below are the formulas in cells C7 through C13. I find it fun and interesting to Google a formula that will allow me to easily solve my problem. Notice that the formulas in cells C12 and C13 are broken up into multiple lines, however, formulas in any actual spreadsheet cell are entered as a single continuous string of characters where the first string character is ‘=’.

coding_fig5

Some Final Comments, Observations and Suggestions

  • For beginning coders, give students a pseudocode description of an algorithm and then have them implement the algorithm in TI-BASIC or in a spreadsheet. After students learn how to translate statements in an algorithm into computer code, they are ready to start learning how to develop algorithms.
  • Pick problems that relate to their current course work that are relatively easy to solve, but also time consuming and tedious. Students now have a reason to want to learn how to create an algorithm and write code to implement the algorithm.
  • The Common Core Standards for Mathematical Practice do not directly address coding, however, coding activities can certainly help promote the goals of the Common Core Standards.
  • Steve Jobs once said the learning how to program computers is a great way to teach people how to solve problems and reason logically.
  • Coding can become addictive. Years ago, a social studies teacher at my high school reported that parents were complaining that their children were spending too much time outside of class writing Apple Macintosh HyperCard stacks for a social studies class project. The social studies teacher only had to present the project to his class and gave students a short introduction to the coding in the HyperCard language. Students quickly became hooked and simply ran with the project. One class project required over 60 floppy discs to hold the HyperCard stacks!
  • It’s not uncommon to find computer programmers who were music majors in college.
  • Teachers should remind their students that many women have made important contributions to computer science. Ada Lovelace (1815 – 1852), the only legitimate child of the famous poet Lord Byron, was an English mathematician and writer. Around 1843, Ada published an elaborate set of notes that many historians consider to be a description of the first computer program. She also envisioned computers doing much more than just numerical calculations. Rear Admiral Grace Hopper (1906 – 1992), nicknamed “Amazing Grace,” began her career teaching mathematics at Vassar in 1931, and was promoted to associate professor in 1941. In 1934, she earned a Ph. D. in mathematics from Yale. Later she served in the U.S. Navy and other civilian organizations devoted to the development of computer systems and programming languages. Hopper believed computer languages should be similar to the English language rather than the machine language of computers. She made significant contributions to the development of COBOL (COmmon Business-Oriented Language) which is still used in many business applications.

How to Find the Day of the Week for a Given Date

Pope Gregory VIII (1502-1585)
Pope Gregory VIII (1502-1585)

A calendar is a fundamental tool that we routinely use to plan and organize our lives. We rarely think about the many different types of calendars that mankind has used over the centuries. In this post I will discuss the difference between the Julian and Gregorian calendars, and present algorithms for finding the day of week for a given Julian or Gregorian calendar date. Hopefully teachers and parents will use this post to create a variety of interesting mathematical activities to give students practice with basic math operations, and develop the ability to maintain concentration by following the steps in a somewhat complicated algorithm. Answer keys can be easily created by accessing an online Day-of-Week calculator.

The Julian calendar was introduced in 46 BC by Julius Caesar, and Pope Gregory VIII introduced the Gregorian calendar in 1582. A steady shift in the date of Easter was the motivation for adopting the Gregorian calendar by the Catholic church. Other names for the Gregorian calendar are the Western calendar and Christian calendar. Countries such as Italy, France and Spain adopted the Gregorian calendar shortly after it was introduced, but England did not adopt the Gregorian calendar until 1752. Russia didn’t convert to the Gregorian calendar until 1918 because the Gregorian calendar had its origin in the Roman Catholic church. The Gregorian calendar is now the most internationally used civil calendar. If you do any type of historical research, it’s important to know whether a date is a Julian or Gregorian calendar date. Dates in time are not necessarily simple facts.

So what is the essential difference between the Julian and Gregorian calendars? Both calendars have leap years, but leap years occur slightly less often in the Gregorian calendar than in the Julian calendar. I will give an intuitive explanation of leap years in a calendar by considering Earth orbits having different periods.

  • In the Julian calendar, the mean length of a year equals 365.25 days = 365 ¼ days. To account for the extra ¼ day each year, an extra day is added to February in all years that are multiples of 4 such as 1628, 1752, 1800 and 1964.
  • Now suppose that the length of a year equals 365.2 days = 365 1/5 days. To account for the extra 1/5 day each year, the calendar would add an extra day in February in all years that are multiples of 5 such as 1775, 1800, 1945.and 2120.
  • Next suppose that the length of a year equals 365.5 days = 365 ½ days. To account for the extra ½ day each year, the calendar would add an extra day in February in all years that are multiples of 2 such as 1778, 1802, 1946 and 2136.
  • In the Gregorian calendar, the mean length of a year equals 365.2425 days. To account for the extra 0.2425 days each year, it was decided to add an extra day in February in the years that are multiples 4 or 400, but not multiples of 100. Hence the years 1600, 2000, 2400 and 2800 are leap years, but 1700, 1800, 1900 and 2100 are not leap years. All other years that are multiples of 4 such as 1776, 1812, 1936 and 2008 are leap years.

Before I can show you the Julian and Gregorian calendar algorithms for finding the day of week for given a date, I need to explain how the floor(x) function and binary mod operator works. The floor(x) function rounds the input value x down to the nearest integer. The p mod q operation gives us the remainder when integer p is divided by integer q ≠ 0. If p or q is negative, different programming languages will produce different mod operator results. In this post, it’s only necessary to deal with integer values of p and q such that p ≥ 0, and q > 0. The text box below illustrates how these functions work.

day_of_week_txtbx1a

The text box below describes Zeller’s Day-of-Week algorithm for Gregorian calendars. Experienced computer programmers or veteran spreadsheet users will find it easy to implement the algorithm in a computer program or spreadsheet. The algorithm should give correct results until about year 4900.

day_of_week_txtbx2a

The two text boxes below show how the Gregorian Day-of-Week algorithm can be applied. I find it interesting and fun to pick significant historical dates. Since England adopted the Gregorian calendar in 1753, the Gregorian calendar must have been adopted in the United States by 1800.

day_of_week_txtbx3a

day_of_week_txtbx4a

The text boxes below show how the Day-of-Week algorithm for Julian calendars. As previously mentioned, it’s important to know if a date is a Julian or Gregorian calendar date. In the two examples for Isaac Newton’s birthday, note that one date is a Julian calendar date and the other is a Gregorian calendar date. I’m sure Newton would have preferred that future historians report his Julian date of birth because it’s nicer for a Christian to say they were born on Christmas day 1642 rather than on January 4, 1643.

day_of_week_txtbx5

day_of_week_txtbx6

day_of_week_txtbx7

Orbit and Rotation of Planet Earth

earth

As we gaze across a beautiful valley or stare in awe at a distant mountain, it is easy to forget that we are on a spinning platform that is traveling on an elliptical orbit around the sun at an average speed of 66,600 miles per hour. I find this seemly unending journey truly amazing. In this post, I would like to take a look at some of the facts that mankind has learned about this journey.

Before Nicholas Copernicus (1474 – 1543), many people thought that the Sun, planets, and stars rotated about the Earth, and each planet in turn rotates on its own private circular arc. This complicated Earth centered view of nature became so entrenched that it became an article of faith in the Catholic Church. In fact, the Catholic Inquisition threated Galileo (1564 – 1642) with torture on the rack unless he publicly retracted his belief in the Sun centered circular orbit Copernican world system. Galileo publicly retracted his belief in the Copernican world view and was spared torture on the rack, but spent the remaining years of his life under house arrest.

Johannes Kepler (1571 – 1630) discovered three laws of planetary motion which is a relatively simple description of planetary motion. (You may find it helpful to read my post Demonstrating Dynamics in a Mathematical Model.) Kepler’s first law stated that the orbit of a planet around the Sun is an ellipse where the Sun is located at one of the two foci of the ellipse. An ellipse is a very special curve where every point P on the ellipse, the distance from P to one focus point plus the distance from P to the other focus point, is a constant. The diagram below shows an ellipse with foci at F1 and F2, length of major axis = 10 units, length of minor axis = 6 units, and center point at (0, 0). For very point P on an ellipse, the sum of the distances from point P to the two focus points equals the length of the major axis. As indicated in the diagram below, an ellipse can be drawn by first anchoring the endpoints of a length of string on a piece of paper or cardboard. Use a pencil to make the string taunt, and then trace the curve by keeping the string taunt as you move the pencil along the elliptical curve.

earth_orbit_fig1

To better understand planetary orbits, it’s necessary to understand what we mean by the eccentricity of an ellipse. If a = half the length of the major axis, and c = the distance from the center to a focus point, then the eccentricity e of the ellipse = c/a. Thus elliptical eccentricity e ranges from 0 to 1. If e = 0, the ellipse is a circle, and if e = 1, the ellipse degenerates to a line segment with foci at the endpoints of the major axis. (By definition, the eccentricity of a parabola equals 1, and the eccentricity of a hyperbola is greater than 1.) The two diagrams below show eccentricity values for five ellipses where the ellipse and foci have the same color. Note that eccentricity approaches 1 as the foci approach the endpoints of the major axis. The eccentricity of the Earth’s orbit = 0.0167086. This is the reason, I suspect, that Copernicus thought the Earth’s orbit was circular, not elliptical. Since half the length of the major axis of the Earth’s elliptical orbit equals 149.6 million km, it follows that the Sun is 0.0167086*149.6 million km = 2.4996 million km from the center of the Earth’s orbit.

earth_orbit_fig2

earth_orbit_txtbx1

The two diagrams below show an exaggerated oval shape of the Earth’s yearly orbit around the Sun; the purpose is to draw your attention to key time periods in a year. Orbital dates can vary slightly from year to year, and therefore the dates shown in the diagrams are approximate. The following points describe the key time periods in Earth’s orbit:

  • At the point of perihelion, the Earth is at its closest point of 147.1 million km from the Sun. In northern latitudes, the direction of the Earth’s polar axis is tilted away from the Sun, which results is less direct sunlight and cooler average temperatures.
  • At the point of aphelion, the Earth is at its farthest point of 152.1 million km from the Sun. In northern latitudes, the direction of the Earth’s polar axis is tilted towards the Sun, which results in more direct sunlight and warmer average temperatures.
  • The equinoxes and solstices divide a year into approximately four equal time periods or seasons. At the fall and spring equinoxes, the Earth’s polar axis is perpendicular to the plane of the Earth’s orbit which results in equal periods of daylight and darkness. At the summer and winter solstices, the Earth’s polar axis is tilted towards or away from the Sun which results the longest and shortest days of the year.
  • At the point of perihelion, the Earth reaches its fastest orbital speed of 109,080 km/hour.
  • At the point of aphelion, the Earth reaches its slowest orbital speed of 105,480 km/hour.
  • The average or mean orbital speed of the Earth equals 107,200 km/hour or 66,600 mph.
  • It takes the Earth 365.256 363 004 days to orbit the Sun. Because of the extra 0.256 363 004 days in a year, it’s necessary to add an extra day to our calendar every four years in February. To be more specific, leap years occur in years that are multiples of 4 or 400, but not multiples of 100. Hence the years 2000 and 2400 are leap years, but the years 1800, 1900, 2100, 2200 and 2300 are not leap years. All other years that are multiples of 4 such as 1868, 1936 and 2016 are leap years.
  • In the diagrams below, note that seasons in the northern and southern hemispheres occur at opposite times of the year.

orbit_northern

orbit_southern

Everyone knows that the Earth does a daily rotation about its polar axis. Here are a few facts about the Earth’s rotation.

  • The Earth rotates in about 24 hours with respect to the Sun and once every 23 hours, 56 minutes and 4 seconds with respect to the stars.
  • The Earth’s rate of rotation rate is slowing with time. Atomic clocks have demonstrated that a modern-day is about 1.7 milliseconds longer than a day in 1900. (I doubt that this fact will be reported in the national news any time soon.)
  • In the northern hemisphere, the Earth rotates east towards the Sun in the morning hours and away from the Sun in the west in the evening hours. This is the reason that the folks in New York see the Sun about 4 hours before the folks in California.
  • Technically speaking, there is no such thing as sunrise and sunset. The Sun only appears to rise and set in the sky because of the rotation of the Earth. Buckminster Fuller who was an American architect (geodesic domes) and systems theorist suggested that we should the terms sunsight and sunclipse because the terms sunrise and sunset do not accurately describe what we observe.
  • The Earth’s rate of rotation is not constant. The true solar day is about 10 seconds longer at the point of perihelion and 10 seconds shorter at the point of aphelion.
  • At the equator, the Earth’s linear speed of rotation is 465.1 m/s, 1,674.4 km/h or 1,040.4 mph. At higher latitudes, the linear rate of rotation is reduced by a factor of Cos(angle of latitude). Example: The Kennedy Space Center is located 28.59° North latitude and has a linear rotation rate of 1,674.4Cos(28.59°) = 1,470.23 km/h = 913.56 mph.

I will close this post about an epiphany I experienced many years ago. As I recall, it was about March of 1975 when my neighbor Chuck Beck invited me into his back yard to view Sun spot activity. Chuck had placed his expensive Celestron telescope with an attached power cord and lens filter on his picnic table. As I adjusted a knob on the Celestron in order to keep the Sun in view, I had the same physical sensation in my legs as if I was riding a merry-go-round. I thought to myself, “Johnson you really ARE on a moving and spinning platform in space!”

Why is the Product of Two Negative Numbers a Positive Number?

Morris_Kline1
Morris Kline (1908-1992)

When I ask most adults or high school students what is -5 times -10, I usually get the correct response of positive 50 or just 50. When I ask them if they can give me simple explanation or an example to show why the product or two negative numbers is a positive number, they can’t.  Students seem to remember the rule “two negatives make a positive”, but some forget that this rule applies to the product or quotient of two real numbers, but not to the sum or difference of two real numbers. I believe it’s fair to say that many lower level math textbooks and math courses treat this rule as just a simple mathematical fact of life, and rarely if ever give an intuitive explanation of why this rule is true.

The purpose of this post is to give examples of intuitive explanations as to why the product of two negative real numbers is a positive real number. It’s important that mathematics makes sense to students, and math should not be just a bunch of somewhat arbitrary rules that can be used to get the right answer. I have used and still use many of these examples when I explain why the product of two negative numbers is positive number. Some of these examples are probably familiar to many readers of this post. The first three examples are my favorites, and I use them exclusively. In all of the examples, it is assumed that students understand multiplication is repeated addition, and students have a basic understanding of the addition rules for positive and negative numbers. Of course, this is a big assumption.

Before I show you my examples, I will give you a brief description of the state of math education on the 1960’s and 1970’s in the United States. The Russian launch of the satellite Sputnik on October 4, 1957 caused a national panic which led to in complete revision of math and science curriculums. The revised math curriculum was called “new math” which was based on the advice of university research mathematicians and other professional mathematicians; not on the advice of wise and experienced math educators. New math placed emphasis on set theory, the fundamental properties of real numbers, functions, relations and the symbols of modern abstract mathematics. The new math approached mathematics from a more rigorous and abstract point of view as opposed to an intuitive and practical point of view. Students and parents found the new math strange and mystifying. Like most new waves in education, the new math was eventually replaced by another new wave. I clearly remember one nationally renowned math educator at a NCTM national convention in the 1980’s state (almost word for word), “Our research shows that a more rigorous abstract approach of teaching math only works with very bright students.” Of course, every experienced math teacher in the audience already knew this. The new math failed because you can’t make an abstraction (identify common core properties of different objects/systems) if you don’t have a base of knowledge and experience from which to make an abstraction. Since elementary, middle school, high school students, and normal adults don’t have this crucial base of knowledge and experience, it should be no surprise that the new math failed. By the early 1980’s, math education started to move in a new direction.

My first example is taken from the book Why Johnny Can’t Add: the Failure of the New Math written by Morris Kline (1908-1992) who was a scientist and professor of mathematics at NYU. One of Professor Kline’s core beliefs is that math concepts should be explained by using concrete examples that students can relate to. The example below is similar to the example Kline used to explain the product rule for positive and negative numbers.

Suppose homeowner Bob hires neighbor boy Bill to do general yard work at $10.00/hour. We have four situations to consider; two from Bob’s point of view and two from Bill’s point of view. Bill is gaining $10 every hour he works and Bob is losing $10 every hour every hour Bill works.

  • 4 hours in the future, Bill will be $40 richer. (+4 * +10 = +40)
  • 4 hours ago, Bill was $40 poorer. (-4 * (+10) = -40)
  • 4 hours in the future, Bob will be $40 poorer. (+4 * (-10) = -40)
  • 4 hours ago, Bob was $40 richer. (-4 * (-10) = +40)

The next example involves filming a person walking forward at the rate of 4 ft/sec for 10 seconds, and then filming the same person walking backwards at the rate of 4 ft/sec for 10 seconds. By running the two films forwards and backwards in a film projector, we have four cases to consider. Let film A show the person walking forward, and film B show the person walking backwards. (It’s fun to pace back and forth across the room to illustrate this example.)

  • If film A is run forward in the projector for 10 seconds, we will see the person walk forward 40 ft. (+4 * +10 = +40)
  • If film A is run backwards in the projector for 10 seconds, we will see the person walk backwards 40 ft. (4 * (-10)) = -40)
  • If film B is run forward in the projector for 10 seconds, we will see the person walk backwards 40 ft. (-4 * 10 = -40)
  • If film B is run backwards in the projector for 10 seconds, we will see the person walk forward 40 ft. (-4 * (-10)) = 40)

The next example is probably familiar to many readers. From my personal experience, a few students find the two previous examples somewhat confusing, but the pattern approach illustrated in the text box below seems to make the most sense to students. The first 4 rows of the table follow from the fact that the product of a positive number and a negative number is a negative number which makes perfect sense to most students. As the value of numbers in column A decrease by 1, the product of A and B gets bigger by 5. When A decreases from 0 to -1, I tell by students they can’t change horses in midstream; so the pattern must be maintained by increasing the product by 5 when A is decreased by 1.

prodnegnumberstxtbx1

The next example hinges on the idea that multiplication is repeated addition under the following rules: (Rules are easier to understand if m and n are integers.)

  • If m is positive, then m * n equals n added to itself m times.
  • If m is negative, then m * n equals the opposite of n added to itself |m| times.

The text box below illustrates how these rules work then n = ±4 and m = ±6.

prodnegnumberstxtbx2

My last example uses the properties of real numbers and mathematical reasoning to demonstrate  (-3)(-5) equals (3)(5) = 15. The demonstration hinges on the following properties of real numbers:

  • The distribute property
  • A negative number times a positive number is negative. (Previously established)
  • m + n = 0 if and only if m and n are opposites of each other.

Because this demonstration requires a higher level of mathematical maturity, I advise against showing this demonstration to younger learners.

prodnegnumberstxtbx3

I will close this post with a discussion of the concept of positive and negative numbers by looking at two different number systems. You may be surprised to learn that in some number systems, the concept of positive and negative numbers does not exist. My post, A Simple Way to Introduce Complex Numbers, discusses the basics of complex numbers.

The set of real numbers:

  • For every real number x: x = 0, x < 0, or x > 0.
  • Every real number x not equal to zero has a unique opposite which is denoted by the symbol –x.
  • The opposite of a real number is the same as the additive inverse of a real number.
  • Real numbers x and y are opposites of each other if and only if x + y = 0.
  • If x > 0, then x is a positive number and –x is a negative number.
  • If x < 0, then x is a negative number and –x is a positive number.
  • The angular direction of all positive numbers is to the right or 00.
  • The angular direction of all negative numbers is to the left or 1800.
  • For all real numbers x and y, x*y = (-x)(-y). Note: This is true for any pair of real numbers. The expression (-x)*(-y) does not indicate we are multiplying two negative real numbers.
  • The symbol –x means the opposite of x; not negative x.

The set of complex numbers:

  • All complex number z can be expressed in the form z = a + bi where a and b are real numbers and i is the unit imaginary number such that i2 = -1.
  • Every complex number z not equal to zero has a unique opposite which is denoted by –z.
  • If z = a + bi, then –z = -a – bi.
  • The opposite of a complex number is the same as the additive inverse of a complex number.
  • Complex numbers w and z are opposites of each other if and only if w + z = 0.
  • The angular direction of complex number z can range from 00 to 3600.
  • In general, complex numbers are neither positive or negative because the angular direction of a complex number can range from 00 to 3600; not just 00 or 1800.
  • For all complex numbers w and z, w*z = (-w)(-z). Note: This is true for any pair of complex numbers. The expression (-w)*(-z) does not indicate we are multiplying two negative complex numbers because complex numbers in general don’t have a positive or negative property.
  • The symbol –z means the opposite of z; not negative z.

The Famous Cantor Ternary Set

infinity3headerfigMany mathematicians consider the Mandelbrot set to be the most complicated and interesting set in all of mathematics. In contrast, the Cantor set is deceptively simple, but it has properties that are just as counter-intuitive and astonishing as some of the properties of the Mandelbrot set. Henry John Stephen Smith discovered the Cantor set in 1874, and Cantor introduced it to the world in 1883. As mentioned in a previous post, Cantor’s work helped lay the foundation upon which much of modern mathematical analysis rests. After studying some of Cantor’s mathematics in grad school, I gained a deeper understanding of fundamental concepts in calculus. When you think that you understand a concept fairly well and later learn that your understanding is a bit lacking, it can be humbling. If you have not read my first two Cantor posts, Infinity Does Not Necessarily Equal Infinity, and Why There Are Infinity Many Different Levels of Infinity, I strongly suggest that you read them before continuing. The concepts presented in this post heavily depend on an understanding of the concepts presented in those posts. As you continue to read this post, please slow down and read carefully. My intention is to be as clear and precise as possible with very limited use of the symbols of abstract mathematics. Cantor is very deep, and therefore this post will not be easy reading for many. Don’t get frustrated and give up if you don’t get it on the first or second read. If you are persistent, you will get it. You will find that the struggle was well worth your time and effort.

As I see it, part of the difficulty in understanding Cantor is that there is a vast difference between mathematical objects and physical objects. There is a theorem in mathematics that tells us that no matter how close one real number is to another real number, say 10-100 apart, there are infinitely many rational numbers between them.  Mathematicians elegantly describe this theorem as follows: The rational numbers are dense in the real numbers. This theorem is certainly not obvious to a normal person, and it seems to be counter-intuitive nonsense. We forget that mathematical points/numbers and curves have no thickness. The set of real numbers is far more complicated and mysterious than we realize. A pure mathematician can cut any interval on a real number line into infinitely many pieces without blinking an eye, but he or she can only cut a piece of lumber into a finite number of pieces. If two atoms are sufficiently close to each other, there is no room to fit another atom between them because atoms have a thickness property. As far as I know, no physical object contains infinitely many atoms. The speed of everything is finite. Pure mathematical knowledge is obtained through a mental activity of logical reasoning from a set of postulates or axioms. Knowledge in physics is obtained through a process of observation, inductive logic, deductive logic and experimentation with physical objects. To say that two real numbers are “just a little bit apart” is imprecise nonsense to a pure mathematician. For a pure mathematician, two reals are equal or they are not equal, but never just a little bit apart. A math professor once told me: “A woman is pregnant or she is not pregnant, but she is never just a little bit pregnant.” Cantor’s work reflects the mind of a pure mathematician who deals with mathematical objects that exist only in the mind of man and God. If God directly communicates math concepts to humans, as Cantor believed, God must be a jokester who is roaring with laughter as He watches us struggle to understand Cantor. If you understand and accept Cantor’s definition of equal cardinality of two sets, his counter-intuitive and absurd theorems are not so counter-intuitive and absurd after all. My three Cantor posts reflect my struggle to understand Cantor.

The purpose of this post is to give the reader a description of the Cantor set and some of its basic properties which seem counter-intuitive, preposterous, absurd, and astonishing. I will avoid the language of formal abstract mathematics as much as possible, and provide numerous explicit examples that illustrate the concepts presented.  Keep in mind the following concepts, definitions, and facts as the construction of the Cantor set is explained.

  • Open interval (p, q) equals all real numbers between p and q, but not including p or q.
  • Closed interval [p, q] equals all real numbers between p and q, and including both p and q.
  • Two sets are disjoint if and only if the intersection of the sets equals the empty set.
  • Numbers expressed in binary or base 2 format have only the digits 0 or 1.
  • Numbers expressed in ternary or base 3 format have only the digits 0, 1, or 2.
  • Numbers expressed in decimal or base 10 format have only digits 0 through 9.
  • The terms “all”, “each”, and “every” mean without exception.
  • “If and only if ” means whenever the first statement is true, the second statement is true and vice versa.
  • A real number is a Cantor number if and only if it’s in the Cantor set.

To get started, let’s see how the Cantor ternary set is constructed. Like the Mandelbrot set, the Cantor ternary set is a fractal because it’s created by an infinite iterative procedure that determines what numbers are in the set. Numbers in the Mandelbrot set are complex numbers (a + bi) in a region of the complex coordinate plane. All Cantor numbers are real numbers contained in [0, 1]. Like the Mandelbrot set, construction of the Cantor set can only take place in the human intellect.

Construction of the Cantor set starts with the closed interval [0, 1] on the real number line with nothing removed. This interval is represented by the top solid bar in the graph below. At each step in the construction, the open middle 1/3 of each closed interval is removed to produce a new set of closed intervals. The Cantor set equals the set of points/numbers remaining in the closed interval [0, 1] after infinitely many iterations. The graph below depicts the closed intervals remaining after each of the first six iterations in the construction. Every horizontal line of the graph depicts the union of a set of closed intervals, and this union of closed intervals contains all of the Cantor numbers. It might appear that the Cantor set is empty, but you will later see that there are as many numbers in the Cantor set as there are real numbers in [0,1]. We end up with the same number of points we started with! In other words, the cardinal number of the Cantor set equals the cardinal number of the set of the real numbers in [0,1]. What remains in [0, 1] is fractal dust. So the Cantor set is nothing more than fractal dust that has the same cardinality as the set of reals in [0, 1].  (That is absurd! How can that be possible?)

infinity3fig1a

The text box below lists the closed intervals remaining after each of the first 5 iterations in the construction of the Cantor set. Note that the endpoints of the closed intervals are Cantor numbers, and the number of endpoints doubles on each iteration. After the 5th iteration, we have found at least 64 Cantor numbers. Later you will see that there are numbers between the endpoints of closed intervals that are also in the Cantor set. Furthermore, all Cantor numbers are contained somewhere inside the union of the disjoint closed intervals at every step in the construction. Example: 12/13 is contained in [8/9, 9/9], 12/13 is in the Cantor set, and 12/13 is not an endpoint of any of the closed intervals. Later you will see why 12/13 is a Cantor number. As an exercise, you could explicitly list all 64 closed intervals remaining after the 6th iteration. This may help you better understand how the Cantor set is constructed.

infinity3txtbx1

Before I go any further, I need to discuss a theorem that tells us how to calculate the value of an infinite geometric sum. In this post, the infinite geometric sum formula is used to calculate the value of a binary or ternary expansion of a number with infinitely many digits. Infinite geometric sums are calculated follows:

  • Let a equal the value of first term of the sum.
  • Let r equal the constant multiplier of the terms where |r| < 1.
  • Sum = a + ar + ar2 + ar3 + . . . = a(1/(1 – r))

The text box below shows how to apply the infinite geometric sum formula to calculate the binary or ternary expansion of a real number that has infinitely many digits.

infinity3txtbx2

We can now see why the sum of the lengths of all open intervals removed from the interval [0, 1] equals 1. This is astonishing and leads to counter-intuitive conclusions. The text box below lists all of the disjoint open intervals removed from [0, 1] in the first 5 iterations. None of these open intervals contains a Cantor number. The sum of all removed open intervals = 1/3 + 2/9 + 4/27 + 8/81 + . . . = 1/3(1 / (1 – 2/3)) = 1. The length of the interval [0, 1] = 1, and the total of the lengths of all of the infinitely many open disjoint intervals removed equals 1. Therefore after infinity many iterations, the sum of the lengths of the closed disjoint intervals that contains the Cantor set must equal 0. All that remains is fractal dust. Mathematicians say that the Cantor set has Lebesgue measure zero. Later you will see that the cardinal number of [0, 1] equals the cardinal number of the Cantor set. (How is it possible that the cardinal number of fractal dust equals the cardinal number of all reals in [0, 1]? That is absurd!)

infinity3txtbx3

It turns out that we can easily determine whether or not a real number x is a Cantor number if we know the ternary expansion of x. An important theorem about Cantor numbers states that every real number x in [0, 1] is a Cantor number if and only if there exists a ternary expansion of x that uses only digits 0 and 2. The proof of Cantor’s theorem hinges on this theorem. We will accept this theorem without a proof. The text box below shows the ternary expansion of various rational numbers in the Cantor set. Notice that some Cantor numbers like 1/27 and 1/3 have two equivalent ternary expansions. What’s important to understand is that the ternary expansion of all Cantor numbers, rational or irrational, can be uniquely expressed using only ternary digits 0 and 2. The ternary expansion of 1/2 = (0.111 . . .)3, and 1/2 is not in the Cantor set. It’s not important to know how to convert an arbitrary number to ternary format. Note that the ternary expansion of 12/13 = (0.220220220 . . .)3. If you are bored and want to add a little spice to your life, find the first 100 digits of the ternary expansion of 1/π or 1/e.

infinity3txtbx4

Before we can get to the proof of Cantor’s theorem, we need to understand one more important idea. Every real number, rational or irrational, in the closed interval [0, 1] can be expressed as a unique binary coded number of the form (0.b1b2b3 . . .)2 where each binary digit bi equals 0 or 1. Some examples: 0 = (0.0)2, 1 = 1/2 + 1/4 + 1/8 + 1/16 + . . . = (0.1111 . . . )2, 2/3 = (0.10101010 . . . )2 and 0.875 = (0.111)2. What’s important to understand is that there is a unique binary expansion of the form just described for every real number in [0, 1]. How to find the binary expansion of an arbitrary number is not important; we just need to know that it can be done.

Cantor’s theorem states that the cardinal number of the set Cantor numbers equals the cardinal number of the set  reals in  [0, 1]. In other words, the number of Cantor numbers equals the number of reals in [0, 1]. A proof of Cantor’s remarkable theorem can now be given and it goes something like this:

  • Let C equal the set of ternary expansions, using only the digits 0 and 2, of all reals in [0, 1]. Therefore C equals the set of Cantor numbers and C is a proper subset of the reals in [0, 1]. C is the fractal dust that is contained in the closed interval [0, 1].
  • Let R equal the set of all binary expansions of the reals in [0, 1]. Therefore R equals the set of all reals in [0,1].
  • Construct a one-to-one function f(x) with domain C and range R that matches all elements of C with all elements of R as follows: (This construction is so simple.) Let x equal any element of C. If the nth ternary digit of x = 0, then set the nth binary digit of f(x) = 0. If the nth ternary digit of x = 2, then set the nth binary digit of f(x) = 1.

Examples: f((0.20022202)3) = (0.10011101)2  and f((0.020220222)3) = (0.010110111)2

  • For every element y in R, there is an element x in C such that f(x) = y.

Example: If y = (0.11000101)2, then x = (0.22000202)3.

  • From the results discussed above and the definition function f, Cantor’s theorem easily follows. Since the cardinal number of the reals in [0, 1] equals the cardinal number of the set of all real numbers, it follows that the cardinal number of the Cantor set equals the cardinal number of the set of all real numbers.

A Couple of Comments:

How to construct the inverse function of f(x) is obvious. I don’t know what the graph of f(x) looks like, and I really don’t care. It’s only important to know that f(x) is a one-to-one function that pair wise maps set C to set R. Perhaps it’s a bit too dramatic and somewhat misleading to say “The number of Cantor numbers equals the number of reals in [0, 1].” It’s probably better to just say “There is a one-to-one function that pair wise matches the set of Cantor numbers with the real numbers in [0, 1].” On the other hand, how else can we compare the number of elements in two sets? If you understand and accept Cantor’s definition of equal cardinality, Cantor’s work makes more sense. Note that the above proof did not use the technique of proof by contradiction.

There is also a diagonal proof of Cantor’s theorem which uses the technique of proof by contradiction. My post Infinity Does Not Necessarily Equal Infinity gives Cantor’s famous diagonal proof which states that the cardinality of the set of real numbers is strictly greater than the cardinality of the set of counting numbers. The diagonal proof can be easily modified to show that the cardinality of the Cantor set is strictly greater than the cardinality of the set of counting numbers. This is easily accomplished by just replacing the strings of binary digits with strings of ternary digits consisting of 0 or 2 only. Therefore the cardinality of the Cantor set and the cardinality of the set of real numbers is strictly greater than the cardinality of the set of counting numbers. The continuum hypothesis states that there is no cardinal number between the cardinal of the counting numbers and cardinal number of all real numbers. If we accept the continuum hypothesis, it follows that the cardinality of the Cantor set equals the cardinality of the set of all real numbers; not just the reals in [0, 1].

I will close this post with a short discussion of the Cantor ternary function. Warning! This is not the function that was defined in the proof of Cantor’s theorem above. Basic properties of the ternary function and its graph are shown below. After a student studies the Cantor ternary function in a graduate level math course, he or she gains a deeper understanding of concepts learned in undergraduate level math courses. Functions are no longer just some formula like f(x) = 3x2 – 2x + 1 or g(x) = 3Cos(x) – 5. The first derivative of the ternary function can’t be found by applying the standard differentiation rules because there is no explicit formula for it. Wikipedia has an excellent article on the Cantor function.

infinity3txtbx5

infinity3fig2

Why There Are Infinitely Many Different Levels of Infinity

Georg Cantor circa 1870
Georg Cantor circa 1870

Because a recent post about the German mathematician Georg Cantor (1845-1918) generated a great deal of interest, I decided to do two more posts about Cantor’s contributions to mathematics. Of course, I find Cantor’s mathematics fascinating, and apparently many readers found the content of that post intellectually stimulating as well. You might think that Cantor’s work amounts to a bunch of clever and interesting mathematical mind games, but this is not the case. His work helped lay the foundation upon which much of modern mathematical analysis rests. If you have not read my first Cantor post, Infinity Does Not Necessarily Equal Infinity, I strongly suggest that you read it before continuing. The concepts presented in this post heavily depend on an understanding of the concepts presented in that post.

The purpose of this post is to show how Cantor proved that there are infinitely many levels of infinity or there are infinitely many different infinite cardinal numbers! The purpose of the next Cantor post will be to give readers a general description of the Cantor ternary set which is counter-intuitive, preposterous, absurd, and astonishing. I will not delve deeply into formal abstract mathematics, because my understanding of Cantor’s work only scratches the surface of his deep mathematics.

To get started, I will do a quick review of some basic definitions and concepts in set theory.

  • A set can be any collection of objects such as numbers, character symbols, cars, people, cats, etc.
  • Set A is a subset of set B if and only if every element of set A is an element of set B.
  • Let A equal any subset of B. A is a proper subset of B if and only if there is an element in B that is not in A.
  • The null or empty set is a set that contains no elements. The symbols { } or Ø denote the empty set.
  • Sets {0}, {Ø}, and {{ }} are not the empty set because each of the three sets contains an element.
  • The null set is both a subset and proper subset of every set.
  • Set A equals set B if and only if the sets are subsets of each other.
  • In set theory and Boolean algebra, the word “or” means “one or the other and possibly both.” In contrast, when a parent uses the word “or” with a child, the parent means “one or the other, but not both.”
  • In set theory and Boolean algebra, the word “and” means “both are in the set” or “both are true.”
  • The union of sets A and B, denoted by AB, is the set of elements that are in A or B.
  • The intersection of sets A and B, denoted by A ∩ B, is the set of elements that are in A and B.
The text box below uses sets of numbers to illustrate the set definitions above.
infinity2txtbx1

The power set of set A, denoted by P(A), equals the set of all possible distinct subsets of A. In other words, P(A) is just another set that contains all of the distinct subsets of set A. To get a better idea of what P(A) means, the text box below gives P(A) for different finite sets of counting numbers. Note that if set A has n elements, then P(A) has 2n elements.

To see why increasing the number of elements in a set by one causes the number of elements in the power set to double, consider how you could go about creating a list of all 32 subsets of the set {1, 2, 3, 4, 5}. The first 16 subsets of {1, 2, 3, 4, 5} are given by the power set of {1, 2, 3, 4}. The other 16 subsets of {1, 2, 3, 4, 5} can be obtained by forming the union of {5} with each of the 16 subsets of {1, 2, 3, 4}. You should later go ahead and list all 32 subsets of {1, 2, 3, 4, 5} and then all 64 subsets of {1, 2, 3, 4, 5, 6}. I’m very serious about this suggestion because it will help you learn to think in a different way and help you better understand the fundamental counting principle, permutations, and combinations. You may find this task tedious and boring, but you will be rewarded with a better understanding of fundamental counting concepts.

infinity2txtbx2

I can now explain the proof Cantor’s theorem which states that the cardinal number of P(A) is strictly greater than the cardinal number of A where A is any finite or infinite set. Cantor’s theorem can be used to show that there are infinitely many different infinite cardinal numbers. Recall from my first Cantor post that the cardinal number of a set equals the number of elements the set contains. Therefore the cardinal number of a google of water molecules equals 10100, and the cardinal number of a MLB active roster equals 25.  Also recall from my first Cantor post that the symbol for the cardinal number of the counting numbers is ℵ0, the symbol for the cardinal number of the real numbers is ℵ1, and ℵ0 < ℵ1.

For finite sets, Cantor’s theorem is obvious. If the cardinal number of finite set A equals n, then the cardinal number of P(A) equals 2n. For infinite sets Cantor’s theorem might seem obvious, but it’s much more difficult to prove. To make Cantor’s proof more comprehensible for infinite sets, I will first give a proof that shows that the cardinal number of P(C) is strictly greater than the cardinal number of C where C equals the set of counting numbers. Like many deep abstract mathematical proofs, Cantor’s proof uses the sophisticated technique of proof by contradiction. For set C, his proof goes something like this:

  • Assume that there is a one-to-one function f with domain C and range P(C) that matches the counting numbers in C with all of the elements of P(C). The text box below shows one of the infinitely many possible ways that we could create a matching rule for f. The order in which domain and range elements are listed makes no difference. The important point is that there exists a one-to-one function f such that the domain of f equals set C and the range of the function, all function values, equals the set P(C).
infinity2txtbx3
  • Construct a special subset M of the counting numbers as follows: (See the text box above.) Let set M equal all counting numbers n such that n is not contained in f(n). M is not the empty set because counting number j, such that f(j) = {   }, must be an element of M by definition.
  • Set M raises a contradiction as follows: There must be a unique counting number k such that f(k) = M. Either k is contained in M or k is not contained in M. If k is contained in M, then by the definition of set M, k is not an element of M. If k is not contained in M, they by the definition of set M, k is an element of M. Therefore the function f can’t exist. Hence there is no counting number k that matches with M, and the cardinal number of set P(C) is greater than the cardinal number of set C. (The contradiction is somewhat like damned if you do and damned if you don’t.)

Now let’s see how we can prove that the cardinal number of the set of real numbers is strictly less than the cardinal number of the power set of real numbers. We need only to modify the last proof a little bit to give us our proof. The following algorithm describes how to create the modified proof:

  • Let R equal the set of real numbers and the variable x equal any real number or element of R.
  • Assume that there is a one-to-one function f with domain R and range P(R) that matches the real numbers in R with all of the elements of P(R).
  • Construct a special subset M of the real numbers as follows:
    1. Let set M equal all real numbers x such that x is not contained in f(x).
    2. M is not the empty set because real number y, such that f(y) = {   }, must be an element of M by definition.
  • Set M raises a contradiction as follows:
    1. There must be a unique real number k such that f(k) = M. Either k is an element of M or k is not an element of M.
    2. If k is an element of M, then by definition of set M, k is not an element of M.
    3. If k is not an element of M, they by definition of set M, k is an element of M.
    4. Therefore function f can’t exist. Hence there is no real number k that matches with M, and the cardinal number of set P(R) is greater than the cardinal number of set R.
Using the proofs described above as a model, it’s relatively easy to prove that the cardinal number of P(A) is strictly greater than the cardinal number of set A where A is any infinite set. By letting our imaginations run wild and considering set expressions such as P(P(A)) and P(P(P(P(A)))), we can create as many different infinite cardinal numbers we wish.

 

If you were persistent enough to follow the logic of Cantor’s proofs, your head is probably about ready to explode from all of the mental exercise. You might be asking these questions:
  1. How will I ever apply set theory and cardinal numbers in my daily life? A: Probably never.
  2. Do many engineers and scientists use set theory and cardinal numbers? A: Very few.
  3. Name a math class that uses set theory? A: Venn diagrams to model probabilities of events in statistics.
  4. Who uses set theory on a regular basis? A: People who design computer logic circuits use Boolean algebra.
  5.  Is the study of set theory and cardinal numbers really just a mind game played by crackpot mathematicians? A: No – Cantor’s work helped create the foundation upon which much of modern mathematics rests.
  6. Should very bright and curious high school math students be exposed to some of Cantor’s ideas? A: Yes.
I will close this post with a bit of personal information about Cantor. Cantor was a devout Lutheran who acknowledged the Absolute infinity of God. He believed that his theories about different levels of infinity were communicated to him by God. Some contemporary Christian theologians viewed Cantor’s work as a direct challenge to the idea that there is a unique infinity that only resides in God. For about the last 35 years of his life, Cantor suffered recurring bouts of depression. Most likely, the numerous vicious attacks on his work by many of his contemporaries contributed to his bouts of depression. Eventually Cantor’s work received praise and accolades from prominent contemporaries. In 1904, the Royal Academy awarded Cantor the Sylvester Medal which was the highest honor in mathematics. The brilliant mathematician David Hilbert said “No one can expel us from the Paradise that Cantor has created.” He spent the last year of his life in a sanatorium where he died on January 16, 1918.

 

Infinity Does Not Necessarily Equal Infinity

Georg Cantor
Georg Cantor (1845-1918)

A light year is about 6 trillion miles and the U.S. national debt reached 18 trillion dollars in 2015. Numbers of this magnitude are almost impossible to comprehend, but compared to infinity they are rather small. The German mathematician Georg Cantor (1845-1918) invented set theory and the mathematics of infinite numbers which in Cantor’s time was considered counter-intuitive, utter nonsense, and simply wrong. Many of Cantor’s contemporaries considered him to be nothing more than a charlatan. Set theory and the mathematics of infinite numbers are now part of mainstream mathematics.

To understand why Cantor upset so many mathematicians, I need to explain a basic concept of Cantor’s set theory. The cardinal number of a set or collection of objects equals the number of objects the set contains. Therefore the cardinal number of a gross of pencils equals 144 and the cardinal number of a mole of atoms is about 6.023 x 1023. For finite sets, the concept of cardinality is simple and straight forward, but for infinite sets the concept of cardinality can be counter-intuitive and utter nonsense. Cantor proved that the cardinal number of one infinite set can be greater than the cardinal number of another infinite set; infinity no longer necessarily equals infinity. Cantor also proved that there are infinitely many levels of infinity. In other words, there are infinitely many different infinite cardinal numbers!

What does Cantor mean when he says that two so seemly different infinite sets can have the same cardinality? Why are there as many real numbers between 0 and 1 as there are from –∞ to +∞? Why are there as many counting numbers as there are rational numbers? Why is the cardinality of the set of rational numbers less than the cardinality of the set of real numbers?  The purpose of this post is to provide answers to these questions without delving into formal abstract mathematics. If you want a mathematically rigorous discussion of cardinal numbers and set theory, take a graduate level course in set theory or point-set topology. My previous post Relations, Functions, and One-to-One Functions discussed concepts that will be used in this post and therefore readers may find it helpful.

To get started, I will do a quick review of the different types of real numbers. All real numbers are either rational or irrational. The set of rational numbers is composed of counting numbers, whole numbers, integers, and numbers that can be expressed as the ratio of two integers. The decimal expansion of all rational numbers starts to repeat in a pattern of fixed finite length at some point. The decimal expansion of an irrational number never starts to repeat in a pattern of fixed finite length. The text boxes below give examples of the different types of real numbers. Note that there is a pattern in the decimal expansion of n, but the length of the pattern increases. The term “real number” is unfortunate because it suggests that some numbers are valid and other numbers like the imaginary numbers are fake numbers.

infinitytxbx1

infinitytxbx2

Cantor uses the concept of cardinality to define when two sets have the same cardinality. Set A has the same cardinality as set B if and only if there is a one-to-one function that matches elements of A with elements of B such that the domain of the function is set A and the range of the function is set B. When both sets have a finite number of elements, this definition makes perfect intuitive sense. Example: When two bags of golf balls contain an equal number of golf balls, it’s easy to see how we can match the golf balls one-to-one, to show that the two bags of golf balls have the same cardinality. When both sets A and B have infinitely many elements, Cantor’s definition leads to a new and profound understanding of the nature of infinity. The matching rule for the one-to-one function in Cantor’s definition may be described by an equation or general algorithm that tells us how to match domain elements with range elements.

Using Cantor’s definition, let’s see why it makes sense to say that the set of real numbers between 0 and 1 has the same cardinality as the set of real numbers greater than 1. Initially, this seems preposterous. Two numbers are reciprocals if and only if the product of the two numbers equals 1. It’s a mathematical fact that every nonzero real number has a unique reciprocal and the reciprocals of two numbers are different if the numbers are different. If 0 < n < 1, then 1/n > 1. If n > 1, then 0 < 1/n < 1. Therefore the one-to-one function y = 1/x with domain equal to the open interval (0, 1) and range equal to the open interval (1, ∞) leads us to the conclusion that the open intervals (0, 1) and (1, ∞) have the same cardinality. Graph A below shows the graph of this function. If you think about it, the only practical way to show that two sets have the same cardinality is to show that there exists a one-to-one function that pair wise matches the elements of the two sets.

infinityfig1a

I will now demonstrate that the open interval (p, q) has the same cardinally as the open interval (-∞, +∞) for any pair of real numbers p and q such that q > p. Let the width of the interval w = q – p and midpoint of the interval m = (p + q)/2. The one-to-one function y = Tan(π/w(x – m) with domain (p, q) has a range equal to (-∞, +∞). From Cantor’s definition, it follows that the cardinality of the open interval (p, q) equals the cardinality of the open interval to (-∞, +∞). Graph B below illustrates that the open interval (0.75, 1.25) has the same cardinality as the open interval (-∞, +∞).

infinityfig2a

The next part of this post will demonstrate that the cardinality of the counting numbers equals the cardinality of the positive rational numbers. This will be accomplished by showing that there is a one-to-one function, f, that matches the counting numbers with the positive rational numbers. The matching rule of the one-to-one function is an algorithm that describes how we can systematically go about matching every counting number with a unique positive rational number in such a manner that every positive rational number gets matched with a counting number. Mathematicians say that the rational numbers are countable.

The algorithm for the matching rule of the one-to-one function is as follows:

1) Organize the positive rational numbers in a rectangular grid as shown below.

2) Start in the upper left corner of the grid. Set the counting number n = 1 and let f(n) = 1/1.

3) Continue moving from grid element to grid element forever as indicated in the diagram. If grid element p/q is not equivalent to a previous function value, then increase n by 1 and let f(n) = p/q. If grid element p/q is equivalent to a previous function value, then skip the grid element and go to the next grid element. (Note that skipped grid elements in the diagram are crossed out.)

infinitytxbx3

Now for Cantor’s famous diagonal proof that the real numbers are not countable. His proof used the sophisticated technique of proof by contradiction which is commonly used by mathematicians to prove a theorem. The diagonal proof goes something like this.

  • Assume that there is a one-to-one function f(n) that matches the counting numbers with all of the real numbers. The box below shows the start of one of the infinitely many possible matching rules for f(n) that matches the counting numbers with all of the real numbers. The real numbers in the range of the function are represented as strings of base 2 real number digits or binary digits (i.e. consisting only of zeros and ones).
  • Now construct a real number p as follows: Let n equal any counting number and f(n) equal the corresponding function value.
  • If the nth binary digit of f(n) = 0, then set the nth binary digit of p = 1.
  • If the nth binary digit of f(n) = 1, then set the nth binary digit of p = 0. (See the text box below.) It’s clear that the real number p is not in the range of f(n) which in turn contradicts the original assumption about f(n). Therefore the cardinality of the real numbers is greater than and the cardinality of the counting numbers and the real numbers are not countable.
infinitytxbx4

 

Some Comments Regarding Cardinal Numbers and Real Numbers:

  • The symbol for the cardinal number of the counting numbers is ℵ0. (aleph naught)
  • The symbol for the cardinal number of the real numbers is ℵ1.
  • The continuum hypothesis states that there is no cardinal number between ℵ0 and ℵ1.
  • If you can prove the continuum hypothesis, you will become world famous overnight.
  • There are infinitely many rational numbers between any two real numbers.
  • The rational numbers are an infinitely small fraction of the real numbers.
  • To work with irrational numbers in practical applications, we use rational numbers to approximate irrational numbers. (3.1416 ≠ π)
  • The points, lines and curves that we draw on a chalkboard or computer screen are just crude approximations of true mathematical points, lines, and curves.
  • True mathematical points and curves are infinitely thin, and therefore they can’t reflect light which in turn tells us that we really can’t see true mathematical points and curves in the physical sense.
  • Mathematical objects only exist in the mind of man and God.

Modeling Limited Population Growth with the Logistic Function

250px-Pierre_Francois_Verhulst[1]Because of limits on food, living space, disease, current technology, war, and other factors, most populations have limited growth as opposed to unlimited exponential growth which is modeled by the classic exponential growth equation P = P0bt/k. A limited growth population starts growing almost exponentially, but reaches a critical point in time where its growth rate slows, and the population starts to asymptotically approach an upper limit as time increases. There are several models that are used to describe limited growth of a population.

In this post, I will discuss the logistic function which was used by the Belgian mathematician Pierre Francois Verhulst (1804-1849) to study limited population growth. The logistic function also has applications in artificial neural networks, biology, chemistry, demography, ecology, economics, biomathematics, geoscience, mathematical psychology, sociology, political science, probability, and statistics.

The two text boxes below describes the key parameters and relationships between the parameters of a logistic function. Graph (A) shows a typical logistic function curve and how equation parameters can be calculated from known characteristics of the population. If pmax, p0, and tc are known, then a, b, and k can be calculated. Likewise, if a, b, and k are known, then pmax, p0, and tc can be calculated. Keep in mind that all limited growth models can only give us a good approximation of a population value at some point in time.

Graph A - JPEG

Text Box 1 - JPEG

Text Box 2 - JPEG

In most cases, the key parameters of a logistic equation are unknown, but an observed set of data-pairs is known. The least-squares logistic equation of a data set is the best of all possible logistic equations that describes the relationship between the data-pair variables. Best possible equation means that the sum of the squared errors (difference between observed value and predicted value) is minimized. Modern graphing calculators have the capability of findings a least-squares equation for a variety of models such as linear, quadratic, cubic, quartic, sinusoidal, log, exponential, and logistic. When given a logistic type data set, I will use a graphing calculator to find the least-squares logistic equation of the data set, and then calculate various characteristics and properties of the resulting logistic model. I will now take a look at two problems that illustrate how the logistic function can be used to describe limited population growth.

Text Box 3 - JPEG

Problem 1 solution: Use math software to do a scatter plot of the data, find the least-squares logistic equation p = 12.0121 / (1 + 10.6694e-0.023856x) of the data set, and then do the appropriate calculations. Refer to graph (B) below. From graph (B) we see that the world population growth rate started to slow in 1999, and the upper limit of the world population is about 12 billion. Keep in mind that this least-squares equation is our current best description of world population growth. Future unknowable events will alter this model.

Graph B - JPEG

Problem 2: The logistic function N(t) = 3,600 / (1 + 29.4e-0.2t ) models the spread of a disease in a town. N(t) = the total number of people infected at time t, and t = the number of days after the first reported infections.

(a) How many people were initially infected?

(b) How many people were infected after 10 days and after 30 days?

(c) When did the rate of infection start to slow?

(d) What is the upper limit of the number of infected people?

 

Problem 2 solution: Use math software to graph the equation, and then do the appropriate calculations. Refer to graph (C) below.

(a) About 118 people were initially infected.

(b) After 10 and 30 days, 723 and 3,355 were infected.

(c) About day 17, the infection rate started to slow.

(d) The upper limit of the number of people infected = 3,600.

Graph C - JPEG

Comments:

  • It’s fun and interesting to experiment with different logistic function parameters. Experimentation always gives a better learning experience.
  • With my graphing calculator, it took about 8 seconds to compute the parameters of a logistic equation. This is an indication of the complexity of the algorithms for computing the parameters of a least-squares equation. I tell my students that they should be ever thankful that they have access to such wonderful computation tools.
  • Computer math software allows students to focus on math concepts, and not get lost in gory computational details. This is why graphing calculators have revolutionized the way we teach statistics. Just getting the ‘answer’ is no longer sufficient. Students must be able to interpret and explain the meaning of the answer in the context of the problem.

Derivation of Continuous Compound Interest Formula without Calculus

Jacob Bernoulli, 1654-1705
Jacob Bernoulli, 1654-1705

My students, like most people, like money and find the topic of compound interest interesting. After completing a unit on simple, compound and continuous compound interest, one of my students told me that math is useful and interesting after all.

This post will discuss the derivation of the formula for the future value of an investment when interest is compounded continuously, FV = Pert. No prior understanding of the limit concept in calculus is required. I will be using the limit concept, but I will give an informal intuitive explanation of the limit concept as it comes up in the discussion. A recent post discussed an approach for deriving an equation that models exponential growth/decay. Problem (2) in that post showed the derivation of the compound interest formula FV = P(1 + r/k)kt where FV = the future value of the investment account, P = principle or one time lump-sum investment, r = annual percent rate of return expressed as a decimal, k = the number of times per year interest is compounded, and time t = the number of years the principal is invested.

Before I can get to the derivation of the equation FV = Pert, I need to explain what continuous compound interest means. Let’s consider an investment where P = $10,000, average annual rate of return = 7% = 0.07, and the investment collects interest over a period of 20 years. I adopted the standard banking convention rule that 1 year = 360 days. (Whether we use 365 or 360 days in a year makes no significant difference. Apparently banks like 30-day months.) The text box below shows how increasing the number of times per year interest is compounded affects the future value of an investment.

compound_interest_txtbx1a

Students immediately notice that there is a point where it makes no difference how often interest is compounded, and they completely understand the difference between simple interest and compound interest. I tell them that the future value of the $10,000 investment, $40,552.00 in this example, represents the upper limit of one’s greed. When interest is compounded more times per year (k approaches infinity), and interest is compounded over smaller and smaller time intervals; say every second, every microsecond, or continuously. No matter what the principal is or the annual interest rate, there is always an upper limit of the future value of an investment, and the upper limit is reached when interest is compounded continuously.

In 1683 in the course of his study of continuous compound interest, Jacob Bernoulli (1654-1705) wanted to find the number that was the limiting value of the expression (1+1/n)^n as n approaches infinity. This is the first time that a number is defined as the limiting value of an expression. Bernoulli determined that this special number is bounded and lies between 2 and 3. In 1748 Leonard Euler (pronounced Oil-er) (1707-1783) published a document in which he named this special number e. He showed that e is the limiting value of the expression (1 + 1/n)n as n approaches infinity, and is approximately equal to 2.718281828459045235. He also gave another definition of e as the limiting value of the infinite sum 1 + 1/1! + 1/2! + 1/3! + . . . . Euler is generally given credit as the first to prove e is an irrational number.

To help you better understand the definition of the irrational number e, I will start by comparing the graphs of functions of the form y = (1 + 1/k)x where k is a fixed constant and the graph of the function y = (1 + 1/x)x. Refer to graphs (A) and (B) and the companion text box below. A quantity that approaches infinity means the quantity gets bigger and bigger without any upper boundary. A quantity that approaches a fixed constant means the quantity gets infinitely close to the fixed constant.

compound_interest_fig1

 

compound_interest_fig2

compound_interest_txtbx2a

The purpose of the above graphs and the comments in the text box is to demonstrate that a subtle difference in the expressions (1 + 1/k)x and (1 + 1/x)x results in far different limiting values as x approaches ∞. The key result needed in the derivation of the continuous compound interest formula is the fact that e = limiting value of (1 + 1/x)x as x approaches ∞ when x is any positive real number. Considering that the expression (1 + 1/n)n is a rational number for every positive integer n, it is astonishing that the expression (1 + 1/n)n approaches an irrational number as n approaches ∞. I can now show you the derivation of the continuous compound interest formula FV = Pert.

compound_interest_txtbx3

Comments:

• When I did the calculations for compounding every minute and compounding every second with my graphing calculator, I got results that were slightly different than the expected results. When I used double floating point precision real numbers in a computer program, program output agreed with the expected results. We need to constantly remind ourselves that calculator or computer calculations of expressions that involve very large numbers, or require a large number of iterations to arrive at a solution, results may be slightly different than the expected or theoretical value.

• Using problems similar to the examples in this post, I show my students how compound interest works and what continuous compounding of interest means. I have them enter the expressions into their graphing calculator as the lesson progresses. This gives them practice using their calculator and they gain a better understanding and appreciation of what compound interest is all about. They are astonished when I show them $10,000*e.07*20 = $40,552.00.

• For a class of curious or advanced students, it’s not wasted class time to show the derivation of the continuous compound interest formula. Less advanced students are usually content with learning how to use the formula. My handout, Basic Financial Formulas, provides an overview of useful financial formulas that you can use in your classroom.

• The derivation of the continuous compound interest formula is a great opportunity to expose advanced high school algebra, college algebra and pre-calculus students to the limit concept in calculus.

• As mentioned earlier, very term of the sequence an = (1 + 1/n)n is a rational number, but the sequence itself converges to the irrational number e. Most calculus students find this very counterintuitive. What a great opportunity to launch a discussion of any number of related math concepts!

• The constants 0, 1, π, e, and i where i2 = -1 are the five most important constants in mathematics because they are widely used in equations that describe relationships in all branches of mathematics and science. The equation eπi + 1 = 0, which is due to Leonhard Euler, is one of the most interesting and intriguing equations in mathematics. Euler used the symbol e for the irrational constant, and in his honor, e is named Euler’s number.

• Both Bernoulli and Euler were prolific mathematical giants. Much of what is routinely used in mathematics and science can be traced back to the work of these two great men. L’Hospital’s Rule in calculus is due to Bernoulli, not L’Hospital. L’Hospital published the rule, but Bernoulli discovered the rule and gave it, for a fee, to L’Hospital.

Because of limits on food, living space, disease, existing technology, war, and other factors, most populations have limited growth as opposed to unlimited exponential growth which is modeled by the classic exponential growth equation P = P0bt/k. A limited growth population starts growing almost exponentially, but it reaches a critical point in time where its growth rate slows, and the population starts to exponentially and asymptotically approach an upper limit. There are several models that are used to describe limited growth of a population. In my next post, I will discuss the logistic function which was used by the Belgium mathematician Pierre Francois Verhulst (1804-1849) to study limited population growth. The logistic function also has applications in artificial neural networks, biology, chemistry, demography, ecology, economics, biomathematics, geoscience, mathematical psychology, sociology, political science, probability, and statistics.

A Different Way to Teach the Quadratic Formula

Quadratic-Formula-EuclidOne of my core beliefs is that, whenever possible, math concepts should be understood from both an algebraic and geometric point of view. In previous posts, we looked at how René Descartes (1596 – 1650) gave us the synthesis of algebra and geometry. Now let’s look at how teachers can help students understand the quadratic formula from both an algebraic and geometric point of view by using custom made handouts created with computer technology.

To best understand this discussion, download the student and teacher versions of the free handout Quadratic Formula (teacher version) from http://www.mathteachersresource.com/instructional-content.html. This handout provides six ideas for teacher-guided quadratic formula discovery/verification activities. During the lesson, students are expected to be actively engaged calculating values of expressions and writing on the handout, so in addition to a handout, they will need a calculator and ruler. To make your presentations more dynamic, project graphs on a screen as you plot points and draw line segments with simple mouse control clicks.

The graph of the equation y = x2 + 5x – 8 is shown below. This quadratic equation is the first equation considered in the free handout Quadratic Formula. The added graphics are the graphics that students would be expected to add as the lesson progresses.

Mathblog14,Edit1

The graph of the equation h = -16t2 + 132t + 60 is shown below. This equation is the fourth equation in the free handout, Quadratic Formula (student version). The activity is about a toy rocket that is shot upward with an initial vertical velocity of 132 feet/second. The added graphics are the graphics students would be expected to add as the lesson progresses. The slope of the secant line through (6.5, 242) and (7, 200) tells us that the average vertical velocity of the toy rocket over the time interval [6.5, 7] equals -84 feet/second. The goal of this activity is to show students how mathematics can be used to extract useful information from an equation.

Mathblog14,Edit1

Teaching Points: (Depending on the class, teachers need to give appropriate coaching.)

  • Students can be shown the derivation of the formula before the lesson or at a later time.
  • Teachers will have to demonstrate how to enter an expression into a calculator. Students will probably make mistakes initially. Practice is the only way to improve.
  • Teachers should have students use the graph to estimate answers before the actual calculation.
  • Students should learn how to express answers in decimal format, because radical format is too abstract.
  • Some answers require more than a simple numerical value. Teachers can dictate an English sentence that would be an appropriate way to answer the question. This is a good way for students to practice writing skills.
  • The equation h = -16t2 + 132t + 60 in the toy rocket activity describes the relationship between t and h in the gravitational field in which we live. Students will learn how this equation comes about when they take a course in physics. ( -16 equals ½ of the gravitational constant for planet earth, 132 ft/sec = the initial vertical velocity, and 60 feet = the initial height above ground level.)
  • Students and teachers can explore how gravity causes the average vertical velocity of an object to change over time.
  • If students understand the basics of complex numbers, teachers can present activities five and six in the Quadratic Formula handout.

The above graphics, created with the program Basic Trig Functions, is offered by Math Teacher’s Resource. Except for exponents, all equations are entered like any equation in a textbook. Example: The inequality 2x – 10Sin3(3x) + 4y2 ≤ 25 is entered as 2x -10Sin(3x)^3 + 4y^2 ≤ 25. Relationships can be implicitly or explicitly defined. The program automatically figures out how to treat an equation or inequality, and shading of all inequality relations is automatic. Users can specify whether to shade the intersection or union of a system of inequalities.

The user interface provides numerous sample equations along with comments and suggestions for setting screen parameters in order to achieve best results. The interface for all program modules is simple and intuitive. After an equation is graphed, users can plot a point on a graph near the mouse cursor and view the x-y coordinates of the plotted point. In addition, relative minimum points, relative maximum points, x-intercepts and, intersection points can be found with simple mouse control clicks. A Help menu provides a quick summary of all of the magical mouse control clicks. Of course, all graphs can be copied to the clipboard and pasted into another document. Go to www.mathteachersresource.com to view multiple screen shots of the program’s modules. Click the “learn more” button in the TRIGONOMETRIC FUNCTIONS section. Teachers will find useful comments at the bottom of each screen shot.