Assignment # 3
Assignment # 3
Assignment # 3
2. (a) Prove the statement: There are real numbers a and b such that √(�� + ��) = √��
+ √��. (b) Prove that the square of any rational number is a rational number.
(c) Prove the statement: There is an integer n > 5 such that 2n – 1 is prime.
3. (a) Prove by contradiction method, the statement: If n and m are odd integers, then n + m is an even integer.
(b) Prove by Contradiction that for any integer a and any prime number p, if p | a, P | (a + 1).
(c) Prove by Contradiction that the set of prime numbers is infinite.
4. (a) Prove by contraposition that if |x| > 1 then x > 1 or x < –1 for all x € R.
(b) Prove by contraposition: For all integers m and n, if m + n is even then m and n are both even or m and n are both
odd. (c) Prove by contraposition that if ab is divisible by 4, then a and b are positive, even integers.
��
��(��+��)=
1
(c) Find the GCD and LCM of the following using prime factors.
(i) 11, 15, 105 (ii) 14, 15, 21 (iii) 12, 72, 31, 32 (iv) 17, 18, 192, 1021
10. (a) Use the extended Euclidean algorithm to express the following as a linear combination.
(i) GCD (144, 89) (ii) GCD (1001, 100001)
(b) Solve each of these congruences using the modular inverses.
(i) 55x ≡ 34 (mod 89) (ii) 89x ≡ 2 (mod 232)
(c) Find an inverse of a modulo m for each of these pairs of relatively prime integers.
(i) a = 2, m = 17 (ii) a = 34, m = 89 (iii) a = 144, m = 233 (iv) a = 200, m = 1001
11. (a) Ali and Fatima are cousins. Both are good in Number Theory. They challenge one-another to solve different problems.
(i) Ali gifted Fatima a book entitled “Discrete Mathematics and Its Applications”. Suppose that first 9 digits of
ISBN-10 of the textbook are 125973128. How can Fatima find the check digit to validate the originality of the book?
(ii) Ali asks Fatima to show him that 15 is an inverse of 7 modulo 26.
(b)
(i) Fatima has asked Ali to encrypt the message “exam” using the RSA system with n = 11 ⋅ 3 and e = 3. translate
each letter into integers and write in the form of Cipher text equation.
(ii) But suddenly their cousin Bilal comes, Fatima tells Ali “XYTU YFQPNSL”. This message is encoded using
function (c)
(i) Fatima asks Ali to list all integers between −100 and 100 that are congruent to −1 modulo
25. (ii) Bilal asks Ali to determine the remainder of 5119 upon division by 59?
12. (a) Use the construction in the proof of the Chinese remainder theorem to find all solutions to the system of congruences.
(i) x ≡ 1 (mod 5), x ≡ 2 (mod 6), and x ≡ 3 (mod 7). (ii) x ≡ 1 (mod 2), x ≡ 2 (mod 3), x ≡ 3 (mod 5), and x ≡ 4 (mod 11). (b) An
old man goes to market and a camel step on his basket and crushes the oranges. The camel rider offers to pay for the
damages and asks him how many oranges he had brought. He does not remember the exact number, but when he had
taken them out 5 at a time, there were 3 oranges left. When he took them 6 at a time, there were also 3 oranges left, when
he had taken them out 7 at a time, there was only 1 orange was left and when he had taken them out 11 at a time, there
was no orange left. What is the number of oranges he could have had? (c) A birthday boy receives a certain number of
presents. If they are arranged in piles of 4, 3 presents are left over. If arranged in piles of 9, 5 presents are left over. If
arranged in piles of 13, 8 presents are left over. What is the smallest number of presents he received?
13. (a)
(i) Encrypt the message “I LOVE DISCRETE MATHEMATICS” by translating the letters into numbers, applying the
Caesar Cipher Encryption function and then translating the numbers back into letters.
(ii) Encrypt the message STOP POLLUTION by translating the letters into numbers, applying the given encryption
function, and then translating the numbers back into letters.
(i) f (p) = (p + 4) mod 26 (ii) f (p) = (p + 21) mod 26
(b) Decrypt these messages encrypted using the Caesar Cipher.
(i) PLG WZR DVVLJQPHQW (ii) IDVW QXFHV XQLYHUVLWB
(c) Decrypt these messages encrypted using the Shift cipher. f (p) = (p + 10) mod 26.
(i) CEBBOXNOB XYG (ii) LO WI PBSOXN
14. (a) Which memory locations are assigned by the hashing function h(k) = k mod 97 to the records of insurance company
customers with these Social Security numbers?
(i) 034567981 (ii) 183211232 (iii) 220195744 (iv) 987255335 (b) Which memory locations are assigned by the hashing
function h(k) = k mod 101 to the records of insurance company customers with these Social Security numbers?
(i) 104578690 (ii) 432222187 (iii) 372201919 (iv) 501338753 (c) What sequence of pseudorandom numbers is
generated using the linear congruential generator? Perform 5 iterations. (i) xn+1 = (4xn + 1) mod 7 with seed x0 = 3?
(ii)xn+1 = (7xn + 2) mod 9 with seed x0 = 5?
2
15. (a) Determine the check digit for the UPCs that have these initial 11 digits.
(i) 73232184434 (ii) 63623991346
(b) Determine whether each of the strings of 12 digits is a valid UPC code.
(i) 036000291452 (ii) 012345678903
(c)
(i) The first nine digits of the ISBN-10 of the European version of the fifth edition of this book are 0-07-119881.What is
the check digit for that book?
(ii)The ISBN-10 of the sixth edition of Elementary Number Theory and Its Applications is 0-321-500Q1-8, where Q is a
digit. Find the value of Q.
16. (a) Encrypt the following messages “ATTACK” and “EXAMINATION” using the RSA system with n = 43 ⋅ 59 and e = 13,
translating each letter into integers and grouping together pairs of integers.
(b) Encrypt the message “ASSIGNMENT” and “SEMESTER” using the RSA system with n = 13 ⋅ 19 and e =
47. (c) Use Fermat’s little theorem to compute the following.
(i) 52003 mod 7 (ii) 52003 mod 11 (iii) 52003 mod 13 (iv) 52003 mod 17
17. (a) Ali is very fond of playing Cricket. He has collected tennis ball in a Basket. He's not sure exactly how many he has
today, so when he
aligns them in rows of 7 balls, 2 balls are left;
aligns them in rows of 17 balls, 3 balls are left;
aligns them in rows of 19 balls, 5 balls are left.
He's positive that there are fewer than 700 balls but how many does he have?
Hint: In this problem, you are supposed to use the following Theorems:
Chinese Remainder Theorem, The Euclidean Algorithm Lemma, Bézout’s Theorem, and Linear
congruences. (b) After counting the number of balls Ali had from part (a), encrypt the number word using
Ceaser Cipher. Hint: you have to convert the number in word counting. i.e., Five hundred and twenty-one.
(c) Use Fermat’s’ theorem, what is the value of x302 (mod 7), where x is the sum of all the digits of the number obtained in
part (a).
18. (a) An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building? (b) A
particular brand of shirt comes in 12 colors, has a male version and a female version, and comes in three sizes for each
sex. How many different types of this shirt are made?
(c) How many different three-letter initials can people have?
19. (a) A basketball team has five starting players. There are 13 girls on the team. In how many ways can the coach select
players to start the game? (Assume each player can play every position.)
(b) 75 people run the Basking Ridge 5k and medals are only awarded to the 1st, 2nd, 3rd, 4th, and 5th place positions.
How many different ways can the runners be awarded?
(c) An amusement park has 27 different rides. If you have enough time to go on 4 rides, how many differen
combinations of rides can you take?
20. (a) A wired equivalent privacy (WEP) key for a wireless fidelity (WiFi) network is a string of either 10, 26, or 58
hexadecimal digits. How many different WEP keys are there?
(b) How many strings are there of four lowercase letters that have the letter x in them?
(c) How many different three-letter initials with none of the letters repeated can people have?
21. (a) How many functions are there from the set {1, 2, ... , m}, where m is a positive integer, to the set {0, 1}? (b) How many
one-to-one functions are there from a set with five elements to sets with five elements? (c) Police use photographs of
various facial features to help eyewitnesses identify suspects. One basic identification kit contains 15 hairlines, 48
eyes and eyebrows, 24 noses, 34 mouths, and 28 chins and 28 cheeks. Find the total number of different faces.
22. (a) Use a tree diagram to determine the number of subsets of {3, 7, 9, 11, 24} with the property that the sum of the
elements in the subset is less than 28.
(b) How many bit strings of length four do not have two consecutive 1’s?
(c) Three officers, a president, a treasurer, and a secretary are to be chosen from among four possible: A, B, C and D.
Suppose that A cannot be president and either C or D must be secretary. How many ways can the officers be chosen?
3
23. (a) Eight members of a school marching band are auditioning for 3 drum major positions. In how many ways can
students be chosen to be drum majors?
(b) You must take 6 CS elective courses to meet your graduation requirements at FAST-NUCES. There are 12 CS
courses you are interested in. In how many ways can you select your elective Courses?
(c) Nine people in our class want to be on a 5-person basketball team to represent the class. How many different teams
can be chosen?
24. (a) A committee of five people is to be chosen from a group of 20 people. How many different ways can a chairperson,
assistant chairperson, treasurer, community advisor, and record keeper be chosen?
(b) A relay race has 4 runners who run different legs of the race. There are 16 students on your track team. In how many
ways can your coach select students to compete in the race? Assume that the order in which the students run matters.
(c) Your school yearbook has an editor in chief and an assistant editor in chief. The staff of the yearbook has 15
students. In how many ways can a student be chosen for these 2 positions?
25. (a) A deli offers 5 different types of meat, 3 types of breads, 4 types of cheeses and 6 condiments. How many different
types of sandwiches can be made of 1 meat, 2 bread, 1 cheese, and 3 condiments?
(b) An ice cream shop has a choice of 12 toppings. In how many ways can you have 5 different toppings on your ice
cream?
(c) Determine how many different 5 digit postal zip codes are possible for the given configuration with and without
repetition. (i) Begins with a 4. (ii) Begins with a 3 or a 1.
26. (a) How many bit strings of length 10 either begin with three 0s or end with two 0s?
(b) How many bit strings of length 5 either begin with 0 or end with two 1s?
(c) For the given configurations, determine how many different computer passwords are possible if repetition is allowed
and if repetition is not allowed. (i) 2 letters followed by 4 digits. (ii) 3 odd digits followed by 2 vowels.
27. (a) Show that if there are 30 students in a class, then at least two have last names that begin with the same letter. (b)
Assuming that no one has more than 1,000,000 hairs on the head of any person and that the population of New York
City was 8,008,278 in 2010, show there had to be at least nine people in New York City in 2010 with the same number of
hairs on their heads.
(c) There are 38 different time periods during which classes at a university can be scheduled. If there are 677 different
classes, how many different rooms will be needed?
29. (a) A class has 20 women and 16 men. In how many ways can you:
(i) put all the students in a row? (ii) put 7 of the students in a row?
(iii) put all the students in a row if all the women are on the left and all the men are on the right? (b) A baseball coach
is determining a batting order for the nine players on the field. If the pitcher does not bat in one of the first four spots,
how many different batting orders can the coach make?
(c) A pizza shop offers twelve different toppings. How many different pizzas can you order with no more than three
toppings?
30. (a) Mr. Shoaib Raza is teaching Discrete structures this semester and is preparing a final exam. He has a pool of 15
questions on Graph theory, 12 questions on Number theory, 7 questions on Propositional logic, 5 questions on trees, 9
questions on Relations and 10 questions on Set theory. He wishes to put 3 questions on each topic on the exam.
Determine the number of different ways the above things can happen.
(b) Suppose that the grades earned by the 97 students appeared in final exam for Discrete Structures class this
semester are A, A-, B+, B, B-, C+, C, C-, D and F. At least how many students will earn the exact same grade? (c)
FAST-NUCES cricket team squad consists of 15 players which includes 2 wicket-keepers, 5 bowlers, 3 all-rounders and
5 batsmen. In how many ways, can cricket squad choose a captain, a vice-captain and a wicket-keeper from among
themselves?
4
31. As we have discussed, the practical application of all the topics in the class. Now you are required to submit at least two
real world applications of the following topics.
(a) Combination
(b) Permutations
(c) Binomial Theorem
(d) Proof methods
(e) Mathematical Induction
5