a) We have the following set of information about a computer program, find the mistake in the program using Rules of Inferences. i. Either a variable is not declared or there is a syntax error in the fifth line. ii. If there is a syntax error in the fifth line, then there is a missing semicolon or there is a mistake in variable name. iii. There is not a missing semicolon. iv. There is a mistake in variable name.
The Answer to the Question
is below this banner.
Can't find a solution anywhere?
NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?
Get the Answers Now!You will get a detailed answer to your question or assignment in the shortest time possible.
Here's the Solution to this Question
In this form the premise (iv) implies the conclusion: "There is a mistake in variable name".
I think in the premise (iv) is omitted "not", that is
iv. There is not a mistake in variable name.
Then using the rule of Conjunction Introduction to (iii) and (iv), we conclude that "There is not a missing semicolon and there is not a mistake in variable name".
Next using de Morgan's law we have "It is not true that there is a missing semicolon or there is a mistake in variable name"
Then using to (ii) and "It is not true that there is a missing semicolon or there is a mistake in variable name" the rule of Modus tollens we conclude "There is not a syntax error in the fifth line".
Finally, using to (i) and "There is not a syntax error in the fifth line" the rule of Disjunctive Syllogism, we conclude that "A variable is not declared".
Therefore, in this case the mistake in the program is the following: "A variable is not declared".