Home > Theory Of Computation > Length Of String || Exact || At Most || At Least : Finite Automata Example

# Length Of String || Exact || At Most || At Least : Finite Automata Example

## Construct Finite Automata Whose Length Of String

Is

Exact 2

Σ={a,b} // Input Alphabets

L={aa,ab,ba,bb} // Finite String

abc is invalid string // the length of abc is 3

{Q,Σ,δ,q0,F}

Q={q0,q1,q2,qd}

Σ={a,b}

q0={q0}

F={q2}

(ab) // String

δ=(QXΣ->Q)

δ(q0,a)->q1

δ(q1,b)->q2

δ(q0,a)->qd

δ(q0,b)->qd

δ(qd,a)->qd

δ(qd,a)->qd

## b) at most 2 (Maximum 2)  // (‘0′,’1′,’2’)

L={ε,a,b,aa,ab,bb,ba}

{Q,Σ,δ,q0,F}

Q={q0,q1,q2,qd}

Σ={a,b}

q0={q0}

F={q0,q1,q2}

δ=(QXΣ->Q)

## c) at least ‘ 2 ‘ // should be 2 and more than two

L={aa,ab,ba,bb,aba,bab……}

0,1 are rejected in this

Example

ababb(Valid String)

ababb Is Valid String For This Language.

## One thought on “Length Of String || Exact || At Most || At Least : Finite Automata Example”

1. I believe other website proprietors should take this internet site as an example , very clean and wonderful user friendly style.