Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views3 pages

DiscreteMath hw2

The document outlines Homework 2 for a Discrete Mathematics course, consisting of various problems related to number theory, modular arithmetic, and functions. It includes tasks such as finding integers satisfying specific equations, analyzing RSA security, proving mathematical theorems, and exploring properties of functions and sets. Each problem is assigned a point value and requires derivations or proofs to support the answers.

Uploaded by

0958216968a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

DiscreteMath hw2

The document outlines Homework 2 for a Discrete Mathematics course, consisting of various problems related to number theory, modular arithmetic, and functions. It includes tasks such as finding integers satisfying specific equations, analyzing RSA security, proving mathematical theorems, and exploring properties of functions and sets. Each problem is assigned a point value and requires derivations or proofs to support the answers.

Uploaded by

0958216968a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1

Discrete Mathematics, Fall 2023


Homework 2

I. H OMEWORK 2
Problem 1 [8 points]
For the following parts, a correct numerical answer will only earn credit if accompanied by its derivation.
Show your work.

(a) [2 pts] Use the Pulverizer to find integers s and t such that 135s + 59t = gcd(135, 59).
(b) [2 pts] Use the previous part to find the inverse of 59 modulo 135 in the range 1,..., 134.
(c) [2 pts] Find all integers x that satisfy the congruence 54x ≡ 2 (mod 89).
(d) [2 pts] Find the remainder of 47200 divided by 19.

Problem 2 [8 points]
Suppose the RSA modulus n = pq is the product of distinct 200 digit primes p and q. A message
m ∈ [0..n) is called dangerous if gcd(m, n) = p or gcd(m, n) = q, because such an m can be used to
factor n and so crack RSA. Estimate the fraction of messages in [0..n) that are dangerous to the nearest
order of magnitude.
Problem 3 [12 points]
In this problem, we will investigate numbers which are squares modulo a prime number p.

(a) [2 pts] An integer n is a square modulo p if there exists another integer x such that n ≡ x2 (mod p).
Prove that x2 ≡ y 2 (mod p) if and only if x ≡ y (mod p) or x ≡ −y (mod p). (Hint: x2 −y 2 = (x+y)(x−y))

(b) [3 pts] There is a simple test we can perform to see if a number n is a square modulo p. It states that

Theorem 1 (Eulers Criterion). : p−1


1. If n is a square modulo p then n 2 ≡ 1 (mod p).
p−1
2. If n is not a square modulo p then n 2 ≡ −1 (mod p).

Prove the first part of Eulers Criterion. (Hint: Use Fermats theorem.)

(c) [7 pts] Assume that p ≡ 3 (mod 4) and n ≡ x2 (mod p). Given n and p, find one possible value of
x. (Hint: Write p as p = 4k + 3 and use Euler’s Criterion. You might have to multiply two sides of an
equation by n at one point.)

Problem 4 [6 points]
Suppose that p is a prime and 0 < k < p.
(a) [3 pts] k is self-inverse if k 2 ≡ 1 (mod p). Prove that k is self-inverse iff either k = 1 or k = p − 1.
Hint: k 2 − 1 = (k + 1)(k − 1)
(b) [3 pts] The English mathematician Edward Waring said that the following theorem would probably
be very difficult to prove because there was no adequate notation for primes. Gauss then proved it (while
standing on one foot, it is rumored); he suggested that Waring failed for lack of notions, not notations.
Theorem (Wilson’s Theorem). If p is a prime, then (p − 1)! ≡ −1 (mod p). Prove Wilson’s Theorem.
Hint: While standing on one foot, think about pairing each term in (p − 1)! with its multiplicative inverse.
2

Problem 5 [10 points]


Here is a very, very interesting game. We start with two distinct, positive integers written on a blackboard.
Call them x and y. You and I now take turns. (I’ll let you decide who goes first.) On each players turn,
he or she must write a new positive integer on the board that is a common divisor of two numbers that
are already there. If a player can not play, then he or she loses.

For example, suppose that 12 and 15 are on the board initially. Your first play can be 3 or 1. Then I play
3 or 1, whichever one you did not play. Then you can not play, so you lose.

(a) [3 pts] Show that every number on the board at the end of the game is either x, y, or a positive divisor
of gcd(x, y).
(b) [3 pts] Show that every positive divisor of gcd(x, y) is on the board at the end of the game.
(c) [4 pts] Describe a strategy that lets you win this game every time.

Problem 6 [10 points]


In one of the previous problems, you calculated square roots of numbers modulo primes equivalent to 3
modulo 4. In this problem you will prove that there are an infinite number of such primes!

(a) [2 pts] As a warm-up, prove that there are an infinite number of prime numbers. (Hint: Suppose that
the set F of all prime numbers is finite, that is F = {p1 , p2 , ..., pk } and define n = p1 p2 · · · pk + 1.)
(b) [1 pts] Prove that if p is an odd prime, then p ≡ 1 (mod 4) or p ≡ 3 (mod 4).
(c) [3 pts] Prove that if n ≡ 3 (mod 4), then n has a prime factor p ≡ 3 (mod 4).
(d) [4 pts] Let F be the set of all primes p such that p ≡ 3 (mod 4). Prove by contradiction that F has
an infinite number of primes.
Problem 7 [6 pts] Let f : B → C be a function. Prove that f is injective if and only if for every pair
of functions g : A → B and h : A → B, we have that f ◦ g = f ◦ h implies g = h.
Problem 8 [6 pts]
Find the truth set of each of these predicates where the domain is the set of integers.
(a) [2 pts] P(x): x4 < 128
(b) [2 pts] Q(x): x2 > x
(c) [2 pts] R(x): 2x + 1 = 0

Problem 9 [8 pts]
Find the domain and range of these functions. Note that in each case, to find the domain, determine the
set of elements assigned values by the function.

(a) [2 pts] the function that assigns to each bit string the number of ones in the string minus the number
of zeros in the string
(b) [2 pts] the function that assigns to each bit string twice the number of zeros in that string
(c) [2 pts] the function that assigns the number of bits left over when a bit string is split into bytes (which
are blocks of 8 bits)
(d) [2 pts] the function that assigns to each positive integer the largest perfect square not exceeding this
integer
3

Problem 10 [4 pts]
Determine whether each of these functions is a bijection from R to R and state why.
(a) [2 pts] f (x) = 3x3 + 16
(b) [2 pts] f (x) = (x + 1)2 /(x + 2)

Problem 10 [8 pts]
Prove or disprove each of these statements about the floor and ceiling functions.
(a) [2 pts] bdxec = dxe for all real numbers x.
(b) [2 pts] bx + yc = bxc + byc for all real numbers x and y
(c) [2 pts] ddx/2e/2e = dx/4e for all real numbers x
(d) [2 pts] bxc + byc + bx + yc ≤ b2xc + b2yc

Problem 11 [8 pts]
Determine whether each of these sets is finite, countably infinite, or uncountable. For those that are
countably infinite, exhibit a one-to-one correspondence between the set of positive integers and that set.
(a) [2 pts] the integers greater than 10
(b) [2 pts] the integers with absolute value less than 2,000,000
(c) [2 pts] the real numbers between 0 and 2
(d) [2 pts] the set A × Z+ where A = {2, 3, 4} and × is the Cartesian product

Problem 12 [6 pts]
Give an example of two uncountable sets A and B such that A ∩ B is
(a) [2 pts] finite.
(b) [2 pts] countably infinite.
(c) [2 pts] uncountable.

You might also like