Please do
exercises in teams of two.
Doing so garners a 5% bonus.
Show intermediate steps/explanations for obtaining answers.
modular_exponentiation(int a, int e, int m)
into a (Java) program.
(Test it with examples from lectures and our textbook,
e.g.
as shown in a lecture,
modular_exponentation(0708,37,10807) should return 8687;
as shown in a lecture,
modular_exponentation(8687,573,10807) should return 708;
as shown in our textbook's Example 11 on page 227,
modular_exponentation(3,644,645) should return 36;
as shown at the top of our textbook's page 243,
modular_exponentation(1819,13,2537) should return 2081;
as shown at the top of our textbook's page 243,
modular_exponentation(1415,13,2537) should return 2182;
as shown near the bottom of our textbook's page 243,
modular_exponentation(0981,937,2537) should return 0704;
and
as shown near the bottom of our textbook's page 243,
modular_exponentation(0461,937,2537) should return 1115.
But you don't need to submit anything showing these tests;
this is just a suggestion for you to confirm that the code works properly.)
Then, do the following:
modular_exponentiation()
to encrypt each block
as in our textbook's Example 11
on pages 242-43.
E.g. for me,
making 'blocks' out of pairs of those eight numbers yields the following:
modular_exponentiation(1202,13,2537) returns 1225,
modular_exponentiation(0620,13,2537) returns 72,
modular_exponentiation(0817,13,2537) returns 1204,
and
modular_exponentiation(0407,13,2537) returns 1051,
so
encrypting those numbers yields the following numbers:
modular_exponentiation()
to decrypt the following numbers:
modular_exponentiation(0981,937,2537) returns 0704,
and
modular_exponentiation(0461,937,2537) returns 1115.
Separating those 'blocked' numbers 0704 and 1115
to translate them into letters yields the following:
multiplicative_inverse_of_e_modulo_f(int e, int f)
into a (Java) program.
(Test it with examples from lectures and our textbook,
e.g.
as shown in a lecture,
multiplicative_inverse_of_e_modulo_f(7,20) should return 3;
as shown in a lecture,
multiplicative_inverse_of_e_modulo_f(13,20) should return 17;
as shown in a lecture,
multiplicative_inverse_of_e_modulo_f(37,10600) should return 573;
and
as indicated in our textbook's Example 12 on page 243,
multiplicative_inverse_of_e_modulo_f(13,2436) should return 937.
But you don't need to submit anything showing these tests;
this is just a suggestion for you to confirm that the code works properly.)
Then, do the following:
assert.)
multiplicative_inverse_of_e_modulo_f(9159,12136) returns 1863,
so
my value for d is 1863.
modular_exponentiation(10266,1863,12367) returns 1300,
modular_exponentiation(7409,1863,12367) returns 1204,
modular_exponentiation(3113,1863,12367) returns 1707,
modular_exponentiation(9231,1863,12367) returns 2412,
modular_exponentiation(1510,1863,12367) returns 418,
modular_exponentiation(11763,1863,12367) returns 2208,
and
modular_exponentiation(6123,1863,12367) returns 1704.
Separating those 'blocked' numbers 1300, 1204, 1707, 2412, 418, 2208, and 1704
to translate them into letters yields the following:
By the way, if you get a number 30 which you're supposed to translate into an English letter, just ignore it.
.
.
.
2k+1
= [by/because of ? ? ? ]
2·2k
> [by/because of ? ? ? ]
k² + k²
> [by/because of ? ? ? ]
k² + 4k
≥ [by/because of ? ? ? ]
k² + 2k + 1
= [by/because of ? ? ? ]
(k + 1)²
.
.
.
But our textbook doesn't provide justifications for the individual steps.
For this exercise, provide such justifications:
copy the material above, and fill in the blanks.
You may need to write a relatively large amount of text
for some of the blanks;
or feel free to actually add more intermediate steps.
(∀n∈ℕ)[1 ≤ 2n].
Use induction.
a and b
are two expressions such that
a ≤ b.
Then use that premise to write a proof of the following formula,
which is the basis
for our ability to cancel or multiply both sides of an inequality
with a value (n):
(∀n∈ℕ)[n·a ≤ n·b].
Use induction.
Clearly label the basis step, the inductive step,
and the inductive hypothesis.
(∀n∈ℕ)[n ≥ 10 → n³ < 2n]
(∀S1,S2,S3)[S1 ∩ (S1 ∪ S2) = (S1 ∩ S2) ∪ (S1 ∩ S3)])
as another way
to determine the cardinalities of those same five sets.