Download MACM-101-C1 : FINAL EXAMINATION

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
no text concepts found
Transcript
MACM-101-C1 : FINAL EXAMINATION
Time: 3 Hours
12 Questions
80 MARKS
SPECIAL
SAMPLE EXAM
3 Pages
1. (8 marks) Translate each of the following English sentences into expressions using
predicate logic notation. Then demonstrate by formal proof that (d) can be inferred from
premises (a), (b) and (c):
a. Everything living is plant or animal.
b. Calvin’s Zorg is alive and not a plant!
c. All animals have hearts.
d. Calvin’s Zorg has a heart.
2. (8 marks) Provide the premises used and the justifications for each step in proving the
following:
∀x [p(x) ∨ q(x)]
∃x ¬p(x)
∀x [¬q(x) ∨ r(x)]
∀x [s(x) → ¬r(x)]
______________________
∃x [¬s(x)]
3. (6 marks)
a. Find the smallest value of n , say n0 , such that 3n < n !
b. Prove by mathematical induction for your value of n0 that 3n < n ! for all n>n0 .
4. (6 marks) For the following statements, either prove that the statement is true or give a
counterexample to show why it is not:
a. X × (Y − Z) = (X × Y) − (X × Z)
b. X ∩ (Y × Z) = (X ∩ Y) × (X ∩ Z)
5. (5 marks) Let X = {1,2,3,4,5,6,7,8,9} . Let S ⊆ X with |S | = 5.
a. How many distinct sets S ⊆ X are there?
b. For any single set S , how many non-empty subsets of S have at most 3 elements?
c. Use the pigeonhole principle to determine whether there is a set S that has the
property that the sums of the elements in every subset of that S are distinct. That is
no two subsets of the set S have elements that sum to the same value. For example
the set S = {1,2,4,6,8} is NOT a candidate because the sum of the members of the
subsets {6} and {2,4} both sum to 6, and the members of the subsets {1,6}, and
{1,2,4} sum to 7. In your answer identify the pigeons and the pigeonholes. HINT:
page..1
Your answer to (b) may prove useful.
6. (5 marks) Consider the equation x1 + x2 + ... + xk = 100 .
a. How many solutions are there to this equation if xi ≥ 1 .
b. Use this result to determine the number of ways of expressing 100 as the sum of k
positive integers for 1 ≥ k ≥ 100 . You may assume that order is important. For
example, 25 + 75 and 75 + 25 should both be counted as separate solutions. Express
your answer as a closed formula.
7. (9 marks) Consider the linear congruence xy ≡ 1 (mod m) , where x and m > 1 are relatively
prime integers.
a. Prove that there always exists a solution y < m to this linear congruence.
b. Prove that the solution y to the linear congruence is unique.
c. Solve the linear congruence for y when x = 7 and m = 4 .
8. (9 marks)
a. If f(x) and g(x) are functions from the set of real numbers to the set of real numbers,
show that f ∈ Θ(g) if and only if There exist positive constants k, C1, and C2 such
that
C1|g(x)| ≤ |f(x)| ≤ C2|g(x)| whenever x > k
b. Show that 3x2 + x + 1 ∈ Θ(x2) by finding values for k, C1, and C2 that satisfy the
formula in (a).
9. (4 marks) Let Σ = {x,y,z }
a. Give an example of a language A over the alphabet Σ , where (A2)* ≠ (A*)2 .
b. Either give an example of a language A over the alphabet Σ , where (A2)* = (A*)2 ,
or else explain why no such example exists.
page..2
10. (6 marks) Consider a finite state machine M with state set S = {s1,s2,s3}, input set I
= {a,b,c,d,e}, and output set O = {T,F}. Determine the following:
a. |S × I|
b. The number of state transition functions v : S × I → S
c. The number of output functions w : S × I → O
11. (10 marks) Among the machines that can be defined on S, I, and O in the previous
question, One such machine can recognize strings that begin and end with a vowel in I, or
begin and end with a consonent in I. This machine displays "T" whenever it recognizes a
valid string and displays "F" otherwise.
a. Draw and properly label the state diagram for the machine.
b. Construct tables that define the state-transition and output functions for this
machine.
c. If V = {a,e} and C = {b,c,d} define the language recognized by this
machine.
page..3