hws/hw06.tex
changeset 577 7a437f1f689d
parent 459 780486571e38
child 595 4bf0096bc06b
equal deleted inserted replaced
576:550186034b6e 577:7a437f1f689d
    55 
    55 
    56 (i) Give a grammar that can recognise such boolean expressions
    56 (i) Give a grammar that can recognise such boolean expressions
    57 and (ii) give a sample string involving all rules given in 1.-4.~that 
    57 and (ii) give a sample string involving all rules given in 1.-4.~that 
    58 can be parsed by this grammar.
    58 can be parsed by this grammar.
    59 
    59 
    60 \item Given the regular expression
    60 \item Given the regular expressions
    61 
    61 
    62 \[(ab + a)\cdot (\ONE + b)\]
    62 \begin{center}
       
    63 \begin{tabular}{ll}    
       
    64   1) & $(ab + a)\cdot (\ONE + b)$\\
       
    65   2) & $(aa + a)^*$\\
       
    66 \end{tabular}
       
    67 \end{center}
    63 
    68 
    64 there are two values for how this regular expression can recognise
    69 there are in case two values for how these regular expressions can
    65 the string $ab$. Give both values and indicate which one is the
    70 recognise the string (for 1) $ab$ and (for 2) $aaa$. Give in each case
    66 POSIX value.
    71 both values and indicate which one is the POSIX value.
    67 
       
    68 \item \POSTSCRIPT        
    72 \item \POSTSCRIPT        
    69 \end{enumerate}
    73 \end{enumerate}
    70 
    74 
    71 \end{document}
    75 \end{document}
    72 
    76