Question: Let w = x_k ... x_0 be a string of ternary digits (MSB first on the left). a) Draw a state diagram for a DFA

 Let w = x_k ... x_0 be a string of ternary

Let w = x_k ... x_0 be a string of ternary digits (MSB first on the left). a) Draw a state diagram for a DFA that accepts strings that are divisible by two. b) Convert the given DFA to a regular expression. c) Let n_i(x) denote the number of digits in x that have value i. For example, for x = 1120, corresponding to the decimal number 2 middot 3 + 3^2 + 3^3 = 42, we have n_0 (x) = 1, n_1(x) = 2 and n_2(x) = 1. Analyze the DFA and determine a simple rule based on the counts n_i(x) for the divisibility by two

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 Databases Questions!