20.0k views
5 votes
Convert the following narratives into propositions and then prove the goal formula for each of the following two cases. For this question use proof by resolution-refutation, that is. proof-by-contradiction (refutation) method. Show all your work for the proof.

a. If the program is efficient, it executes quickly. Either the program is efficient, or it has a bug. However, the program does not execute quickly. Programs written by me are efficient. Therefore program has a bug. (use letters E,Q,B. etc.) b. The crop is good, but there is not enough water. If there is a lot of rain or not a lot of sun, then there is enough water. Crops need lot of fertilizers and pesticides. Therefore, the crop is good and there is a lot of sun. (use letters C,W. R. S)

User Will Ward
by
8.4k points

1 Answer

3 votes

Final answer:

To prove the goal formula for each case, we use proof by resolution-refutation. In case (a), assuming the negation of the goal formula, we derive a contradiction and prove that the program has a bug. In case (b), assuming the negation of the goal formula, we also derive a contradiction and prove that the crop is good and there is a lot of sun.

Step-by-step explanation:

To convert the narratives into propositions, we will assign variables to represent each statement. Let's define:

  • E: The program is efficient
  • Q: The program executes quickly
  • B: The program has a bug

For case (a):

  • Premises: E → Q, E ∨ B, ¬Q, P (where P represents the statement 'Programs written by me are efficient')
  • To prove the goal formula, we use proof by resolution-refutation (proof-by-contradiction):
  • Assume the negation of the goal formula, which is ¬B.
  • By resolving the premises with the assumption, we can derive a contradiction: E, ¬Q from the premises E → Q, E ∨ B, ¬Q, P.
  • Since we have a contradiction, the assumption ¬B must be false, and therefore the goal formula (B) must be true.
  • Conclusion: The program has a bug.

For case (b):

  • Premises: C ∧ ¬W, (R ∨ ¬S) → W, C → (F ∧ P)
  • To prove the goal formula, we use proof by resolution-refutation (proof-by-contradiction):
  • Assume the negation of the goal formula, which is ¬(C ∧ S).
  • By resolving the premises with the assumption, we can derive a contradiction: C, (R ∨ ¬S) from the premises C ∧ ¬W, (R ∨ ¬S) → W, C → (F ∧ P).
  • Since we have a contradiction, the assumption ¬(C ∧ S) must be false, and therefore the goal formula (C ∧ S) must be true.
  • Conclusion: The crop is good and there is a lot of sun.

User Mikepote
by
7.8k points