Question: Question 1 Consider ternary ( base - 3 ) numbers over the digits = { 0 , 1 , 2 } . Assume that numbers

Question 1
Consider ternary (base-3) numbers over the digits ={0,1,2}. Assume that numbers with superfluous leading zeros are allowed. Give a regular expression for each of the following languages:
Numbers where all the digits are the same. For example, 00,1,22, and 2222 are valid, but 010, and 122 are invalid.
Numbers that start and end with the same digit. For example, 1,11 and 121 are valid, but 01 and 122 are invalid.
Numbers that do not contain consecutive repeated digits. For example, 10 and 121 are valid, but 00 and 122 are invalid.
Question 2
Give a DFA for each of the languages in Question 1.
Question 1 Consider ternary ( base - 3 ) numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!