Skip to content

drepfawx/dfa_coursework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DFA for Recognizing 8-Character Strings

This Java program is part of my coursework in Discrete Structures, where I have to synthesize a deterministic finite automaton (DFA), designed to recognize strings of length 8 that follow a specific pattern.

Language Definition

The DFA accepts only strings that meet the following criteria:

  1. The 1st character must be c.
  2. The 2nd character must be either a or b.
  3. The 3rd character must be c.
  4. The 4th to 8th characters must be either b or c (in any order).

Example of Accepted Strings

  • cacbbcbcAccepted
  • cccbbcccRejected (2nd character is not a or b)
  • cacbbcbRejected (Length is not 8)
  • cacbbcbxRejected (8th character is not b or c)

image Figure: DFA state transition diagram (badly drawn).

About

Deterministic finite automaton (DFA) coursework - Discrete Structures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages