程序代写代做代考 Haskell 11/9/2020 Grok | COMP30026 Practice Exam

11/9/2020 Grok | COMP30026 Practice Exam
Queson 5 Part B (4 marks)
Queson 5 Part B (4 marks)
Construct a DFA which recognises the language of the regular expression
Make sure your automaton is complete and determinisc. It does not need to be minimal.
Instrucons
GiveyouranswerasaHaskellexpressiondfa5B :: DFA.  Format
The Haskell type DFA is defined in DFA.hs, and it is familiar to you from two worksheets, as well as from Assignment 2.
For example, this DFA:
can be represented as follows:
dfa = ([1,2], “ab”, t, 1, [2])
where
t = [ ((1,’a’),2)
, ((1,’b’),1)
, ((2,’a’),1)
, ((2,’b’),2)
]
 Visualisaon WealsoprovidetheDFAvisualiseryouarefamiliarwith.DrawyourDFAdfa :: DFA
withvisDFA dfa.
https://groklearning.com/learn/unimelb-comp30026-2020-s2/prac-exam/13/ 1/1
Cheng
.
∗)ab(∗)ba(