Chapter 1: Q1E (page 48)
Show that in any base , the sum of any three single-digit numbers is at most two digits long.
Chapter 1: Q1E (page 48)
Show that in any base , the sum of any three single-digit numbers is at most two digits long.
All the tools & learning materials you need for study success - in one app.
Get started for freeShow that if is a nontrivial square root of 1 modulo N , that is if but , then must be composite. (For instance,; thus 4 is a nontrivial square root of 1 modulo 15.)
1.38. To see if a number, say , is divisible by , you just add up the digits of its decimalrepresentation, and see if the result is divisible by role="math" localid="1658402816137" .
( , so it is not divisible by ).
To see if the same number is divisible by , you can do this: subdivide the number into pairs ofdigits, from the right-hand end , add these numbers and see if the sum is divisible by (if it's too big, repeat).
How about ? To see if the number is divisible by , subdivide it into triples from the end add these up, and see if the sum is divisible by .
This is true for any prime other than and . That is, for any prime , there is an integer such that in order to see if divides a decimal number , we break into -tuples of decimal digits (starting from the right-hand end), add up these -tuples, and check if the sum is divisible by .
(a) What is the smallest such for ? For ?
(b) Show that is a divisor of .
Find the inverse of:.
On page 38, we claimed that since about a fraction of n-bit numbers are prime, on average it is sufficient to draw random n -bit numbers before hitting a prime. We now justify this rigorously. Suppose a particular coin has a probability p of coming up heads. How many times must you toss it, on average, before it comes up heads? (Hint: Method 1: start by showing that the correct expression is . Method 2: if E is the average number of coin tosses, show that ).
Consider the problem of computing .
(a) If is an role="math" localid="1658397956489" -bit number, how many bits long is , approximately ( form)?
(b) Give an algorithm to compute and analyze its running time.
What do you think about this solution?
We value your feedback to improve our textbook solutions.