Question
This is all the info that I have. Construct a Markov Algorithm that will reverse the order of an input string that consists of zero
This is all the info that I have.
Construct a Markov Algorithm that will reverse the order of an input string that consists of zero or more upper case letters. ABCDE should become EDCBA, AB should become BA, A should stay A, and should stay . NOTE: Your algorithm must handle strings of ANY length, not just length 0-5. Demonstrate that your algorithm works by constructing a tables for each of the input strings , A, AB, ABC and ABCD (a separate table for each input). To reduce the size of these tables, show only the lines where the rule succeeds. Extra info: Your rules can introduce new characters that can appear temporarily in the working strings. These characters will be lower case Greek symbols like, , , , etc. In general, it makes sense for these symbols to not appear in the final result, but while they are there, they should be treated just like the upper case letters in that they can satisfy a match for a variable just as well as an upper case letter. For example, if the rule being looked at is xy -> yx and the current string is AB, then the rule would change the string to AB. Every time a rule actually executes, you start by considering the rules from the top again and you start by looking at the beginning of the current string. Execution stops either when a rule that ends with a period is executed or if the working string does not cause any of the rules to fire.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started