rework
E1-Qa1 test inputs: The specification says that w1 and w2 are strings over Σ∗={a,b,c,d}∗, so your machine should have all of the following behaviours: qi,Ba−aaa#aB ← accept qi,Ba−#aaaaB ← reject qi,Bb−bbb#bB ← accept qi,Bb−#bbbbB ← reject qi,Bc−ccc#cB ← accept qi,Bc−#ccccB ← reject qi,Bd−ddd#dB ← accept qi,Bd−#ddddB ← reject qi,Ba−bcabc#aB ← accept qi,Ba−bcabc#dB ← reject Of course w2 does not have to be a single character, it can be anything in {a,b,c,d}∗. -------------------------------------------------------------------------------------------------------------------- Make sure your Turing machines are deterministic! If you have any looping non-deterministic transitions in your machine and the automarker tries a string that should be rejected, JFLAP will just keep looping on the transition forever, looking for a way to accept the string.. There is no way to build a truly non-deterministic machine, so JFLAP just has to enumerate all possible paths it can take and reject it if none of them work - however, if it can loop forever, JFLAP would rather do that than admit that it can't find a path (too much pride, i guess......) so be very careful for and test that your machine accepts strings in the language AND REJECTS STRINGS THAT AREN'T!. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Exercise 2 "Let L = {M | M is a TM that halts with exactly two words on its tape in the form Bw1Bw2B}", is this describing the input that will cause the machine to halt, or describing the state of the tape when it halts? L={M∣M is a TM that halts leaving exactly two words on its tape in the form Bw1Bw2B} maybe it's more clear to say "leaving on the tape" than "with". ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Blank symbol in Exercise 1 Is the blank symbol in Exercise 1 the character 'B' or the blank symbol built-in to JFLAP (mentioned later in the spec)? This doesn't seem to be made entirely clear in the specification The B symbol in the assignment specification is the blank symbol (it says so at the top of the second page) Importantly though, we have deviated from what you have probably become used to in class, in that for the string aabb, the input configuration is q0,Ba−abbB and not q0,B−aabbB, i.e., the head starts on the first character of the input string and NOT the blank to the left of it! This is to avoid making you use the weird blank symbol that is built into JFLAP - so that you dont have to cut-and-paste the blank symbol every time you want to put in a string like □aabb So, for this reason, your machines should not start with the transition B/B,R as they have in most of your tutorial exercises. -------------------------------------------------------------------------------------------------------------------------------------------------------------- M testing I am wondering how do you make tests for our TMs? and how we test them exactly as you test. When I test, some inputs show the dialog shown in @174. which requires me to click yes to continue. so, how tests click yes automatically, or how to disable that in JFLAP? Unfortunately I am not sure that you can. The automarker is built by editing the source-code for JFLAP, so it just uses JFLAP as a back-end for computing everyone's marks. The closest you can come is through batch testing with JFLAP. Our test cases for the automarker are all formatted exactly the way that that link specifies at the bottom under the "Batch Run Turing Machines" heading. You can write a text file with as many lines as you like in the format: <input> <expected output> <accept/reject> and then run it as a batch test.. You will still have to click the button though, unfortunately, unless you can find a way to disable it, but I don't think you can do it.. if your machine accepts the string, then it will compare its output against the <expected output> and if they match it will say "accepted" If you dont care about the output string then replace <expected output> with ~ and that will work with any output.. -------------------------------------------------------------------------------------------------------------------------------------------------------------- Excercise 1A When designing the Turing machine are we allowed to use symbols that are not in the alphabet for marking purposes? Will you be sending in inputs to test that it only accepts the alphabet {a,b,c,d}, for instance by throwing in a few e's and f's, or even capitals? for part (a), we will not check any of the outputs - only accept/reject.. so you can leave whatever you want on the tape for that your machine for part (b) must ALWAYS accept, and in that case we will ONLY check the output for part (c), we will be checking whether your machine accepts or rejects correctly, and if it accepts we will also check the output.. if it rejects, we dont care about the output.. as for combining the machines, it is up to you how you do it.. determining if the language of two Turing machines is the same is an undecidable question, so there is no way we can check that.. all we are interested in is what your machine produces.. so if you want to use a completely different algorithm for part (c) as for parts (a) and (b), then you are welcome to, but you would be making unnecessary extra work for yourself! said so, you probably cannot simply just bolt the two machines together, it is very likely you will need to make some modifications to them so that they play together nicely....