CS 139 // 2020-04-07
Claim: $L$ is Turing recognizable if and only if $L\le_m A_\text{TM}$.
$L$
$L\le_m A_\text{TM}$
$w\in L$
$w\not\in L$
$A_\text{TM} = \{\langle M, w\rangle \mid \text{ $M$ is a TM that accepts $w$}\}$
$L \le_m A_\text{TM}$
$f$
$f(w) \in A_\text{TM}$
Claim: the following language is decidable $$\text{FINITE}_\text{DFA} = \{ \langle M\rangle \mid \text{$M$ is a DFA and $L(M)$ is finite} \}$$
$$\text{FINITE}_\text{DFA} = \{ \langle M\rangle \mid \text{$M$ is a DFA and $L(M)$ is finite} \}$$
Which of these languages about TMs are decidable?
$L_1 = \{\langle M \rangle \mid \text{$M$ has $\ge$ 481 states}\}$
$L_2 = \{\langle M \rangle \mid \text{$M$ takes $\ge$ 481 steps on input $\epsilon$}\}$
$L_3 = \{\langle M \rangle \mid \text{$M$ takes $\ge$ 481 steps on some input}\}$
$L_4 = \{\langle M \rangle \mid \text{$M$ takes $\ge$ 481 steps on all inputs}\}$
$L_5 = \{\langle M \rangle \mid \text{$M$ moves its head to the 481th cell on $\epsilon$}\}$
$L_6 = \{\langle M \rangle \mid \text{$M$ accepts $\epsilon$}\}$
$L_7 = \{\langle M \rangle \mid \text{$M$ accepts some string}\}$
$L_8 = \{\langle M \rangle \mid \text{$M$ accepts every string}\}$
$L_9 = \{\langle M \rangle \mid \text{$M$ accepts a finite set}\}$
$\epsilon$
$\le$
Claim: the following language is decidable $$\text{FINITE}_\text{TM} = \{ \langle M\rangle \mid \text{$M$ is a TM and $L(M)$ is finite} \}$$
$$\text{FINITE}_\text{TM} = \{ \langle M\rangle \mid \text{$M$ is a TM and $L(M)$ is finite} \}$$
Let $f:\{\texttt{x}\}^\ast\rightarrow\{0, 1, 2\}$ be the function defined by $$f(\texttt{x}^n) = (n\;\%\;3)$$ Show that $f$ is computable by giving a low-level Turing machine that computes it
$f:\{\texttt{x}\}^\ast\rightarrow\{0, 1, 2\}$
$$f(\texttt{x}^n) = (n\;\%\;3)$$
$\Sigma = \{\texttt{(}, \texttt{)}\}$
$P = \{w\in\Sigma^\ast \mid \text{$w$ has perfectly matched parentheses}\}$
$\texttt{(()())}\in P$
$\texttt{(()))()}\not\in P$
$P$