0% found this document useful (0 votes)
14 views6 pages

Homework1 2011 - Beypazzar

The document outlines the instructions and questions for CSCI 2011 Homework 1 on Logic. It specifies the use of AI assistants with restrictions, requires individual work, and emphasizes the importance of justifying answers. The homework includes various logic problems related to propositions, quantifiers, and logical equivalences.

Uploaded by

ham.burger615767
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views6 pages

Homework1 2011 - Beypazzar

The document outlines the instructions and questions for CSCI 2011 Homework 1 on Logic. It specifies the use of AI assistants with restrictions, requires individual work, and emphasizes the importance of justifying answers. The homework includes various logic problems related to propositions, quantifiers, and logical equivalences.

Uploaded by

ham.burger615767
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CSCI 2011 Homework 1 Topic: Logic

Instructions:

• Questions listed as “Section x.y Problem z” are from the course textbook. • This assignment
must be completed individually, on your own.
• You may use an AI assistant such as Chat-GPT or Claude on this assignment, but there are
important restrictions:
o You must use an AI assistant account that saves your chat history for future reference. Be
prepared to log in to your AI assistant account and show your "live" chat history to the instructor
or TAs.
o You must cite AI whenever it was used. It is sufficient to cite the name of the AI model and the
type of help you received. For example: (received hints from Chat GPT) or (copied answer from
Chat-GPT).
o You are not allowed to rely on an AI model that allows you to directly browse and copy online
solutions to similar problems.
o You must have your own conversation with the AI assistant; you are not allowed to share your
conversation output with other students.
o Be aware that the AI models do get things wrong!
o Please do not rely on these to do the work for you because this will inhibit your own learning,
and because they make mistakes. Practice using AI as a tutor. • When answering questions,
always justify your answer.

• Unless otherwise stated, you cannot use truth tables to prove logical equivalences. • Full credit
requires exemplary answers that are clear, concise, and complete.
Alignment to the textbook:
• Question 1 is related to sections 1.1 and 1.2
• Questions 2 and 3 are related to section 1.3
• Questions 4 and 5 are related to section 1.4
• Question 6 is related to section 1.5
• Question 7 is related to section 1.6
Questions:

1. Consider the following propositions p, q, and r.


p: "The restaurant is closed."
q: "I am hungry."
r: "I will eat lunch."

(a) (5 points) Write the following English sentence as a proposition using p, q, and/or r: "I will eat
lunch if the restaurant is open."
¬𝑝 → 𝑟

(b) (5 points) Write the following English sentence as a proposition using p, q, and/or r: "I will eat
lunch only if I am hungry and the restaurant is open.
𝑟 → (𝑞 ∧ ¬𝑝)

(c) (5 points) Write the following proposition as an English sentence: ¬ r → ¬ q


If I’m not hungry, I will not eat lunch.

2. (10 points) Section 1.3 Problem 12b on page 38.


“Show that each of these conditional statements is a tautology by using truth tables.”
[(p → q) ∧ (q → r)] → (p → r)

See table on next page:


p q r p→q q→r (p → q) ∧ (q → (p → r) [(p → q) ∧ (q → r)] → (p → r)
r)

T T T T T T T T

T T F T F F F T

T F T F T F T T

T F F F T F F T

F T T T T T T T

F T F T F F T T

F F T T T T T T

F F F T T T T T

Because the expression [(p → q) ∧ (q → r)] → (p → r) evaluates to true no matter the


value of p, q, and r, it must be a tautology.

3. (10 points) Show that (p ∧ ¬q) ∨ (¬p ∧ q) and ¬ (p ∧ q) ∧ (p ∨ q) are logically


