1. Home
  2. Explore
  3. Computer Science
  4. Logic and Constraint Reasoning

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Logic and Constraint Reasoning

  • 91Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: AI Modeling

Describe the modeling, learning, and inference workflow presented in the lecture.

91 questions

  1. 1

    Describe the modeling, learning, and inference workflow presented in the lecture.

    Model answer

    Learning uses data to produce a model, and inference uses that model to answer a question.

    Explanation

    The general workflow is data, learning, model, then inference from a question to an answer.

  2. 2

    What question does inference answer in a search problem?

    Model answer

    It finds a minimum-cost path.

    Explanation

    A search problem is modeled so that inference can determine the path with the lowest cost.

  3. 3

    What question does inference answer in an MDP or game, as summarized in the lecture?

    Model answer

    It seeks a maximum-value policy.

    Explanation

    The model is used to identify a policy with the greatest value.

  4. 4

    What question does inference answer in a constraint satisfaction problem (CSP), as summarized in the lecture?

    Model answer

    It seeks a maximum-weight assignment.

    Explanation

    The assignment gives values to variables while satisfying the relevant constraints.

  5. 5

    What kind of query can inference answer in a Bayesian network?

    Model answer

    It can compute the probability of query variables conditioned on evidence variables.

    Explanation

    The query asks for a conditional probability given observed evidence.

  6. 6

    Compare state-based models with variable-based models.

    Model answer

    State-based models represent states and actions connecting them; variable-based models represent variables and factors that constrain their values.

    Explanation

    Search, MDPs, and games are state-based examples, while CSPs and Bayesian networks use variables and factors.

  7. 7

    How do logical models represent a problem differently from state-based and variable-based models?

    Model answer

    They represent knowledge using logical formulas and reason using inference rules.

    Explanation

    Logic provides another way to model the world, distinct from graphs of states or variables linked by factors.

  8. 8

    What was the historical status of logic in artificial intelligence before the 1990s?

    Model answer

    Logic-based methods were a dominant AI paradigm and attracted substantial interest.

    Explanation

    The lecture compares the enthusiasm for logic in earlier AI with the excitement surrounding deep learning today.

  9. 9

    What two limitations of traditional logic helped motivate other AI approaches?

    Model answer

    Logic was deterministic, making uncertainty difficult to handle, and rule-based, making it unnatural to use large amounts of data to guide behavior.

    Explanation

    Probabilistic methods addressed uncertainty, while machine learning provided ways to learn from data.

  10. 10

    What important strength of logic remains valuable despite those limitations?

    Model answer

    Logic is expressive: it can represent complicated ideas succinctly.

    Explanation

    The lecture emphasizes expressive power as a central reason to study logic.

  11. 11

    Why can ordinary natural-language reasoning lead to mistakes, even when an argument initially sounds plausible?

    Model answer

    Natural language is imprecise and can use the same words in slippery or ambiguous ways.

    Explanation

    For example, “better than” does not necessarily preserve the same meaning when comparing a penny, nothing, and world peace.

  12. 12

    What does the dime–nickel–penny example illustrate about reasoning?

    Model answer

    If a dime is better than a nickel and a nickel is better than a penny, the transitive conclusion that a dime is better than a penny is plausible.

    Explanation

    The example presents a chain of comparisons for which the conclusion follows naturally.

  13. 13

    Why does the argument about a penny being better than world peace fail to provide sound reasoning?

    Model answer

    The word “better” shifts or behaves ambiguously across the comparisons, so the conclusion does not reliably follow.

    Explanation

    The example demonstrates how ambiguous natural-language terms can make an apparently similar chain of reasoning invalid.

  14. 14

    What is one key difference between a logical language and a programming language?

    Model answer

    Both are formal, but logical languages are declarative, whereas programming languages specify computation or procedures.

    Explanation

    A logical statement expresses what is the case rather than giving step-by-step instructions for how to compute it.

  15. 15

    What two capabilities should a logical language provide?

    Model answer

    It should represent knowledge about the world and support reasoning with that knowledge.

    Explanation

    Merely storing facts is insufficient; a system must also be able to use them to draw conclusions.

  16. 16

    Name the three ingredients of a logic and state the role of each.

    Model answer

    Syntax defines valid expressions, semantics defines their meanings, and inference rules specify permitted operations for deriving formulas.

    Explanation

    Together, these ingredients define the language, what its statements mean, and how reasoning proceeds.

  17. 17

    How do the expressions “2 plus 3” and “3 plus 2” illustrate the distinction between syntax and semantics?

    Model answer

    They have different syntax but the same semantics because both mean 5.

    Explanation

    Syntax concerns the form of an expression, while semantics concerns what it means.

  18. 18

    How can the same expression have different semantics in different languages?

    Model answer

    The expression “3 divided by 2” can mean different things depending on the language’s interpretation of division.

    Explanation

    The expression’s form alone does not determine its meaning; the language’s semantics must also be specified.

  19. 19

    What general trade-off occurs as logical languages become more expressive?

    Model answer

    Greater expressivity generally makes computation in the language harder.

    Explanation

    Moving from propositional logic to first-order logic and beyond allows more to be expressed but increases computational difficulty.

  20. 20

    What role do propositional symbols play in propositional logic?

    Model answer

    They are atomic formulas—the smallest formulas—and typically stand for propositions.

    Explanation

    Symbols such as letters or words can be combined with logical connectives to form larger formulas.

  21. 21

    Which connectives can be used to build propositional formulas in the lecture’s system?

    Model answer

    Negation, conjunction, disjunction, implication, and biconditional.

    Explanation

    These connectives combine or modify formulas to form more complex expressions.

  22. 22

    State the recursive rule for forming propositional formulas from existing formulas.

    Model answer

    If FFF and GGG are formulas, then egF eg FegF, FextandGF ext{ and } GFextandG, FextorGF ext{ or } GFextorG, FextimpliesGF ext{ implies } GFextimpliesG, and FextifandonlyifGF ext{ if and only if } GFextifandonlyifG are formulas.

    Explanation

    This rule builds complex formulas from already valid formulas and the allowed connectives.

  23. 23

    Why is a propositional symbol by itself a formula?

    Model answer

    A propositional symbol is an atomic formula, so it is valid without being built from smaller formulas.

    Explanation

    Atomic formulas are the base case of the recursive definition of propositional syntax.

  24. 24

    Why is “A and not B” a formula, but “A not B” not a formula?

    Model answer

    The first uses a permitted connective to combine formulas; the second has no connective joining its parts.

    Explanation

    Syntax determines whether an expression is grammatically valid, independently of what someone might guess it means.

  25. 25

    Why is an expression using “plus” between propositional formulas not a valid propositional formula in this system?

    Model answer

    “Plus” is not one of the defined logical connectives.

    Explanation

    Only the connectives specified by the syntax rules can be used to construct formulas.

  26. 26

    Does a logical symbol such as “not” have to carry its familiar everyday meaning just because it has that name?

    Model answer

    No. Syntax treats it as a symbol, and its meaning comes from the logic’s specified semantics.

    Explanation

    A formal system’s interpretation is defined by its rules rather than by common-sense associations with the symbols’ names.

  27. 27

    What is a model in propositional logic?

    Model answer

    It is a complete assignment of truth values to all propositional symbols.

    Explanation

    A model specifies whether every symbol is true or false in one possible situation, also called a world.

  28. 28

    How many models are there for three propositional symbols, and why?

    Model answer

    There are eight models because each of the three symbols can independently be true or false.

    Explanation

    The number of complete assignments for nnn symbols is 2n2^n2n; for three symbols, this is eight.

  29. 29

    What does the interpretation function do?

    Model answer

    It takes a formula and a model and returns whether the formula is true in that model.

    Explanation

    It connects syntactic formulas to their truth in particular possible worlds.

  30. 30

    How is an atomic propositional symbol interpreted in a model?

    Model answer

    Its truth value is obtained by looking up that symbol’s assigned value in the model.

    Explanation

    This lookup is the base case used to interpret more complex formulas recursively.

  31. 31

    When is a conjunction true according to the propositional truth tables?

    Model answer

    A conjunction is true only when both of its component formulas are true.

    Explanation

    If either component is false, their conjunction is false.

  32. 32

    When is a disjunction true according to the propositional truth tables?

    Model answer

    A disjunction is true when at least one of its component formulas is true.

    Explanation

    It is false only when both components are false.

  33. 33

    When is an implication false according to the propositional truth tables?

    Model answer

    An implication is false only when its antecedent is true and its consequent is false.

    Explanation

    It is true when the antecedent is false or the consequent is true.

  34. 34

    When is a biconditional true?

    Model answer

    It is true when its two component formulas have the same truth value.

    Explanation

    Both true and both false make the biconditional true.

  35. 35

    How is the truth value of a negated formula determined?

    Model answer

    Negation reverses the truth value of the formula it modifies.

    Explanation

    A true formula becomes false under negation, and a false formula becomes true.

  36. 36

    How should a complex propositional formula be evaluated in a given model?

    Model answer

    Evaluate its atomic symbols first, then apply the truth rules for its connectives recursively, following the formula’s structure.

    Explanation

    Breaking the formula into subformulas makes it possible to compute its truth value from the leaves upward.

  37. 37

    What set of models does a formula represent?

    Model answer

    It represents all models in which the formula evaluates to true.

    Explanation

    The formula’s meaning can be viewed as a subset of all possible worlds.

  38. 38

    What does it mean to assert a formula as information about the world?

    Model answer

    It rules out models in which the formula is false and restricts attention to models in which it is true.

    Explanation

    For instance, asserting that a bottle is on a table excludes possible worlds where it is not on the table.

  39. 39

    How can a short formula express a large number of possible situations?

    Model answer

    A formula can compactly denote a set of models that may be exponentially large in the number of symbols.

    Explanation

    This ability to represent many possible worlds with a small expression is one source of logic’s expressive power.

  40. 40

    What is a knowledge base in propositional logic?

    Model answer

    It is a set of formulas representing the facts or information known about the world.

    Explanation

    A knowledge base collects the statements available to a reasoning system.

  41. 41

    How are the models of a knowledge base determined from the models of its formulas?

    Model answer

    They are the intersection of the model sets of all formulas in the knowledge base.

    Explanation

    A world is a model of the knowledge base only if every formula in it is true in that world.

  42. 42

    What happens to the set of possible models as formulas are added to a knowledge base?

    Model answer

    It can only stay the same size or shrink, because the new formula imposes an additional constraint.

    Explanation

    Adding a formula intersects the existing model set with the new formula’s model set.

  43. 43

    What does it mean for a knowledge base to entail a formula?

    Model answer

    The knowledge base entails the formula when every model of the knowledge base is also a model of that formula.

    Explanation

    In set terms, the formula’s model set contains the knowledge base’s model set; the formula adds no new constraint.

  44. 44

    What does it mean for a knowledge base to contradict a formula?

    Model answer

    Their model sets have an empty intersection, so no world satisfies both the knowledge base and the formula.

    Explanation

    The formula is inconsistent with everything the knowledge base currently permits.

  45. 45

    How are contradiction and entailment related?

    Model answer

    A knowledge base contradicts a formula if and only if it entails the negation of that formula.

    Explanation

    If the knowledge base permits no model in which the formula is true, every permitted model makes its negation true.

  46. 46

    What does it mean for a formula to be contingent with respect to a knowledge base?

    Model answer

    The formula is consistent with the knowledge base but is not already entailed by it.

    Explanation

    Intersecting their model sets produces a nonempty set that is smaller than the knowledge base’s original model set.

  47. 47

    Give an example of a contingent piece of information when the knowledge base already says it is raining.

    Model answer

    Learning that it is also snowing is contingent information if it is consistent with what is already known.

    Explanation

    It narrows the possible worlds without eliminating all of them or leaving the knowledge base’s model set unchanged.

  48. 48

    How should a system respond to a told formula that is already entailed by its knowledge base?

    Model answer

    It can say that it already knew the information.

    Explanation

    Since the new formula excludes no additional models, it contributes no new information.

  49. 49

    How should a system respond to a told formula that contradicts its knowledge base?

    Model answer

    It should reject the information as inconsistent with what it already knows.

    Explanation

    There is no possible model satisfying both the knowledge base and the newly supplied formula.

  50. 50

    How should a system respond to a told formula that is contingent with respect to its knowledge base?

    Model answer

    It should accept it as new information and update its knowledge base.

    Explanation

    The information is consistent but narrows the set of possible worlds.

  51. 51

    What three responses can a system give to a yes-or-no question under this logical account?

    Model answer

    Yes, no, or “I don’t know.”

    Explanation

    Entailment yields a definite yes, contradiction yields a definite no, and contingency means neither answer is forced.

  52. 52

    When is the answer to a yes-or-no question a definite yes?

    Model answer

    When the knowledge base entails the formula expressing the question.

    Explanation

    Every world consistent with the knowledge base makes the queried formula true.

  53. 53

    When is the answer to a yes-or-no question a definite no?

    Model answer

    When the knowledge base contradicts the queried formula.

    Explanation

    No world consistent with the knowledge base makes the queried formula true.

  54. 54

    When should a system answer “I don’t know” to a yes-or-no question?

    Model answer

    When the queried formula is contingent with respect to the knowledge base.

    Explanation

    Some permitted worlds make it true and others do not, so neither yes nor no follows necessarily.

  55. 55

    Why does a propositional system need a predefined set of symbols for its model-based semantics?

    Model answer

    A model assigns truth values to the symbols in that set, so a question about an unrepresented symbol cannot be resolved from those assignments.

    Explanation

    If the system has no information about a new proposition such as DDD, its response may be “I don’t know.”

  56. 56

    How can propositional logic be extended probabilistically using a distribution over models?

    Model answer

    Treat the knowledge base and the queried formula as events, then compute the probability of the formula conditioned on the knowledge base.

    Explanation

    This conditional probability is the probability mass of their intersection divided by the probability mass of the knowledge base, assuming the latter is nonzero.

  57. 57

    How does probabilistic reasoning change the response to a contingent query?

    Model answer

    Instead of only saying “I don’t know,” it can give a probability for the query given the knowledge base.

    Explanation

    The probabilistic extension quantifies uncertainty rather than treating every non-entailed query alike.

  58. 58

    What does satisfiability mean for a knowledge base?

    Model answer

    A knowledge base is satisfiable if it has at least one model.

    Explanation

    Equivalently, its formulas are not collectively self-contradictory.

  59. 59

    How can satisfiability testing determine whether a knowledge base entails a formula FFF?

    Model answer

    Test whether the knowledge base together with the negation of FFF is satisfiable; if it is not, the knowledge base entails FFF.

    Explanation

    An unsatisfiable combination means there is no knowledge-base model in which FFF is false.

  60. 60

    After checking whether the knowledge base together with the negation of FFF is satisfiable, what second test distinguishes contradiction from contingency?

    Model answer

    If the first test is satisfiable, test the knowledge base together with FFF: unsatisfiability means contradiction, while satisfiability means contingency.

    Explanation

    Thus, answering a query’s three-way status requires at most two satisfiability checks.

  61. 61

    How is propositional satisfiability mapped to a constraint satisfaction problem?

    Model answer

    Treat propositional symbols as variables, formulas as constraints, and a satisfying assignment as a model.

    Explanation

    A CSP solver can search for an assignment satisfying all formulas; if one exists, the knowledge base is satisfiable.

  62. 62

    What is model checking in the propositional setting described in the lecture?

    Model answer

    It takes a knowledge base and determines whether a satisfying model exists.

    Explanation

    It returns whether the knowledge base is satisfiable, often by solving the corresponding SAT problem.

  63. 63

    How does DPLL approach propositional satisfiability?

    Model answer

    It uses backtracking search with pruning that exploits the structure of the propositional constraints.

    Explanation

    The pruning can avoid exploring assignments that cannot lead to a satisfying model.

  64. 64

    How does WalkSAT approach propositional satisfiability?

    Model answer

    It is a randomized local-search algorithm.

    Explanation

    The lecture compares its broad approach to randomized methods such as Gibbs sampling, while noting that it addresses SAT.

  65. 65

    Why is propositional satisfiability a useful primitive for logical inference?

    Model answer

    Entailment, contradiction, and contingency can all be decided using satisfiability checks.

    Explanation

    This reduces several kinds of knowledge-base queries to the classical SAT problem, a special case of CSP solving.

  66. 66

    What is an inference rule in logic?

    Model answer

    It specifies that if certain premise formulas hold, a conclusion formula may be derived.

    Explanation

    For example, a rule can use known premises to add a new formula directly to the knowledge base.

  67. 67

    State the modus ponens inference rule in words.

    Model answer

    If PPP is true and PPP implies QQQ, then derive QQQ.

    Explanation

    For example, knowing that it is raining and that rain implies wet permits deriving that it is wet.

  68. 68

    What does it mean for inference rules to operate directly on syntax?

    Model answer

    They match and manipulate formulas themselves rather than explicitly computing their sets of models.

    Explanation

    This can allow a rule to use a small, local subset of the knowledge base without examining every possible world.

  69. 69

    Describe the basic forward-inference procedure using a set of inference rules.

    Model answer

    Repeatedly find premises in the knowledge base that match a rule and add its conclusion, stopping when no new formulas can be added.

    Explanation

    This process accumulates consequences by applying rules to formulas already available.

  70. 70

    What does it mean for a knowledge base to derive or prove a formula using a rule set?

    Model answer

    It means that repeated application of the specified rules can produce that formula from the knowledge base.

    Explanation

    Derivation is a syntactic, rule-based relationship, unlike entailment, which is defined using models.

  71. 71

    How does derivability differ from entailment?

    Model answer

    Derivability depends on the chosen inference rules; entailment depends on whether every knowledge-base model satisfies the formula.

    Explanation

    A formula can be semantically entailed even when a limited rule set cannot derive it.

  72. 72

    What does it mean for a set of inference rules to be sound?

    Model answer

    Every formula derivable using the rules is semantically entailed by the knowledge base.

    Explanation

    Sound rules produce no conclusions that are false in some model consistent with the premises.

  73. 73

    What does it mean for a set of inference rules to be complete?

    Model answer

    Every formula semantically entailed by the knowledge base can be derived using the rules.

    Explanation

    Completeness means that the rule system can reach the whole set of logical consequences.

  74. 74

    Why is soundness generally more important than completeness?

    Model answer

    An incomplete system may miss some true conclusions, but an unsound system can assert conclusions that are not true.

    Explanation

    Missing a consequence limits capability; producing erroneous conclusions undermines trust in the reasoning system.

  75. 75

    Is modus ponens sound for propositional logic? Explain briefly.

    Model answer

    Yes. If PPP and PPP implies QQQ are both true, then QQQ must be true.

    Explanation

    There is no model satisfying both premises while making the conclusion false.

  76. 76

    Why is inferring “it is raining” from “it is wet” and “rain implies wet” unsound?

    Model answer

    Wetness can occur without rain, so the premises do not guarantee that it is raining.

    Explanation

    The reasoning incorrectly reverses the implication: knowing its consequence does not establish its antecedent.

  77. 77

    Why is modus ponens incomplete for unrestricted propositional logic?

    Model answer

    It cannot derive every semantic consequence when formulas involve constructs, such as disjunction, that its rule does not handle.

    Explanation

    For example, rain together with “rain or snow implies wet” entails wet, but basic modus ponens cannot use the disjunctive antecedent.

  78. 78

    What two broad strategies can address the incompleteness of a limited inference rule?

    Model answer

    Restrict the language to a fragment where the rule is complete, or use more powerful rules such as resolution.

    Explanation

    The lecture develops the restricted Horn-clause approach and previews resolution as a more general approach.

  79. 79

    What is a definite clause?

    Model answer

    It is a formula in which a conjunction of propositional symbols implies a single propositional symbol.

    Explanation

    It expresses that when all the symbols in the antecedent hold, the one symbol on the right also holds.

  80. 80

    What does a definite clause with several premises express?

    Model answer

    It says that if all its premise symbols are true, its single conclusion symbol is true.

    Explanation

    For example, rain and snow implying traffic makes traffic follow when both rain and snow hold.

  81. 81

    Why is “rain and snow implies traffic or peaceful” not a definite clause?

    Model answer

    Its right-hand side contains a disjunction of two symbols rather than one propositional symbol.

    Explanation

    A definite clause permits only a single proposition as the consequent.

  82. 82

    What is a Horn clause, as defined in the lecture?

    Model answer

    It is either a definite clause or a goal clause.

    Explanation

    The lecture defines these two forms as the Horn-clause fragment used for its completeness result.

  83. 83

    What is a goal clause?

    Model answer

    It is a conjunction of propositional symbols implying false.

    Explanation

    It rules out the case in which all of its antecedent symbols hold together.

  84. 84

    How is modus ponens generalized for definite clauses?

    Model answer

    If all symbols in a clause’s antecedent are known and the clause implies a symbol QQQ, derive QQQ.

    Explanation

    The rule matches multiple known premises rather than only the single premise in basic modus ponens.

  85. 85

    Why are standalone facts such as “rain” allowed in the definite-clause form?

    Model answer

    They are the zero-premise case: an empty conjunction is treated as true, so the fact itself is asserted.

    Explanation

    This convention lets Horn-clause knowledge bases include atomic facts as well as conditional rules.

  86. 86

    What completeness result does the lecture give for modus ponens and Horn clauses?

    Model answer

    For a knowledge base consisting of Horn clauses, if it entails a propositional symbol, generalized modus ponens can derive that symbol.

    Explanation

    Together with soundness, this makes modus ponens complete for the stated Horn-clause setting.

  87. 87

    How can a Horn-clause system derive traffic from rain and weekday information?

    Model answer

    Use rain and the rule rain implies wet to derive wet, then combine wet and weekday with the rule wet and weekday implies traffic.

    Explanation

    Each step applies generalized modus ponens to known facts and a matching definite clause.

  88. 88

    Why is inference with definite clauses described as accumulating positive information?

    Model answer

    The rules add a conclusion symbol when all required premises are known; they do not require choosing among alternative conclusions.

    Explanation

    This supports a simple process of collecting symbols known to be true, without branching over disjunctions.

  89. 89

    Why can modus ponens not directly use a rule whose consequent is “traffic or peaceful”?

    Model answer

    The rule does not establish which disjunct is true, so it cannot safely add either symbol as a definite conclusion.

    Explanation

    Handling such alternatives requires reasoning about disjunction, which basic modus ponens does not do.

  90. 90

    How can a rule with a conjunction of conclusions be rewritten into definite clauses?

    Model answer

    Replace it with separate rules that share the antecedent and each conclude one of the symbols.

    Explanation

    For example, “A implies B and C” can be represented by “A implies B” and “A implies C.”

  91. 91

    What broader role does resolution have in propositional inference?

    Model answer

    Resolution is a more powerful inference rule that can handle disjunctions and support more general propositional inferences.

    Explanation

    The lecture identifies it as an approach for going beyond the restricted Horn-clause setting.

1 of 91
Question 1 of 91

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent