University of Hail
College of Computer Science and Engineering
Dept of Computer Science & Software Engineering
First Semester 2015
ICS-252 Discrete Structure II
ail. S.hagahmoodi@uoh.edu.saOffice P16/8
Dr. Salah Omer Hagahmoodi
Course Overview
Acknowledgment goes to
Dr. M. Rana
3 ICS 252 Discrete Structures II (3-0-3)
Number Theory: Modular Arithmetic, Integer Representation, Fermat’s Little
Theorem, Chinese Remainder Theorem, RSA.; Proof Techniques: Methods of
Proofs, Applications from Number Theory, Recursive Definitions; Algorithm
Correctness; Relations: Closures and Equivalence Relations, Partial Orderings
and Lattices, Hasse Diagrams; Recurrence Relations and Generating
Functions; Automata Theory: Finite State Machines, Regular Expressions,
DFA, NDFA and their equivalence, Grammars and Chomsky Hierarchy,
Introduction to Turing Machines.; Abstract Algebra: Groups, Homomorphisms
and Lagrange's Theorem, Applications.
Prerequisite: ICS 102
Course Objectives
This course introduce the mathematical concepts that form
the basis of computer science, including number theory
(such
as
division,
modular
arithmetic,
integer
representation,
Fermat’s
Little
Theorem,
Chinese
1-5
A student completing this module unit should be
able to:
1- Understand what discrete structures are, and
why it is important in computer science.
2- Understand the basic concept related to
i.
number theory such as division, congruent,
prime numbers, gcd, and relatively primes.
ii. different b-systems to represent the integers.
iii. different techniques of proof.
iv. different types of relations.
v. what is the mean by recursive?
vi. basic concepts in automata theory.
3- Ability to:
i. use division and modular arithmetic for generating
pseudorandom numbers, hash function and cryptology.
ii. prove some theorems related to number theory.
iii.change a decimal integer to other b-system and vice
via.
iv.prove a mathematical statement using of the method
proof.
v. prove that the algorithm is correct.
vi.solve many exercise related to studied topics.
vii.
use Fermat’s little and Chinese Remainder theorem in
RSA.
viii.determine the language generated by deterministic
finite automata and regular expression
Course Assessment
Assessment: Assessment for this course will be based on homework, class tests (or quizzes), major exams, a final exam as in the following:
Major 1 20%
Major 2 20%
Quizzes + HW 15%
Final Exam 45%
Lecture one: Outlines
•
Define Discrete Structures
•
Importance of Discrete Structures
•
What is Number Theory
•
Number Theory Areas
•
Integer Representation
Discrete Structures
Definition: Discrete structure deals with discrete objects.
Discrete objects are those which are separated from (not connected) each other.
Examples:
Integers (whole numbers 5, 10, 15), rational numbers (ones that
can be expressed as the quotient of two integers i.e. 10/5) are discrete object.
Automobiles, houses, people etc. are all discrete objects.
On the other hand real numbers (such as 5.35, 5.2345) which
include irrational as well as rational numbers are not discrete.
Between any two different real numbers there is another real
number different from either of them. So they are packed without any gaps and can not be separated from their immediate
neighbors. In that sense they are not discrete.
Importance of Discrete Structures
• It provides foundation material for computer science.• It includes important material from such areas as set theory, logic, graph theory, and combinatorics.
• It enables students to create and understand a proof— either a formal symbolic proof or a less formal but still
mathematically rigorous argument—is essential in formal
specification, in verification, in databases, and in
cryptography.
Importance of Discrete Structures
• The graph theory concepts are used in networks, operating systems, and compilers.
• Set theory concepts are used in software engineering and in databases.
• In engineering, It can be used to control multiproduct batch plants, synthesis of new multifunctional reactors
and design of a new class of simulator.
What is Number Theory?
Definition: Number theory
is the branch of pure
mathematics concerned with the properties of
numbers in general, and integers in particular, as
well as the wider classes of problems that arise
from their study.
Number Theory Areas:
•
Elementary number theory-
Study of Integers.
•
Analytic number theory-
employs the machinery
of calculus and complex analysis to tackle
questions about integers.
Number Theory Areas
13 • Algebraic number theory- the concept of a number is
expanded to the algebraic numbers which are roots of polynomials with rational coefficients.
• Geometry of numbers- incorporates some basic
geometric concepts, such as lattices, into number-theoretic questions.
• Combinatorial number theory- deals with number
theoretic problems which involve combinatorial ideas in their formulations or solutions.
• Computational number theory- studies algorithms relevant in number theory. Fast algorithms for prime testing and integer factorization have important
applications in cryptography.
What is an Integer
• The integers from the Latin integer, literally are
"untouched", hence we can say "whole“.
• formed by the natural numbers including 0 (0, 1, 2, 3, ...)
together with the negatives of the non-zero natural numbers (−1, −2, −3, ...).
• They are numbers that can be written without a fractional or decimal component, and fall within the set {... -3 ,−2, −1, 0, 1, 2, 3...}.
• For example, 65, 7, and −756 are integers; 1.6 and 1½ are
not integers. The set of all integers is often denoted by a boldface Z (or blackboard bold ℤ), which stands for Zahlen
(German for numbers, pronounced [ˈtsaːlən])
Integer Representation
15
• Integers can be thought of as discrete, equally spaced points on an infinitely long number line.
• In everyday life we use decimal notation (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) to express integers. For Example: 965 is used to denote as;
• In computers we normally use Binary (0, 1) number system (with 2 as the base) e.g. 10111.
• Octal (base 8)- (0, 1, 2, 3, 4, 5, 6, 7) number system, e.g 457
• Hexadecimal (base 16)- (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) e.g. 05DF
By using these number systems we can represents characters, such as letters upper and lower cases and numbers.
ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.
Theorem
Let
b
be a positive integer greater than 1.
Then if
n
is a positive integer, it can be
expressed uniquely in the form
Where
K
is a nonnegative integer,
Are non negative integers less than
b
, and
a
0, a
1...
a
ka
k
≠
0
ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.
Example
ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.