Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need the code in python or in psude code Thanks Problem 1. (20 points) Make a string match program using a finite automata. However,
I need the code in python or in psude code
Thanks
Problem 1. (20 points) Make a string match program using a finite automata. However, you need to modify it so it finds the patter either forwards or backwards. The first word in the input file is the pattern (on its own line). The second word will be the string you are trying to match. Output all indexes where a match starts happening. You may assume we will only put the normal 26 English letters in lower case for both the pattern and string. It is possible for a match to happen twice (if the pattern is symmetric). You should output the index of this match twice then. Assume indexes start from 0 Sample input file (all characters on a single line with no spaces between): abcc abccbabcc Corresponding sample output.txt file (spaces separating indexes (no space after final index)): 0 2 5Step 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