Programming Question

You have to answer the question

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

HW 05-03 Mealy & Moore Machines
Problem 13a
Use JFLAP to create a Mealy machine that takes as input a binary string and outputs the bitwise NOT of that string.
Save as _problem13.jff
For example:
Input
Output
0
1
1
0
00
11
01
10
10
01
11
00
000
111
001
110
010
101
011
100
010101011
101010100
Copyright © 2024, Jennifer S. Kay, kay@rowan.edu
v. 42029010
Permission is granted to students currently enrolled in my classes to print this out for personal use.
This work may NOT be reproduced or shared IN ANY OTHER WAY without written permission from the author.
Problem 13b
Use JFLAP to create a Moore machine that takes as input a binary string and outputs a number sign followed by the
bitwise NOT of that string.
Save as _problem13.jff
For example:
Input
Output
0
#1
1
#0
00
#11
01
#10
10
#01
11
#00
000
#111
001
#110
010
#101
011
#100
010101011
#101010100
Copyright © 2024, Jennifer S. Kay, kay@rowan.edu
v. 42029010
Permission is granted to students currently enrolled in my classes to print this out for personal use.
This work may NOT be reproduced or shared IN ANY OTHER WAY without written permission from the author.
Problem 14a
Part a: Use JFLAP to create a Mealy machine over the alphabet {a,b,c} that prints a “*” every time it sees 3 “a”s (not
necessarily in a row) and then resets its counter. Otherwise it should print an o (lower case o)
Save as _Problem14Parta.jff
For example:
Input
Output
Λ
Λ (it’s a Mealy machine – it doesn’t print
until it sees input!)
a
o
b
o
c
o
aa
oo
ab
oo
ac
oo
ba
oo
bb
oo
aaccbccbaccc
oooooooo*ooo
abcabc
oooooo
abcbcbc
ooooooo
abaaababbbb
ooo*ooooooo
abaaababbabab
ooo*ooooo*ooo
Copyright © 2024, Jennifer S. Kay, kay@rowan.edu
v. 42029010
Permission is granted to students currently enrolled in my classes to print this out for personal use.
This work may NOT be reproduced or shared IN ANY OTHER WAY without written permission from the author.
Problem 14b
Use JFLAP to create a MOORE machine over the alphabet {a,b,c} that prints a “*” every time it sees 3
“a”s (not necessarily in a row) and then resets its counter. Otherwise it should print an o (lower case o)
Save as _Problem14Partb.jff
For example:
Input
Output
Λ
o (it’s a Moore machine – so now it
outputs something even before it sees the
first letter.)
a
oo
b
oo
c
oo
aa
ooo
ab
ooo
ac
ooo
ba
ooo
bb
ooo
aaccbccbaccc
ooooooooo*ooo
abcabc
ooooooo
abcbcbc
oooooooo
abaaababbbb
oooo*ooooooo
abaaababbabab
oooo*ooooo*ooo
Copyright © 2024, Jennifer S. Kay, kay@rowan.edu
v. 42029010
Permission is granted to students currently enrolled in my classes to print this out for personal use.
This work may NOT be reproduced or shared IN ANY OTHER WAY without written permission from the author.
Problem 15
Use JFLAP to create a Moore Machine that processes strings over the alphabet {a,b,c}. The machine prints + signs as long
as there are zero or one “a” in the string. As soon as it sees a second “a”, it prints an “@” sign and continues to print “@”
from then on. If it never sees two “a”s, then it should just print a string of “+” signs.
Save as _problem15.jff
Examples:
String
Output
Λ
+
abc
++++
abac
+++@@
a
++
bbb
++++
babac
++++@@
babaccbcb
++++@@@@@@
aa
++@
aaabbaaa
++@@@@@@@
aaa
++@@
Copyright © 2024, Jennifer S. Kay, kay@rowan.edu
v. 42029010
Permission is granted to students currently enrolled in my classes to print this out for personal use.
This work may NOT be reproduced or shared IN ANY OTHER WAY without written permission from the author.
Problem 16
Use JFLAP to create a Mealy Machine that processes strings over the alphabet {a,b,c}
■ The machine has two modes. It always starts in the first mode
1. In the first mode:
a. Whenever it sees an “a”, it prints a “+” (plus sign)
b. Whenever it sees a “b”, it prints an “@” (at sign)
2. In the second mode:
a. Whenever it sees an “a”, it prints a “” (greater than sign)
3. Whenever it sees a “c”, it prints an “=” (equals sign) and switches modes
Save as _additional7-12.jff
Examples:
String
Output
abc
+@=
acb
+=>
a
+
ccc
===
bacab
@+=
bacaccbcb
@+==@
caa
=

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER