From b3561f6cfc930c514cbb714abdf81b8d24bd9013 Mon Sep 17 00:00:00 2001 From: kdotmanoj Date: Tue, 13 Aug 2024 02:59:52 +0530 Subject: [PATCH] Fixed all duplicate exercises in Chapter 7 --- .../exercises/ex_10/question.md | 10 +-- .../exercises/ex_11/question.md | 20 +++++- .../exercises/ex_12/question.md | 23 ++----- .../exercises/ex_13/question.md | 21 +----- .../exercises/ex_14/question.md | 20 ++++-- .../exercises/ex_15/question.md | 15 +++- .../7-Logical-Agents/exercises/ex_16/index.md | 2 +- .../exercises/ex_16/question.md | 34 ++++++---- .../exercises/ex_17/question.md | 18 ++--- .../7-Logical-Agents/exercises/ex_18/index.md | 5 +- .../exercises/ex_18/question.md | 32 ++++----- .../7-Logical-Agents/exercises/ex_19/index.md | 3 +- .../exercises/ex_19/question.md | 28 ++------ .../7-Logical-Agents/exercises/ex_20/index.md | 5 +- .../exercises/ex_20/question.md | 16 +++-- .../7-Logical-Agents/exercises/ex_21/index.md | 5 +- .../exercises/ex_21/question.md | 40 +++++++---- .../7-Logical-Agents/exercises/ex_22/index.md | 5 +- .../exercises/ex_22/question.md | 21 ++++-- .../7-Logical-Agents/exercises/ex_23/index.md | 3 +- .../exercises/ex_23/question.md | 14 +--- .../7-Logical-Agents/exercises/ex_24/index.md | 3 +- .../exercises/ex_24/question.md | 68 +++++++++---------- .../exercises/ex_25/question.md | 20 +----- .../7-Logical-Agents/exercises/ex_26/index.md | 3 +- .../exercises/ex_26/question.md | 20 +----- .../7-Logical-Agents/exercises/ex_27/index.md | 3 +- .../exercises/ex_27/question.md | 6 +- .../7-Logical-Agents/exercises/ex_28/index.md | 3 +- .../exercises/ex_28/question.md | 34 +--------- .../7-Logical-Agents/exercises/ex_29/index.md | 3 +- .../exercises/ex_29/question.md | 17 ++++- .../7-Logical-Agents/exercises/ex_30/index.md | 3 +- .../exercises/ex_30/question.md | 6 +- .../7-Logical-Agents/exercises/ex_31/index.md | 4 +- .../exercises/ex_31/question.md | 10 ++- .../7-Logical-Agents/exercises/ex_32/index.md | 13 ---- .../exercises/ex_32/question.md | 4 -- .../7-Logical-Agents/exercises/ex_33/index.md | 12 ---- .../exercises/ex_33/question.md | 16 ----- .../7-Logical-Agents/exercises/ex_34/index.md | 12 ---- .../exercises/ex_34/question.md | 5 -- .../7-Logical-Agents/exercises/ex_35/index.md | 12 ---- .../exercises/ex_35/question.md | 9 --- .../7-Logical-Agents/exercises/ex_5/index.md | 2 +- .../exercises/ex_5/question.md | 32 +++------ .../exercises/ex_6/question.md | 18 ++--- .../exercises/ex_7/question.md | 4 +- .../exercises/ex_8/question.md | 12 ++-- .../exercises/ex_9/question.md | 9 ++- 50 files changed, 278 insertions(+), 425 deletions(-) delete mode 100644 markdown/7-Logical-Agents/exercises/ex_32/index.md delete mode 100644 markdown/7-Logical-Agents/exercises/ex_32/question.md delete mode 100644 markdown/7-Logical-Agents/exercises/ex_33/index.md delete mode 100644 markdown/7-Logical-Agents/exercises/ex_33/question.md delete mode 100644 markdown/7-Logical-Agents/exercises/ex_34/index.md delete mode 100644 markdown/7-Logical-Agents/exercises/ex_34/question.md delete mode 100644 markdown/7-Logical-Agents/exercises/ex_35/index.md delete mode 100644 markdown/7-Logical-Agents/exercises/ex_35/question.md diff --git a/markdown/7-Logical-Agents/exercises/ex_10/question.md b/markdown/7-Logical-Agents/exercises/ex_10/question.md index e897d1f2f9..b27ce506f7 100644 --- a/markdown/7-Logical-Agents/exercises/ex_10/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_10/question.md @@ -1,9 +1,5 @@ -We have defined four binary logical connectives.
- -1. Are there any others that might be useful?
- -2. How many binary connectives can there be?
- -3. Why are some of them not very useful?
+Using a method of your choice, verify +each of the equivalences in +Table logical-equivalence-table (page logical-equivalence-table). diff --git a/markdown/7-Logical-Agents/exercises/ex_11/question.md b/markdown/7-Logical-Agents/exercises/ex_11/question.md index b27ce506f7..a7325dfcbb 100644 --- a/markdown/7-Logical-Agents/exercises/ex_11/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_11/question.md @@ -1,5 +1,21 @@ -Using a method of your choice, verify -each of the equivalences in +Decide whether each of the following +sentences is valid, unsatisfiable, or neither. Verify your decisions +using truth tables or the equivalence rules of Table logical-equivalence-table (page logical-equivalence-table). + +1. ${Smoke} {\:\;{\Rightarrow}\:\;}{Smoke}$
+ +2. ${Smoke} {\:\;{\Rightarrow}\:\;}{Fire}$
+ +3. $({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) {\:\;{\Rightarrow}\:\;}(\lnot {Smoke} {\:\;{\Rightarrow}\:\;}\lnot {Fire})$
+ +4. ${Smoke} \lor {Fire} \lor \lnot {Fire}$
+ +5. $(({Smoke} \land {Heat}) {\:\;{\Rightarrow}\:\;}{Fire}) + {\;\;{\Leftrightarrow}\;\;}(({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) \lor ({Heat} {\:\;{\Rightarrow}\:\;}{Fire}))$
+ +6. $({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) {\:\;{\Rightarrow}\:\;}(({Smoke} \land {Heat}) {\:\;{\Rightarrow}\:\;}{Fire}) $
+ +7. ${Big} \lor {Dumb} \lor ({Big} {\:\;{\Rightarrow}\:\;}{Dumb})$
diff --git a/markdown/7-Logical-Agents/exercises/ex_12/question.md b/markdown/7-Logical-Agents/exercises/ex_12/question.md index a7325dfcbb..7dd591b95f 100644 --- a/markdown/7-Logical-Agents/exercises/ex_12/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_12/question.md @@ -1,21 +1,6 @@ -Decide whether each of the following -sentences is valid, unsatisfiable, or neither. Verify your decisions -using truth tables or the equivalence rules of -Table logical-equivalence-table (page logical-equivalence-table). - -1. ${Smoke} {\:\;{\Rightarrow}\:\;}{Smoke}$
- -2. ${Smoke} {\:\;{\Rightarrow}\:\;}{Fire}$
- -3. $({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) {\:\;{\Rightarrow}\:\;}(\lnot {Smoke} {\:\;{\Rightarrow}\:\;}\lnot {Fire})$
- -4. ${Smoke} \lor {Fire} \lor \lnot {Fire}$
- -5. $(({Smoke} \land {Heat}) {\:\;{\Rightarrow}\:\;}{Fire}) - {\;\;{\Leftrightarrow}\;\;}(({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) \lor ({Heat} {\:\;{\Rightarrow}\:\;}{Fire}))$
- -6. $({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) {\:\;{\Rightarrow}\:\;}(({Smoke} \land {Heat}) {\:\;{\Rightarrow}\:\;}{Fire}) $
- -7. ${Big} \lor {Dumb} \lor ({Big} {\:\;{\Rightarrow}\:\;}{Dumb})$
+Any propositional logic sentence is logically +equivalent to the assertion that each possible world in which it would +be false is not the case. From this observation, prove that any sentence +can be written in CNF. diff --git a/markdown/7-Logical-Agents/exercises/ex_13/question.md b/markdown/7-Logical-Agents/exercises/ex_13/question.md index 66d190d981..2f5dda7ca5 100644 --- a/markdown/7-Logical-Agents/exercises/ex_13/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_13/question.md @@ -1,21 +1,4 @@ -Decide whether each of the following -sentences is valid, unsatisfiable, or neither. Verify your decisions -using truth tables or the equivalence rules of -Table logical-equivalence-table (page logical-equivalence-table).
- -1. ${Smoke} {\:\;{\Rightarrow}\:\;}{Smoke}$
- -2. ${Smoke} {\:\;{\Rightarrow}\:\;}{Fire}$
- -3. $({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) {\:\;{\Rightarrow}\:\;}(\lnot {Smoke} {\:\;{\Rightarrow}\:\;}\lnot {Fire})$
- -4. ${Smoke} \lor {Fire} \lor \lnot {Fire}$
- -5. $(({Smoke} \land {Heat}) {\:\;{\Rightarrow}\:\;}{Fire}) - {\;\;{\Leftrightarrow}\;\;}(({Smoke} {\:\;{\Rightarrow}\:\;}{Fire}) \lor ({Heat} {\:\;{\Rightarrow}\:\;}{Fire}))$
- -6. ${Big} \lor {Dumb} \lor ({Big} {\:\;{\Rightarrow}\:\;}{Dumb})$
- -7. $({Big} \land {Dumb}) \lor \lnot {Dumb}$
+Use resolution to prove the sentence $\lnot A \land \lnot B$ from the +clauses in Exercise convert-clausal-exercise. diff --git a/markdown/7-Logical-Agents/exercises/ex_14/question.md b/markdown/7-Logical-Agents/exercises/ex_14/question.md index 7dd591b95f..86ed4dce46 100644 --- a/markdown/7-Logical-Agents/exercises/ex_14/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_14/question.md @@ -1,6 +1,18 @@ -Any propositional logic sentence is logically -equivalent to the assertion that each possible world in which it would -be false is not the case. From this observation, prove that any sentence -can be written in CNF. +This exercise looks into the relationship between +clauses and implication sentences.
+ +1. Show that the clause $(\lnot P_1 \lor \cdots \lor \lnot P_m \lor Q)$ + is logically equivalent to the implication sentence + $(P_1 \land \cdots \land P_m) {\;{\Rightarrow}\;}Q$.
+ +2. Show that every clause (regardless of the number of + positive literals) can be written in the form + $(P_1 \land \cdots \land P_m) {\;{\Rightarrow}\;}(Q_1 \lor \cdots \lor Q_n)$, + where the $P$s and $Q$s are proposition symbols. A knowledge base + consisting of such sentences is in implicative normal form or Kowalski + form Kowalski:1979.
+ +3. Write down the full resolution rule for sentences in implicative + normal form.
diff --git a/markdown/7-Logical-Agents/exercises/ex_15/question.md b/markdown/7-Logical-Agents/exercises/ex_15/question.md index 2f5dda7ca5..6fd632f7fc 100644 --- a/markdown/7-Logical-Agents/exercises/ex_15/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_15/question.md @@ -1,4 +1,15 @@ +According to some political pundits, a person who is radical ($R$) is +electable ($E$) if he/she is conservative ($C$), but otherwise is not +electable.
-Use resolution to prove the sentence $\lnot A \land \lnot B$ from the -clauses in Exercise convert-clausal-exercise. +1. Which of the following are correct representations of this + assertion?
+ + 1. $(R\land E)\iff C$
+ + 2. $R{\:\;{\Rightarrow}\:\;}(E\iff C)$
+ + 3. $R{\:\;{\Rightarrow}\:\;}((C{\:\;{\Rightarrow}\:\;}E) \lor \lnot E)$
+ +2. Which of the sentences in (a) can be expressed in Horn form? diff --git a/markdown/7-Logical-Agents/exercises/ex_16/index.md b/markdown/7-Logical-Agents/exercises/ex_16/index.md index 55809aae0e..193cfee9a1 100644 --- a/markdown/7-Logical-Agents/exercises/ex_16/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_16/index.md @@ -3,8 +3,8 @@ layout: exercise title: Exercise 7.16 permalink: /knowledge-logic-exercises/ex_16/ breadcrumb: 7-Logical-Agents -canonical_id: ch7ex16 home: "true" +canonical_id: ch7ex16 --- {% include mathjax_support %} diff --git a/markdown/7-Logical-Agents/exercises/ex_16/question.md b/markdown/7-Logical-Agents/exercises/ex_16/question.md index 86ed4dce46..ff2e5e5737 100644 --- a/markdown/7-Logical-Agents/exercises/ex_16/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_16/question.md @@ -1,18 +1,26 @@ -This exercise looks into the relationship between -clauses and implication sentences.
+This question considers representing satisfiability (SAT) problems as +CSPs.
-1. Show that the clause $(\lnot P_1 \lor \cdots \lor \lnot P_m \lor Q)$ - is logically equivalent to the implication sentence - $(P_1 \land \cdots \land P_m) {\;{\Rightarrow}\;}Q$.
+1. Draw the constraint graph corresponding to the SAT problem + $$(\lnot X_1 \lor X_2) \land (\lnot X_2 \lor X_3) \land \ldots \land (\lnot X_{n-1} \lor X_n)$$ + for the particular case $n{{\,=\,}}5$.
-2. Show that every clause (regardless of the number of - positive literals) can be written in the form - $(P_1 \land \cdots \land P_m) {\;{\Rightarrow}\;}(Q_1 \lor \cdots \lor Q_n)$, - where the $P$s and $Q$s are proposition symbols. A knowledge base - consisting of such sentences is in implicative normal form or Kowalski - form Kowalski:1979.
+2. How many solutions are there for this general SAT problem as a + function of $n$?
-3. Write down the full resolution rule for sentences in implicative - normal form.
+3. Suppose we apply {Backtracking-Search} (page backtracking-search-algorithm) to find all + solutions to a SAT CSP of the type given in (a). (To find + all solutions to a CSP, we simply modify the basic + algorithm so it continues searching after each solution is found.) + Assume that variables are ordered $X_1,\ldots,X_n$ and ${false}$ + is ordered before ${true}$. How much time will the algorithm take + to terminate? (Write an $O(\cdot)$ expression as a function of $n$.)
+ +4. We know that SAT problems in Horn form can be solved in linear time + by forward chaining (unit propagation). We also know that every + tree-structured binary CSP with discrete, finite domains can be + solved in time linear in the number of variables + (Section csp-structure-section). Are these two + facts connected? Discuss.
diff --git a/markdown/7-Logical-Agents/exercises/ex_17/question.md b/markdown/7-Logical-Agents/exercises/ex_17/question.md index 6fd632f7fc..9db9a25d0c 100644 --- a/markdown/7-Logical-Agents/exercises/ex_17/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_17/question.md @@ -1,15 +1,7 @@ -According to some political pundits, a person who is radical ($R$) is -electable ($E$) if he/she is conservative ($C$), but otherwise is not -electable.
-1. Which of the following are correct representations of this - assertion?
- - 1. $(R\land E)\iff C$
- - 2. $R{\:\;{\Rightarrow}\:\;}(E\iff C)$
- - 3. $R{\:\;{\Rightarrow}\:\;}((C{\:\;{\Rightarrow}\:\;}E) \lor \lnot E)$
- -2. Which of the sentences in (a) can be expressed in Horn form? +Explain why every nonempty propositional clause, by itself, is +satisfiable. Prove rigorously that every set of five 3-SAT clauses is +satisfiable, provided that each clause mentions exactly three distinct +variables. What is the smallest set of such clauses that is +unsatisfiable? Construct such a set. diff --git a/markdown/7-Logical-Agents/exercises/ex_18/index.md b/markdown/7-Logical-Agents/exercises/ex_18/index.md index 44674ae944..84c5113f9b 100644 --- a/markdown/7-Logical-Agents/exercises/ex_18/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_18/index.md @@ -3,11 +3,10 @@ layout: exercise title: Exercise 7.18 permalink: /knowledge-logic-exercises/ex_18/ breadcrumb: 7-Logical-Agents -home: "true" canonical_id: ch7ex18 +home: "true" --- {% include mathjax_support %} +
{% include_relative question.md %}
- -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_18/question.md b/markdown/7-Logical-Agents/exercises/ex_18/question.md index ff2e5e5737..b689beffe4 100644 --- a/markdown/7-Logical-Agents/exercises/ex_18/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_18/question.md @@ -1,26 +1,18 @@ -This question considers representing satisfiability (SAT) problems as -CSPs.
+A propositional 2-CNF expression is a conjunction of +clauses, each containing exactly 2 literals, e.g., +$$(A\lor B) \land (\lnot A \lor C) \land (\lnot B \lor D) \land (\lnot + C \lor G) \land (\lnot D \lor G)\ .$$
-1. Draw the constraint graph corresponding to the SAT problem - $$(\lnot X_1 \lor X_2) \land (\lnot X_2 \lor X_3) \land \ldots \land (\lnot X_{n-1} \lor X_n)$$ - for the particular case $n{{\,=\,}}5$.
+1. Prove using resolution that the above sentence entails $G$.
-2. How many solutions are there for this general SAT problem as a - function of $n$?
+2. Two clauses are semantically distinct if they are not + logically equivalent. How many semantically distinct 2-CNF clauses + can be constructed from $n$ proposition symbols?
-3. Suppose we apply {Backtracking-Search} (page backtracking-search-algorithm) to find all - solutions to a SAT CSP of the type given in (a). (To find - all solutions to a CSP, we simply modify the basic - algorithm so it continues searching after each solution is found.) - Assume that variables are ordered $X_1,\ldots,X_n$ and ${false}$ - is ordered before ${true}$. How much time will the algorithm take - to terminate? (Write an $O(\cdot)$ expression as a function of $n$.)
+3. Using your answer to (b), prove that propositional resolution always + terminates in time polynomial in $n$ given a 2-CNF sentence + containing no more than $n$ distinct symbols.
-4. We know that SAT problems in Horn form can be solved in linear time - by forward chaining (unit propagation). We also know that every - tree-structured binary CSP with discrete, finite domains can be - solved in time linear in the number of variables - (Section csp-structure-section). Are these two - facts connected? Discuss.
+4. Explain why your argument in (c) does not apply to 3-CNF.
diff --git a/markdown/7-Logical-Agents/exercises/ex_19/index.md b/markdown/7-Logical-Agents/exercises/ex_19/index.md index 3956e00cb6..a18f02d9ce 100644 --- a/markdown/7-Logical-Agents/exercises/ex_19/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_19/index.md @@ -9,5 +9,4 @@ home: "true" {% include mathjax_support %} - -
{% include_relative question.md %}
\ No newline at end of file +
{% include_relative question.md %}
diff --git a/markdown/7-Logical-Agents/exercises/ex_19/question.md b/markdown/7-Logical-Agents/exercises/ex_19/question.md index 03f57c385a..b7e77d6588 100644 --- a/markdown/7-Logical-Agents/exercises/ex_19/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_19/question.md @@ -1,26 +1,12 @@ -This question considers representing satisfiability (SAT) problems as -CSPs.
+Prove each of the following assertions:
-1. Draw the constraint graph corresponding to the SAT problem - $$(\lnot X_1 \lor X_2) \land (\lnot X_2 \lor X_3) \land \ldots \land (\lnot X_{n-1} \lor X_n)$$ - for the particular case $n{{\,=\,}}4$.
+1. Every pair of propositional clauses either has no resolvents, or all + their resolvents are logically equivalent.
-2. How many solutions are there for this general SAT problem as a - function of $n$?
+2. There is no clause that, when resolved with itself, yields + (after factoring) the clause $(\lnot P \lor \lnot Q)$.
-3. Suppose we apply {Backtracking-Search} (page backtracking-search-algorithm) to find all - solutions to a SAT CSP of the type given in (a). (To find - all solutions to a CSP, we simply modify the basic - algorithm so it continues searching after each solution is found.) - Assume that variables are ordered $X_1,\ldots,X_n$ and ${false}$ - is ordered before ${true}$. How much time will the algorithm take - to terminate? (Write an $O(\cdot)$ expression as a function of $n$.)
- -4. We know that SAT problems in Horn form can be solved in linear time - by forward chaining (unit propagation). We also know that every - tree-structured binary CSP with discrete, finite domains can be - solved in time linear in the number of variables - (Section csp-structure-section). Are these two - facts connected? Discuss. +3. If a propositional clause $C$ can be resolved with a copy of itself, + it must be logically equivalent to $ True $.
diff --git a/markdown/7-Logical-Agents/exercises/ex_20/index.md b/markdown/7-Logical-Agents/exercises/ex_20/index.md index a65126c126..a88cdd6bf7 100644 --- a/markdown/7-Logical-Agents/exercises/ex_20/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_20/index.md @@ -3,11 +3,10 @@ layout: exercise title: Exercise 7.20 permalink: /knowledge-logic-exercises/ex_20/ breadcrumb: 7-Logical-Agents -canonical_id: ch7ex20 home: "true" +canonical_id: ch7ex20 --- {% include mathjax_support %} - -
{% include_relative question.md %}
\ No newline at end of file +
{% include_relative question.md %}
diff --git a/markdown/7-Logical-Agents/exercises/ex_20/question.md b/markdown/7-Logical-Agents/exercises/ex_20/question.md index 9db9a25d0c..2bc3474add 100644 --- a/markdown/7-Logical-Agents/exercises/ex_20/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_20/question.md @@ -1,7 +1,13 @@ -Explain why every nonempty propositional clause, by itself, is -satisfiable. Prove rigorously that every set of five 3-SAT clauses is -satisfiable, provided that each clause mentions exactly three distinct -variables. What is the smallest set of such clauses that is -unsatisfiable? Construct such a set. +Consider the following sentence:
+$$[ ({Food} {\:\;{\Rightarrow}\:\;}{Party}) \lor ({Drinks} {\:\;{\Rightarrow}\:\;}{Party}) ] {\:\;{\Rightarrow}\:\;}[ ( {Food} \land {Drinks} ) {\:\;{\Rightarrow}\:\;}{Party}]\ .$$
+ +1. Determine, using enumeration, whether this sentence is valid, + satisfiable (but not valid), or unsatisfiable.
+ +2. Convert the left-hand and right-hand sides of the main implication + into CNF, showing each step, and explain how the results confirm + your answer to (a).
+ +3. Prove your answer to (a) using resolution. diff --git a/markdown/7-Logical-Agents/exercises/ex_21/index.md b/markdown/7-Logical-Agents/exercises/ex_21/index.md index d66ce07193..f517996084 100644 --- a/markdown/7-Logical-Agents/exercises/ex_21/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_21/index.md @@ -3,10 +3,11 @@ layout: exercise title: Exercise 7.21 permalink: /knowledge-logic-exercises/ex_21/ breadcrumb: 7-Logical-Agents -canonical_id: ch7ex21 home: "true" +canonical_id: ch7ex21 --- {% include mathjax_support %} -
{% include_relative question.md %}
+ +
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_21/question.md b/markdown/7-Logical-Agents/exercises/ex_21/question.md index b689beffe4..7e16b564e8 100644 --- a/markdown/7-Logical-Agents/exercises/ex_21/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_21/question.md @@ -1,18 +1,34 @@ -A propositional 2-CNF expression is a conjunction of -clauses, each containing exactly 2 literals, e.g., -$$(A\lor B) \land (\lnot A \lor C) \land (\lnot B \lor D) \land (\lnot - C \lor G) \land (\lnot D \lor G)\ .$$
+A sentence is in disjunctive normal form(DNF) if it is the disjunction of +conjunctions of literals. For example, the sentence +$(A \land B \land \lnot C) \lor (\lnot A \land C) \lor (B \land \lnot C)$ +is in DNF.
-1. Prove using resolution that the above sentence entails $G$.
+1. Any propositional logic sentence is logically equivalent to the + assertion that some possible world in which it would be true is in + fact the case. From this observation, prove that any sentence can be + written in DNF.
-2. Two clauses are semantically distinct if they are not - logically equivalent. How many semantically distinct 2-CNF clauses - can be constructed from $n$ proposition symbols?
+2. Construct an algorithm that converts any sentence in propositional + logic into DNF. (Hint: The algorithm is similar to + the algorithm for conversion to CNF iven in + Sectio pl-resolution-section.)
-3. Using your answer to (b), prove that propositional resolution always - terminates in time polynomial in $n$ given a 2-CNF sentence - containing no more than $n$ distinct symbols.
+3. Construct a simple algorithm that takes as input a sentence in DNF + and returns a satisfying assignment if one exists, or reports that + no satisfying assignment exists.
-4. Explain why your argument in (c) does not apply to 3-CNF.
+4. Apply the algorithms in (b) and (c) to the following set of + sentences:
+ + $A {\Rightarrow} B$
+ + $B {\Rightarrow} C$
+ + $C {\Rightarrow} A$
+ +5. Since the algorithm in (b) is very similar to the algorithm for + conversion to CNF, and since the algorithm in (c) is much simpler + than any algorithm for solving a set of sentences in CNF, why is + this technique not used in automated reasoning? diff --git a/markdown/7-Logical-Agents/exercises/ex_22/index.md b/markdown/7-Logical-Agents/exercises/ex_22/index.md index dde08f5835..e8ffdd8052 100644 --- a/markdown/7-Logical-Agents/exercises/ex_22/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_22/index.md @@ -3,10 +3,11 @@ layout: exercise title: Exercise 7.22 permalink: /knowledge-logic-exercises/ex_22/ breadcrumb: 7-Logical-Agents -canonical_id: ch7ex22 home: "true" +canonical_id: ch7ex22 --- {% include mathjax_support %} -
{% include_relative question.md %}
+ +
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_22/question.md b/markdown/7-Logical-Agents/exercises/ex_22/question.md index b7e77d6588..0944e02d50 100644 --- a/markdown/7-Logical-Agents/exercises/ex_22/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_22/question.md @@ -1,12 +1,19 @@ -Prove each of the following assertions:
+Convert the following set of sentences to +clausal form.
-1. Every pair of propositional clauses either has no resolvents, or all - their resolvents are logically equivalent.
+1. S1: $A {\;\;{\Leftrightarrow}\;\;}(B \lor E)$.
-2. There is no clause that, when resolved with itself, yields - (after factoring) the clause $(\lnot P \lor \lnot Q)$.
+2. S2: $E {\:\;{\Rightarrow}\:\;}D$.
-3. If a propositional clause $C$ can be resolved with a copy of itself, - it must be logically equivalent to $ True $.
+3. S3: $C \land F {\:\;{\Rightarrow}\:\;}\lnot B$.
+ +4. S4: $E {\:\;{\Rightarrow}\:\;}B$.
+ +5. S5: $B {\:\;{\Rightarrow}\:\;}F$.
+ +6. S6: $B {\:\;{\Rightarrow}\:\;}C$
+ +Give a trace of the execution of DPLL on the conjunction of these +clauses. diff --git a/markdown/7-Logical-Agents/exercises/ex_23/index.md b/markdown/7-Logical-Agents/exercises/ex_23/index.md index a3cfeb494c..1297b028f2 100644 --- a/markdown/7-Logical-Agents/exercises/ex_23/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_23/index.md @@ -9,4 +9,5 @@ canonical_id: ch7ex23 {% include mathjax_support %} -
{% include_relative question.md %}
+ +
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_23/question.md b/markdown/7-Logical-Agents/exercises/ex_23/question.md index 2bc3474add..af23bed409 100644 --- a/markdown/7-Logical-Agents/exercises/ex_23/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_23/question.md @@ -1,13 +1,5 @@ -Consider the following sentence:
-$$[ ({Food} {\:\;{\Rightarrow}\:\;}{Party}) \lor ({Drinks} {\:\;{\Rightarrow}\:\;}{Party}) ] {\:\;{\Rightarrow}\:\;}[ ( {Food} \land {Drinks} ) {\:\;{\Rightarrow}\:\;}{Party}]\ .$$
- -1. Determine, using enumeration, whether this sentence is valid, - satisfiable (but not valid), or unsatisfiable.
- -2. Convert the left-hand and right-hand sides of the main implication - into CNF, showing each step, and explain how the results confirm - your answer to (a).
- -3. Prove your answer to (a) using resolution. +Is a randomly generated 4-CNF sentence with $n$ symbols and $m$ clauses +more or less likely to be solvable than a randomly generated 3-CNF +sentence with $n$ symbols and $m$ clauses? Explain. diff --git a/markdown/7-Logical-Agents/exercises/ex_24/index.md b/markdown/7-Logical-Agents/exercises/ex_24/index.md index f8e049f113..a1e71eb38b 100644 --- a/markdown/7-Logical-Agents/exercises/ex_24/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_24/index.md @@ -8,6 +8,5 @@ canonical_id: ch7ex24 --- {% include mathjax_support %} +
{% include_relative question.md %}
- -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_24/question.md b/markdown/7-Logical-Agents/exercises/ex_24/question.md index 7e16b564e8..15af8bf143 100644 --- a/markdown/7-Logical-Agents/exercises/ex_24/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_24/question.md @@ -1,34 +1,34 @@ - - -A sentence is in disjunctive normal form(DNF) if it is the disjunction of -conjunctions of literals. For example, the sentence -$(A \land B \land \lnot C) \lor (\lnot A \land C) \lor (B \land \lnot C)$ -is in DNF.
- -1. Any propositional logic sentence is logically equivalent to the - assertion that some possible world in which it would be true is in - fact the case. From this observation, prove that any sentence can be - written in DNF.
- -2. Construct an algorithm that converts any sentence in propositional - logic into DNF. (Hint: The algorithm is similar to - the algorithm for conversion to CNF iven in - Sectio pl-resolution-section.)
- -3. Construct a simple algorithm that takes as input a sentence in DNF - and returns a satisfying assignment if one exists, or reports that - no satisfying assignment exists.
- -4. Apply the algorithms in (b) and (c) to the following set of - sentences:
- - $A {\Rightarrow} B$
- - $B {\Rightarrow} C$
- - $C {\Rightarrow} A$
- -5. Since the algorithm in (b) is very similar to the algorithm for - conversion to CNF, and since the algorithm in (c) is much simpler - than any algorithm for solving a set of sentences in CNF, why is - this technique not used in automated reasoning? +Minesweeper, the well-known computer game, is +closely related to the wumpus world. A minesweeper world is +a rectangular grid of $N$ squares with $M$ invisible mines scattered +among them. Any square may be probed by the agent; instant death follows +if a mine is probed. Minesweeper indicates the presence of mines by +revealing, in each probed square, the number of mines +that are directly or diagonally adjacent. The goal is to probe every +unmined square. + +1. Let $X_{i,j}$ be true iff square $[i,j]$ contains a mine. Write down + the assertion that exactly two mines are adjacent to \[1,1\] as a + sentence involving some logical combination of + $X_{i,j}$ propositions. + +2. Generalize your assertion from (a) by explaining how to construct a + CNF sentence asserting that $k$ of $n$ neighbors contain mines. + +3. Explain precisely how an agent can use {DPLL} to prove that a given square + does (or does not) contain a mine, ignoring the global constraint + that there are exactly $M$ mines in all. + +4. Suppose that the global constraint is constructed from your method + from part (b). How does the number of clauses depend on $M$ and $N$? + Suggest a way to modify {DPLL} so that the global constraint does not need + to be represented explicitly. + +5. Are any conclusions derived by the method in part (c) invalidated + when the global constraint is taken into account? + +6. Give examples of configurations of probe values that induce + long-range dependencies such that the contents of a + given unprobed square would give information about the contents of a + far-distant square. (Hint: consider an + $N\times 1$ board.) diff --git a/markdown/7-Logical-Agents/exercises/ex_25/question.md b/markdown/7-Logical-Agents/exercises/ex_25/question.md index 0944e02d50..c067860540 100644 --- a/markdown/7-Logical-Agents/exercises/ex_25/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_25/question.md @@ -1,19 +1,5 @@ -Convert the following set of sentences to -clausal form.
- -1. S1: $A {\;\;{\Leftrightarrow}\;\;}(B \lor E)$.
- -2. S2: $E {\:\;{\Rightarrow}\:\;}D$.
- -3. S3: $C \land F {\:\;{\Rightarrow}\:\;}\lnot B$.
- -4. S4: $E {\:\;{\Rightarrow}\:\;}B$.
- -5. S5: $B {\:\;{\Rightarrow}\:\;}F$.
- -6. S6: $B {\:\;{\Rightarrow}\:\;}C$
- -Give a trace of the execution of DPLL on the conjunction of these -clauses. +How long does it take to prove +${KB}{\models}\alpha$ using {DPLL} when $\alpha$ is a literal already +contained in ${KB}$? Explain. diff --git a/markdown/7-Logical-Agents/exercises/ex_26/index.md b/markdown/7-Logical-Agents/exercises/ex_26/index.md index 6e50c96d7e..3f1bf16e51 100644 --- a/markdown/7-Logical-Agents/exercises/ex_26/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_26/index.md @@ -9,4 +9,5 @@ canonical_id: ch7ex26 {% include mathjax_support %} -
{% include_relative question.md %}
+ +
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_26/question.md b/markdown/7-Logical-Agents/exercises/ex_26/question.md index 0944e02d50..b19524f43e 100644 --- a/markdown/7-Logical-Agents/exercises/ex_26/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_26/question.md @@ -1,19 +1,5 @@ -Convert the following set of sentences to -clausal form.
- -1. S1: $A {\;\;{\Leftrightarrow}\;\;}(B \lor E)$.
- -2. S2: $E {\:\;{\Rightarrow}\:\;}D$.
- -3. S3: $C \land F {\:\;{\Rightarrow}\:\;}\lnot B$.
- -4. S4: $E {\:\;{\Rightarrow}\:\;}B$.
- -5. S5: $B {\:\;{\Rightarrow}\:\;}F$.
- -6. S6: $B {\:\;{\Rightarrow}\:\;}C$
- -Give a trace of the execution of DPLL on the conjunction of these -clauses. +Trace the behavior of {DPLL} on the knowledge base in +Figure pl-horn-example-figure when trying to prove $Q$, +and compare this behavior with that of the forward-chaining algorithm. diff --git a/markdown/7-Logical-Agents/exercises/ex_27/index.md b/markdown/7-Logical-Agents/exercises/ex_27/index.md index 10f9efae84..b8420f50b3 100644 --- a/markdown/7-Logical-Agents/exercises/ex_27/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_27/index.md @@ -8,6 +8,5 @@ canonical_id: ch7ex27 --- {% include mathjax_support %} +
{% include_relative question.md %}
- -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_27/question.md b/markdown/7-Logical-Agents/exercises/ex_27/question.md index af23bed409..cca516b2fb 100644 --- a/markdown/7-Logical-Agents/exercises/ex_27/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_27/question.md @@ -1,5 +1,5 @@ -Is a randomly generated 4-CNF sentence with $n$ symbols and $m$ clauses -more or less likely to be solvable than a randomly generated 3-CNF -sentence with $n$ symbols and $m$ clauses? Explain. +Write a successor-state axiom for the ${Locked}$ predicate, which +applies to doors, assuming the only actions available are ${Lock}$ and +${Unlock}$. diff --git a/markdown/7-Logical-Agents/exercises/ex_28/index.md b/markdown/7-Logical-Agents/exercises/ex_28/index.md index 7c8b294901..d38db1f85e 100644 --- a/markdown/7-Logical-Agents/exercises/ex_28/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_28/index.md @@ -8,5 +8,6 @@ canonical_id: ch7ex28 --- {% include mathjax_support %} -
{% include_relative question.md %}
+ +
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_28/question.md b/markdown/7-Logical-Agents/exercises/ex_28/question.md index 15af8bf143..8975deb7ac 100644 --- a/markdown/7-Logical-Agents/exercises/ex_28/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_28/question.md @@ -1,34 +1,4 @@ -Minesweeper, the well-known computer game, is -closely related to the wumpus world. A minesweeper world is -a rectangular grid of $N$ squares with $M$ invisible mines scattered -among them. Any square may be probed by the agent; instant death follows -if a mine is probed. Minesweeper indicates the presence of mines by -revealing, in each probed square, the number of mines -that are directly or diagonally adjacent. The goal is to probe every -unmined square. -1. Let $X_{i,j}$ be true iff square $[i,j]$ contains a mine. Write down - the assertion that exactly two mines are adjacent to \[1,1\] as a - sentence involving some logical combination of - $X_{i,j}$ propositions. -2. Generalize your assertion from (a) by explaining how to construct a - CNF sentence asserting that $k$ of $n$ neighbors contain mines. - -3. Explain precisely how an agent can use {DPLL} to prove that a given square - does (or does not) contain a mine, ignoring the global constraint - that there are exactly $M$ mines in all. - -4. Suppose that the global constraint is constructed from your method - from part (b). How does the number of clauses depend on $M$ and $N$? - Suggest a way to modify {DPLL} so that the global constraint does not need - to be represented explicitly. - -5. Are any conclusions derived by the method in part (c) invalidated - when the global constraint is taken into account? - -6. Give examples of configurations of probe values that induce - long-range dependencies such that the contents of a - given unprobed square would give information about the contents of a - far-distant square. (Hint: consider an - $N\times 1$ board.) +Discuss what is meant by optimal behavior in the wumpus +world. Show that the {Hybrid-Wumpus-Agent} is not optimal, and suggest ways to improve it. diff --git a/markdown/7-Logical-Agents/exercises/ex_29/index.md b/markdown/7-Logical-Agents/exercises/ex_29/index.md index 26b5e4ba19..0e39ef2476 100644 --- a/markdown/7-Logical-Agents/exercises/ex_29/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_29/index.md @@ -2,8 +2,7 @@ layout: exercise title: Exercise 7.29 permalink: /knowledge-logic-exercises/ex_29/ -breadcrumb: 7-Logical-Agents -home: "true" +breadcrumb: 7-logical-Agents canonical_id: ch7ex29 --- diff --git a/markdown/7-Logical-Agents/exercises/ex_29/question.md b/markdown/7-Logical-Agents/exercises/ex_29/question.md index c067860540..7bf4cc8fbd 100644 --- a/markdown/7-Logical-Agents/exercises/ex_29/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_29/question.md @@ -1,5 +1,16 @@ -How long does it take to prove -${KB}{\models}\alpha$ using {DPLL} when $\alpha$ is a literal already -contained in ${KB}$? Explain. +Suppose an agent inhabits a world with two states, $S$ and $\lnot S$, +and can do exactly one of two actions, $a$ and $b$. Action $a$ does +nothing and action $b$ flips from one state to the other. Let $S^t$ be +the proposition that the agent is in state $S$ at time $t$, and let +$a^t$ be the proposition that the agent does action $a$ at time $t$ +(similarly for $b^t$).
+ +1. Write a successor-state axiom for $S^{t+1}$.
+ +2. Convert the sentence in (a) into CNF.
+ +3. Show a resolution refutation proof that if the agent is in $\lnot S$ + at time $t$ and does $a$, it will still be in $\lnot S$ at time + $t+1$. diff --git a/markdown/7-Logical-Agents/exercises/ex_30/index.md b/markdown/7-Logical-Agents/exercises/ex_30/index.md index ff9eae9bc2..f9f0ac34b9 100644 --- a/markdown/7-Logical-Agents/exercises/ex_30/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_30/index.md @@ -3,11 +3,10 @@ layout: exercise title: Exercise 7.30 permalink: /knowledge-logic-exercises/ex_30/ breadcrumb: 7-Logical-Agents -home: "true" canonical_id: ch7ex30 +home: "true" --- {% include mathjax_support %} -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_30/question.md b/markdown/7-Logical-Agents/exercises/ex_30/question.md index b19524f43e..c6bd6df38f 100644 --- a/markdown/7-Logical-Agents/exercises/ex_30/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_30/question.md @@ -1,5 +1,5 @@ -Trace the behavior of {DPLL} on the knowledge base in -Figure pl-horn-example-figure when trying to prove $Q$, -and compare this behavior with that of the forward-chaining algorithm. +Section successor-state-section +provides some of the successor-state axioms required for the wumpus +world. Write down axioms for all remaining fluent symbols. diff --git a/markdown/7-Logical-Agents/exercises/ex_31/index.md b/markdown/7-Logical-Agents/exercises/ex_31/index.md index 87d3a659af..e73d561dac 100644 --- a/markdown/7-Logical-Agents/exercises/ex_31/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_31/index.md @@ -3,10 +3,10 @@ layout: exercise title: Exercise 7.31 permalink: /knowledge-logic-exercises/ex_31/ breadcrumb: 7-Logical-Agents -home: "true" canonical_id: ch7ex31 --- {% include mathjax_support %} -
{% include_relative question.md %}
+ +
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_31/question.md b/markdown/7-Logical-Agents/exercises/ex_31/question.md index cca516b2fb..905c2cdd60 100644 --- a/markdown/7-Logical-Agents/exercises/ex_31/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_31/question.md @@ -1,5 +1,9 @@ -Write a successor-state axiom for the ${Locked}$ predicate, which -applies to doors, assuming the only actions available are ${Lock}$ and -${Unlock}$. +Modify the {Hybrid-Wumpus-Agent} to use the 1-CNF logical state +estimation method described on page 1cnf-belief-state-page. We noted on that page +that such an agent will not be able to acquire, maintain, and use more +complex beliefs such as the disjunction $P_{3,1}\lor P_{2,2}$. Suggest a +method for overcoming this problem by defining additional proposition +symbols, and try it out in the wumpus world. Does it improve the +performance of the agent? diff --git a/markdown/7-Logical-Agents/exercises/ex_32/index.md b/markdown/7-Logical-Agents/exercises/ex_32/index.md deleted file mode 100644 index e029f9652e..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_32/index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: exercise -title: Exercise 7.32 -permalink: /knowledge-logic-exercises/ex_32/ -breadcrumb: 7-Logical-Agents -home: "true" -canonical_id: ch7ex32 ---- - -{% include mathjax_support %} - - -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_32/question.md b/markdown/7-Logical-Agents/exercises/ex_32/question.md deleted file mode 100644 index 8975deb7ac..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_32/question.md +++ /dev/null @@ -1,4 +0,0 @@ - - -Discuss what is meant by optimal behavior in the wumpus -world. Show that the {Hybrid-Wumpus-Agent} is not optimal, and suggest ways to improve it. diff --git a/markdown/7-Logical-Agents/exercises/ex_33/index.md b/markdown/7-Logical-Agents/exercises/ex_33/index.md deleted file mode 100644 index e6c423fba5..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_33/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: exercise -title: Exercise 7.33 -permalink: /knowledge-logic-exercises/ex_33/ -breadcrumb: 7-logical-Agents -canonical_id: ch7ex33 ---- - -{% include mathjax_support %} - - -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_33/question.md b/markdown/7-Logical-Agents/exercises/ex_33/question.md deleted file mode 100644 index 7bf4cc8fbd..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_33/question.md +++ /dev/null @@ -1,16 +0,0 @@ - - -Suppose an agent inhabits a world with two states, $S$ and $\lnot S$, -and can do exactly one of two actions, $a$ and $b$. Action $a$ does -nothing and action $b$ flips from one state to the other. Let $S^t$ be -the proposition that the agent is in state $S$ at time $t$, and let -$a^t$ be the proposition that the agent does action $a$ at time $t$ -(similarly for $b^t$).
- -1. Write a successor-state axiom for $S^{t+1}$.
- -2. Convert the sentence in (a) into CNF.
- -3. Show a resolution refutation proof that if the agent is in $\lnot S$ - at time $t$ and does $a$, it will still be in $\lnot S$ at time - $t+1$. diff --git a/markdown/7-Logical-Agents/exercises/ex_34/index.md b/markdown/7-Logical-Agents/exercises/ex_34/index.md deleted file mode 100644 index 9088bef129..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_34/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: exercise -title: Exercise 7.34 -permalink: /knowledge-logic-exercises/ex_34/ -breadcrumb: 7-Logical-Agents -canonical_id: ch7ex34 -home: "true" ---- - -{% include mathjax_support %} - -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_34/question.md b/markdown/7-Logical-Agents/exercises/ex_34/question.md deleted file mode 100644 index c6bd6df38f..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_34/question.md +++ /dev/null @@ -1,5 +0,0 @@ - - -Section successor-state-section -provides some of the successor-state axioms required for the wumpus -world. Write down axioms for all remaining fluent symbols. diff --git a/markdown/7-Logical-Agents/exercises/ex_35/index.md b/markdown/7-Logical-Agents/exercises/ex_35/index.md deleted file mode 100644 index 5ac7a0ea25..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_35/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: exercise -title: Exercise 7.35 -permalink: /knowledge-logic-exercises/ex_35/ -breadcrumb: 7-Logical-Agents -canonical_id: ch7ex35 ---- - -{% include mathjax_support %} - - -
{% include_relative question.md %}
\ No newline at end of file diff --git a/markdown/7-Logical-Agents/exercises/ex_35/question.md b/markdown/7-Logical-Agents/exercises/ex_35/question.md deleted file mode 100644 index 905c2cdd60..0000000000 --- a/markdown/7-Logical-Agents/exercises/ex_35/question.md +++ /dev/null @@ -1,9 +0,0 @@ - - -Modify the {Hybrid-Wumpus-Agent} to use the 1-CNF logical state -estimation method described on page 1cnf-belief-state-page. We noted on that page -that such an agent will not be able to acquire, maintain, and use more -complex beliefs such as the disjunction $P_{3,1}\lor P_{2,2}$. Suggest a -method for overcoming this problem by defining additional proposition -symbols, and try it out in the wumpus world. Does it improve the -performance of the agent? diff --git a/markdown/7-Logical-Agents/exercises/ex_5/index.md b/markdown/7-Logical-Agents/exercises/ex_5/index.md index 62674414e9..be70482fff 100644 --- a/markdown/7-Logical-Agents/exercises/ex_5/index.md +++ b/markdown/7-Logical-Agents/exercises/ex_5/index.md @@ -3,8 +3,8 @@ layout: exercise title: Exercise 7.5 permalink: /knowledge-logic-exercises/ex_5/ breadcrumb: 7-Logical-Agents -home: "true" canonical_id: ch7ex5 +home: "true" --- {% include mathjax_support %} diff --git a/markdown/7-Logical-Agents/exercises/ex_5/question.md b/markdown/7-Logical-Agents/exercises/ex_5/question.md index 0e499c3f90..effcae9f18 100644 --- a/markdown/7-Logical-Agents/exercises/ex_5/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_5/question.md @@ -1,30 +1,16 @@ -Which of the following are correct?
+Prove each of the following assertions:
-1. ${False} \models {True}$.
+1. $\alpha$ is valid if and only if ${True}{\models}\alpha$.
-2. ${True} \models {False}$.
+2. For any $\alpha$, ${False}{\models}\alpha$.
-3. $(A\land B) \models (A{\;\;{\Leftrightarrow}\;\;}B)$.
+3. $\alpha{\models}\beta$ if and only if the sentence + $(\alpha {\:\;{\Rightarrow}\:\;}\beta)$ is valid.
-4. $A{\;\;{\Leftrightarrow}\;\;}B \models A \lor B$.
+4. $\alpha \equiv \beta$ if and only if the sentence + $(\alpha{\;\;{\Leftrightarrow}\;\;}\beta)$ is valid.
-5. $A{\;\;{\Leftrightarrow}\;\;}B \models \lnot A \lor B$.
- -6. $(A\lor B) \land (\lnot C\lor\lnot D\lor E) \models (A\lor B\lor C) \land (B\land C\land D{\:\;{\Rightarrow}\:\;}E)$.
- -7. $(A\lor B) \land (\lnot C\lor\lnot D\lor E) \models (A\lor B) \land (\lnot D\lor E)$.
- -8. $(A\lor B) \land \lnot(A {\:\;{\Rightarrow}\:\;}B)$ is satisfiable.
- -9. $(A\land B){\:\;{\Rightarrow}\:\;}C \models (A{\:\;{\Rightarrow}\:\;}C)\lor(B{\:\;{\Rightarrow}\:\;}C)$.
- -10. $(C\lor (\lnot A \land \lnot B)) \equiv ((A{\:\;{\Rightarrow}\:\;}C) \land (B {\:\;{\Rightarrow}\:\;}C))$.
- -11. $(A{\;\;{\Leftrightarrow}\;\;}B) \land (\lnot A \lor B)$ - is satisfiable.
- -12. $(A{\;\;{\Leftrightarrow}\;\;}B) {\;\;{\Leftrightarrow}\;\;}C$ has - the same number of models as $(A{\;\;{\Leftrightarrow}\;\;}B)$ for - any fixed set of proposition symbols that includes $A$, $B$, $C$.
+5. $\alpha{\models}\beta$ if and only if the sentence + $(\alpha \land \lnot \beta)$ is unsatisfiable. diff --git a/markdown/7-Logical-Agents/exercises/ex_6/question.md b/markdown/7-Logical-Agents/exercises/ex_6/question.md index effcae9f18..bdff1e9abd 100644 --- a/markdown/7-Logical-Agents/exercises/ex_6/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_6/question.md @@ -1,16 +1,12 @@ -Prove each of the following assertions:
+Prove, or find a counterexample to, each of the following assertions:
-1. $\alpha$ is valid if and only if ${True}{\models}\alpha$.
+1. If $\alpha\models\gamma$ or $\beta\models\gamma$ (or both) then + $(\alpha\land \beta)\models\gamma$
-2. For any $\alpha$, ${False}{\models}\alpha$.
+2. If $(\alpha\land \beta)\models\gamma$ then $\alpha\models\gamma$ or + $\beta\models\gamma$ (or both).
-3. $\alpha{\models}\beta$ if and only if the sentence - $(\alpha {\:\;{\Rightarrow}\:\;}\beta)$ is valid.
- -4. $\alpha \equiv \beta$ if and only if the sentence - $(\alpha{\;\;{\Leftrightarrow}\;\;}\beta)$ is valid.
- -5. $\alpha{\models}\beta$ if and only if the sentence - $(\alpha \land \lnot \beta)$ is unsatisfiable. +3. If $\alpha\models (\beta \lor \gamma)$ then $\alpha \models \beta$ + or $\alpha \models \gamma$ (or both).
diff --git a/markdown/7-Logical-Agents/exercises/ex_7/question.md b/markdown/7-Logical-Agents/exercises/ex_7/question.md index bdff1e9abd..9cf0b6d7e2 100644 --- a/markdown/7-Logical-Agents/exercises/ex_7/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_7/question.md @@ -5,8 +5,8 @@ Prove, or find a counterexample to, each of the following assertions:
1. If $\alpha\models\gamma$ or $\beta\models\gamma$ (or both) then $(\alpha\land \beta)\models\gamma$
-2. If $(\alpha\land \beta)\models\gamma$ then $\alpha\models\gamma$ or - $\beta\models\gamma$ (or both).
+2. If $\alpha\models (\beta \land \gamma)$ then $\alpha \models \beta$ + and $\alpha \models \gamma$.
3. If $\alpha\models (\beta \lor \gamma)$ then $\alpha \models \beta$ or $\alpha \models \gamma$ (or both).
diff --git a/markdown/7-Logical-Agents/exercises/ex_8/question.md b/markdown/7-Logical-Agents/exercises/ex_8/question.md index 9cf0b6d7e2..1979110568 100644 --- a/markdown/7-Logical-Agents/exercises/ex_8/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_8/question.md @@ -1,12 +1,10 @@ -Prove, or find a counterexample to, each of the following assertions:
+Consider a vocabulary with only four propositions, $A$, $B$, $C$, and +$D$. How many models are there for the following sentences?
-1. If $\alpha\models\gamma$ or $\beta\models\gamma$ (or both) then - $(\alpha\land \beta)\models\gamma$
+1. $B\lor C$.
-2. If $\alpha\models (\beta \land \gamma)$ then $\alpha \models \beta$ - and $\alpha \models \gamma$.
+2. $\lnot A\lor \lnot B \lor \lnot C \lor \lnot D$.
-3. If $\alpha\models (\beta \lor \gamma)$ then $\alpha \models \beta$ - or $\alpha \models \gamma$ (or both).
+3. $(A{\:\;{\Rightarrow}\:\;}B) \land A \land \lnot B \land C \land D$.
diff --git a/markdown/7-Logical-Agents/exercises/ex_9/question.md b/markdown/7-Logical-Agents/exercises/ex_9/question.md index 1979110568..e897d1f2f9 100644 --- a/markdown/7-Logical-Agents/exercises/ex_9/question.md +++ b/markdown/7-Logical-Agents/exercises/ex_9/question.md @@ -1,10 +1,9 @@ -Consider a vocabulary with only four propositions, $A$, $B$, $C$, and -$D$. How many models are there for the following sentences?
+We have defined four binary logical connectives.
-1. $B\lor C$.
+1. Are there any others that might be useful?
-2. $\lnot A\lor \lnot B \lor \lnot C \lor \lnot D$.
+2. How many binary connectives can there be?
-3. $(A{\:\;{\Rightarrow}\:\;}B) \land A \land \lnot B \land C \land D$.
+3. Why are some of them not very useful?