0

I need help designing an automata that accepts the following words "hello" and "hello world"
The alphabet includes the english alphabet and numbers.
I just need to know how to start designing this automata.

4
Contributors
5
Replies
6
Views
4 Years
Discussion Span
Last Post by Taywin
0

Could you post the whole language including the constraints

just by the current details, the solution would look linear like checking if the next set of input corresponds to the right word like 'h' then 'e' where it could end with just the word 'hello' or 'world', are there any restrictions to the problem like the string can be accepted if those words are a substring?

Edited by zeroliken

0

There are several documents i need to look for those strings.
For example if "hello" or "hello world" are in a document i need to output something like
Word found in document 1 or Word not found in document 3(and so on). i dont need any help programming, i just need help setting the automata.

0

then same answer as before

checking if the next set of input corresponds to the right word like 'h' then 'e' where it could end with just the word 'hello' or 'world'

0

Why do you need an automata ? It doesn't look like you need to check for strings matching any regular expressions. Just load the contents of the documents as string and do a find for the required strings.

0

@Agni, I don't think this is about programming, but it is about concept in computer science (something similar to formal methods and/or models).

@israruva, zeroliken has already answered your question. Did you draw a diagram of the NFA yet? Use the diagram to determine the automata.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.