














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
ejioejfjrek erjjkgnrj iorejgiojigjjrtjgijitjigjijtitjgiojitjiojgi4jijjjriojgkrejklkldnslklknkldsn,mnsohrwjgortjhgiojrtkgjktrjgklnkrtlnh4uh85t48u580tu304ut8riejiojreoiegjorhjgonsider a hard disk with 16 recording surfaces ( 0 − 15 ) having 16384 cylinders ( 0 − 16383 ) and each cylinder contains 64 sectors ( 0 − 63 ) . Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is <cylinder number, surface number, sector number>. A file of size 42797 KB is stored in the disk and the starting disk location of the file is < 1200 , 9 , 40 > . What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner? onsider a hard disk with 16 recording surfaces ( 0 − 15 ) having 16384 cylinders ( 0 − 16383 ) and each cylinder contains 64 sectors ( 0 − 63 ) . Data storage capacity i
Typology: Summaries
1 / 22
This page cannot be seen from the preview
Don't miss anything!
Topics:
Divisibility and modular arithmetic, Integer representations, Primes and the
greatest common divisor, Congruence.
properties is known as number theory.
theory including many of those used in computer science. As we develop
number theory, we will use the proof methods developed in Module 1 to prove
many theorems.
introduce modular, or clock, arithmetic.
divided by a fixed positive integer, called the modulus.
base.
algorithm for finding them. In particular, we will discuss binary, octal, and
hexadecimal (base 2, 8, and 16) representations.
as positive divisors.
considered to be one of the most beautiful proofs in mathematics.
concerning primes.
Euclidean algorithm for computing them.
tells us that every positive integer has a unique factorization into primes.
or may not be an integer.
12
3
= 4 is an integer, whereas
11
4
= 2. 75 is not.
DEFINITION: If a and b are integers with a ≠ 0, we say that a divides b if
there is an integer c such that b = ac , or equivalently, if
𝑏
a
is an integer.
When a divides b we say that a is a factor or divisor of b , and that b is a
multiple of a.
The notation a | b denotes that a divides b.
universe of discourse is the set of integers
EXAMPLE: Determine whether 3|7 and whether 3|12.
Solution: We see that 3 | 7, because
7
3
is not an integer.
On the other hand, 3|12 because
12
3
EXAMPLE: Let n and d be positive integers. How many positive integers
not exceeding n are divisible by d?
Solution: The positive integers divisible by d are all the integers of the
form dk , where k is a positive integer.
Hence, the number of positive integers divisible by d that do not exceed n
equals the number of integers k with 0 < dk ≤ n , or with 0 < k ≤ n/d.
Therefore, there are positive integers not exceeding n that are
divisible by d.
COROLLARY 1 If a , b , and c are integers, where a ≠ 0, such that a | b
and a | c , then a |( mb + nc ) whenever m and n are integers.
Proof:
We will give a direct proof.
By part ( ii ) of Theorem 1 we see that a | mb and a | nc
whenever m and n are integers.
By part ( i ) of Theorem 1 it follows that a |( mb + nc ).
Let a be an integer and d a positive integer. Then there are unique integers
q and r , with 0 ≤ r < d , such that a = d q + r.
Proof:
Let S be the set of nonnegative integers of the form a - dq , where q is an
integer that is 𝑆 = {𝑧 ∈ 𝑁| 𝑧 = 𝑎 − 𝑑𝑞 }
This set is nonempty (one can prove it – small exercise) because - dq can be
made as large as desired (taking q to be a negative integer with large
absolute value). By the well-ordering property, S has a least element
r = a – d 𝑞
0
for some 𝑞. (Cont….)
Note: The well-ordering principle states that every non-empty set of
positive integers contains a least element
In the equality given in the division algorithm, d is called the divisor , a
is called the dividend , q is called the quotient , and r is called the
remainder.
This notation is used to express the quotient and remainder:
q = a div d, r = a mod d.
Remark: Note that both a div d and a mod d for a fixed d are functions
on the set of integers. Furthermore, when a is an integer and d is a
positive integer, we have a div d = a/d and a mod d = a - d.
Example: What are the quotient and remainder when 101 is divided
by 11?
Solution: 101 = 11 ∗ 9 + 2_._
Hence, the quotient when 101 is divided by 11 is 9 = 101 div 11, and
the remainder is 2 = 101 mod 11.
Solution: We have - 11 = 3 ( - 4 ) + 1_._
Hence, the quotient when - 11 is divided by 3 is - 4 = - 11 div 3, and the
remainder is 1 = - 11 mod 3.
Note that the remainder cannot be negative.
because r = - 2 does not satisfy 0 ≤ r < 3.
remainder is zero when a is divided by d.
an integer a is divided by the positive integer m.
have the same remainder when they are divided by the positive integer m.
If a and b are integers and m is a positive integer, then a is congruent to b modulo m if
m divides a - b.
We use the notation a ≡ b (mod m ) to indicate that a is congruent to b modulo m.
moduli ).
Let a and b be integers, and let m be a positive integer.
Then a ≡ b (mod m ) if and only if a mod m = b mod m
Example: Determine whether 17 is congruent to 5 modulo 6 and
whether 24 and 14 are congruent modulo 6
Solution: Because 6 divides 17 - 5 = 12, we see that 17 ≡ 5 (mod 6).
However, 24 - 14 = 10 is not divisible by 6, hence, 24 ≢14 (mod 6).
Note: The great German mathematician Karl Friedrich Gauss
developed the concept of congruences at the end of the eighteenth
century. The notion of congruences has played an important role in
the development of number theory.
Let m be a positive integer. If a ≡ b ( mod m) and c ≡ d ( mod m) , then a
Proof: We use a direct proof.
Since a ≡ b ( mod m) and c ≡ d ( mod m) , by Theorem 4 there are
integers s and t with b = a + sm and d = c + tm.
Hence, b + d = (a + sm) + (c + tm) = (a + c) + m(s + t) and
bd = (a + sm)(c + tm) = ac + m(at + cs + stm).
Hence, a + c ≡ b + d ( mod m) and ac ≡ bd ( mod m).
If 7 ≡ 2 ( mod 5 ) and 11 ≡ 1 ( mod 5 ) ,
By Theorem 5 it follows that
18 = 7 + 11 ≡ 2 + 1 = 3 ( mod 5 ) and that
77 = 7 · 11 ≡ 2 · 1 = 2 ( mod 5 ).
𝑚
, the set of nonnegative integers
less than m , that is, the set
{0 , 1 ,... , m - 1}
𝑚
by
a +
𝑚
b = (a + b) mod m,
where the addition on the right-hand side of this equation is the ordinary
addition of integers.
𝑚
by
a ·
𝑚
b = (a · b) mod m,
where the multiplication on the right-hand side of this equation is the
ordinary multiplication of integers.
𝑚
and ·
𝑚
are called addition and multiplication modulo m
and when we use these operations, we are said to be doing arithmetic
modulo m.
𝑚
to
find 7 +
11
9 and 7 ·
11
Solution:
Using the definition of addition modulo 11, we find that
11
9 = ( 7 + 9 ) mod 11 = 16 mod 11 = 5 ,
and
11
9 = ( 7 · 9 ) mod 11 = 63 mod 11 = 8_._
Hence 7 +
11
9 = 5 and 7 ·
11