Physics is the study of the nature of things like matter and energy. Mathematics is the study of the structure of quantity, space and number. Logic is the study of the structure of reasoning.
Physics consists of a collection of theories that explain how energy and matter work. A theory uses mathematics to relate one or more physical quantity/quantities to other quantity/quantities. Because physics is a science, a theory can only be validated by repeatable, objectively observable experiments. A validated theory is no longer valid when experiments can objectively and repeatedly contradict the theory.
As a result, physics, no matter how complex and abstract, is still “grounded” to the physical world. Nothing can be taken for granted.
Mathematics has many branches, let us consider something relatively simple like algebra. Algebra studies the structure of quantities and operators that operate on quantities.
It is important to note that mathematics serves multiple purposes. The first one is as a language. Symbols used in mathematics are like words, people have a common understanding of these symbols. For example, the symbol represents the concept of the quantity of one, and it is a fairly universal understanding. Likewise, there are also symbols representing operations like addition, multiplication and etc.
While the meaning of quantities is often easily understood, the same may not be said about operators. What is the meaning of ? We know the answer, but do we really understand the concept?
Addition () probably starts with the counting of objects and the concept of “together”. Trundle wants 2 apples and Nunu wants 3 apples, how many apples should I gather to feed Trundle and Nunu? The answer is obviously five.
However, defining is hardly useful, as it does not tell us much about other instances of adding. People then start to notice patterns that are, well, intuitive. For example, people may notice that , and then they may notice seems to be universally true.
Just because it is intuitive and cannot be proven wrong does not mean commutativity is true in general. Interestingly, as far as I can research, it is until the 19th century that commutativity is actually proven. The curious can refer to Wikipedia’s page on proofs of addition axioms.
Not surprisingly, the proofs of addition axioms are based on some more elemental (low level) axioms known as Peano axioms.
Regardless of the elementality, mathematics still boils down to axiomatic rules. Unlike physical laws, however, these axiomatic rules are just assumed and taken for granted. This is where mathematics and physics differ. There are no experiments to validate the most fundamental axioms in mathematics.
Logic exists long before mathematics is formalized. This is because logic is even more core to human reasoning. Let us consider the following (fictional) scenario.
Caveman Mundo observes that in order for animal tracks to be formed, the soil needs to be moist and an animal has to walk on it. As Caveman Mundo hunts, he came to an area where no animal track was visible. Without taking CISP440 or any logic class, Mundo figured out that at least one of the two necessary conditions to have animal tracks is missing.
Mundo had time, and since he could not conclude there were no animals, he decided to spend a little of time to look for animals in that area.
This is how elemental logic is. Logic does not deal with quantities or the explanation of physical phenomena. It deals with the structure of truthfulness. In the caveman Mundo example, logic was utilized without any mathematics or physics.
In addition to being useful as a standalone tool, logic is also used in mathematics to connect axioms to theorems. Mathematics, in return, is used in physics to model physical phenomena. This shows how logic is at the core of everything STEM.
Logic probably did not come in its current form in ancient times. The caveman Mundo example might start with numerous observations that Mundo accumulated. In other words, Mundo might have started his logic formation by observations and grouping these observations into mental bins. By noticing the structure of observations in these bins, Mundo abstracted such observations to a rule that only pertains to animal tracks.
After much time, generations of smart humans probably abstracted the essence of logic from specific rules like the animal track rule that Mundo formulated.
Like mathematics boils down to axiomatic rules, logic also boils down to its own core definitions and axiomatic rules. Such rules are also taken for granted, they do not require experiments to validate.
Computer science does not seek truth about the physical world. This is because computers are artificial objects that operate by a known set of rules. As far as the machine is concerned, there is no discoveries to be made.
However, computers are programmable. Generally speaking, a program has a implicitly or explicitly defined behavior. Hence, the truth that we seek in computer science is whether a computer does what it is supposed to as the result of the computer hardware and programming.
Referring to the cartoon, when a game development team comes up with a specification of a game, that becomes the expected behavior of the program. It is of great importance to make sure the game behaves as expected!
Broadening to computer security, there are mainly two types of vulnerabilities:
Each type of vulnerability has a truth assessment involved:
This is why logic and truth assessment is important in computer science.