equivalent using the laws of logic. State each equivalence on the left, and the law of logic used
on the right. (Hint: begin by applying the distributive law to (p ∧ ¬q) ∨ (¬p ∧ q). If it is
confusing, you can treat it like (p ∧ ¬q) ∨ r, and then replace r with (¬p ∧ q).

By Distributive law (left term):


(p ∧ ¬q) ∨ (¬p ∧ q) ≡ (p ∨ (¬p ∧ q)) ∧ (¬q ∨ (¬p ∧ q))

By Distributive law again (left term):


(p ∨ (¬p ∧ q)) ∧ (¬q ∨ (¬p ∧ q)) ≡ ((p ∨ ¬p) ∧ (p ∨ q)) ∧ ((¬q ∨ ¬p) ∧ (¬q ∨ q))

By negation law, (p ∨ ¬p) and (¬q ∨ q) evaluate to true:


((T) ∧ (p ∨ q)) ∧ ((¬q ∨ ¬p) ∧ (T))
By Identity law (T) ∧ (p ∨ q) is equivalent to just (p ∨ q). Left term is now equivalent to:
(p ∨ q) ∧ (¬q ∨ ¬p)

By DeMorgan’s law (right term):


¬ (p ∧ q) ∧ (p ∨ q) ≡ (¬p ∨ ¬q) ∧ (p ∨ q)

Comparing our new left and right terms:

(p ∨ q) ∧ (¬q ∨ ¬p) ≡ (¬p ∨ ¬q) ∧ (p ∨ q)

Rearranging by Commutative laws:

(p ∨ q) ∧ (¬q ∨ ¬p) ≡ (p ∨ q) ∧ (¬q ∨ ¬p)

4. Let C(x) be the statement "x is in this class," and F(x) be "x is a friendly person." Express
each of these statements in terms of C(x), F(x), quantifiers, and logical connectives.

(a) (10 points) "Someone is in this class".


∃𝑥𝐶(𝑥) (there is an x for which C(x) is true)

(b) (10 points) "Only friendly people are in this class".


∀𝑥(𝐶(𝑥) → 𝐹(𝑥)) (for all x, C(x) implies F(x).)
5. Section 1.4 Problems 40b, d on page 59 (be extremely clear).

“Translate these system specifications into English, where the predicate S(x, y) is “x is in
state y” and where the domain for x and y consists of all systems and all possible states,
respectively.”

a. (5 points) Section 1.4 #40b


∀x(S(x, malfunctioning) ∨ S(x, diagnostic))
For all x, x must be either in the malfunctioning or diagnostic state.

b. (5 points) Section 1.4 #40d


∃x¬S(x, available)
There is an x for which x is NOT available.

6. Let the binary predicate F(x,y) be the statement "You can fool person x at time y".

a. (10 points) Express the famous Bob Marley quote, "You can fool some people sometimes, but
you can't fool all the people all the time" using F(x,y) and quantifiers. You must simplify all
negations (no negations to the left of a quantifier). You may use a compound predicate
statement involving ∧ or ∨.

"You can fool some people sometimes, but you can't fool all the people all the time"
Bob Marley is basically saying: There exists multiple (at least two) people who can be
fooled at a given time. Also, there is at least one person that cannot be fooled at a certain
time. (can’t fool em all)

If x is a person and y is a time

(∃x1 ∃y1 , ∃x2 ∃y2, (F(x1, y1) ∧ F(x2, y2)) ∧ x, ∃y, ¬F(x, y))

Where x1 is not equal to x2 (same for y’s)


There exists a person that can be fooled at a time, but also there exists a person who
cannot be fooled at a time.

b. (5 points) Negate the previous statement, simplify all negations, and express as a statement
in English, as simply as you can.

Using DeMorgan’s laws


¬(∃x1 ∃y1 , ∃x2 ∃y2, (F(x1, y1) ∧ F(x2, y2)) ∧ ∃x, ∃y, ¬F(x, y)) becomes
∀x1 ∀y1 , ∀x2 ∀y2, (¬F(x1, y1) v ¬F(x2, y2)) v ∀x, ∀y, F(x, y)

Translating to “For all x and y, there is only one person who can be fooled at a given time,
or everyone can be fooled all the time.”

7. (20 points) Prove the conclusion from the premises, stating the rules of inference that you
use. You must number the lines of your proof and reference the appropriate lines when you
state the rules of inference.
"If there is a tree in the park, it is over 10 years old. Every tree over 10 years old has deep roots.
There is a tree in the park. Therefore, there is a tree with deep roots in the park." Let P(x) be, "x
is in the park," let T(x) be, "x is over 10 years old," and let R(x) be, "x has deep roots." Use y to
represent an unspecified oak tree.

Here are the premises: ∀x(P(x) → T(x)), ∀x(T(x) → R(x)), ∃x P(x)

Here is the desired conclusion: ∃x(P(x) ∧ R(x))

1.​ ∃x P(x) and ∀x(P(x) → T(x)), therefore ∃xT(x) (modus ponens)


2.​ ∃xT(x) and ∀x(T(x) → R(x)), therefore ∃xR(x) (modus ponens)
3.​ ∀x(P(x) → T(x)) and ∀x(T(x) → R(x)), so ∀x(P(x) → R(x)) (hypothetical syllogism)
4.​ ∃x P(x) and ∀x(P(x) → R(x)), therefore ∃x(P(x) ∧ R(x)) (modus ponens)

You might also like