0% found this document useful (0 votes)
4 views15 pages

Module 4 (105) Mathematical Foundations

The document discusses the mathematical foundations of Computer Science and Computer Engineering, emphasizing the importance of discrete mathematics, Boolean algebra, and the theory of computation. It highlights key concepts such as Turing machines, computational complexity, and various foundational areas like coding theory and game theory. The content is aimed at enhancing problem-solving capabilities and logical reasoning in computing applications.

Uploaded by

Brandon Quon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views15 pages

Module 4 (105) Mathematical Foundations

The document discusses the mathematical foundations of Computer Science and Computer Engineering, emphasizing the importance of discrete mathematics, Boolean algebra, and the theory of computation. It highlights key concepts such as Turing machines, computational complexity, and various foundational areas like coding theory and game theory. The content is aimed at enhancing problem-solving capabilities and logical reasoning in computing applications.

Uploaded by

Brandon Quon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Mathematical foundations of

Computer Science and


Computer Engineering
CECS-105
Module 4

Forouzan Golshani

© Copyright Forouzan Golshani


Foundations of Computing
• As disciplines, both Computer Science and Computer Engineering are
rooted in well-developed mathematical theories that span several
centuries of work by numerous mathematicians.
• The theory of computation is about abstract models of computation and
the general classes of problems that can be solved using them.
• Discrete mathematics is important in many areas of Computer Science.
• For Computer Engineering, like other branches of engineering, Calculus 1
and 2 are important, as is Boolean Algebra.
• Although called “math courses”, these are fun courses, because in
computing we only look at the applications of mathematical
formulations. ☺

© Copyright Forouzan Golshani


Discrete Mathematics
• Discrete Mathematics is a branch of mathematics that is concerned with discrete
elements. Thus, objects can assume only distinct, separated values.
• Its foundations are set theory, algebra and arithmetic.
• In Computing, discrete math is used for software design specifications and
analysis of algorithms, among many other areas.
• It is considered to be a great tool for improving reasoning and problem-solving
capabilities, which are important for writing complicated software.
• Students who are successful in discrete mathematics will be able to generalize
from a single instance of a problem to an entire class of problems. Another
important benefit is the ability to identify and extract patterns from data.
• Important note:
The actual calculations of discrete mathematics are not difficult. The important
part is the ability to think logically with a clearer thought process.

© Copyright Forouzan Golshani


Topics in Discrete Math
• Discrete math builds upon our knowledge of Sets, Relations and Functions,
and introduces some new topics such as: Boolean Algebra and
Propositional Logic, Mathematical Induction, Probability, Graph Theory,
Trees, etc.
• Do you remember set theory?
V = { a, e, i, o, u } or V = { x : x is a vowel in the English alphabet }
D = { 1, 2, 3 } or D = { x : x is a positive integer and x<4}
This is where things begin! Then, a relation on the above two sets is any
subset of their Cartesian product. For example:
R = { (e, 1), (o, 2), (e, 3), (a, 1) }
is a relation on V and D.
Remember that functions can be defined as restricted forms of relations.

© Copyright Forouzan Golshani


Applications in Computing
• Using the simple refresher of last slide, we can define a number of
important concepts that are used heavily in Computing.
• Given a set of nodes N, a graph on this set of nodes b
can be represented by a relation over the set N. a
For example, the graph on the right can be c
represented by the following relation. e
{ (a,b), (a,d), (b,d), (e,d), (d,c) } d

• In databases, a record (or a tuple in relational databases) with multiple


fields is simply a relation over the sets of possible data of each type. The
following is an example.
{ (John Doe, Administration, 152467), (Jane Roe, Maintenance, 161300), … }
© Copyright Forouzan Golshani
Boolean Algebra
• Boolean algebra, designed by George Boole in 1854, is a branch of
mathematics in which the variables take on truth values true and false,
often represented by 1 and 0, respectively.
• Also called Binary Algebra, Boolean Algebra is used to specify and analyze
the digital (logic) circuits.
• The basic operations of Boolean algebra are:
• Conjunction: The AND operation
• Disjunction: The OR operation
• Negation: The NOT operation.
Operator Symbols Precedence
NOT ' - ¬ Highest
AND . ∧ Middle
OR + ∨ Lowest

© Copyright Forouzan Golshani


