Download CS 3333 Mathematical Foundations of CS

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Proofs of Fermat's little theorem wikipedia , lookup

Line (geometry) wikipedia , lookup

Transcript
CS 3333 Mathematical Foundations of CS
Test 1
Summer 2013
6/24/13
No books or notes may be used. You may use a calculator to check answers and do routine calculations. However,
you also must show all your work. Answer all questions in the spaces provided. For problem solving questions, be
sure to indicate the major steps and the final answer.
1. (3 points) Let a, b, and c be integers and ab ≠ 0. Prove: If a | b and b | c, then a | c.
2. (2 points) State the division algorithm.
3. (2 point) Apply the division algorithm to determine the quotient and remainder in
-95 = ____* (8) + ____.
4. (3 points) Let a, b, c, d and m be positive integers. Prove or disprove:
if a  b (mod m) and c  d (mod m) , then a  c  b  d (mod m) .
5.
(2 points) Solve the congruence 3𝑥 ≡ 4 𝑚𝑜𝑑 13.
6. (1 point) Suppose that a computer has only the memory locations 012…17. Use the hashing
function h, where h( x)  x  7 (mod 18) , where x is the record ID, to determine the memory
locations in which the record with ID 53 is stored.
7. (2 points) Give the sequence of pseudorandom numbers generated using the pure multiplicative
generator xn 1  5 xn (mod 9) with seed x0  2 ?
8. (2 point) Give the prime factorization of 10780.
9. (4 points) If 𝑎 = 25 ∙ 73 ∙ 11 and 𝑏 = 2 ∙ 32 ∙ 7 ∙ 11, what are gcd(a,b) and lcm(a,b)?
10. (3 points) Use the Euclidean algorithm to find gcd(68, 86).
11. (3 points) Find the Bezout coefficients for 68 and 86. That is, find integers s and t such that
gcd(68, 86) = 68s + 86t.
12. (6 points) Give the binary, octal and hexadecimal representations of the base-10 number 2xyzw,
where xy and zw represent the two-digit month and day values, respectively, for your birthday.
(E.g., I was born March 2 … so my number would be 20302.)
13. (6 points) Give the binary, decimal and hexadecimal representations of 4567(8) .
14. (5 points) Let In be an nn identity matrix and Dn an nn diagonal matrix. Which of the following
statements are true? Give a reason or counterexample.
Statement
True/False
In is a lower triangular matrix. T
F
Why?
.
___________________________________________
Dn is a symmetric matrix.
T
F
___________________________________________
In is a stochastic matrix.
T
F
___________________________________________
 10  5 3 


What is the matrix specified by 5I 3   3  2 9  ?
  5 9 17 


____________________________________________
15. (3 points) Suppose A is a 55 matrix and B a 65 matrix. Is A+B defined? Is AB defined? Is BA
defined? Give very brief justifications of your answers.
16. (2 points) Suppose A  4 1  5 and Bt  (2  3 0) . What is A  B ? ______________
 1 0   1  1
  
 .
17. (3 points) Calculate 
 2 4  0 1 
________________
18. (3 points) Let A, B and C be matrices of sizes 104, 410, 105, respectively. What is the most
efficient way to calculate the product ABC --- (AB)C or A(BC)? Give the number of
multiplications required for each process.
1 1
19. (2 points) If 𝐴 = (−1 1
1 2
2
3), find |𝐴|.
3
2 1
), find 𝐵 −1 .
−3 3
20. (2 points) For the matrix 𝐵 = (
21. (4 points) Rewrite the following system of equations as a matrix equation.
𝑥 +
−𝑥 +
𝑥 +
𝑦+
𝑦+
2𝑦 +
2𝑧 = 4
3𝑧 = 4
4𝑧 = 7
2 4
) using the augmented matrix method (Gauss-Jordan
1 5
22. (4 points) Give the inverse of (
elimination).
BONUS:1) Are there two-digit decimal and hexadecimal numbers (non-zero) such that 𝑎𝑏(10) = 𝑏𝑎(16) ?
What about the same for two-digit decimal and octal numbers?
If so, show the number(s). If not, show why not.
2) Show the binary representation for the following approximation of π ≈ 3.14 accurate to the
2−10 place.