Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
0 of .
Results for:
P. 1
Final Exam Spring 2010

# Final Exam Spring 2010

Ratings: (0)|Views: 139|Likes:
- Final Exam Spring 2010
- Final Exam Spring 2010

### Availability:

See more
See less

10/15/2013

pdf

text

original

CS 3333 Mathematical Foundations of CS
Spring 2010Final 5/7/10 2.5 Hours
No books or notes, except the supplied formulas sheet, may be used. Calculators are allowed. Answer allquestions in the spaces provided. For problem solving questions, be sure to indicate the major steps andthe final answer.
1.

(3 points) Let a, b, and c be integers and a
0, b
0. Show that if a | b and b | c, then a | (b+c).
2.

(2 points) State the division algorithm.
3.

(1 point)
90 mod 16 = ____________.
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) Find the smallest positive integer ‘a’ such that a+5
2a (mod 9).
Fall 2010 Handout

CS 3333 Mathematical Foundations of CS. Final Spring 2010. Page 2/11
6.

(1 point) The personnel records in a company are stored in locations 0
,
1
,
2
,
,
99. The hashingfunction h(s,y)
=
(s
+
y) mod 100, where s is the last four digits of the SSN and y is the four-digit birth year of the person in the record, is used to determine the location in which a record is stored.Where is the record with SSN and date of birth field values xxx-xx-4572 and xx-xx-1951,respectively, stored?
7.

(1 point) If a·b = 3
8
·5
3
·11
8
and gcd(a,b) = 3
2
·11, what is lcm(a,b)? ___________
8.

(2 points) Use the Euclidean algorithm to find gcd(123,277).
9.

(2 points) Give the binary and octal representations of 8173
16
.
10.

(1 point) What are identity, diagonal and symmetric matrices?
11.

(2 points) Suppose A is a 5
×
4 matrix and B is a 5
×
4 matrix. Is A+B defined? Is AB defined? Givevery brief justifications of your answers.

CS 3333 Mathematical Foundations of CS. Final Spring 2010. Page 3/11
12.

(3 points) Let A, B and C be matrices of sizes 2
×
5, 5
×
20, 20
×
3, respectively. What is the mostefficient way to calculate the product A
B
C? Give the number of multiplications required in eachcase?
13.

(2 points) Suppose
( )
5023
=
A
. Calculate the dot product A
A
t
.
14.

(1 point) Suppose
⎠ ⎞⎝ ⎛
=
011110101
A
and
⎠ ⎞⎝ ⎛
=
001110010
B
. Let C = A
B. Calculate c
1,2
.