Due: Friday, May 1st by 6:00 PM
Write up carefully argued solutions to the following problems. Each solution should be clear enough that it can explain (to someone who does not already understand the answer) why it works. However, you may use results from lecture, the reference sheets, and previous homework without proof.
You are required to submit your own solutions. You are allowed to discuss the homework with other students. However, the write up must clearly be your own, and moreover, you must be able to explain your solution at any time. We reserve ourselves the right to ask you to explain your work at any time in the course of this class.
You have a total of three late days during the quarter, but you can only use one late day on any one homework, giving an additional day on both parts. Please plan ahead.
Submit your solution via Gradescope. In particular:
Each numbered task should be solved on its own page (or pages). Do not write your name on the individual pages. (Gradescope will handle that.)
When you upload your pages, make sure each one is properly rotated. If not, you can use the Gradescope controls to turn them to the proper orientation.
Follow the Gradescope prompt to link tasks to pages.
You are not required to typeset your solution, but your submission must be legible. It is your responsibility to make sure solutions are readable — we will not grade unreadable write-ups.
We say that an equation is in “standard form” if it looks like for some constants , , and . The first equation below is in standard form, but the second is not.
Solve each of the below modular equations by following these steps, showing your work as described next.
If the modular equation is not in standard form, then transform it into standard form.
Show the sequence of operations, either adding to both sides or simplifying (e.g., algebraically modifying terms on individual sides as done in lecture).
Calculate one solution to the modular equation in standard form using the Extended Euclidean Algorithm.
Show your work by writing out the sequence of quotients and remainders, the resulting tableau, and the sequence of substitutions needed to calculate the relevant multiplicative inverse. Then, show how multiplying the initial equation on both sides by the multiplicative inverse gives you a solution to the equation.
State all integer solutions to the modular equation in standard form.
Your answer should be of the form “ for any integer ”, where and are integers with .
If the original modular equation was not in standard form, justify briefly (in one sentence) why the solutions to the equation in standard form are the same as the solutions to the original equation.
Show that there is some solution such that .
Prove, by induction, that holds for all integers .
Write an English proof, following the template given in lecture.
Prove, by induction, that holds for all integers .
Write an English proof, following the template given in lecture.
When you first learned recursion in CSE 123, a mysterious person gave you the following recursive Java method and claimed that it behaves like the natural-number version of Math.pow():
int mysteriousPow(int b, int m) { /* Assumes: b >= 1 and m >= 0 */
if (m == 0) {
return 1;
} else if (m == 1) {
return b;
} else {
return (b - 1) * mysteriousPow(b, m - 1) + b * mysteriousPow(b, m - 2);
}
}
You wrote some tests and realized that this method might be correct,
but you didn’t know how to prove it rigorously...until you are taking
CSE 311 and learn strong induction! Now, let’s try to prove the
correctness of this method. Not sure what I mean? Let’s put it another
way:
Let
be a positive integer. The function
is defined for all integers
recursively as follows:
Use strong induction to prove that the following holds for all integers :
Write an English proof, following the template given in lecture.
The following problems are optional and do not need to be submitted. However, you may submit solutions and receive a small amount of extra credit for any 5 (of the 12) subparts, graded solely on completion. For the maximum extra credit score, at least 5 subparts should be submitted, including at least one subpart from each of the three sections.
Find solutions to each of the following modular equations.
Write an English proof for the following claims. It should not be necessary to use induction.
Let and be positive integers, with . Prove the following claim: for any integers and , there exists an integer such that and .1 Hint: Apply Bézout’s theorem.
Let and be positive integers. For any integers and , if , then . (Note that the subscript has changed from to .)
Let and be positive integers, with . If , then , for any integers and . Hint: You can use the facts proven on slide 82 of topic 3.
For any positive integer , .
For any positive integers and ,
Prove the following claims using induction. Use the English proof template given in lecture. (You must decide whether to use weak or strong induction.)
for all integers .
Every positive integer is either even or odd.
Every amount of postage of cents can be formed using only 4-cent and 5-cent stamps. That is, for every integer , there exist non-negative integers and such that .
for all integers .
Consider a function defined for all integers by , , and for . Prove that for all .
This claim is a simple version of (the existence part of) the Chinese Remainder Theorem.↩︎