Question

The decimal notation for a number is the number written in the usual way, as a...

  1. The decimal notation for a number is the number written in the usual way, as a string over the alphabet {0,1,⋯9}. For example, the decimal notation for 13 is a string of length 2. In unary notation, only the symbol “I” is used; thus 5 would be represented as IIIII in unary notation. Show that each of the following is or is not a regular language.

(For regular languages, write down its regular expression or describe the automata accepting it; for languages that are not regular, prove it using pumping lemma)

  1. {w: w is the unary notation for a number that is a multiple of 7}
  2. {w: w is the unary notation for 10n,n ≥1}

Homework Answers

Answer #1

Both of these are regular languages:

1. {w: w is the unary notation for number that is multiple of 7}

reg expression - (IIIIIII)* = (I7)*

PFA automata image: S is start state and F is the final state. Here both are represented by the same node. Since string of 0 length is also a multiple of 7.

2. {w: w is the unary notation for 10n,n ≥1}

reg expression - (IIIIIIIIII)+ = (I10)+

PFA automata image: S is start state and F is the final state

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions