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.

Recommended Answers

All 5 Replies

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?

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.

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'

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.

@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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.