Coder Social home page Coder Social logo

automata-theory's Introduction

TATHAGATO ROY

ROLL : 2019111020

To Run any of the file :

python3 q1.py path/to/input/file path/to/output/file

Q1

Convert to transform regex to NFA

Approach : First convert the infix regex to postfix using shunting yard

Then Convert the postfix to an NFA using Thompson construction wih the help of stacks

Assumption : Empty set is cannot be input

Q2

Convert an NFA to DFA

Approach :

Create a directed graph of states with only epsilon edges.
Use floyd Warshal to compute distance matrix and then for each state generate the list of reachable states using only epsilon transitions

The above generates the e-closures for each set.After that follow the algorithm given in Sipser to Convert the NFA to DFA

Q3

Convert regex to DFA

Approach :

Create a N-state GNFA from the dfa .Then Create a 2 state GNFA iteratively by removing non - final and non - start state at every iteration

The final edge weight is the regex

Q4

DFA minimization

Approach :

Remove all unreachable states

The partition the remaining states using the equivalence class idea from Myhill-Node Theorem

LINK TO THE VIDEO

https://iiitaphyd-my.sharepoint.com/:v:/g/personal/tathagato_roy_research_iiit_ac_in/ERZ6GV6rzipNlDrJT6mD5RsByLhRSRmW2k7bhtQ9GYHCuQ?e=HHvWDp

automata-theory's People

Watchers

Tathagato Roy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.