Question: 1 Rewrite Systems (a) Given the same input, i.e., a sequence of characters starting with 1 and ending with #, and any combination of Os

 1 Rewrite Systems (a) Given the same input, i.e., a sequence

1 Rewrite Systems (a) Given the same input, i.e., a sequence of characters starting with 1 and ending with #, and any combination of Os and is in-between, specify a set of rewrite rules that determine whether the string contains the same number of Os and 1s. Here is some sample "output": 10011# should be rewritten as 1# 11001# should be rewritten as 1# 1110110# should be rewritten as 111# 10001100# should be rewritten as 1000# In other words, the ^# indicates that the input string has the same number of Os and 1s. If the string does not contain the same number of Os and 1s, the resulting string shows how many more Os or is there are in the input string. (b) Is there at most only a single rewrite rule that can be applied at any point in time during the rewrite process? Explain. (c) Show the steps of your rewrite system for the input strings 10101# and 110110#. 1 Rewrite Systems (a) Given the same input, i.e., a sequence of characters starting with 1 and ending with #, and any combination of Os and is in-between, specify a set of rewrite rules that determine whether the string contains the same number of Os and 1s. Here is some sample "output": 10011# should be rewritten as 1# 11001# should be rewritten as 1# 1110110# should be rewritten as 111# 10001100# should be rewritten as 1000# In other words, the ^# indicates that the input string has the same number of Os and 1s. If the string does not contain the same number of Os and 1s, the resulting string shows how many more Os or is there are in the input string. (b) Is there at most only a single rewrite rule that can be applied at any point in time during the rewrite process? Explain. (c) Show the steps of your rewrite system for the input strings 10101# and 110110#

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!