Practice problems

Problems and topics listed here are for open discussion and practice. Feel free to work with a partner or ask the instructor questions. Towards the end of the lab period we may review some but not necessarily all answers. You are welcome to discuss solutions and strategies to these problems openly with classmates and the instructor outside of lab/class, on Piazza, and office hours.

Check the reading for next week and be sure to complete the reading, particularly 1.1-1.2, by Tuesday. Pay attention to the formal definition of the deterministic finite automata (DFA) and the formal definition of computation.

Sample Problems

You do not need to submit any solutions to these problems. This work will not be graded.

You may want to review the notes for this week. You may complete the problems in any order

True or False?

- $ \emptyset \subseteq \emptyset$
- $ \emptyset \in \emptyset$
- $ \emptyset \in \{ \emptyset \}$
- $ \emptyset \subseteq \{ \emptyset \}$
- $ \{ \{ a, b \} \} \in 2^{ \{ a, b , \{ a, b \} \} }$

- $2^{ \{ 7, 8, 9 \} } \setminus 2^{ \{ 7, 9 \} } = $?
- $2^\emptyset = $?

Are the following functions, relations, or neither?

- $\{ (a, b) : b = a^2 \}$
- $\{ (a, b) : a \geq b \}$
- $\{ (a, b) : b^2 = a \}$

The inverse of a binary relation $R \subseteq A \times B$, denoted $R^{-1}$ is a subset of $B \times A$ such that $(b,a) \in R^{-1}$ iff $(a, b) \in R$. The inverse of a relation is a relation.

- Is the inverse of a function a relation?
- Is it a function?
- What if $f$ is one-to-one?
- What if it is onto?
- A bijection?

Consider the alphabet $\Sigma = \{a, b, c\}$.

- Write all the strings of length 2 in $\Sigma^*$ in lexicographical order
- Write all the unique subsets of size 2 of $\Sigma$ in lexicographical order

Show that the set of integers $\mathbb{Z}=\{ \ldots, -2, -1, 0, 1, 2, \ldots \}$ is countably infinite by giving a bijection $f$ from $\mathbb{N}$ to $\mathbb{Z}$.

Prove that $n^2+n$ is divisible by 2 via induction

Prove that $n^2+n$ is divisible by 2 using a case based analysis and considering the case when $n$ is even and the case when $n$ is odd.