hws/hw02.tex
changeset 940 1c1fbf45a03c
parent 930 0f92e2087520
child 966 d82c91f85391
equal deleted inserted replaced
939:fb6ffb9b7304 940:1c1fbf45a03c
   116       (b) binary numbers. Hint: Observe that the empty string
   116       (b) binary numbers. Hint: Observe that the empty string
   117       is not a number. Also observe that leading 0s are
   117       is not a number. Also observe that leading 0s are
   118       normally not written---for example the JSON format for numbers
   118       normally not written---for example the JSON format for numbers
   119       explicitly forbids this. So 007 is not a number according to JSON.
   119       explicitly forbids this. So 007 is not a number according to JSON.
   120 
   120 
   121       \solution{Just numbers without leading 0s: $0 + (1..9)\cdot(0..1)^*$;
   121       \solution{Just numbers without leading 0s: $0 + (1..9)\cdot(0..9)^*$;
   122         can be extended to decimal; similar for binary numbers
   122         can be extended to decimal; similar for binary numbers
   123       }
   123       }
   124 
   124 
   125 \item Decide whether the following two regular expressions are
   125 \item Decide whether the following two regular expressions are
   126       equivalent $(\ONE + a)^* \equiv^? a^*$ and $(a \cdot
   126       equivalent $(\ONE + a)^* \equiv^? a^*$ and $(a \cdot