Code Monkey home page Code Monkey logo

ckyalgorithm's Introduction

CKYAlgorithm

This project is about the simplest implementation of Cocke-Younger-Kasami (CYK) Algorithm (using 2D String array in Java Netbeans) for acceptance of string of a Context Free Grammar.

Input : Grammar in 2D String array in the show format, Input string in a 1D String array

Output : The java program will generate a table using the CYK Algorithm. The String will be acceptable if the last cell of the first row of the table contains the Start Symbol. (which in the sample grammar is 'S')

Notations : If the Grammar has the following 4 productions : S->AB/BC A->BA/a B->CC/b C->AB/a Then it will be stored in a 2D String Array eliminating the '->' and '/' symbols. String G[4][3]={{"S","AB","BC"}, {"A","BA","a"}, {"B","CC","b"}, {"C","AB","a"}};

If the input string is "baaba" then it will be stored in a 1D String : String w[]={"b","a","a","b","a"};

ckyalgorithm's People

Contributors

priyanshbrannen avatar

Stargazers

 avatar

Watchers

 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.