程序代写代做代考 case study Haskell scheme University of Sheffield Department of Computer Science

University of Sheffield Department of Computer Science
COM2001: Advanced Programming Techniques Assessment 2016-17
Assignment 3: Breaking the Enigma Code
This assignment counts as 20% of the assessment for COM2001.
It’s based on the ‘Bombe Case Study’ which you have separate notes for.
What you must do
1. Write Haskell code to implement the Bombe simulation following the design explained in the case study, assuming the simplifications made there: ‘ that the choice of rotors and reflector is always the same: referring to the assignment 2 spec the left rotor will be RI, the middle rotor RII and the right rotor RIII. The reflector is the standard one (which was called reflector B).’
You may make changes to the design, but be sure to explain them if you do.
You may make use of the code you submitted for assignments 1 and 2, or you may use mine (which is on MOLE).
2. Show that your code works for the examples given in ‘BombeTesting16.hs’ on the MOLE site. Be clear that you may not get perfect decodes: the menu may not provide enough constraints to deduce the whole stecker. You should be able to work out the message, however.
3. 1 and 2 above count for 70% of the credit for this assignment. The remaining credit is reserved for experiments with the simulation. Here are some suggestions: you don’t have to implement them all and you are free to do your own thing provided you explain what it is.
i. How long does a menu need to be before the Stecker based on it produces a correct decript? What happens if the menu is too short?
ii. Does the answer to i depend on how many pairs there are in the Stecker?
iii. A given Crib contains many menus. Amend the code so that several menus are used,
rather than just the longest.
iv. Remove the simplifications made in (1).
Marking Scheme

70% for 1 & 2 above. Of this, 60% for the code, 20% for documentation, 20% for testing. It’s too complicated to divide the marks between individual functions, but the breakdown according to the program structure will be
 top level: search all offsets (breakEnigma, breakEA) 15%
 search for a Stecker given the offsets ( findStecker) 15%
 follow implications from an initial Stecker (followMenu) 50%
 Bottom level: use of simulated enigmas and steckerAdd 20%
30% for your extensions (3 above).
What to hand in
a) Your commented code, as one or more .hs files ready to run. Give your name in an initial comment. Make sure you include everything you are importing, e.g. from assignment 1 and assignment 2,
b) Test results for the functions you’ve written (cut and paste from the console window),
c) If you’ve attempted (3) above, short report on what you’ve done.
How to hand in
Hand in by MOLE.
DEADLINE: Friday 16th December (Week 12) at midnight.