Computer Science Question

PartI:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
  • Understanding logical expressions (30 pt.)

    • (6 pt., 2 pt. each) Write each of the following conditional statements and the corresponding converse, inverse, and contrapositive as English sentences in the form β€œif 𝒑, then 𝒒.” Winning the lottery implies that you will become rich. I sneeze whenever I smell pepper. To make an omelet, it is necessary to break some eggs.
    • (12 pt., 3 pt. each) Determine the truth value of each of the following statements if the domain consists of all integers. If it is true, find a different domain for which it is false. If it is false, find a different domain for which it is true. Justify your answer.

    Example: I will pass the course if I come to class.

    Answer:

    Original statement: If I come to class, then I will pass the course.

    Save Time On Research and Writing
    Hire a Pro to Write You a 100% Plagiarism-Free Paper.
    Get My Paper

    Converse: If I pass the course, then I will come to class.

    Inverse: If I do not come to class, then I will not pass the course.

    Contrapositive: If I do not pass the course, then I will not come to class.

    Example: βˆ€π’™(𝒙 ≀ πŸπ’™) Answer:

    False. If π‘₯ = βˆ’1, then 2π‘₯ = βˆ’2 and βˆ’1 > βˆ’2.

    True when the domain consists of all nonnegative integers. For all nonnegative integers π‘₯, π‘₯ ≀ 2π‘₯.

    • βˆƒπ’™(𝒙 + 𝒙 = 𝒙)
    • βˆ€π’™(𝒙 𝐒𝐬 𝐞𝐒𝐭𝐑𝐞𝐫 𝐞𝐯𝐞𝐧 𝐨𝐫 𝐨𝐝𝐝)
    • βˆ€π’™(𝟏/𝒙 ≀ 𝟏)

    3. (12 pt., 3 pt. each) Let 𝑩(𝒙) be the statement β€œπ’™ is a barista,” π‘ͺ(𝒙) be the statement β€œπ’™ is a customer,” and 𝑺(𝒙, π’š) be the statement β€œπ’™ served a drink to π’š.” If the domain of 𝒙 and π’š consists of all people, express each of the following sentences in terms of 𝑩(𝒙), π‘ͺ(𝒙), 𝑺(𝒙, π’š), quantifiers, and logical operators.

    Example: Some barista served every customer a drink. Answer:

    βˆƒπ‘₯(𝐡(π‘₯) ∧ βˆ€π‘¦(𝐢(𝑦) β†’ 𝑆(π‘₯, 𝑦)))

    • Some barista served every other barista a drink.
    • There are two different customers who were served a drink by the same barista.
    • No customer served a drink to anyone.
    • There is a barista who served a drink to exactly one customer.

    Part II: Proving logical equivalence using laws of propositional logic (60 pt.)

    • (40 pt., 10 pt. each) Use the laws of propositional logic to prove that the following compound propositions are logically equivalent. Β¬(𝒑 ∧ 𝒒) ∧ Β¬(𝒑 ∧ ¬𝒒) and ¬𝒑 (𝒑 ∧ ¬𝒓) β†’ ¬𝒒 and (𝒑 ∧ 𝒒) β†’ 𝒓 𝒑 ↔ 𝒒 and ¬𝒑 ↔ ¬𝒒 Β¬(¬𝒑 ∨ ((¬𝒑 ∨ 𝒒) ∧ ¬𝒓)) and 𝒑 ∧ (𝒒 β†’ 𝒓)
    • (20 pt., 10 pt. each) Use the laws of propositional logic to prove that the following compound propositions are tautologies. 𝒑 β†’ (𝒒 β†’ 𝒑) ((𝒑 β†’ 𝒓) ∧ (𝒓 β†’ 𝒒)) β†’ (𝒑 β†’ 𝒒 )

    Additional Topics: Satisfiability (10 pt.)

    A compound proposition is said to be satisfiable if there is an assignment of truth values to its variables that makes it true. For example, 𝑝 ∧ π‘ž is true when 𝑝 = 𝑇 and π‘ž = 𝑇; thus, 𝑝 ∧ π‘ž is satisfiable.

    When no such assignment exists, the compound proposition is said to be unsatisfiable. For example, 𝑝 ∧ ¬𝑝 is always false; thus, 𝑝 ∧ ¬𝑝 is unsatisfiable.

    To show that a compound proposition is satisfiable, we need to find at least one assignment of truth values to its variables that makes it true. However, to show that a compound proposition is unsatisfiable, we need to show that every assignment of truth values to its variables makes it false.

    6. (10 pt., 2.5 pt. each) Determine whether each of the following compound propositions is satisfiable or unsatisfiable. Justify your answer.

    • (𝒑 ↔ 𝒒) ∧ (¬𝒑 ↔ 𝒒)
    • Β¬(𝒑 ∧ 𝒒) ∧ Β¬(𝒑 ∧ ¬𝒒) ∧ Β¬(¬𝒑 ∧ ¬𝒒)
    • (𝒑 ∨ 𝒒) ∧ (¬𝒑 ∨ 𝒒) ∧ (𝒑 ∨ ¬𝒒) ∧ (¬𝒑 ∨ ¬𝒒)
    • (𝒑 β†’ ¬𝒒) ∧ (¬𝒑 β†’ 𝒒) ∧ (𝒒 β†’ ¬𝒓) ∧ (𝒒 β†’ 𝒓) ∧ (¬𝒒 β†’ ¬𝒓)

    Part I: Understanding logical expressions (30 pt.)
    1. (6 pt., 2 pt. each) Write each of the following conditional statements and the corresponding
    converse, inverse, and contrapositive as English sentences in the form β€œif 𝒑, then 𝒒.”
    Example: I will pass the course if I come to class.
    Answer:
    Original statement: If I come to class, then I will pass the course.
    Converse: If I pass the course, then I will come to class.
    Inverse: If I do not come to class, then I will not pass the course.
    Contrapositive: If I do not pass the course, then I will not come to class.
    a. Winning the lottery implies that you will become rich.
    b. I sneeze whenever I smell pepper.
    c. To make an omelet, it is necessary to break some eggs.
    2. (12 pt., 3 pt. each) Determine the truth value of each of the following statements if the domain
    consists of all integers. If it is true, find a different domain for which it is false. If it is false,
    find a different domain for which it is true. Justify your answer.
    Example: βˆ€π’™(𝒙 ≀ πŸπ’™) Answer:
    False. If π‘₯ = βˆ’1, then 2π‘₯ = βˆ’2 and βˆ’1 > βˆ’2.
    True when the domain consists of all nonnegative integers. For all nonnegative integers π‘₯, π‘₯
    ≀ 2π‘₯.
    a.
    b. βˆƒπ’™(𝒙 + 𝒙 = 𝒙)
    c. βˆ€π’™(𝒙 𝐒𝐬 𝐞𝐒𝐭𝐑𝐞𝐫 𝐞𝐯𝐞𝐧 𝐨𝐫 𝐨𝐝𝐝)
    d. βˆ€π’™(𝟏/𝒙 ≀ 𝟏)
    3. (12 pt., 3 pt. each) Let 𝑩(𝒙) be the statement β€œπ’™ is a barista,” π‘ͺ(𝒙) be the statement β€œπ’™ is a
    customer,” and 𝑺(𝒙, π’š) be the statement β€œπ’™ served a drink to π’š.” If the domain of 𝒙 and π’š
    consists of all people, express each of the following sentences in terms of 𝑩(𝒙), π‘ͺ(𝒙), 𝑺(𝒙,
    π’š), quantifiers, and logical operators.
    Example: Some barista served every customer a drink. Answer:
    βˆƒπ‘₯(𝐡(π‘₯) ∧ βˆ€π‘¦(𝐢(𝑦) β†’ 𝑆(π‘₯, 𝑦)))
    a. Some barista served every other barista a drink.
    b. There are two different customers who were served a drink by the same barista.
    c. No customer served a drink to anyone.
    d. There is a barista who served a drink to exactly one customer.
    Part II: Proving logical equivalence using laws of propositional logic (60 pt.)
    4. (40 pt., 10 pt. each) Use the laws of propositional logic to prove that the following compound
    propositions are logically equivalent.
    a. Β¬(𝒑 ∧ 𝒒) ∧ Β¬(𝒑 ∧ ¬𝒒) and ¬𝒑
    b. (𝒑 ∧ ¬𝒓) β†’ ¬𝒒 and (𝒑 ∧ 𝒒) β†’ 𝒓
    c. 𝒑 ↔ 𝒒 and ¬𝒑 ↔ ¬𝒒
    d. Β¬(¬𝒑 ∨ ((¬𝒑 ∨ 𝒒) ∧ ¬𝒓)) and 𝒑 ∧ (𝒒 β†’ 𝒓)
    5. (20 pt., 10 pt. each) Use the laws of propositional logic to prove that the following compound
    propositions are tautologies.
    a. 𝒑 β†’ (𝒒 β†’ 𝒑)
    b. ((𝒑 β†’ 𝒓) ∧ (𝒓 β†’ 𝒒)) β†’ (𝒑 β†’ 𝒒 )
    Additional Topics: Satisfiability (10 pt.)
    A compound proposition is said to be satisfiable if there is an assignment of truth values to its variables
    that makes it true. For example, 𝑝 ∧ π‘ž is true when 𝑝 = 𝑇 and π‘ž = 𝑇; thus, 𝑝 ∧ π‘ž is satisfiable.
    When no such assignment exists, the compound proposition is said to be unsatisfiable. For example,
    𝑝 ∧ ¬𝑝 is always false; thus, 𝑝 ∧ ¬𝑝 is unsatisfiable.
    To show that a compound proposition is satisfiable, we need to find at least one assignment of truth
    values to its variables that makes it true. However, to show that a compound proposition is unsatisfiable,
    we need to show that every assignment of truth values to its variables makes it false.
    6. (10 pt., 2.5 pt. each) Determine whether each of the following compound propositions is
    satisfiable or unsatisfiable. Justify your answer.
    a. (𝒑 ↔ 𝒒) ∧ (¬𝒑 ↔ 𝒒)
    b. Β¬(𝒑 ∧ 𝒒) ∧ Β¬(𝒑 ∧ ¬𝒒) ∧ Β¬(¬𝒑 ∧ ¬𝒒)
    c. (𝒑 ∨ 𝒒) ∧ (¬𝒑 ∨ 𝒒) ∧ (𝒑 ∨ ¬𝒒) ∧ (¬𝒑 ∨ ¬𝒒)
    d. (𝒑 β†’ ¬𝒒) ∧ (¬𝒑 β†’ 𝒒) ∧ (𝒒 β†’ ¬𝒓) ∧ (𝒒 β†’ 𝒓) ∧ (¬𝒒 β†’ ¬𝒓)

    Order a unique copy of this paper

    600 words
    We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
    Total price:
    $26
    Top Academic Writers Ready to Help
    with Your Research Proposal

    Order your essay today and save 25% with the discount code GREEN