implement a turing machine -- 2
Budget: $30 – $250 USD
Implement a turing machine M for the following:
Input #w# : w {a,b}*, M computes na (w) – nb (w) in unary notation. Assume that na(w) > nb(w).
For example: input #bbabaababaaaa# Will yield:
#bbabaababaaaa#III#
Requirements:
Source program in C or C++
Object code
Execution Instructions
Sample runs
Use a Debug Flag that can be read as input or changed before compilation. If this flag is set (true), then your program displays the current configuration after each step; otherwise, the program displays only the initial and final configurations.
Input #w# : w {a,b}*, M computes na (w) – nb (w) in unary notation. Assume that na(w) > nb(w).
For example: input #bbabaababaaaa# Will yield:
#bbabaababaaaa#III#
Requirements:
Source program in C or C++
Object code
Execution Instructions
Sample runs
Use a Debug Flag that can be read as input or changed before compilation. If this flag is set (true), then your program displays the current configuration after each step; otherwise, the program displays only the initial and final configurations.