Questions tagged [finite-state-automaton]

Mathematical model of computation used to design computer programs and sequential logic.

Mathematical model of computation used to design computer programs and sequential logic. Simple examples of the finite state machine might be traffic lights or a vending machine.

31 questions
0
votes
0 answers

How does forced alignment happen in Kaldi?

I am going through the popular 'yesno' tutorial to get comfortable with Kaldi toolkit. For acoustic model training we will need the start and end times of each utterance, the speaker ID of each utterance, and a list of all words and phonemes present…
0
votes
1 answer

How does placing the output (word) labels on the initial transitions of the words in an FST lead to effective composition?

I am going through hbka.pdf (WFST paper). https://cs.nyu.edu/~mohri/pub/hbka.pdf A WFST figure for reference Here the input label i, the output label o, and weight w of a transition are marked on the corresponding directed arc by i: o/w. It does not…
0
votes
1 answer

How to create a deterministic finite automata for the "regular" function where states lead to more than one state depending on the value of an int

the manual of Minizinc says that we can pass an array to the "regular" function that represent the transitions between states of a DFA. For this state machine: It puts this example: array[STATE,SHIFT] of int: t = [| 2, 3, 1 % state 1 | 4, 4, 1…
Ezequile
  • 11
  • 1
0
votes
1 answer

Aligning nodes in dot with group does not give the desired result

I tried to create graph from here Improving graphviz layout and want to get the exact picture like in post, but can't vertically align nodes and get nice curve in q3->q3. My question is about how fix this: digraph { layout=dot rankdir =…
kirogasa
  • 627
  • 5
  • 19
0
votes
1 answer

How do I set a pause between if statements?

I want to write a code that let’s a car drive if low light is detected and stop if a sonar sensor measures less than 20 cm. This has to be repeated. However, if the same low light is detected again while driving, the car has to stop completely and…
0
votes
1 answer

Draw an FSA that recognizes: (A∗ | AB+). (The bar outscopes the other operators, so its equal to: (A∗) | (AB+).) Use as few states possible

I've attached what I have. My problem is that I don't know if its correct and if I've even used the fewest states possible to answer this question. Really appreciate any help on what I currently did wrong this is what i have currently
0
votes
0 answers

Given a finite character vocabulary, what is the easiest way to represent arbitrarily long sequences of characters with uniform length?

I am attempting to manipulate a finite state transducer for a project. However, in constructing the FST, I need the output symbols to each be some arbitrarily long sequence of characters from the input symbols, which are simply individual unique…
DLS
  • 13
  • 3
0
votes
1 answer

Is this NFA correctly accepting inputs that end with a 00?

In a lecture it was said that this NFA accepts inputs ending with two zeros or inputs=0: https://ibb.co/9Wt0j7J . The alphabet is {0,1} But if the input would be 001 we would on some path also end up in the acceptance state (z2) but it would not be…
Logik
  • 219
  • 2
  • 9
0
votes
1 answer

Is the pumping lemma proof wrong from book ?

The proof for 'pumping lemma' from book : Pumping lemma: If A is a regular language, then there is a number p (the pumping length) where if s is any string in A of length at least p, then s may be divided…
0
votes
1 answer

What state will this finite automata go when reading a symbol which is not belong to its alphabet?

As we know, the definition of 'finite state automata' is: Then we have this finite state automat described as: Then we have the conclusion: Question is : Instead of accept an empty string, what if the automat first read string is '2', which is…
0
votes
1 answer

Why does my screen not update when I click my button the first time, but works perfectly fine afterwards?

This is my first time making a finite state Automata. I tried making a stop light kind of program where if you click the button, the light changes once, starting at green, then to yellow if clicked again, then to red, before looping again. I managed…
Josee
  • 141
  • 1
  • 2
  • 12
0
votes
4 answers

Game Ai using Enum as Finite State Machine

I want to implement an ai into a simple street fighter style game, and I want to do this with a finite state machine. For a simple example, this FSM has the states: Attacking, Chasing, Fleeing From what I have read online, a good way of implementing…
Hdot
  • 543
  • 1
  • 4
  • 15
0
votes
2 answers

npda for the language number a's less than or equal to 3 times the number of b's

I am trying to construct an npda for L = {w ∈ {a,b}*| na(w) <= 3*nb(w)}. This means that for every b there can be at most 3 a's. First of all, this is what I have done so far. From the start state, we push a single "a" on to the stack. (at the…
-1
votes
1 answer

Finite state machine with timer resets

I'll have a real world problem that I try to solve which involves the implementation of a FSM. But I fail to get it right. My problem: I want to integrate my garage door into my smart home. As it is an apartment block, I cannot tamper with the…
LuMa
  • 1,673
  • 3
  • 19
  • 41
-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