Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Solve the following 1,4 3 2TT 5x- 1+ (15 x) dx 5X

Answered: 1 week ago