Questions tagged [finite-automata]

A finite automaton (FA) is a mathematical description of an algorithm capable of parsing regular languages. FAs have no external memory, and as such can only take into account a fixed number of previous symbols when processing strings. A deterministic FA (DFAs) is one for which there is only ever one legal transition between states; nondeterministic FAs can be transformed into equivalent DFAs. FAs are the weakest of the commonly-defined automata.

585 questions
-2
votes
1 answer

Automaton for prefix matching

Using an open source Java automaton library, eg: org.apache.lucene.util.automaton or dk.brics.automaton, how can I build an automaton for prefix matching? eg: an automaton created from the set of strings ["lucene", "lucid"], that will match when…
tekumara
  • 8,357
  • 10
  • 57
  • 69
-2
votes
2 answers

Can anybody explain it to me in detail how to draw transition diagram (DFA/NFA) in theory of computer science?

Ok so this subject is little confusing. I can understand the transition table very well but when it comes to diagram I'm struggling to find out on what basis the diagram is created. Can anybody explain it to me in detail on what basis do we have to…
-2
votes
2 answers

Regular expressions: strings that are not accepted by `(ab+ba)*`

(ab+ba)* accepts all zero or more "a"s followed by zero or more "b"s, and also zero or more "b"s, followed by zero or more "a"s. What is the reject state of this RE? Just think about the strings that are not accepted by (ab+ba)*.
user423733
  • 315
  • 1
  • 3
  • 4
-2
votes
2 answers

Compute transition function error

I'm trying to implement this transition function algorithm in ruby. Here is the algorithm: Compute-Transition-Function(P, Σ); m := |P| for q=0 to m for each a∈Σ k := min(m + 1, q + 2) repeat k=k−1 until (Pk ⊐ Pqa) …
kuat
  • 1
  • 2
-2
votes
1 answer

How to represent a coffee machine using DFA?

I want to know how to represent a coffee machine using a Deterministic finite automata? I've tried a lot to do this job. I represented each and every processes as a set,by putting one to one correspondence with Natural numbers. But I still don't…
Shinoy Shaji
  • 397
  • 10
  • 27
-2
votes
1 answer

How can I make a string empty again after going through different states in a non deterministic finite automata?

For example I have several states I will name A, B and C. A allows 1,0 and loops. When it enters state B, is it possible that everything will be empty again before going to C? If yes, how?
-2
votes
4 answers

Using regular expressions check if a particular segment exist in a given string

There are segments in the below-mentioned string. Each segment is started with a tilt(~) sign and I want to check if there exists a segment in which the AAA segment appears and on its 3rd index a number 63 is present. ISA*ABC**TODAY*ALEXANDER…
Aamerallous
  • 133
  • 13
-3
votes
1 answer

Design a transition diagram for Finite Automata that accepts a language L over Σ {0,1} in which every string start with 0 and ends with 1

What's the transition diagram of this Finite Automata? Is the diagram shown in the image correct?
Jack B
  • 11
  • 1
  • 3
-3
votes
1 answer

what is the regular expression for the automaton?

In this automaton how to find regular expression
-4
votes
4 answers

DFA that contains 1011 as a substring

I have to draw a DFA that accepts set of all strings containing 1011 as a substring in it. I tried but could not come up with one. Can anyone help me please? Thanks
DrunkOnBytes
  • 29
  • 2
  • 3
-4
votes
2 answers

Convert This NFA to DFA

I'm having trouble understanding how to convert. I made a state table for NFA but This alphabet instead of (a,b) makes me confused. Can anyone help me how to convert this NFA to DFA?
alongova
  • 35
  • 5
-4
votes
1 answer

Designing DFA to accept language of even length beginning with 11

Design a DFA to accept language L={w|w is of even length and begins with 11} where inputs are 0'a and 1's?
Raksha
  • 13
  • 1
  • 7
-4
votes
2 answers

C++ Running Time of Algorithms

I've made Naive Approach/Finite Automata search algorithms as homework. Professor also asked for us to print run time of each algorithm. I tried; int start_s=clock(); // the code you wish to time goes here int stop_s=clock(); cout << "time: "…
NTahaE
  • 5
  • 1
  • 5
-4
votes
5 answers

vector vs set in java

which one do you prefer? I want to make a finite automata in java; is it more efficient using vector or set?
gin
  • 27
  • 1
  • 1
  • 10
-5
votes
2 answers

Find a Regular Expression for the language accepted by the Finite Automata

Find a Regular Expression for the language accepted by the Finite Automata
1 2 3
38
39