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

11/9/2020 Grok | COMP30026 Practice Exam
Queson 8
Part B (3 marks)
Queson 8 Part B (3 marks)
Below are eight regular expressions.
1. 2. 3. 4. 5. 6. 7. 8.
Two regular expressions are equivalent iff they denote the same language. Your task is to determine the equivalence classes for these eight expressions. That is, you have to group equivalent expressions together.
Instrucons
Give your answer as a Haskell expression of type [[Int]]. The list of lists should be a paroning of [1,2,3,4,5,6,7,8].
 Format
For example, if you think that the first four expressions are all equivalent, and the last four are all equivalent, but not equivalent to the first four, your answer should be [[1,2,3,4],[5,6,7,8]].
Or, if you think none of these expressions are equivalent to any others, you should give the answer [[1],[2],[3],[4],[5],[6],[7],[8]].
You can give the elements in an equivalence class in any order you like, and you can list the equivalence classes in any order you like. For example, the answers [[1,2,3,4], [5,6,7,8]] and [[6,7,8,5],[4,3,2,1]] are equally good.
https://groklearning.com/learn/unimelb-comp30026-2020-s2/prac-exam/21/ 1/1
Cheng
∗)b∪a( )b ∪ ∗a(∗a )ε ∪ b(∗a a∗)ba( ∗)∗b∗a( ∗)ab(a ∗)∗ab(∗a b∗a ∪ ∗a