Boolean Laws
• Complement of a variable is represented by a negation. The complement of
variable A is represented as ¬A. Thus, if A = 0 then ¬A = 1, and if A = 1 then ¬A = 0.
Note that ¬¬A = A.
• Conjunction laws: Laws that govern the operation AND are:
A^1 = A A^0 = 0 A^A = A A^¬A = 0
• Disjunction Laws: Laws governing the operation OR are:
Av1 = 1 Av0 = A AvA = A Av¬A = 1
• Commutative law:
A^B = B^A AvB = BvA
• Associative law:
(A^B)^C = A^(B^C) (AvB)vC = Av(BvC)
• Distributive law:
A^(BvC) = (A^B)v(A^C)

© Copyright Forouzan Golshani


Evaluating Boolean expressions
Given two variables A and B as Boolean variables, the values of basic expressions are calculated as follows:

A B ¬A A^B AvB
͢ 0 0 1 0 0
0 1 1 0 1
1 0 0 0 1
1 1 0 1 1

Let us read the first row of the table. The first row can be read as:
“If A and B are both false, then ¬A is true, A^B is false, and AvB is false.”

© Copyright Forouzan Golshani


Logic and Computing

First Order Logic


(Predicate Logic)

Propositional Logic

Boolean Algebra

More complex systems of formal logic are built on the


foundational rules of Boolean algebra.
© Copyright Forouzan Golshani
Turing Machines
• Alan Turing: Mathematician, 1912-54, BA Cambridge, PhD Princeton
• The Turing Machine formalized the concept of a general-purpose
computer, which included:
• An infinitely long tape that can contain symbols
• A head that can read symbols from or write symbols to the tape
• A state register that stores the state of the head
• A list of possible instructions.

© Copyright Forouzan Golshani


Artistic renderings of Turing machine

© Copyright Forouzan Golshani


Turing Machines and Computers
• Turing outlined the detailed design of a stored program in a
computer with memory.
In today’s computers: the tape is the RAM (Random Access Memory),
which is not quite infinite!, the head is the CPU (Central Processing
Unit), and the list of instructions is held in computer’s memory.
• Though extremely simple, we can construct a Turing Machine for
implementing the logic of any given computer algorithm.
• In summary, Turing – arguably the most influential mathematician of
our field – was able to prove properties of computation in its most
general form by providing a mathematical description of a very
simple device capable of arbitrary computations.

© Copyright Forouzan Golshani


Theory of Computation
• There are parallels between Turing machines and a branch of mathematics called
λ–calculus, which is also the foundation of research in programming languages.
Every problem that can be solved using a Turing Machine is solvable in λ–calculus.
• Corollary: If a problem is not solvable in λ–calculus, is it not solvable by Turing machines.
• There are certain problems that by their very nature can never be solved by a
computer. Computability theory attempts to classify what is and what is not
computable.
• Certain classes of problems can never be solved by a computer, for example, the
halting problem: whether a program (or a Turing Machine) will stop running or
will run indefinitely.
• There are also a class of problems that are theoretically computable, but in
practice solving them will require too much resources (memory and CPU) or more
time than the life of the universe.
© Copyright Forouzan Golshani
Computational Complexity
• Computational complexity attempts to classify problems based on
how they scale up with respect to the amount of resources and the
number of steps.
• Simplest class includes those problems that can be computed efficiently.
Examples: graph connectivity or testing if a number is prime.
• The next group includes those problems that can be solved but require
substantial resources such as a quantum computer.
Examples: Factoring or discrete logarithm
• A more complex set of problems are those for which we can only find a good
solution but necessarily the best solution.
Examples: Travelling salesman or map coloring
• Of course, there are multiple other categories of problems with higher
complexity.
© Copyright Forouzan Golshani
Various other foundational areas
• Coding theory: Used in communications, networking, programming and
other areas where computers communicate with each other.
• Game theory: Used in artificial intelligence, cybernetics and game design.
• Graph theory: The foundation for data structures and searching
algorithms.
• Mathematical logic (Predicate logic, Propositional logic and Boolean logic):
Used in many areas including formal proof methods, modeling logical
queries, and studying the limitations of computing.
• Number theory (the theory of the integers): Used in cryptography, data
science and artificial intelligence.

© Copyright Forouzan Golshani

You might also like