0% found this document useful (0 votes)
29 views19 pages

Logic Practice Problems Answers

Logic Practice Problems Artificial Intelligence

Uploaded by

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

Logic Practice Problems Answers

Logic Practice Problems Artificial Intelligence

Uploaded by

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

Logic Practice Problems

Problem Set #1: Convert to English


• 1. ∀x: isBunny(x) ⇒ isCute(x)
• 2. ∀x: isStudent(x) ∧ studiesAI(x) ⇒ isCool(x)
• 3. ∀x: isBunny(x) ∧ isStudent(x) ∧ studiesAI(x) ⇒ isCute(x) ∧
isCool(x)
• 4. ∀x: eatsRamen(x) ⇒ isHomeless(x) ∨ isDoingPhD(x)
• 5. ∃s ∀h: isStudent(x) ∧ studies(s, AI) ∧ homeworkFor(h, AI) ∧
¬Hates(s,h)
• 6. ∀x: (isCat(x) ⇒ isCool(x)) ∧ (isDog(x) ⇒ Drools(x))
Answer Follows…
Problem Set #1 Answers
• 1. All bunnies are cute
• 2. All students taking AI are cool
• 3. Every bunny who is a student taking AI is cute and cool
• 4. Everyone who eats Ramen is either homeless or is doing a PhD
• 5. There is at least 1 student who does not hate any AI homework.
• 6. All cats are cool and all dogs drool.
Problem Set #2: Convert to First-Order Logic
• 1. There is a bunny who is cute.
• 2. Elder gods do not like Hello Kitty.
• 3. There is only one Bradman.
• 4. Every child who has a Trump card is cool. Use Has(x,y) to denote that “x
has y”.
• 5. Some students took CSE 228 in Fall 2021. Use Takes(person, course,
semester)
• 6. Every student who takes CSE 228 passes the course in every semester.
Use Takes(person, course, semester), and Passes(person, course,
semester).
Answer Follows…
Answer
• 1. ∃x: isBunny(x) ∧ isCute(x)
• 2. ∀x: isElderGod(x) ⇒ ¬Likes(x, Hello Kitty)
• 3. ∃x: isBradman(x) ∧ ∀y: isBradman(y) ⇒ (x=y)
• 4. ∀x ∀y: isChild(x) ∧ isTrumpCard(y) ∧ Has(x,y) ⇒ Cool(x)
• 5. ∃x: isStudent(x) ∧ Takes(student, CSE 228, Fall 2021)
• 6. ∀x ∀y: isStudent(x) ∧ inSemester(y) ∧ Takes(x, CSE 228, y) ⇒
Passes(x, CSE 228, y)
Problem Set #3: Find the missing logic
symbol
• 1. ∀x: Something(x) ??? SomethingElse(x)
• 2. ∃x: Something(x) ??? SomethingElse(x)
Answer Follows…
Answer
• 1. ⇒
• 2. ∧
Problem Set #3: Are the logic statements correctly
written? If not, correct the logic statement.
• 1. English: Peter has at least 2 children.
• First-order logic: ∃x ∃y: parentOf(Peter, x) ∧ parentOf(Peter, y)
• 2. English: Someone at Presidency is intelligent.
• First-order logic: ∃x: atPresidency(x) ∧ isIntelligent(x)
Answer Follows…
Answers
• 1. English: Peter has at least 2 children.
• First-order logic: ∃x ∃y: parentOf(Peter, x) ∧ parentOf(Peter, y)
• No.
• Solution: ∃x ∃y: parentOf(Peter, x) ∧ parentOf(Peter, y) ∧ ¬(x=y)
• 2. English: Someone at Presidency is intelligent.
• First-order logic: ∃x: atPresidency(x) ∧ isIntelligent(x)
• Yes.
Problem Set #4: Convert to English
• 1. ∀x: isIITian(x) ⇒ isSmart(x)
• 2. ∀x: isIITian(x) ∧ isSmart(x)
• 3. ∃x: isIITian(x) ⇒ isSmart(x)
• 4. ∃x: isIITian(x) ∧ isSmart(x)
• 5. ∀x ∀y: Knows(x,y)
• 6. ∀x ∃y: Knows(x,y)
• 7. ∃x ∀y: Knows(x,y)
Answer Follows…
Answers
• 1. All IITians are smart
• 2. Everyone is an IITian and everyone is smart.
• 3. There is someone who, if he is an IITian is also smart.
• 4. There is someone who is an IITian and is smart.
• 5. Everybody knows everybody.
• 6. Everybody knows at least one person
• 7. There is at least one person who knows everyone.

You might also like