reset password
Author Message
rpuas
Posts: 29
Posted 22:38 May 01, 2016 |

Midterm review question...

if my notes are correct, the answer for A1 Q1 is...

a, b, and c

Can someone explain why d, e, and f are not an answer?

(I don't recall the explanation given in class)

303496263
Posts: 68
Posted 22:47 May 01, 2016 |

d is not true because even though it contains at least one zero, it doesn't include the numbers which could end with 1 ie: 101

e is not true because it won't let a number start with 1

and f is not correct because, similar to d, it can't end with 1

Hope this makes sense. 

jwarren6
Posts: 56
Posted 22:48 May 01, 2016 |

Not D because although you can have any number of 1's and 0's before the mandatory 0, you can then only have 0's following that. You must be able to have 1's at the end as well in order to satisfy any string, i.e. the string can only terminate with 0's in this answer.

Not E because you can only have optional 0's before the mandatory 0 in the middle, i.e. the allowable strings could only begin with 0 with this answer.

Not F because this answer does not allow any strings that end with 1's.

Not G because this answer does not allow any strings with 1's in them.

I hope this explanation helps.

rpuas
Posts: 29
Posted 23:06 May 01, 2016 |

thanks... i figured it out after I posted the question... but both your answers confirm my reasoning.