CS4311: Introduction to Computation Theory hw01

CS 4311 Introduction to Computation Theory
Homework 1: warm-up, Chapter 0

Due: Wednesday, 9/13/06, beginning of class (Assigned: Wednesday, 9/6/06)

You are required to turn in answers to all the questions. However, only a random subset of the questions will be graded. While discussion with others is permitted and encouraged, the final work should be done individually. You are not allowed to work in groups. The answers, comments, and programs (if any) must be the original work of the author. You are allowed to build on material supplied in the class. If you use any other source than the class notes and the textbook, specify it clearly.

1. Let A be the set {x,y,z} and B be the set {x,y}.
a. What is A - B?
b. What is B - A?
c. List all the subsets of A (the power set of A).
d. List A x B?

2. (problem 0.4) If set A has a elements and set B has b elements, how many elements are in A x B? Explain your answer.

3. (problem 0.5) If C is a set with c elements, how many elements are in the power set of C? Explain your answer.

4. (problem 0.6 with additions) Let X be the set {1,2,3,4,5} and Y be the set {6,7,8,9,10}. The unary function f:X->Y and the binary function g:X x Y -> Y are described in the following tables.

          n    f(n)             g   6   7   8   9   10
         ----------             ----------------------
          1     6               1   10  10  10  10  10
          2     7               2   7   8   9   10  6
          3     6               3   7   7   8   8   9
          4     7               4   9   8   7   6   10
          5     6               5   6   6   6   6   6
a. What is the value of f(2)?
b. What are the range and domain of f?
c. What is the value of g(2,10)?
d. What are the range and domain of g?
e. What is the value of g(4,f(4))?
f. Write a new function h1 such that it is the same as f.
g. Write a new function h2 such that it is different from f at only one point.
h. The range of f is specified as Y. Rewrite the range of f such that it is an onto function.
i. Write a new function h3 such that it is similar to f, but it is a partial function.

5. (problem 0.10) Find the error in the following proof that 2=1. Consider the equation a = b . Multiply both sides by a to obtain a2 = ab . Subtract b2 from both sides to get a2 - b2 = ab - b2 . Now factor each side, (a+b)(a-b) = b(a-b), and divide each side by (a-b) , to get (a+b) = b . Finally, let a and b equal 1, which shows that 2=1.

6. Give examples to show that the intersection of two countably infinite sets can be either finite or countably infinite, and that the intersection of two uncountable sets can be finite, countably infinite, or uncountable.