Answer to Question #147068 in Discrete Mathematics for taha

Question #147068
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.
1
Expert's answer
2020-12-01T05:48:24-0500

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 "\\neg p\\land \\neg q=\\neg(p\\lor q)" 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".


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS