0
$\begingroup$

I want to describe the set of all words in the following format: a0w1

where a represents EITHER 0 or 1, and w represents {0,1}*

So 00011 is valid as is 1010011, etc. etc.

I'm really new to set notation, so I'm not sure what I can do.

Is L = {a,0,w,1 | a = 0 or 1, w $\in$ {0,1}*} valid for what I want to describe?

Thanks!

1 Answers 1

1

You can describe that set in many ways. For instance, it corresponds to the regular expression $(0\lor 1)0(0\lor 1)^*1$ (in one common formalism for regular expressions). However, if you want to describe it as a set of strings using standard set notation, you want something like

$\Big\{a0w1\in\{0,1\}^*:a\in\{0,1\}\text{ and }w\in\{0,1\}^*\Big\}\;.$

In particular, you don’t want the commas: words over an alphabet are normally written without, unless some of the symbols in the alphabet require more than one typographical symbol to represent them.

  • 0
    OK got it, thanks2012-07-19