Coder Social home page Coder Social logo

a2_cfg's Introduction

Test String results for each section of Part B

Part_B_1 // A CFG for alphabet {a,b} that recognizes the language consisting of // all strings that start with an odd number of a's followed by the // same number of b's. // Test your program with the following input strings: // ab, aabb, aaabbb, aaabbbbb, aaaabbb CFG S=>aaSbb S=>ab output: run: Accept String? true Accept String? false Accept String? true Accept String? false Accept String? false BUILD SUCCESSFUL (total time: 0 seconds)

Part_B_2 // A CFG for alphabet {a,b} that recognizes the language consisting of // all strings of length 1 or greater that do not contain the substring // aa.
// Test your program with the following input strings: // abba, abbabaaa, abaabab, bababbab, bbbabba CFG S=>bS S=>abS S=>a S=>b S=>ab run: Accept String? true Accept String? false Accept String? false Accept String? true Accept String? true BUILD SUCCESSFUL (total time: 0 seconds)

Part_B_3 // A CFG for alphabet {a,b} that recognizes the language consisting of // all strings that contain exactly one b, have 2N a's // (N >= 0, N is an integer) before the b, and 2N+1 a's after the b. // Test your program with the following input strings: // ba, aaabaaaa, aabaaa, abaa, aaaabaaa CFG S=>Ta T=>aTa T=>b run: Accept String? true Accept String? true Accept String? true Accept String? true Accept String? false BUILD SUCCESSFUL (total time: 0 seconds)

Part_B_4 // A CFG for alphabet {x,y,z} that recognizes the language consisting of // all strings that start with z, followed by N x's (N >= 0), followed // by twice as many y's, and ending with z. // Test your program with the following input strings: // zz, zxxyyz, zxxyyyy, zxyyz, zxxyyyyz CFG S=>zTz T=>xTyy T=> run: Accept String? true Accept String? false Accept String? false Accept String? true Accept String? true BUILD SUCCESSFUL (total time: 0 seconds)

a2_cfg's People

Contributors

tim3ds avatar

Watchers

James Cloos avatar  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.