updated
authorcu
Thu, 19 Oct 2017 13:15:22 +0100
changeset 525 a2ee4b11c976
parent 524 3acec8c93c4b
child 526 a6093b0ad246
updated
hws/hw04.pdf
hws/hw04.tex
hws/hw09.pdf
hws/hw09.tex
progs/pow.scala
Binary file hws/hw04.pdf has changed
--- a/hws/hw04.tex	Thu Oct 19 11:04:43 2017 +0100
+++ b/hws/hw04.tex	Thu Oct 19 13:15:22 2017 +0100
@@ -11,7 +11,7 @@
 \begin{enumerate}
 
 \item If a regular expression $r$ does not contain any occurrence of $\ZERO$,  
-is it possible for $L(r)$ to be empty?
+is it possible for $L(r)$ to be empty? Explain why, or give a proof.
 
 \item Define the tokens and regular expressions for a language
   consisting of numbers, left-parenthesis $($, right-parenthesis $)$,
Binary file hws/hw09.pdf has changed
--- a/hws/hw09.tex	Thu Oct 19 11:04:43 2017 +0100
+++ b/hws/hw09.tex	Thu Oct 19 13:15:22 2017 +0100
@@ -33,11 +33,12 @@
   Give the arithmetic expression that produced this code.  Make sure
   you give all necessary parentheses.
 
-\item Describe what the following two JVM instructions do!
+\item Describe what the following three JVM instructions do!
 
 \begin{lstlisting}[language=JVMIS,numbers=none]
 iload 3
 istore 1
+ifeq label
 \end{lstlisting}
 
 \item \POSTSCRIPT  
--- a/progs/pow.scala	Thu Oct 19 11:04:43 2017 +0100
+++ b/progs/pow.scala	Thu Oct 19 13:15:22 2017 +0100
@@ -23,3 +23,13 @@
 
 pow(C, 3)
 pow(C, 3).size                            // -> 15
+
+
+val A = Set("a", "b", "c", "d")
+pow(A, 4).size   
+
+val A = Set("a", "b", "c")
+pow(A, 5).size   
+
+val A = Set("a", "b", "")
+pow(A, 5).size