COMP 1390, Midterm Exam 1, Fall 2014
Student Name:
Student Number:
1. (5 marks) Suppose R and S are relations on a set A. Prove or disprove: If R and S are transitive, R S is
transitive. You should write detail steps for the proof, or provide a counter ex

COMP 1390, Midterm Exam 1, Fall 2014
Student Name:
Student Number:
1. (5 marks) Suppose T and S are relations on a set A. Prove or disprove: If T and S are symmetric, T S is
symmetric. You should write detail steps for the proof, or provide a counter exam

COMP 1390, Midterm Exam 4, Fall 2014
Student Name:
Student Number:
1. (4 marks) For the following graph,
a) Find an Euler circuit, or if there is no Euler circuit, then explain the
A
B
C
G
D
E
reason.
b) Find the adjacency matrix for the above graph.
F
2.

COMP 1390, Midterm Exam 4, Fall 2014
Student Name:
Student Number:
1. (4 marks) For the following graph,
a) Find an Euler circuit, or if there is no Euler circuit, then explain the
A
B
F
E
D
G
reason.
b) Find the adjacency matrix for the above graph.
C
2.

COMP 1390, Midterm Exam 2, Fall 2014
Student Name:
Student Number:
1. (6 marks) Compute the followings.
a) log2(1/256) =
b) | 28.9 | =
c) 34 div 6 =
d) 27 mod 8 =
e) 34.12 =
f) 27.45 =
2. (2 marks) Find the prime factorization of 1348.
3. (3 marks) Let F(

COMP 1390, Midterm Exam 3, Fall 2014
Student Name:
Student Number:
1. (2 marks) Find the greatest common divisor of 160 and 216.
2. (2 marks) Define the followings
a) Alphabet
b) Formal language over
3. (2 marks) Write 1/2 + 2/3 3/4 + 4/5 5/6 + 6/7 7/8

COMP 1390, Midterm Exam 2.5, Fall 2014
Student Name:
Student Number:
1. (4 marks) Prove that the square root of 2 is irrational.
-A-
2. (4 marks) Prove that there is no integer that is both odd and even.
-A-

COMP 1390, Midterm Exam 2.5, Fall 2014
Student Name:
Student Number:
1. (4 marks) Prove that the sum of any irrational number and any rational number is irrational.
-B-
2.
(4 marks) Prove that the square root of 2 is irrational.
-B-