\documentclass[12pt]{article} \usepackage{amssymb} \usepackage{euscript} \usepackage{latexsym} \linespread{1.30} \usepackage[dvips]{graphics} \usepackage{psfig} \newtheorem{teo}{Theorem}[section] \newtheorem{dfn}{Def.}[section] \newtheorem{lem}{Lemma}[section] \newtheorem{pro}{Proposition}[section] \newtheorem{dms}{Proof}[section] \newtheorem{cor}{Corollary}[section] %------------------------------------------------------------ % Figure PS ABSOLUTELY HERE %------------------------------------------------------------ \setcounter{topnumber}{10} \renewcommand{\topfraction}{1} \renewcommand{\bottomfraction}{0} \renewcommand{\textfraction}{0} \newcommand{\FigHps}[3]{%\Fig{name}{title}{width} \begin{figure}[ht] \centerline{ \psfig{figure=#1.ps,width=#3} } \vspace{3mm} \caption{#2} \label{#1} \end{figure} } %------------------------------------------------------------ \begin{document} \title{Automata-Theoretic approach to Design Verification} \author{Lecture 2} \date{November 4, 1998} \maketitle \section*{Conventions} We use a certain notation to describe classes of automata (and the corresponding classes of languages accepted by such automata): \begin{itemize} \item DFA: deterministic automata on finite words \item NFA: nondeterministic automata on finite words \item DBW: deterministic B\"uchi automata on infinite words \item NBW: nondeterministic B\"uchi automata on infinite words \item NGBW: nondeterministic generalized B\"uchi automata on infinite words \end{itemize} \section{Review of last lecture} \begin{center} \begin{tabular}{|c|c|c|} \hline Operation & Automaton on finite words & Automaton on $\omega$ words \\ \hline Union & Complexity $\sim \| A_{1} \| + \| A_{2} \|$ & Complexity $\sim \| A_{1} \| + \| A_{2} \| $ \\ \hline Intersection & Complexity $\sim \| A_{1} \| \times \| A_{2} \|$ & Complexity $\sim \| A_{1} \| \times \| A_{2} \|$ \\ \ \ & \ \ & by generalized Buchi automaton \\ \hline Determinization & Complexity $\sim 2 ^{\| A \|}$ & Complexity $\sim n^{n}$ \\ \ \ & by subset construction & to be discussed \\ \hline \end{tabular} \end{center} \section{Lower bounds on determination and complementation} \subsection{Determinization} Consider \\ $L_{1}= \{uv: u,v \in \Sigma^{n}, u \neq v \} \ \ \ \ \ \ \Sigma = \{ 0,1 \}$ \\ $ L_{2}= \{ w : w \in \Sigma^{k}, k \neq 2n \} $ \\ and let be $L= L_{1} \cup L_{2}$ \\ \ \ \\ Let $A_{1}$ be NFW such that \\ $A_{1}= ( \Sigma, S^{1}, S^{1}_{0}, \rho^{1}, F^{1} ) \ \ \ $ where \\ $S^{1}= \{ 0, \Sigma \times \{1, \ldots n \} , 1,2 \}$ \\ $S^{1}_{0}= \{0\}, \ \ \ \ \ F^{1}= \{1\} \ \ \ $ and \[ \rho^{1}(0,a) = \{0, (a,1) \} \ \ \ \ a \in \Sigma \] \[ \rho^{1}((a,i),b) = \left\{ \begin{array}{lll} ( a,i+1) & {\rm if\ \ } i\leq n & \ \ \\ 1 & {\rm if\ \ } i=n,\ \ a\neq b & \ \ \ \ \ a,b \in \Sigma \\ %moshe1: 2 & {\rm if\ \ } i=n,\ \ a=b & \ \ \ \ \ a,b \in \Sigma \\ % 2 & {\rm if\ \ } i=n,\ \ a=b & \ \ \\ \end{array} \right. \vspace{3mm} \] Let $A_{2}$ be NFW such that \\ $A_{1}= ( \Sigma, S^{2}, S^{2}_{0}, \rho^{2}, F^{2} ) \ \ \ $ where \\ $S^{2}= \{ 0,1,2, \ldots 2n,2n+1 \}$ \\ $S^{2}_{0}= \{0\}, \ \ \ \ \ F^{2}= \{0,1, \ldots 2n-1,2n+1\} \ \ \ $ and \[ \rho^{2}(i,a) = \left\{ \begin{array}{ll} ( i+1) & {\rm if\ \ } i\leq 2n \\ i & {\rm if\ \ } i > 2n \\ \end{array} \right. \] Then it is easily seen that \ \ \ \ $L(A_{1} \cup A_{2}) = L = L_{1} \cup L_{2}$,\\ Complexity $\sim \| A_{1} \| + \| A_{2} \|$ \begin{dfn} \ \ \\ \rm{ $\rho^{*}: S\times \Sigma^{*} \rightarrow S$ \ \ is defined as \\ $\rho^{*}(s,\epsilon) = s$ \\ $\rho^{*}(s,wa) = \rho(\rho^{*}(s,w),a) \ \ \ \ \ w \in \Sigma^{*}, \ \ a \in \Sigma$ } \end{dfn} \begin{pro} \ \ \\ \rm{ Let $A$ be DFW for $L=L_{1} \cup L_{2}$. Then:\\ $A=(\Sigma,S,S_{0},\rho,F) \Rightarrow |S| > 2^{n}$ \\ {\bf Proof:}\\ Assume $|S|<2^{n}$ and consider all possible words $w_{1},\ldots w_{2^{n}1}$ over $\Sigma$ of size $n$. Let $t_{1}, \ldots t_{2^{n}} \in S$ be states such that $\rho^{*}(s_{0},w_{i})=t_{i}$.\\ Then by peagonhole principle (PHP) $\exists i \neq j$ such that $t_{i}=t_{j}$. Consider $w_{j}w_{j} \notin L$: we have $\rho^{*}(s_0,(w_{j}w_{j})) = \rho^{*}(\rho_{*}(s_0,w_{j}),w_{j})= \rho^{*}(t_{j},w_{j}) = \rho^{*}(t_{i},w_{j}) = \rho^{*}(s_0,w_{i},w_{j})$, but then $w_{i} w_{j} \in L$, which is a contradiction. \begin{flushright} $\Box$ \\ \end{flushright} } \end{pro} \subsection{Complementation} We saw in the previous section that the language $L_1 \cup L_2$ is accepted by an NFW with $(O(n)$ states. We now show that the complementary language of $L_1 \cup L_2$ requires an exponential number of states. \begin{pro} \ \ \\ \rm{ Let $L= \{ ww : w\in \Sigma^{n} \}$ and NFW $A=(\Sigma, S, S_{0}, \rho, F)$ such that $L(A)=L$. Then \ \ $|S| \ge 2^{n}$. \\ {\bf Proof:} \\ Consider all possible words $w_1,\ldots w_{2^{n}}$ over $\Sigma$ of size $n$. We have $w_i w_i \in L$ for $1 \le i \le 2^{n}$. Let $t^i_0,t^i_1,\ldots,t^i_{2n+1}$ be an accepting run of $A$ on $w_i w_i$. Consider the state $t^1_{n+1}, t^2_{n+1},\ldots,t^{2^n}_{n+1}$. Then by PHP $\exists i \neq j$ such that $t^i_{n+1} = t^j_{n+1}$. It follows that the sequence $t^0_0,\ldots,t^i_n,t^j_{n+1},\ldots,t^j_{2n+1}$ is an accepting run of $A$ on $w_i w_j$. But $w_i w_j \not\in L$, a contradiction. \begin{flushright} $\Box$ \\ \end{flushright} } \end{pro} \section{From NGBW to NBW} \begin{pro} \ \ \\ \rm{ For every NGBW (DGBW) $A$ there is a NBW (DBW) $A$ such that $L_{\omega}(A)= L_{\omega}(A^{b})$ \\ {\bf Proof:} by construction.\\ Let $A=(\Sigma,S,S_{0},\rho,\{F_{0}, \ldots F_{k-1} \})$ \\ $A^{b} = (\Sigma,S^{b},S_{0}^{b},\rho^{b},F^{b})$ -- will contain $k$ copies of $A$ \\ $S^{b} = S \times \{0, \ldots k-1 \}$ \\ $S_{0}^{b} = S_{0} \times \{ 0 \}$ \[ \rho((s,i),a) = \{(t,i):t= \rho(s,a), s \notin F_{i} \} \cup \{(t,i+1):t= \rho(s,a), s \in F_{i} \} \] $F^{b}=F_{i} \times \{i \}$ \ \ for any $i$ \\ $L_{\omega}(A) = L_{\omega}(A^{b})$ -- easy to see. \begin{flushright} $\Box$ \\ \end{flushright} } \end{pro} {\bf \emph {Open question:}} are $k$ copies necessary? \noindent {\bf \emph {Note:}} When constructing intersection for NBW we used NGBW. By using Proposition $3.1$ we can get back to NBW (when given NGBW we construct NBW).\\ \ \ \\ \section{Complementation of DBW} \begin{pro} \ \ \\ \rm{ For every DBW $A$ there is a NBW $A^{c}$ such that \ \ $\Sigma^\omega - L_{\omega}(A) = L_{\omega}(A^{c})$. \\ {\bf Proof:} by construction \\ $A=(\Sigma,S,S_{0},\rho,F)$ \\ $A^{c} = (\Sigma,S^{c},S_{0}^{c},\rho^{c},F^{c})$ \\ $S^{c} = S \times \{ 0 \} \cup (S - F) \times $ \{ 1 \} \\ $S_{0}^{c} = S_{0} \times \{ 0 \}$ \\ $F^{c}= (S - F) \times \{ 1 \}$ \\ and with $s \in S, \ \ a \in \Sigma$ \[ \rho^{c}((s,0),a) = \left\{ \begin{array}{ll} \{ (\rho(s,a),0) \} & \ \ \rho(s,a) \in F \\ \{ (\rho((s,a),0),(\rho((s,a),1) \}, & \rho(s,a) \notin F \\ \end{array} \right. \] $\rho^{c}((s,1),a)= \{ (\rho(s,a),1) \}$, if $\rho(s,a) \notin F$ \\ {\bf Claim}: $\Sigma^\omega - L_{\omega}(A) = L_{\omega}(A^{c})$ \\ Direction I: \\ Let $w \in \Sigma^{\omega} - L_{\omega}(A), \ \ w=a_{0}a_{1} \ldots $, so there is a unique run \ \ $r=s_{0}s_{1} \ldots $ of $A$ on $w$. So there is some $k$ such that $ \forall i > k, s_{i} \notin F \Rightarrow (s_{0},0) \ldots (s_{k},0)(s_{k+1},1) \ldots $ is an accepting run of $A^{c}$.\\ Direction II: \\ $w \in L_{\omega}(A^{c}), \ \ w=a_{0},a_{1} \ldots $ which means there is an accepting run $r = (s_{0},0) \ldots (s_{k},0)(s_{k+1},1)$ of $A^{c}$, so there is a unique run $r'=s_{0} \ldots s_{k}s_{k+1}$ of $A$ on $w$, but this run is rejecting. } \begin{flushright} $\Box$ \\ \end{flushright} \end{pro} {\bf \emph {Open question:}} Can you complement DBW with fewer states? \\ \begin{pro} \ \ \\ \rm{ There is a language $L$ such that $L \in$ DBW but $\Sigma^\omega-L \notin$DBW\\ {\bf Proof:} \\ $L= ( \{0,1 \}^{*}0 )^{\omega} \ \ \ \ \Sigma^\omega- L= \{ 0,1 \}^{*}1^{\omega}$ a): DBW for $L$ is (both states are initial states): \FigHps{automa}{DBW for $L= (\{ 0,1 \}^{*}0)^{\omega}$ }{0.5\textwidth} b): $\Sigma^\omega- L\notin$ DBW \\ Suppose $\{ 0,1 \}^{*}1^{\omega}= L_{\omega}(A)$ for some $A$. We will construct $w \in L_{\omega}(A)- \{ 0,1 \}^{*}1^{\omega}$. \\ Let $w_{0}=1^{\omega}, \ \ w_{0} \in L_{\omega}(A)$. This means there is an accepting run of $A$ such that $r=s_{0}s_{1} \ldots $ and there exists a finite prefix $u_{0}$ of $w$ such that $\rho^{*}(s_{0},u_{0}) \in F$.\\ Now take $w_{1}=u_{0}01^{\omega}$ in $L_{\omega}(A)$. This implies there is an accepting run of $A$ and and there exists a finite prefix $u_{0}0u_{1}$ of $W_{1}$ such that $\rho^{*}(s_{0},u_{0}0u_{1}) \in F$.\\ Inductively, we construct a sequence $u_{0},u_{1} \ldots$ such that \\ $\rho^{*}(s_{0},u_{0}) \in F$, \ldots, $\rho^{*}(s,u_{0}0u_{1}0u_{2} \ldots 0u_{k}) \in F$. \\ Take the infinite word $w=u_{0}0u_{1} \ldots$: it follows that there is an accepting run $r$ of $A$ on $w$, because it visits $F$ i.o., but $w \notin \{ 0,1 \}^{*}1^{\omega}$. } \begin{flushright} $\Box$ \\ \end{flushright} \end{pro} \section{Determinization of NBW} \begin{dfn} \ \ \\ \rm{ M\"{u}ller condition: \\ $A= (\Sigma,S,S_{0}, \rho, G) \ \ \sigma \subseteq 2^{S}$ \\ a run $r$ is accepting iff $inf(r) \in G$ } \end{dfn} We use DMW and NMW to denote deterministic and nondeterministic M\"uller automata on infinite words. \begin{pro} \ \ \\ \rm{ For every NBW $A$ there is a NMW $A^{M}$ such that $L_{\omega}(A) = L_{\omega}(A^{M})$ \\ {\bf Proof:} \\ Take $G = \{ P \subseteq S : P \cap S \neq \O \} $ } \end {pro} \begin{pro} \ \ \\ \rm{ For every DBW $A$ there is a DMW $A^{M}$ such that $\Sigma^\omega - L_{\omega}(A)= L_{\omega}(A^{M})$\\ {\bf Proof:} \\ Take $G= \{ P \subseteq S : P \cap S = \neq \O \}$ -- co-Buchi automaton } \end{pro} \begin{teo} \ \ \\ \rm{ McNaughton's Theorem (1966): For every NBW $A$ there is a DMW $A^{d}$ such that $L_{\omega}(A)= L_{\omega}(A^{d})$\\ {\bf Proof:} future class. } \end{teo} \begin{pro} \ \ \\ \rm{ For every DMW $A=( \Sigma,S_{0},S, \rho, G)$ there is a DMW $A^{c}= (\Sigma,S_{0},S,\rho,G^{c})$ such that $\Sigma^\omega - L_{\omega}(A)= L_{\omega}(A^{c})$ \\ {\bf Proof:} \\ Take $G^{c}=2^{S}-G$ } \end{pro} \begin{pro} \ \ \\ \rm{ For every NMW $A$ there is an NBW $A^{b}$ such that $L_{\omega}(A)= L_{\omega}(A^{b})$ \\ {\bf Proof:} \\ Assignment } \end{pro} \end{document}