Consider the following premises: 1. A ? (B ? A) is a Theorem of Propositional Calculus/Logic (i.e. it's logically valid), for all statement forms A and B. 2. Suppose then that the following are the temporary axioms (assumptions): a) W (axiom 1) b) Y (axiom 2) c) Y ? Z (axiom 3) Using the logical rules of inference, Modus Ponens (MP) and/or Hypothetical Syllogism (HS), show that X ? Z is deducible (i.e. it is a logical/valid conclusion) from the given premises (i.e. 1 and 2). Question 3: The finite state machine (FSM): generates the regular language, L = {a?b? | a ? 1 and m ? 2}. Implement the above FSM as a C++ function, int is_abb(char * str ) { // C++ code here } that returns a 1 if the given string, str, is in L and returns a 0 if str is not in L. Assume the existence of a C++ function, int str_len(char * str), which returns the length of the given string, str.
Added by Rajuili B.
Close
Step 1
Step 1: Start with the given axioms: X and X -> Z (given as said in the explanation). Show more…
Show all steps
Your feedback will help us improve your experience
Lottie Adams and 82 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Show that X->Z
Lottie A.
Use propositional logic to prove the validity of the arguments in Exercises 25–33. These will become additional derivation rules for propositional logic, summarized in Table 1.14. 25. (P ∨ Q) ∧ P' → Q 26. (P → Q) → (Q' → P') 27. (Q' → P') → (P → Q) 28. P → P ∧ P 29. P ∨ P → P (Hint: Instead of assuming the hypothesis, begin with a version of Exercise 28; also make use of Exercise 27.) 30. [(P ∧ Q) → R] → [P → (Q → R)] 31. P ∧ P' → Q 32. P ∧ (Q ∨ R) → (P ∧ Q) ∨ (P ∧ R) (Hint: First rewrite the conclusion.) 33. P ∨ (Q ∧ R) → (P ∨ Q) ∧ (P ∨ R) (Hint: Prove both P ∨ (Q ∧ R) → (P ∨ Q) and P ∨ (Q ∧ R) → (P ∨ R); for each proof, first rewrite the conclusion.) TABLE 1.14 More Inference Rules From Can Derive Name/Abbreviation for Rule P → Q, Q → R P → R [Example 16] Hypothetical syllogism — hs P ∨ Q, P' Q [Exercise 25] Disjunctive syllogism — ds P → Q Q' → P' [Exercise 26] Contraposition — cont Q' → P' P → Q [Exercise 27] Contraposition — cont P P ∧ P [Exercise 28] Self-reference — self P ∨ P P [Exercise 29] Self-reference — self (P ∧ Q) → R P → (Q → R) [Exercise 30] Exportation — exp P, P' Q [Exercise 31] Inconsistency — inc P ∧ (Q ∨ R) (P ∧ Q) ∨ (P ∧ R) [Exercise 32] Distributive — dist P ∨ (Q ∧ R) (P ∨ Q) ∧ (P ∨ R) [Exercise 33] Distributive — dist
Supreeta N.
Determine if the following arguments are valid or invalid by analyzing them and identifying if Universal Modus Ponens, Universal Modus Tollens, Universal Transitivity or one of the fallacies were used. Carefully define all predicates and universe of discourse you are using. Write your comments directly on this sheet. Also give a counter example for the invalid arguments using a complete sentences to explain why it is invalid. Universal Modus Ponens: If given that for all x in the universe of discourse P(x) implies Q(x) and that P(a) is true then we can conclude that Q(a) is also true. Universal Modus Tollens: If given that for all x in the universe of discourse P(x) implies Q(x) and that ¬Q(a) is true then we can conclude that ¬P(a) is also true. Universal Transitivity: If given that for all x in the universe of discourse P(x) implies Q(x) and Q(x) implies R(x) then we can conclude that P(x) implies R(x) is also true. (1) A ∩ B ⊆ C and x ∉ A. Therefore x ∉ C. (Hint: do not introduce predicates here, just use the definition and math expressions)
Manisha S.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD