Scire ad trascendere - Learn to transcend.

Topics covered:

  • Boolean logic, truth tables
  • Understanding and using definitions
  • Divisibility and fundamental theorem of artithmetic
  • Proof of if-then and iff statements

Develop the ability to understand new concepts

In the future, no matter where you are going to work in (e.g. industry, academia, etc.), you are likely to encounter new concepts. During undergraduate education, you are taught with general knowledge, which acts as a foundation for your further specialization. There are too many technologies in this world to be covered within a four-year time span. Therefore, instead of teaching you everything, it would be much more practical if we choose to cultivate an ability to understand everything individually.

One of the key purposes of this course is to help you form the skills to comprehend mathematical concepts that are necessary for all computer science literature. Personally speaking, I think mathematical concepts are the “easiest” to understand among all other categories, simply because:

  1. They are usually very concise.
  2. They usually exclude any possible ambiguity.
  3. It is very easy to verify whether one has understood the concept correctly or not.

More concretely, the definition of a simplest mathematical concept looks like this:

A circle is a shape consisting of all points in a plane that are a given distance from a given point, the centre. (Wikipedia)

Whereas in psychology, the definition of a fundamental concept looks like this:

Emotions are biological states associated with the nervous system brought on by neurophysiological changes variously associated with thoughts, feelings, behavioural responses, and a degree of pleasure or displeasure. (Wikipedia)

There is no doubt that the mathematical concept possesses higher degree of clarity and definitiveness. Therefore, please do not be afraid of new concepts in mathematics. After all, they are not the most difficult things you’ll need to deal with in your future studies.

Identifying the key components of a definition

Having finished grading your homework, I find out that many of you are unable to understand the definitions provided by the homework guidelines effectively. The sentence structure or wording in mathematical materials may differ from standard English documents, which perhaps creates difficulty for you to perceive an idea. However, the fact that these contents tend to be grammatically correct implies that they contain all essential components that build up a sentence, i.e. subject, verb, object, complements, etc. To understand a concept thoroughly, I think the first thing you need to do is to identify what each component is. Let’s look at the examples below.

Example: Pythagorean triple

Consider the following definition of Pythagorean triples:

Let there be three positive integers , and . The triple is called a Pythagorean triple if .

Suppose we have a triple . How do we know if it is a Pythagorean triple? We compute and compare it with . You should be able to find out that , which means it is a Pythagorean triple. But here comes the question: what is it? In other words, which of the following is a Pythagorean triple?

Example: even number

Consider the following definition of even numbers:

Let there be an integer . It is called an even number if .

Suppose there are two even numbers and . Obviously, we have and . Now you are asked to verify “if the sum of two even numbers is an even number”, which quantity should you focus on?

  • 1

You may begin to notice that “ is said to be if ” is a very common expression in mathematical literature. In this case, usually is the subject, is the name of the definition, and the predicate for determining whether can be called . For Pythagorean triples, is , is “Pythagorean triple”, and is . For even numbers, is , is “even number”, and is . It is essentially saying: if is true, then is . Otherwise, is not .

Let’s come back to Toyota number, which appears in the homework question. The definition of Toyota number is as follows:

Let be a positive integer. Then is said to be a Toyota number if .

Here, is , is “Toyota number” and is . If is true, then is a “Toyota number ()”. Otherwise, if is false, then is not a “Toyota number ()”. It is important to realize that the subject here is instead of . Therefore, we are trying to decide whether is a Toyota number, not or .

In question 2b, you are asked to prove/disprove if “the product of two Toyota numbers is a Toyota number.” Let there be two Toyota numbers and , you should determine if is a Toyota number. Some people try to calculate if is a Toyota number, which is completely irrelevant to what the question is asking.

Example: logical consequence

Consider the following definition of logical consequence:

Let and be Boolean expressions. We say that is a logical consequence of if is a tautology.

You are asked to answer this question:

Let and be Boolean variables. Show, by constructing a complete truth table, that is a logical consequence of , and .

Let’s do a step-by-step matching between these two statements:

  • is
  • is
  • is
  • is

Therefore, we need to construct the following truth table:

$$a$$ $$b$$ $$c$$ $$b \lor c$$ $$a \rightarrow (b \lor c)$$ $$\neg b$$ $$\neg c$$ $$(a \rightarrow (b \lor c)) \land (\neg b) \land (\neg c)=u$$ $$u\rightarrow (\neg a)$$
T T T T T F F F T
T T F T T F T F T
T F T T T T F F T
T F F F F T T F T
F T T T T F F F T
F T F T T F T F T
F F T T T T F F T
F F F F T T T T T

We are able to conclude is a tautology, for the last column is all true. As a result, is a logical consequence of , and .

Converting definitions to something easier to comprehend

Sometimes definitions are written in a most compact and concise form, which can increase the difficulty to understand them. When you find a new definition confusing, maybe you can try to convert them to “everyday language”, which greatly facilitates problem solving. For example, we mentioned the definition of Toyota numbers before:

A positive integer is said to be a Toyota number if .

It is easy to see that , which means that we can check if instead.

The fundamental theorem of arithmetic states that every integer greater than 1 either is a prime number itself or can be represented as the product of prime numbers and that, moreover, this representation is unique, except for the order of the factors. With this knowledge in our mind, we can conduct the following derivation:

  1. If , it means that 3 is a factor of .
  2. . The fundamental theorem of arithmetic indicates and can both be represented as the product of prime numbers (now assume ).
  3. 3 is a prime number. If 3 is a factor of , then either 3 is a factor of or 3 is a factor of (or both).

You may find the third step a bit obscure. You can think about it in this way: suppose 3 is not a factor of nor , there is no way that 3 is a factor of , because you cannot find two integers other than and whose product is 3.

With the conclusion of step 3, we can rewrite the definition of Toyota number as follows:

A positive integer is said to be a Toyota number if either is divisible by 3 or is divisible by 3 (or both). 2

It is a lot longer and much easier to understand. But you know what? Mathematicians hate it. So everyone one them will prefer the old definition.

The definition of square free integers is even trickier:

Let be a positive integer. Then is said to be a square free integer if is divisible by no perfect square other than 1.

Many of you are unable to tell whether a number is square free or not, because the definition is simply too abstract. For example, some of you consider 12 to be a square free integer, which is not true because , and 4 happens to be a perfect square. Here comes the question: using the fundamental theorem of arithmetic, can you “simplify” the definition of square free integers? I will provide the answers below, but feel free to think about it for now.

Answer (click to expand)

The fundamental theorem of arithmetic states that we can write as the product of its prime factors. That is, we can write

where ’s are its prime factors and ’s are exponents greater than zero. For example, we can write , , etc.

Now it should be fairly easy to see that is a square free number if none of the exponents are greater than 1! Because if any exponent is greater than 1, then would be divisible by a perfect square . This allows us to rewrite the definition of square free numbers as follows:

Let be a positive integer. Then is said to be a square free integer if all exponents of its prime factors are equal to one. 3

This definition also provides a way of examining whether an integer is square free or not. For example, because , we know that it is a square free number; because , it is not a square free number. Isn’t this definition much easier to understand?

Therefore, when you come across a definition that is obscure, try to convert it into a form which you can handle with ease. I know there are a lot of unspoken techniques involved in this process, so it is vitally important that you do more exercises to perfect your skills.

Learn the foundation of proofs

In my opinion, a proof is a formal argument to show that a mathematical statement is true. Once you get familiar with writing proofs, it almost feels like a novelist writing his new piece. As a result, everyone can have his/her unique way of presenting an elegant proof, as long as the logic is consistent. However, despite being a highly malleable form of argument, there are still some basic rules to follow. Just like a novel can be of any topic, but it always needs to have characters, plot, theme, etc.

There are many well-known templates to write proofs, such as proof by contradiction, proof by induction and so on. I believe we may get to these advanced methods later in this semester, but they are not required at this stage. Now we are only constructing direct proofs, which has little constraint. However, there is one case where special care should be taken, that is when you are proving iff statements. Always remember that you need to prove both directions of an iff statement!

Example: proving an iff statement

Prove the following statement:

Let be an integer. Then is odd if and only if is the sum of two consecutive numbers.

We can write the statement like this (informally):

Proof:

() If is odd, by definition, we know , where is an integer. Because , which is the sum of two consecutive numbers, we can conclude that is the sum of two consecutive numbers.

() If is the sum of two consecutive integers, let those two numbers be and . It can be seen that , which indicates that is an odd number.

Remarks. For grading purposes, it would be better to write “” and “” explicitly. It demonstrates that you know how to write proofs properly.

Find a correct direction

Usually, you are asked to either prove/disprove a statement. These are two distinct directions, and only one of them is correct. Therefore, it is important to have an idea of whether the statement itself is actually true/false. If it seems to be true, we will prove it to be true (using direct proofs). It is seems to be false, then we can disprove it (with counterexamples).

One of the easiest ways to figure out if a statement is true or not is to test it with examples. An example is shown as below.

Example: sum of two square free numbers

Proof or disprove:

The sum of two square free integers is a square free integer.

Confirming whether it is true or false:

  1. Come up with some square free numbers. Using the new definition of square free numbers that we derived before, we can generate many square free numbers in the following ways:

  2. Now we can test the statement with the square numbers above. For example, , which is square free. , which is square free. But , which is not square free. Therefore, we have found an counterexample, where the sum of two square free numbers is not square free. Therefore, we can go ahead to disprove this statement with this counterexample.

During the trial-and-error phase, if you have tested a number of cases, and the statement still holds true, then you should consider proving the statement to be true.

Remember the purpose of proving is to show that the statement is always true, given the constraints. It only takes one counterexample to disprove a statement, but to prove something, you need to convince everyone that the statement is perpetually correct. Therefore, you cannot prove a statement by examples, because it is usually impossible to enumerate all possible cases (except for some special cases where the number of possibilities is finite, e.g. Boolean logic).

Think about the well-known Goldbach’s conjecture, which states that “every even integer greater than 2 can be expressed as the sum of two primes.” For example, , , , , etc. People have tested all even numbers from 2 to 4,000,000,000,000,000,000 with computers, and the conjecture is true for all these numbers. But this doesn’t mean that this conjecture is proved, because the program can never test all possible even numbers. However, if the program finds one even number that cannot be represent as the sum of two primes, then we can immediate disprove this conjecture that has puzzled some of the most talented mathematicians around the world for hundred of years.

Just let it be

顺其自然
Shun-qi-zi-ran, which basically means, "let it be".

To this day, I still remember the catchphrase of my high school math teacher–when we had difficulty solving a question, he would always say “顺其自然”, which basically means “let it be”. In a mathematical context, it means to approach a question with what you have in hand, even when it seems very distant from what is being asked. It is somehow correct because all these exam/homework questions are designed in a way that they are solvable for an average student. Right now, you are not dealing with read-world problems. You are just solving questions that are meticulously created for students, which are supposed to be easy. If you are greatly confused by these questions, it only means that you are not familiar with the techniques taught in class.

With this attitude in mind, let’s look at the most difficult problem in homework #2, which is to prove/disprove “the product of two Toyota numbers is a Toyota number.” The first step is to figure out whether the statement is true or not. To do that, we need to find some Toyota number. With the new Toyota number definition above, we can immediately enumerate these Toyota numbers: 1, 3, 4, 6, 7, 9, … And then we can start the testing phase. We can quickly verify that , , , so we should consider proving this statement instead of disproving it.

Let , be two Toyota numbers, then by definition, we know that and . Now we need to find out if the product of these two Toyota numbers (which is , not ) is a Toyota number. Using the definition of Toyota numbers, we can say that our goal is to determine if is true.

Right now, there is not much to work with, as all statements we have are discriminative rather than quantitative. More specifically, just tells you “3 divides ”, but there is not a value or equality that you can play with. Recall the definition of divisibility indicates that there exists an integer such that . Similarly, there is another integer such that . We have gone from nothing to something, namely two equalities to work with:

Our goal is to prove . Here, is a quadratic term, which is difficult to deal with. If we look at the two equalities, it is not hard to observe that

which means we can substitute the quadratic terms with linear terms. This can bring us closer to form of the second term () in the target, maybe there is a chance for something magical to happen. Therefore, we can write

Because is an integer, by the definition of divisibility, we can conclude that , which means is a Toyota number.

The thought process of the solution is clear:

  1. Find out if we should prove or disprove the statement.
  2. Write down our target.
  3. Derive a step further from what we have known to generate two equalities to work with.
  4. Compare our target and the equalities, then find a way to combine them.
  5. The result shows that the statement is true.

I think the “let it be” spirit can be reflected vividly in this process. When you don’t know whether to prove or disprove, you just test the statement with cases to find a general direction. When there is no equation to work with, you create something out of nowhere. When you do have something in your hand, you go ahead and figure out a way to combine them so that you can unravel the answer that is carefully hidden by the test maker. Try to play with the knowledge in your head and rearrange the equations on your draft paper. At some point, you will come up with something constructive.

If you are not that good at observing…

In the proof above, there is a “clever step” where we substitues the term with the product of two linear terms. What if you are unable to devise it on your own? In the discussion above, we have shown that the definition of Toyota numbers is equivalent to:

A positive integer is said to be a Toyota number if either is divisible by 3 or is divisible by 3 (or both).

Let , be two Toyota numbers, there are only four possibilities:

What do we do next? We’ll have to verify them one by one!

  1. If , we can write , then . It can be seen that

    Hence, we know that is a Toyota number in this case.

  2. If , we can write . Therefore, and . It can be seen that

    Hence, we know that is a Toyota number in this case.

  3. If , similar to Case 2, we know that is a Toyota number in this case.

  4. If , we can write . Therefore, and . Now, we have . It can be seen that

    Hence, we know that is a Toyota number in this case.

We have shown that is a Toyota number in all four possible cases. Therefore, is always a Toyota number.

There are always multiple ways to solve a question. Of course, this approach is more complicated than the previous one, but it is still a valid proof that can get you full marks. If you just try to play with the information given by the question, you will get yourself closer to one of the correct paths and eventually come up with a valid solution.

Beyond this help session…

If you want to do better in course, try these:

  1. Read the textbook carefully.
  2. Finish some practice questions on textbook.
  3. If you find it difficult to solve homework questions, feel free to come to office hours.
  4. Access different types of resources. For example, learn from YouTube, Coursera, etc.
  5. Rewrite proofs that you did in course activities and office hours to consolidate your impression.
  1. Don’t ever write an expression like this! means “two divides ”, it does not indicate any value! Another similar example is the perpendicular symbol (). When you write , it means is perpendicular to . You can’t say

  2. There is still one key step missing: in step 2, we assume that . So for the new definition to be completely identical to the old one, we also need to verify one more case, i.e. when . There is a chance that when , our new definition fails to represent the old one. Fortunately, these two definitions are indeed equivalent. 

  3. Again, we did not consider . It should be added into this definition as a special case. For simplicity, I am leaving it in the footnotes. This just shows the expressive power of mathematical definitions: sometimes a shorter definition can be more accurate than a longer one.