Theory of Computing > QUESTIONS & ANSWERS > California State University, San Marcos CS 421 Theory of computing CS421 - Yoshii - HW1B (based on (All)
California State University, San Marcos CS 421 Theory of computing CS421 - Yoshii - HW1B (based on Week2a) Recognizer vs. Generator ==========================================================... =========== DUE: Week 3 Friday before midnight (11:55pm) TOTAL: 30 pts **NAME: ** ====================================================================== Programming Problems [30pts] ------------------------------------------------------- To receive points for any programming HW for CS421: · Read @instructions first. · Your programs must be compilable and tested using g++ on empress. · Your outputs must be a screen dump, or a "script" (.txt file) · And it must have the line for compiling the files!! · The state of the program statement must be provided!!! A) Write a recognizer in C++ for L = {x | x is a binary number} [10 pts] recognizer.cpp must be used. main: Given a string (from E) cined from the user, pass it to the recognizer function. Cout “YES IN L” or “NO NOT IN L” depending on what was returned. Following the instructions: B) Write a generator in C++ for L = {x | x is a binary number}.[20 pts] generator.cpp must be used. main: It should create each string over E = {0,1,2} systematically all strings using 0, 1 and 2 systematically, with no repeated strings. Hint CS311 HW1 using a queue.] recognizer function: the same one from part a. (copy and use) Testing: The user must interactively terminate the execution of the program after at least 20 binary strings have been displayed although your program should be able to keep on going [Show More]
Last updated: 1 year ago
Preview 1 out of 2 pages
Connected school, study & course
About the document
Uploaded On
Nov 15, 2022
Number of pages
2
Written in
This document has been written for:
Uploaded
Nov 15, 2022
Downloads
0
Views
61
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·