1 give a regular expression for the set of all bit strings 0 1 that are divisible by 5346630

1. Give a regular expression for the set of all bit strings {0,1}that are divisible by 3.

*CLARIFICATION: The numbers 0,3,6,9,12,15 (in base 10), etcare divisible by 3. The needed regular expression shouldproduce the equivalence in base 2. i.e. 0000, 0011, 0110,1001, 1100, 1111, etc. In my example I used 4 bits, but theexpression could have an unlimited amount of bits such as0000000000011, which is 3 in base 10 and is divisible by 3. Essentially, this will produce the all of the answers to x mod 3 inbinary.

2. Give a regular expression for the set of all strings over thealphabet {0,1} that contains no occurrences of the strings 000 and111.

The answer can only use concatenation “(ab)”, alternation “a|b”,plus “a+”, and Kleene Stars “a*(a|b)*. Basically no languagespecific symbols that makes life easier. =(

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now