Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. % ---------
  2. % Compile with "pdflatex hw0".
  3. % --------
  4. %!TEX TS-program = pdflatex
  5. %!TEX encoding = UTF-8 Unicode
  6.  
  7. \documentclass[11pt]{article}
  8. \usepackage{jeffe,handout,graphicx}
  9. \usepackage[utf8]{inputenc} % Allow some non-ASCII Unicode in source
  10.  
  11. \def\Sym#1{\textbf{\texttt{\color{BrickRed}#1}}}
  12.  
  13. % Redefine suits
  14. \usepackage{pifont}
  15. \def\Spade{\text{\ding{171}}}
  16. \def\Heart{\text{\textcolor{Red}{\ding{170}}}}
  17. \def\Diamond{\text{\textcolor{Red}{\ding{169}}}}
  18. \def\Club{\text{\ding{168}}}
  19.  
  20. % =========================================================
  21. % Define common stuff for solution headers
  22. % =========================================================
  23. \Class{CS 374}
  24. \Semester{Spring 2015}
  25. \Authors{2}
  26. \AuthorOne{Akshat Gupta}{agupta60}
  27. \AuthorTwo{Rohit Mukerji}{rmukerj2}
  28. \AuthorThree
  29.  
  30.  
  31. % =========================================================
  32. \begin{document}
  33.  
  34. % ---------------------------------------------------------
  35. \HomeworkHeader{1}{3} % homework number, problem number
  36.  
  37. \def\LL{\textcolor{NavyBlue}{\,\llbracket\,}}
  38. \def\RR{\textcolor{Red}{\,\rrbracket\,}}
  39.  
  40.  
  41.  
  42.  
  43.  
  44. \begin{solution} \leavevmode
  45.  
  46. \begin{flushleft}
  47. a) $M$ = ($Q$, $\sum$, $\delta$, $q_o$, $F$) \\
  48.  
  49. \end{flushleft}
  50.  
  51. \begin{flushleft}
  52. Q = $Q_1$ x $Q_2$ x $Q3$\\
  53. $\sum$ = $\sum$\\
  54. $\delta$(($q_1$, $q_2$, $q_3$), a) = ($\delta$($q_1$, a), $\delta$($q_2$, a), $\delta$($q_3$, a)) where ($q_1$, $q_2$, $q_3$) $\in$ $Q$\\
  55. $F$ = ($F_1$ x $F_2$ x $Q_3$) + ($F_1$ x $Q_2$ x $F_3$) + ($Q_1$ x $F_2$ x $F_3$)
  56.  
  57. \end{flushleft}
  58.  
  59. \begin{flushleft}
  60. b)
  61.  
  62. \end{flushleft}
  63.  
  64. \begin{flushleft}
  65. \underline{To Prove}: Let $X$ be a regular language accepted by $M$. We need to show that $X$ = L. \\
  66. $\implies$ $X$ $\subseteq$ L and L $\subseteq$ X \\
  67.  
  68.  
  69.  
  70.  
  71. \end{flushleft}
  72.  
  73. \begin{flushleft}
  74.  
  75. ($q_1$, $q_2$, $q_3$) $\xrightarrow{w}$ ($a_1$, $a_2$, $a_3$)\\
  76. \end{flushleft}
  77.  
  78. \begin{flushleft}
  79. \underline{Inductive Hypothesis:} For all strings w such that |w| < n, \\($q_1$, $q_2$, $q_3$) $\xrightarrow{w}$ ($p_1$, $p_2$, $p_3$) in M iff $q_1$ $\xrightarrow{w}$ $p_1$ in $M_1$, $q_2$ $\xrightarrow{w}$ $p_2$ in $M_2$, and $q_3$ $\xrightarrow{w}$ $p_3$ in $M_3$.\\
  80. \underline{Inductive Step:} Let s be an arbitary string such that |s| = n. We can write s as s = aw, where |w| < n.\\
  81. Suppose, ($q_1$, $q_2$, $q_3$) $\xrightarrow{a}$ ($r_1$, $r_2$, $r_3$). Then by definition, $q_1$ $\xrightarrow{a}$ $r_1$, $q_2$ $\xrightarrow{a}$ $r_2$, and $q_3$ $\xrightarrow{a}$ $r_3$\\
  82. Also by the Inductive Hypothesis, $r_1$ $\xrightarrow{w}$ $p_1$, $r_2$ $\xrightarrow{w}$ $p_2$, and $r_3$ $\xrightarrow{w}$ $p_3$.\\
  83. Pasting the computations back together, as $q_1$ $\xrightarrow{a}$ $r_1$ and $r_1$ $\xrightarrow{w}$ $p_1$, $q_1$ $\xrightarrow{aw}$ $p_1$\\
  84. As we know aw = s, $q_1$ $\xrightarrow{s}$ $p_1$\\
  85. Without Loss of Generality, $q_2$ $\xrightarrow{s}$ $p_2$ and $q_3$ $\xrightarrow{s}$ $p_3$\\
  86. $\implies$ ($q_1$, $q_2$, $q_3$) $\xrightarrow{s}$ ($p_1$, $p_2$, $p_3$)
  87.  
  88. \end{flushleft}
  89.  
  90.  
  91.  
  92. \end{solution}
  93.  
  94. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement