section of this chapter contains an
introduction to the techniques of program
verification. This is a formal technique to
verify that procedures are correct.
Program verification serves as the basis
for attempts under way to prove in a
mechanical fashion
are almost certainly prime. Do such tests
have any potential drawbacks? 3. The
question of whether there are infinitely
many Carmichael numbers was solved
recently after being open for more than
75 years. Describe the ingredients that
went into the proof
guessing the bits in its binary expansion.
13. Show that an integer is divisible by 9 if
and only if the sum of its decimal digits is
divisible by 9. P1: 1 CH04-7R Rosen2311T MHIA017-Rosen-v5.cls May 13,
2011 10:24 308 4 / Number Theory and
Cryptography 1
also be true. Remark: In a proof by
mathematical induction it is not assumed
that P (k) is true for all positive integers!
It is only shown that if it is assumed that P
(k) is true, then P (k + 1) is also true.
Thus, a proof by mathematical induction
is n
Solution: To construct the proof, let P (n)
denote the proposition: n3 n is
divisible by 3. BASIS STEP: The statement
P (1) is true because 13 1 = 0 is divisible
by 3. This completes the basis step.
INDUCTIVE STEP: For the inductive
hypothesis we assume t
linear congruences modulo pairwise
relatively prime moduli, find the
simultaneous solution of these
congruences modulo the product of these
moduli. 11. Given a positive integer N, a
modulusm, a multiplier a, an increment c,
and a seed x0, where 0 a< m, ge
interest to readers. The author is the
Series Editor of these books). Note that
there are many opportunities for errors in
induction proofs. We will describe some
incorrect proofs by mathematical
induction at the end of this section and in
the exercises.
encrypted using Alices key kAlice. (ii)
Cathy sends back to Alice a key
kAlice,Bob, which she generates,
encrypted using the key kAlice, followed
by this same key kAlice,Bob, encrypted
using Bobs key, kBob. (iii)Alice sends to
Bob the key kAlice,Bob encry
knocks the (k + 1)st domino overi.e., if
P (k) P (k + 1) is true for all positive
integers kthen all the dominoes are
knocked over. This is illustrated in Figure
2. Why Mathematical Induction is Valid
Why is mathematical induction a valid
proof technique?
system of congruences x a1(mod m1)
and x a2 (mod m2), where a1, a2, m1,
and m2 are integers with m1 > 0 and m2
> 0, has a solution if and only if gcd(m1,
m2) | a1 a2. b) Show that if the system
in part (a) has a solution, then it is unique
modulo lcm(m1,
where p1, p2,.,pn are the n smallest
primes, for as many positive integer n as
possible. 4. Look for polynomials in one
variables whose values at long runs of
consecutive integers are all primes. 5.
Find as many primes of the form n2 + 1
where n is a posi
proofs using mathematical induction, as
well as introducing the terminology
mathematical induction. Maurolicos
proofs were informal and he never used
the word induction. See [Gu11] to learn
more about the history of the method of
mathematical induction. P
of factorial function. This shows that P (k
+ 1) is true when P (k) is true. This
completes the inductive step of the proof.
We have completed the basis step and the
inductive step. Hence, by mathematical
induction P (n) is true for all integers n
with n
assume that If you are rusty simplifying
algebraic expressions, this is the time to
do some reviewing! 1 + 2 + k = k(k + 1)
2 . Under this assumption, it must be
shown that P (k + 1) is true, namely, that 1
+ 2 + k + (k + 1) = (k + 1)[(k + 1) + 1] 2
= (k
47, 7), dAlice = 1183 and (nBob, eBob) =
(3127, 21) = (59 53, 21), dBob = 1149.
First express your answers without
carrying out the calculations. Then, using
a computational aid, if available, perform
the calculation to get the numerical
answers. 31. Alic
Rosen-v5.cls May 13, 2011 10:25 5
CHAPTER Induction and Recursion 5.1
Mathematical Induction 5.2 Strong
Induction and Well-Ordering 5.3
Recursive Definitions and Structural
Induction 5.4 Recursive Algorithms 5.5
Program Correctness Many mathematical
state
congruence 3(d1 + d4 + d7) + 7(d2 + d5 +
d8) + (d3 + d6 + d9) 0 (mod 10) must
hold. 45. Show that if d1d2 .d9 is a valid
RTN, then d9 = 7(d1 + d4 + d7) + 3(d2 +
d5 + d8) + 9(d3 + d6) mod 10.
Furthermore, use this formula to find the
check digit that follo
prove statements that assert that P (n) is
true for all positive integers n, where P
(n) is a propositional function. A proof by
mathematical Unfortunately, using the
terminology mathematical induction
clashes with the terminology used to
describe differe
the ciphertext. 17. Construct a valid RSA
encryption key by finding two primes p
and q with 200 digits each and an integer
e > 1 relatively prime to (p 1)(q 1). 18.
Given a message and an integer n = pq
where p and q are odd primes and an
integer e > 1 re
message secret decryption: the process of
returning a secret message to its original
form encryption key: a value that
determines which of a family of
encryption functions is to be used shift
cipher: a cipher that encrypts the
plaintext letter p as (p + k
inverse of e = 13 modulo 42 58.) 28.
Suppose that (n, e) is an RSA encryption
key, with n = pq where p and q are large
primes and gcd(e, (p 1)(q 1) = 1.
Furthermore, suppose that d is an inverse
of e modulo (p 1)(q 1). Suppose that C
Me (mod pq). In the
(ii) of this theorem, and the inductive
hypothesis, we conclude that the first
term in this last sum, 7(7k+2 + 82k+1), is
divisible by 57. By part (ii) of this
theorem, the second term in this sum, 57
82k+1, is divisible by 57. Hence, by part
(i) of this
Use the autokey cipher to encrypt the
message NOW IS THE TIME TO DECIDE
(ignoring spaces) using a) the keystream
with seed X followed by letters of the
plaintext. b) the keystream with seed X
followed by letters of the ciphertext. 49.
Use the autokey ciph
there are infinitely many primes
(Theorem 3 in Section 4.3) to show that
are infinitely many primes in the
arithmetic progression 6k + 5, k = 1, 2,.
30. Explain why you cannot directly adapt
the proof that there are infinitely many
primes (Theorem 3 in Se
prove an extremely wide variety of
theorems, each of which is a statement of
this form. (Remember, many
mathematical assertions include an
implicit universal quantifier. The
statement if n is a positive integer, then
n3 n is divisible by 3 is an example o
point needs to be made about
mathematical induction before we
commence a study of its use. The good
thing about mathematical induction is
that it can be used to prove P1: 1 CH05-7R
Rosen-2311T MHIA017-Rosen-v5.cls May
13, 2011 10:25 5.1 Mathematical
Induc
the definition of harmonic number = H2k
+ 1 2k + 1 + 1 2k+1 by the definition of
2kth harmonic number 1 + k 2 + 1 2k +
1 + 1 2k+1 by the inductive hypothesis
1 + k 2 + 2k 1 2k+1 because there are
2k terms each 1/2k+1 1 + k 2 + 1 2
canceling a common fact
law (where the two sets are
k j = 1 Aj and Ak+1) = k j = 1 Aj
Ak+1 by the inductive hypothesis = k +1 j
= 1 Aj by the definition of union. This
completes the inductive step. Because we
have completed both the basis step and
the inductive step, by mathema
digit. 9. Describe the Luhn algorithm for
finding the check digit of a credit card
number and discuss the types of errors
that can found using this check digit. 10.
Show how a congruence can be used to
tell the day of the week for any given date.
11. Desc
2 we explicitly defined sets and functions.
That is, we described sets by listing their
elements or by giving some property that
characterizes these elements. We gave
formulae for the values of functions.
There is another important way to define
such obje