Question

In: Computer Science

Consider the ternary number system. What is the corresponding regular expression of a DFA that accepts...

Consider the ternary number system. What is the corresponding regular expression of a DFA that accepts ternary strings that are not divisible by nine?

Solutions

Expert Solution


The final regular expression for the language which contains strings that are not divisible by 9 is :

     R.E= ε +1+2+(0+1+2)*(01+02+10+11+12+20+21+22)

Here, ε is empty string.as per the question, ε can also be accepted by the grammer.

Thank you..

  


Related Solutions

Problem 1. Derive an expression for the mixing entropy ∆Smix of a ternary system. Simplify your...
Problem 1. Derive an expression for the mixing entropy ∆Smix of a ternary system. Simplify your result, writing it as the total number of particles N times a purely intensive function of the mole fractions of all three components.
1. What is a regular expression? Write a regular expression that will detect “College” and “collegE”....
1. What is a regular expression? Write a regular expression that will detect “College” and “collegE”. 2. What is degree centrality? Create a graph of 4 vertices and compute the degree centrality of the vertices. 3. Compute internal and external community densities for a graph containing 6 nodes. You can create any graph of 6 nodes with at least 4 edges.
Consider the following regular expression meta operators: ( ) [ ] { } . * +...
Consider the following regular expression meta operators: ( ) [ ] { } . * + ? ^ $ | \ For each of the following, give one example of strings which the regular expression would match. Describe (colloquially, in a manner that a non-technical person would understand) the set of strings that the pattern is designed to match. Each regular expression is enclosed in the pair of '/' characters below. [2 marks each] (a) /^[a-z][0-9]*\.$/ (b) /([0-9]+)\s\w+\s\1/
What are the general principles of DFA? What are the steps to minimize the number of...
What are the general principles of DFA? What are the steps to minimize the number of parts for an assembly?
Create and test a python regular expression that matches a street address consisting of a number...
Create and test a python regular expression that matches a street address consisting of a number with one or more digits followed by two words of one or more characters each. The tokens should be separated by one space each, as in 123 Main Street.
Q1 Write a python regular expression to match a certain pattern of phone number.             ###...
Q1 Write a python regular expression to match a certain pattern of phone number.             ### Suppose we want to recognize phone numbers with or without hyphens. The ### regular expression you give should work for any number of groups of any (non- ### empty) size, separated by 1 hyphen. Each group is [0-9]+. ### Hint: Accept "5" but not "-6" ### FSM for TELEPHONE NUMBER IS: # state:1 --[0-9]--> state:2 # state:2 --[0-9]--> state:4 # state:2 --[\-]---> state:3 #...
Question II: Consider the language L below. If L is a regular language, construct the corresponding...
Question II: Consider the language L below. If L is a regular language, construct the corresponding DFA. If not, prove that L is not a regular language. L= {0n10n | n ≥1} Consider the language M consisting of those strings of 0’s and 1’s that have an equal number of 0’s and 1’s (not in any particular order). Suppose we know M is not a regular language. Consider the language N consisting of those strings of 0’s and 1’s that...
Write the correct regular expression pattern for a phone number field with the format XXX-XXX-XXXX
Write the correct regular expression pattern for a phone number field with the format XXX-XXX-XXXX
Consider GaAsP system. Determine the range of the direct bandgap energies possible and the corresponding range...
Consider GaAsP system. Determine the range of the direct bandgap energies possible and the corresponding range of wavelength.
linux Using the grep or egrep commands, what would be the full command (including regular expression)...
linux Using the grep or egrep commands, what would be the full command (including regular expression) to view only the lines in the file /boot/grub/grub.cfg that DO NOT begin with a hashtag (the # sign). In other words, what would be the command to print all the lines in this file that do not begin with this character.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT