Example of calculating the practical/real temporal complexity of two algorithms

In this post, I’ll show you an example of how to calculate the practical time complexity of two algorithms that solve the same problem. As you should remember from the previous post, we calculate temporal complexity to assess how efficient an algorithm is compared to another algorithm. By doing this, we can choose the best

Example of calculating the practical/real temporal complexity of two algorithms Read More »

4. Show that the additive inverse, or negative, of an even number is an even number using a direct proof

Let’s refresh the concept of direct proof. “A direct proof of a conditional statement p → q is constructed when the first step is the assumption that p is true; subsequent steps are constructed using rules of inference, with the final step showing that q must also be true. A direct proof shows that a

4. Show that the additive inverse, or negative, of an even number is an even number using a direct proof Read More »

7. Use a direct proof to show that every odd integer is the difference of two squares.

Let’s refresh the concept of direct proof. “A direct proof of a conditional statement p → q is constructed when the first step is the assumption that p is true; subsequent steps are constructed using rules of inference, with the final step showing that q must also be true. A direct proof shows that a

7. Use a direct proof to show that every odd integer is the difference of two squares. Read More »

5. Prove that if m + n and n + p are even integers, where m, n, and p are integers, then m + p is even. What kind of proof did you use?

Sometimes, we must attempt different proof methods to prove a certain theorem or complete a certain proof. This is what you will find usually in practice. Think about it, you are doing some research, you think something is true under certain conditions, you create a conjecture, and now you have to prove it. No one

5. Prove that if m + n and n + p are even integers, where m, n, and p are integers, then m + p is even. What kind of proof did you use? Read More »