automaton: Interpretation of Automaton Diagrams (Using TikZ)

May 12, 2018
By

[This article was first published on R/exams, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Exercise template for assessing the interpretation of an automaton diagram (drawn with TikZ) based on randomly generated input sequences.

Name:
automaton
Type:
Related:

Description:
An automaton diagram with four states A-D is drawn with TikZ and is to be interpreted, where A is always the initial state and one state is randomly picked as the accepting state. Five binary 0/1 input sequences acceptance have to be assessed with approximately a quarter of all sequences being accepted. Depending on the exams2xyz() interface the TikZ graphic can be rendered in PNG, SVG, or directly by LaTeX.
Solution feedback:
Yes
Randomization:
Random numbers, text blocks, and graphics
Mathematical notation:
No
Verbatim R input/output:
No
Images:
Yes
Other supplements:
No
Raw: (1 random version)
PDF:
automaton-Rnw-pdf
automaton-Rmd-pdf
HTML:
automaton-Rnw-html
automaton-Rmd-html

Demo code:

library("exams")

set.seed(1090)
exams2html("automaton.Rnw")
set.seed(1090)
exams2pdf("automaton.Rnw")

set.seed(1090)
exams2html("automaton.Rmd")
set.seed(1090)
exams2pdf("automaton.Rmd")

To leave a comment for the author, please follow the link and comment on their blog: R/exams.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)