hws/hw02.tex
changeset 941 66adcae6c762
parent 931 14a6adca16b8
child 967 ce5de01b9632
equal deleted inserted replaced
940:46eee459a999 941:66adcae6c762
   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