CSCE 222 Homework 6 (Due Apr. 17)
1. What is the number of derangements of size k from the set {1, 2, . . . , n} to the set
{1, 2, . . . , n} so that f (x) 6= x exactly k times with 1 ≤ k ≤ n?
2. Let R be the relation defined on the power set of the set of integers P (Z) by A R B
whenever A∪B is a finite set of integers. Prove whether or not R is reflexive, symmetric,
antisymmetric or transitive.
3. Prove that a relation R defined on a set A that is reflexive, symmetric and antisymmetric is an equivalence relation and determine the equivalence classes.
4. Construct a deterministic finite-state automaton for the language L = {w ∈ {0, 1}∗ |
011 cannot appear in the middle of w except at the beginning or at the end}.
5. Give an informal description of a deterministic Turing machine for the language L =
{w ∈ {0, 1}∗ | w = w1 w2 · · · w2n for n > 0 with wi ∈ {0, 1} for 1 ≤ i ≤ 2n and
wk = w2n−k+1 exactly half of the time for 1 ≤ k ≤ n}.