Computer Science and Engineering (Data Science)
Year of
CODE COURSE NAME CATEGORY L T P CREDIT
Introduction
CST292 NUMBER THEORY VAC 4 0 0 4 2019
Preamble: This is the foundational course for awarding B. Tech. Honours in Computer Science and
Engineering with specialization in Security in Computing. The purpose of this course is to
create awareness among learners about the important areas of number theory used in computer
science. This course covers Divisibility & Modular Arithmetic, Primes & Congruences, Euler's
Function, Quadratic Residues and Arithmetic Functions, Sum of Squares and Continued fractions.
Concepts in Number Theory help the learner to apply them eventually in practical applications in
Computer organization & Security, Coding & Cryptography, Random number generation, Hash
functions and Graphics.
Prerequisite: A sound background in Higher Secondary School Mathematics
Course Outcomes: After the completion of the course the student will be able to
Illustrate modular arithmetic operations, methods and techniques (Cognitive Knowledge
CO1
Level:Understand)
Use the methods - Induction, Contraposition or Contradiction to verify the correctness of
CO2
mathematical assertions (Cognitive Knowledge Level: Apply)
Utilize theorems and results about prime numbers, congruences, quadratic residues and
CO3 integer factorization for ensuring security in computing systems (Cognitive Knowledge
Level: Analyse)
Illustrate uses of Chinese Remainder Theorem & Euclidean algorithm in Cryptography and
CO4
Security (Cognitive Knowledge Level: Apply)
Explain applications of arithmetic functions in Computer Science (Cognitive Knowledge
CO5
Level:Understand)
Implement Number Theoretic Algorithms using a programming language (Cognitive
CO6
Knowledge Level: Apply)
Computer Science and Engineering (Data Science)
Mapping of course outcomes with program outcomes
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 ! ! ! ! ! !
CO2 ! ! ! ! !
CO3 ! ! ! ! ! !
CO4 ! ! ! ! ! !
CO5 ! ! ! ! ! !
CO6
! ! ! ! ! ! !
Abstract POs defined by National Board of Accreditation
PO# Broad PO PO# Broad PO
PO1 Engineering Knowledge PO7 Environment and Sustainability
PO2 Problem Analysis PO8 Ethics
PO3 Design/Development of solutions PO9 Individual and team work
Conduct investigations of complex
PO4 PO10 Communication
problems
PO5 Modern tool usage PO11 Project Management and Finance
PO6 The Engineer and Society PO12 Life long learning
Computer Science and Engineering (Data Science)
Assessment Pattern
Continuous Assessment Tests End Semester
Bloom’s Category Examination Marks
Test1 (Percentage) Test2 (Percentage) (Percentage)
Remember 30 30 30
Understand 30 30 30
Apply 40 40 40
Analyse
Evaluate
Create
Mark Distribution
Total Marks CIE Marks ESE Marks ESE Duration
150 50 100 3 hours
Continuous Internal Evaluation Pattern:
Attendance : 10 marks
Continuous Assessment Tests : 25 marks
Continuous Assessment Assignment : 15 marks
Computer Science and Engineering (Data Science)
Internal Examination Pattern:
Each of the two internal examinations has to be conducted out of 50 marks
First Internal Examination shall be preferably conducted after completing the first half of the syllabus
and the Second Internal Examination shall be preferably conducted after completing remaining part of
the syllabus.
There will be two parts: Part A and Part B. Part A contains 5 questions (preferably, 2 questions each
from the completed modules and 1 question from the partly covered module), having 3 marks for each
question adding up to 15 marks for part A. Students should answer all questions from Part A. Part B
contains 7 questions (preferably, 3 questions each from the completed modules and 1 question from
the partly covered module), each with 7 marks. Out of the 7 questions in Part B, a student should
answer any 5.
End Semester Examination Pattern:
There will be two parts; Part A and Part B. Part A contains 10 questions with 2 questions from each
module, having 3 marks for each question. Students should answer all questions. Part B contains 2
questions from each module of which a student should answer any one. Each question can have
maximum 2 sub-divisions and carries 14 marks.
SYLLABUS
Module 1
Divisibility and Modular Arithmetic:
Finite Fields – Groups, Rings and Fields.
Divisibility - Divisibility and Division Algorithms, Well ordering Principle,Bezout’s Identity.
Modular Arithmetic- Properties, Euclid's algorithm for the greatest common divisor, Extended Euclid’s
Algorithm, Least Common multiple, Solving Linear Diophantine Equations, Modular Division.
Module 2
Primes and Congruences:
Prime Numbers-Prime Numbers andprime-powerfactorization, Fermat and Mersenne primes.,
Primality testing and factorization.
Computer Science and Engineering (Data Science)
Congruences-Linear congruences, Simultaneous linear congruences, Chinese Remainder Theorem,
Fermat’s little theorem, Wilson's theorem.
Module 3
Congruences with a Prime-Power Modulus&Euler's Function:
Congruences with a Prime-Power Modulus-Arithmetic modulo p, Pseudoprimes and Carmichael
numbers, Solving congruences modulo prime powers.
Euler's Function-Euler’s Totient function, Applications of Euler’s Totient function, Traditional
Cryptosystem, Limitations.
The Group of units- The group Un,Primitive roots, Existence of primitive roots, Applications of
primitive roots.
Module 4
Quadratic Residues & Arithmetic Functions :
Quadratic Residues- Quadratic Congruences, The group of Quadratic residues, Legendre symbol,
Jacobi Symbol, Quadratic reciprocity.
Arithmetic Functions- Definition and examples, Perfect numbers, Mobius function and its properties,
Mobius inversion formula, The Dirichlet Products.
Module 5
Sum of Squares and Continued Fractions:
Sum of Squares- Sum of two squares, The Gaussian Integers, Sum of three squares, Sum of four
squares.
Continued Fractions -Finite continued fractions, Infinite continued fractions, Pell's Equation, Solution
of Pell’s equation by continued fractions.
Text Books
1. G.A. Jones & J.M. Jones, Elementary Number Theory, Springer UTM, 2007.
2. Joseph Silverman, A Friendly introduction to Number Theory, Pearson Ed. 2009.
Computer Science and Engineering (Data Science)
Reference Books
1. William Stallings, Cryptography and Network Security Principles and Practice, Pearson Ed.
2. Tom M.Apostol, ‘Introduction to Analytic Number Theory’, Narosa Publishing House Pvt. Ltd,
New Delhi, (1996).
3. Neal Koblitz, A course in Number Theory and Cryptography, 2nd Edition, Springer ,2004.
Sample Course Level Assessment Questions
Course Outcome 1 (CO1): Describe the properties of modular arithmetic and modulo operator.
Course Outcome 2 (CO2): Prove that the equation y2 = x3 - 2 has only the integer solution (3, ±5).
Course Outcome 3 (CO3): State the law of reciprocity for Jacobi symbols and use it to determine
whether 888 is a quadratic residue or non residue of the prime 1999.
Course Outcome 4 (CO4): Using Chinese remainder theorem, solve the system of congruence x
≡2(mod 3), x ≡3(mod 5), x ≡2(mod 7)
Course Outcome 5(CO5): State and prove Dirichlet product.
Course Outcome 6 (CO6):Use extended Euclid's algorithm to solve Diophantine equations
efficiently. Given three numbers a>0, b>0, and c, the algorithm should return some x and y such that
a x + b y = c.
Computer Science and Engineering (Data Science)
Model Question Paper
QP CODE: PAGES: 03
RegNo : …............................... Name :………..……………
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
FOURTH SEMESTER BTECH (HONOURS) DEGREE EXAMINATION, MONTH &YEAR
Course Code:CST 292 Course
Name: Number Theory
Max.Marks:100 Duration: 3 Hours
PART A
Answer all Questions. Each question carries 3 Marks (10x3=30)
1. State and prove well ordering principle.
2. Find gcd d of x=525 and y=231 and express d as ax + by where a and b are integers.
3. Solve the congruence equation 103 x≡ 57 (mod 211).
4. Use Fermat’s Little theorem to show that 91 is not a prime.
5. If m is relatively prime to n , show that Φ(mn) = Φ(m) Φ(n).
6. Explain how public key cryptography can be used for digital signatures.
7. Define Mobius function and prove Mobius function is a multiplicative.
8. State and prove Dirichlet product.
9. Show that every prime of the form 4k+1 canbe represented uniquely as the sum of two
squares.
10. Find the continued fraction representation of the rational number 55/89.
Part B
Answer any one Question from each module.
Each question carries 14 Marks
11. (a) State the Euclidean algorithm and its extension with an example. (7)
(b) Find all the solutions of 24x + 34 y = 6. (7)
OR
12. (a) Describe the properties of modular arithmetic and modulo operator. (7)
(b) Explain Extended Euclidean algorithm. Using the algorithm find the
Computer Science and Engineering (Data Science)
multiplicative inverse of 135 mod 61 (7)
13. (a) State and prove Wilson’s theorem . (7)
(b) Explain Fermat’s factorization method and use it to factor 809009 (7)
OR
14. (a) Using Chinese remainder theorem, solve the system of congruences,
x ≡2(mod 3), x ≡3(mod 5), x ≡2(mod 7) (7)
(b) Define Fermat primes. Show that any two distinct Fermat numbers are
Relatively prime. (7)
15. (a) Distinguish between public key and private key encryption techniques.
Also point out the merits and demerits of both. (7)
(b) Define Carmichael number and show that a Carmichael number must
be the product of at least three distinct primes. (7)
OR
16. (a)Define a pseudo prime to a base and find all non trivial bases for which
15 is a pseudo prime. (6)
(b) Find an element of
i) order 5 modulo 11 ii) order 4 modulo 13
iii) order 8 modulo 17 iv) order 6 modulo 19 (8)
17. (a) Determine the quadratic residues and non residues modulo 17. Also
determine whether 219 is a quadratic residue or non residue of the prime 383.
(8)
(b) State the law of quadratic reciprocity. Determine those odd primes p for
which 3 is a quadratic residue and those for which it is a non residue. (6)
OR
18. (a) State and prove properties of Legendre’s symbol. (7)
(b) State the law of reciprocity for Jacobi symbols and using it determine
whether 888 is a quadratic residue or non residue of the prime 1999. (7)
19. (a) Prove that the equation y2 = x3 - 2 has only the integer solution (3 , ±5). (7)
Computer Science and Engineering (Data Science)
(b) Define a Gaussian integer. Factorize the Gaussian integer 440 − 55i. (7)
OR
20. (a) If m, and n can be expressed as sum of four squares, then show that mn can
also be expressed the sum of four squares. (7)
(b) Find all the solutions of the Diophantine equation x2 – 6 y 2 =1. (7)
Teaching Plan
Module 1: Divisibility and Euclidean Algorithm 9 hours
1.1 Finite Fields – Groups and Rings. 1 hour
1.2 Finite Fields – Fields. 1 hour
1.3 Divisibility and Division Algorithms, Well ordering Principle. 1 hour
Decimal Expansion of a positive Integer, Greatest Common Divisor,
1.4 1 hour
Bezout’s Theorem.
Modular Arithmetic- Properties of congruences, Modular Arithmetic
1.5 1 hour
Operations, Properties of Modular Arithmetic.
Euclid's algorithm for the greatest common divisor, Extended Euclid’s
1.6 1 hour
Algorithm.
1.7 Solving Linear Diophantine Equations. 1 hour
1.8 Least Common multiple and Modular Division. 1 hour
Implementation of Euclid’s algorithm, Extended Euclid’s Algorithm and
1.9 1 hour
solution of Linear Diophantine Equations.
Module 2: Primes and Congruences 9 hours
2.1 Prime Numbersand prime-powerFactorization. 1 hour
2.2 Fermat and Mersenne primes. 1 hour
2.3 Primality testing and factorization, Miller -Rabin Test for Primality. 1 hour
2.4 Pollard's Rho Method for Factorization, Fermat’s Factorization. 1 hour
Computer Science and Engineering (Data Science)
2.5 Linear congruences, Simultaneous linear congruences. 1 hour
2.6 Chinese Remainder Theorem. 1 hour
2.7 Implementation of Chinese Remainder Theorem. 1 hour
2.8 Fermat's little theorem. 1 hour
2.9 Wilson's theorem. 1 hour
Module 3: Congruences with a Prime-Power Modulus &Euler's Function 9 hours
3.1 Congruences with a Prime-Power Modulus, Arithmetic modulo p. 1 hour
3.2 Pseudo-primes and Carmichael numbers. 1 hour
3.3 Solving congruences modulo prime powers. 1 hour
3.4 Definition of Euler Totient function, Examples and properties. 1 hour
3.5 Multiplicativity of Euler's Totient function. 1 hour
3.6 Applications of Euler’s function, Euler’s Theorem. 1 hour
3.7 Traditional Cryptosystem, Limitations, Public Key Cryptography. 1 hour
3.8 The Group of Units, Primitive Roots. 1 hour
3.9 Existence of primitive roots for Primes, Applications of primitive roots. 1 hour
Module 4: Quadratic Residues and Arithmetic Functions 9 hours
4.1 Quadratic congruences, The group of Quadratic Residues. 1 hour
4.2 Legendre symbol, Jacobi Symbol. 1 hour
4.3 Quadratic reciprocity. 1 hour
4.4 Quadratic residues for prime-power moduli. 1 hour
4.5 Arithmetic Functions: Definition and examples. 1 hour
Computer Science and Engineering (Data Science)
4.6 Perfect numbers, Definition and proposition. 1 hour
4.7 Mobius inversion formula., application of the Mobius inversion formula. 1 hour
4.8 Mobius function and its properties. 1 hour
4.9 The Dirichlet Product, Definition and proof. 1 hour
Module 5: Sum of Squares and Continued Fractions 9 hours
5.1 Sum of Squares, Sum of two squares. 1 hour
5.2 The Gaussian Integers. 1 hour
5.3 Sum of three squares. 1 hour
5.4 Sum of four squares. 1 hour
5.5 Continued Fractions, Finite continued fractions. 1 hour
5.6 Continued Fractions, Finite continued fractions. 1 hour
5.7 Infinite continued fractions. 1 hour
5.8 Pell's Equation, Definition. 1 hour
5.9 Solution of Pell's equation by continued fractions. 1 hour