Questions tagged [automata]

Automata Theory, including abstract machines, grammars, parsing, grammatical inference, transducers, and finite-state techniques

Automata (plural of automaton) are abstract models of machines. These machines take an input such as a string of characters and give some output, often an "accept" or "decline" value.

These machines are closely related to . Many languages can be categorized based on the type of automata that can accept them. For instance,

  • regular languages can be recognized by some deterministic finite automata.
  • context-free languages can be recognized by some pushdown automata.
  • recursively enumerable languages can be recognized by some Turing machine.

There are many different types of automata, each with slightly different definitions. A few examples are

  • Deterministic Finite Automata (DFA)
  • Nondeterministic Finite Automata (NFA)
  • Pushdown Automata
  • Infinite Automata
  • Alternating Automata

For instance, a deterministic finite automata $A$ has five parts:

  • a finite set of states $Q$
  • a finite set of input symbols called the alphabet $\Sigma$
  • a transition function $\delta: (Q\times \Sigma)\rightarrow Q$
  • an initial state $q_0 \in Q$
  • a set of accept states $F\subseteq Q$

The automaton $A$ takes in a string $\sigma$ of characters of $\Sigma$. The automaton starts at state $q_0$ and then for each letter of $\sigma$ it moves to another state according to the transition function $\delta$. Once the automaton has used every letter of $\sigma$, if its final state is in $F$, then we say that $A$ accepts $\sigma$.

For questions also about

1841 questions
69
votes
4 answers

Difference between NFA and DFA

In very simple terms please, all resources I'm finding are talking about tuples and stuff and I just need a simple explanation that I can remember easily because I keep getting them mixed up.
Ogen
  • 2,255
  • 8
  • 31
  • 44
35
votes
4 answers

Why does this FSM accept binary numbers divisible by three?

This finite state machine (FSM) accepts binary numbers that are divisible by three. In theory the states should equal to the value $n$ mod $3$, but how does this work for binary numbers? What I don't get is how the transitions get together because…
muffel
  • 2,879
10
votes
1 answer

Proof that an automaton stops

I discovered an automaton that produced interesting, random-seeming patterns. The rule was as follows. Given a grid of points, some occupied and some not, and a current point and a previous point; change the current point to the unoccupied point one…
rlms
  • 843
7
votes
1 answer

Constructor And\Or-graph on function transition of the alternating automata

In a And\Or-graph induced by the transition function, each node of $G$ corresponds to a state $q$ belonging to a set $Q$ of the state of the Automaton, for $q$ with $\delta(q,a)=q_1*q_2$, the node is a $*$-node with two successors $q_1$ and $q_2$.…
kafka
  • 183
6
votes
2 answers

Is a DFA a subset of NFA? Why?

After reading this previous question Difference between NFA and DFA, it's clearer to me their relationship/differences. Can one say that a DFA is a subset of a NFA where both recognize a/the same regular language? If so, how can I back my…
5
votes
1 answer

Is $\epsilon$ in every alphabet?

Given a $\Sigma$ an alphabet, is $\epsilon$ in it logically? For example, if I have a function $ f : \Sigma \to \Sigma $, can I define it for example $ f(\sigma) = \epsilon$? even if my alphabet is for example only $\Sigma = \{a,b,c\}$?
TheNotMe
  • 4,841
5
votes
1 answer

Give a push down Automata for this language: the length of is odd and it's middle symbol is 0

Give a push down automaton for this language: {w| the length of w is odd and it's middle symbol is 0} Here is the CFG I wrote for this language: S --> 0|0S0|0s1|1s0|1s1 This what I have done for odd length part (I'm not using a stack for first…
Node.JS
  • 1,119
5
votes
4 answers

How to draw this finite automate?

I would like to verify if i have the good approach to this problem, while looking at my solution it seems ok but i am not sure. Thank you. I am using this tool to draw if you wanna help out : http://madebyevan.com/fsm/ Here's the question : Build a…
codetime
  • 335
  • 2
  • 8
5
votes
1 answer

My Moore and Mealy machines look the same. Why?

For university I have to construct equivalent Mealy and Moore machines that solve certain problems. But I am confused, as my Moore and Mealy machines turn out to have exactly the same nodes, just with different labels. Example Input alphabet: {0,…
Lucius
  • 153
4
votes
1 answer

How do we choose a good string for the pumping lemma?

we have a Language $$\mathscr L: \{a^mb^n: m \ne n\}$$ we need to choose a good string $w$. apparently $w = a^{n+1}m^{n}$ is not a good string. can someone explain why? I also found this and I thought this is highly misleading, because when I use…
4
votes
3 answers

Matrix representation of Automata

Is anyone know if there is any tutorial for the matrix representation of automata?? I am taking a theoritical computer science in this semester and the professor uses the matrix in his lecture. I gonna have test next week so I have to study for it.…
eChung00
  • 2,963
  • 8
  • 29
  • 42
4
votes
1 answer

Automata|The mid 1/3 of regular language is still regular

Define $$L_{\frac{1}{3}}=\{w \in \Sigma^*\ |\ \exists x,y\in \Sigma^*,\ xwy\in L,\ |x|=|w|=|y|\}$$L is a regular language, is $L_{\frac{1}{3}}$ a regular language? I think it might be similar to the question of half of L. Automata | Prove that if…
gcc17
  • 61
4
votes
1 answer

NFA of $k$ states recognizing all words of length $\le k$

Let $N$ be an NFA with $k$ states that recognizes some language $A$. a. Show that if $A$ is nonempty, $A$ contains some string of length at most $k$. b. Show, by giving an example, that part (a) is not necessarily true if you replace both $A$’s by…
4
votes
2 answers

how can the empty set ∅ and {ϵ} be considered regular languages? (automaton)

On an NFA, how can the empty set ∅ and {ϵ} be considered regular languages? Does it make sense that a machine that accepts no symbols or a machine that takes the empty symbol exist? I could think of a machine (laptop) that is in off mode, where no…
mf295
  • 41
4
votes
3 answers

If L is regular, so is $L-\{λ\}$?

A language is regular, by definition, if you can create a DFA for it. Then I need to prove that if $L$ is regular, then so is $L-\{\lambda\}$ for any $\lambda\in L$. Any ideas?
Pluto
  • 143
  • 1
  • 3
1
2 3
17 18