A Security DeviceThe purpose of this assignment is to get you to use Finite Automata concepts in solving real-life problems. Part 1 (70 pts)Think of simulating a security installation very similar to those installed in many offices and homes. The installation has a keypad and an engine (a controller) used to decide whether the user has entered the correct access code or not. The keypad has ten keys, labeled from '0' to '9'. The security engine will unlock the lock when it finds the correct un-locking access code in the input string. Likewise, the security engine will lock the lock when it finds the correct locking access code in the input string. For example, let's assume that the un-locking code is 33441. If the user enters the string 91352033441245, then the lock will be unlocked as soon as the engine finds the last correct letter of the access code in the input string. The engine will lock the lock again when the user enters the locking code. Assuming that the locking code is 33444 then the lock will be locked and unlocked as described below: 913520334412451033444123970001112334451334410101 unlock--^ ^--lock unlock--^ Your program will read from standard input without echoing the input characters. Characters other than digits 0 throuh 9 will be quietly discarded. Your engine will recognize a fixed access code. The access code will be the least significant five digits in your student ID, followed by a 1 for the unlock code and by a 4 for the locking code. DDDDD1 is the unlocking code DDDDD4 is the locking code, where DDDDD are the lest significant five digits in your student ID. As soon as the last digit of the access code is entered, your program will signal the action taken (lock or unlock). Part 2 (20 pts)Let's now assume that a possible intruder does not have any idea about how long the access string is. You decide to test how long it takes for one to unlock the lock. One possible way to try to break the lock is to generate a random sequence of numerical digits as the input string to the device. Of course, after each digit input from the keypad the intruder should check to see whether the lock has been unlocked or not. This would naturally increase the time it takes an intruder to break your security mechanism.
Submission (10 pts)
Direct the memo to your class instructor. NOTE: You don't need to be concerned about optimization(s). In particular you are not required to minimize the number of states in your FAs. You can do so if you want but this is not a must. How We TestGeneral ConditionsWe are not going to test your project from within an IDE, whether Eclipse, Visual Studio, or anything else. Test Environments
Testing Algorithm
mkdir /tmp/john-smith ; cd /tmp/john-smith git clone <link-to-john-smith-project-repository>If we cannot clone your repository then STOP, assign a score of zero for the project.
If the README file is missing, or the file exists but specific setup
instructions are missing from it then STOP, assign a score of zero
for the project.
|