Discrete Mathematics · free preview

Chapter 7 Problem Set. Additional Topics

Problem set for this chapter. Additional Topics.

1. How this assessment works

This lesson is a curated assessment adapted from MIT OpenCourseWare 6.042J Mathematics for Computer Science (Spring 2015) (https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-spring-2015/), used under CC BY-NC-SA 4.0. Work through the 10 problems in order, for each problem, type your reasoning in the answer box or write it on the handwriting pad, then submit it for AI grading.

How the grading works Every problem is graded by an AI mathematics teacher that reads the official solution shipped with the course. It checks your work criterion by criterion, awards partial credit for correct steps, and returns written feedback. Equivalent mathematics and valid alternative methods are accepted, a different route to the same result can still earn full marks.

If your answer is incomplete, the feedback names exactly which steps are missing, so you can correct them and try again.

2. Problem 1, Modular inverse and exponentiation modulo 113

(a) Find a number x∈{0,1,…,112}x \in \{0,1,\ldots,112\} such that 11x≡1(mod113)11x \equiv 1 \pmod{113}.

(b) Find a number y∈{0,1,…,112}y \in \{0,1,\ldots,112\} such that 1112111≡y(mod113)11^{12111} \equiv y \pmod{113}. (Hint. 113 is prime.)

3. Problem 2, Infinite antichain under divisibility

Consider the natural numbers partially ordered by divisibility. Prove that this partial order has an infinite antichain.

4. Problem 3, GCD scaling property proof

Prove that gcd⁡(ka,kb)=k⋅gcd⁡(a,b)\gcd(ka, kb) = k \cdot \gcd(a, b) for all k>0k > 0.

5. Problem 4, Existence of modular inverse iff coprime

An inverse of kk modulo n>1n > 1 is an integer, k−1k^{-1}, such that k⋅k−1≡1(modn)k \cdot k^{-1} \equiv 1 \pmod{n}. Show that kk has an inverse iff gcd⁡(k,n)=1\gcd(k, n) = 1. Hint. We saw how to prove the above when nn is prime.

6. Problem 5, Powers of 10 modulo 11

Use a result from elsewhere on this problem set to show that 10k≡(−1)k(mod11)10^k \equiv (-1)^k \pmod{11}.

7. Problem 6, Alternating digit sum divisibility by 11

Using the fact 10k≡(−1)k(mod11)10^k \equiv (-1)^k \pmod{11}, explain why the alternating digit-sum procedure works.

8. Problem 7, Power sum modulo prime with exponent multiple

Let Sk=1k+2k+…+(p−1)kS_k = 1^k + 2^k + \ldots + (p-1)^k, where pp is an odd prime and kk is a positive multiple of p−1p - 1. Use Fermat's theorem to prove that Sk≡−1(modp)S_k \equiv -1 \pmod{p}.

9. Problem 8, Two integers with sum or difference divisible by 51

Prove that among every set of 30 integers, there exist two whose difference or sum is a multiple of 51.

10. Problem 9, Ternary strings with matching consecutive digits

(a) Let ana_n be the number of length nn ternary strings (strings of the digits 0, 1, and 2) that contain two consecutive digits that are the same. For example, a2=3a_2 = 3 since the only ternary strings of length 2 with matching consecutive digits are 11, 22, and 33. Also, a0=a1=0a_0 = a_1 = 0, since in order to have consecutive matching digits, a string must be of length at least two.

Find a recurrence formula for ana_n.

(b) Show that

−x1−2x+x(1−3x)(1−2x)\frac{-x}{1-2x} + \frac{x}{(1-3x)(1-2x)}

is a closed form for the generating function of the sequence a0,a1,…a_0, a_1, \ldots

(c) Find real numbers rr and ss such that

1(1−2x)(1−3x)=r1−2x+s1−3x.\frac{1}{(1-2x)(1-3x)} = \frac{r}{1-2x} + \frac{s}{1-3x}.

(d) Use the previous results to write a closed form for the nnth term in the sequence.

11. Problem 10, Generating functions for doughnut selection constraints

Suppose there are four kinds of doughnuts, plain, chocolate, glazed, and butterscotch. Write generating functions for the number of ways to select the flavors of nn doughnuts, subject to the following different constraints.

(a) Each flavor occurs an odd number of times.

(b) Each flavor occurs a multiple of 3 times.

(c) There are no chocolate doughnuts and at most one glazed doughnut.

(d) There are 1, 3, or 11 chocolate doughnuts, and 2, 4, or 5 glazed.

(e) Each flavor occurs at least 10 times.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free