πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

Finite state machine

Finite state machine

  • Finite state machine is used to recognize patterns.
  • Finite automata machine takes the string of symbol as input and changes its state accordingly. In the input, when a desired symbol is found then the transition occurs.
  • While transition, the automata can either move to the next state or stay in the same state.
  • FA has two states: accept state or reject state. When the input string is successfully processed and the automata reached its final state then it will accept.

A finite automata consists of following:

Q: finite set of states
βˆ‘: finite set of input symbol
q0: initial state
F: final state
Ξ΄: Transition function

Transition function can be define as

Ξ΄: Q x βˆ‘ β†’Q  

FA is characterized into two ways:

  1. DFA (finite automata)
  2. NDFA (non deterministic finite automata)

DFA

DFA stands for Deterministic Finite Automata. Deterministic refers to the uniqueness of the computation. In DFA, the input character goes to one state only. DFA doesn't accept the null move that means the DFA cannot change state without any input character.

DFA has five tuples {Q, βˆ‘, q0, F, Ξ΄}

Q: set of all states
βˆ‘: finite set of input symbol where Ξ΄: Q x βˆ‘ β†’Q
q0: initial state
F: final state
Ξ΄: Transition function

Example

See an example of deterministic finite automata:

Q = {q0, q1, q2}  
βˆ‘ = {0, 1}  
q0 = {q0}  
F = {q3}  


Finite state machine

NDFA

NDFA refer to the Non Deterministic Finite Automata. It is used to transit the any number of states for a particular input. NDFA accepts the NULL move that means it can change state without reading the symbols.

NDFA also has five states same as DFA. But NDFA has different transition function.

Transition function of NDFA can be defined as:

Ξ΄: Q x βˆ‘ β†’2Q


Example

See an example of non deterministic finite automata:

Q = {q0, q1, q2}  
βˆ‘ = {0, 1}  
q0 = {q0}  
F = {q3} 

Finite state machine 1

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>