ICS-252 Discrete Structure II

  

University of Hail

College of Computer Science and Engineering

Dept of Computer Science & Software Engineering

First Semester 2015

  ICS-252 Discrete Structure II ail Office P16/8

  

Dr. Salah Omer Hagahmoodi

Assistant Professor.

Course Overview

  

Acknowledgment goes to

Dr. M. Rana

The former Assistant professor

University of Hail Course Descriptions

  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 Remainder Theorem), relations, proof methods, recursive

  

definition and abstract algebra. Then demonstrate how

these concepts are applied to the areas of computer

science, including cryptology (encryption and decryption

and RSA), hashing function, pseudorandom number

generator, recursive algorithm, correctness of algorithms,

finite state machine and languages.

  A student completing this module unit should be able to:

  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?

  Course Outcomes

Course Outcomes

  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

  

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% Total 100%

Lecture one: Outlines

  • Define Discrete Structures
  • Importance of Discrete Structures
  • What is Number Theory
  • Number Theory Areas
  • Integer Representation ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.

  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.

  

ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.

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.

  

ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.

Number Theory Areas

  • 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. ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.

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])

  ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.

Integer Representation

  • 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;

  2 1 9 . 10  6 . 10  5 .

  10 • 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.

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 k k

  

  

1

  1

n a b a b a b a b

....

       k k

  

  1

  1 a , a

  .........a k

  1 Where K is a nonnegative integer, Are non negative integers less than b , and a

  ≠ 0 k 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.

  2 ) 101 ( Lecture 1 Homework 1) What is the Decimal expansion of the integer that has as its

  ( 101011111 )

  2 Binary expansion? 2) What is the Decimal expansion of the Hexadecimal expansion of

  AE B ( 2 )

  16

  ?

3) What is the Binary expansion of the integer

that has 5 as its Decimal? 4) What is the Binary expansion of the Octal expansion of ?

  ( 467 )

  8

  Thank you for your Attention.

  ICS-252 Dr. Salah Omer Hagahmoodi, Assistant Professor, CSSE, University of Hail.