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

  • 85Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: AI Framework
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is the modeling–inference–learning paradigm?

Tap to flipClick to flipspace

Data is used in learning to produce a model; inference then uses that model to answer a question.

Or swipe the card

85 cards

  1. What is the modeling–inference–learning paradigm?

    Data is used in learning to produce a model; inference then uses that model to answer a question.

  2. What inference question is associated with search problems?

    What is the minimum-cost path?

  3. What inference question is associated with MDPs and games?

    What is the maximum-value policy?

  4. What inference question is associated with constraint satisfaction problems (CSPs)?

    What is the maximum-weight assignment?

  5. What inference query is associated with Bayesian networks?

    The probability of query variables conditioned on evidence variables.

  6. What are state-based models, and how are they typically represented?

    They represent states as graph nodes and actions as transitions that incur costs or provide rewards; solutions can be paths, contingent paths, or policies.

  7. What are variable-based models?

    Models that represent variables and factors that constrain the values those variables can take.

  8. What is the main strength of logic-based models, and what are two traditional limitations?

    Logic is highly expressive, but classical logic is deterministic and rule-based, making uncertainty and learning directly from large amounts of data difficult.

  9. What is the trade-off between expressivity and computational efficiency across logical languages?

    More expressive languages can represent more kinds of statements, but reasoning in them is generally harder to compute.

  10. Why use logical inference instead of trying variable values by backtracking in a structured problem?

    Logical inference can exploit the problem's structure to reach an answer much more efficiently than searching through possible assignments.

  11. What three ingredients define a logic?

    Syntax, semantics, and inference rules.

  12. What does syntax specify in a logical language?

    Which expressions are valid or grammatical in the language.

  13. What does semantics specify?

    What each valid expression means, defined precisely by how it is interpreted.

  14. What do inference rules do?

    They specify syntactic operations that derive formulas from other formulas while preserving their intended semantics.

  15. How can two expressions have different syntax but the same semantics?

    For example, “2 plus 3” and “3 plus 2” are different expressions but both mean 5.

  16. Can identical-looking syntax have different semantics in different languages?

    Yes. For example, “3 divided by 2” can have different meanings depending on the language and its rules.

  17. Why is natural language risky for precise inference?

    It can be slippery and ambiguous, allowing apparently reasonable conclusions that do not follow reliably from the statements.

  18. What two properties make logical languages useful for representing and reasoning about knowledge?

    They should be rich enough to represent knowledge and should support reasoning with that knowledge.

  19. How are logical languages similar to programming languages and natural languages, respectively?

    Like programming languages, they are formal; like natural languages, they are declarative.

  20. Why are general algorithms for reasoning important in AI?

    They automate logical work across many problems, rather than relying on a person to manipulate each expression manually.

  21. What is an atomic formula in propositional logic?

    A propositional symbol, such as A or a named proposition, that cannot be broken into a smaller formula.

  22. What connectives can be used to build propositional formulas?

    Negation (not), conjunction (and), disjunction (or), implication, and biconditional (equivalence).

  23. How are complex propositional formulas defined?

    Recursively: propositional symbols are formulas, and applying a logical connective to existing formulas produces another formula.

  24. Why is “A plus not B” not a valid propositional formula in the described language?

    Plus is not one of the defined logical connectives.

  25. Why is “A not B” not a valid propositional formula as written?

    There is no connective combining A with not B.

  26. Do propositional symbols and connectives have their everyday meanings merely because of their appearance?

    No. They are symbols whose meaning is determined by the logic’s specified semantics, not by common-sense intuition.

  27. What is a model in propositional logic?

    A complete assignment of truth values—true or false—to the propositional symbols.

  28. How many models are possible for a set of n propositional symbols?

    There are 2n2^n2n complete truth-value assignments.

  29. Why are propositional models also sometimes called worlds?

    Each complete assignment represents one possible state of the world.

  30. What does the interpretation function do?

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

  31. How is an atomic propositional symbol interpreted in a model?

    By looking up the truth value assigned to that symbol in the model.

  32. When is a conjunction true?

    Only when both of its component formulas are true.

  33. When is a disjunction true?

    When at least one of its component formulas is true.

  34. When is an implication from F to G true?

    It is false only when F is true and G is false; otherwise, it is true.

  35. When is a biconditional between F and G true?

    When F and G have the same truth value.

  36. How is a negated formula interpreted?

    Its truth value is the opposite of the truth value of the formula being negated.

  37. What does the set of models of a formula represent?

    All complete assignments in which that formula is true; the formula therefore rules out worlds where it is false.

  38. What set of worlds satisfies “rain or wet”?

    All worlds except the one in which it is neither raining nor wet.

  39. How can a short logical formula represent a very large set of possibilities?

    A formula can compactly describe a set of satisfying models that may grow exponentially with the number of symbols.

  40. What is a knowledge base (KB) in propositional logic?

    A set of formulas representing facts known about the world.

  41. How are the models of a knowledge base determined?

    They are the intersection of the models of all formulas in the knowledge base: only worlds where every formula is true remain possible.

  42. What happens to the possible models as formulas are added to a knowledge base?

    The set of possible models can only stay the same size or shrink, because each new formula adds a constraint.

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

    Every model of the knowledge base is also a model in which F is true; F adds no new constraint to what the KB already allows.

  44. If a knowledge base entails “rain or snow,” what happens when it is told “snow”?

    It learns nothing new if snow was already true in every remaining model; this is entailment of the new formula.

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

    There is no model that satisfies both the knowledge base and F.

  46. How are contradiction and entailment related?

    A KB contradicts F exactly when it entails not F.

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

    Adding it leaves a nonempty set of models that is smaller than the original set: it adds information without causing contradiction.

  48. What are the three possible responses to telling a system a formula?

    It already knew it (entailed), it cannot believe it (contradictory), or it learned something new (contingent).

  49. What should a system answer when a yes/no query is entailed by its knowledge base?

    Yes, with certainty: the query is true in every remaining model.

  50. What should a system answer when a yes/no query contradicts its knowledge base?

    No, with certainty: the query is false in every remaining model.

  51. What should a system answer when neither a query nor its negation is determined by the knowledge base?

    “I don’t know”; the query is contingent with respect to the KB.

  52. How can a knowledge base and formula be interpreted probabilistically?

    Treat the KB and formula as events over possible worlds; the probability of F given the KB is P(F∣KB)=P(F∩KB)P(KB)P(F\mid KB)=\frac{P(F\cap KB)}{P(KB)}P(F∣KB)=P(KB)P(F∩KB)​.

  53. What do conditional probabilities of 0 and 1 correspond to in the logical view?

    Probability 0 corresponds to contradiction; probability 1 corresponds to entailment.

  54. What does a probabilistic extension offer beyond a yes/no logical answer?

    It can quantify uncertainty—for example, giving a probability estimate rather than only saying “I don’t know.”

  55. What assumption is needed to compute the probabilistic version of a query?

    A joint probability distribution over complete assignments must be available; learning that distribution is a separate problem.

  56. Why does a propositional system answer “I don’t know” about a previously unspecified symbol?

    The system reasons over a specified set of propositional symbols, and the knowledge base contains no information determining that symbol’s truth value.

  57. What does it mean for a knowledge base to be satisfiable?

    At least one model satisfies every formula in the knowledge base; its set of models is nonempty.

  58. How can entailment, contradiction, and contingency be determined using satisfiability checks?

    Check satisfiability of KB together with not F: if unsatisfiable, KB entails F. Otherwise check KB together with F: if unsatisfiable, they contradict; if satisfiable, F is contingent.

  59. What is model checking in this setting?

    Taking a knowledge base and determining whether a satisfying model exists.

  60. How does propositional satisfiability reduce to a CSP?

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

  61. What is DPLL?

    A satisfiability algorithm based on backtracking search with pruning that exploits the structure of propositional constraints.

  62. What is WalkSAT?

    A randomized local-search algorithm for satisfiability, analogous in broad style to randomized methods such as Gibbs sampling.

  63. Why is satisfiability a useful primitive for logical queries?

    Entailment, contradiction, and contingency can all be determined with at most two satisfiability checks.

  64. What is an inference rule?

    A rule that says when formulas serving as premises allow another formula to be added as a conclusion.

  65. What does modus ponens allow one to infer?

    Given P and “if P then Q,” infer Q.

  66. What is the general forward-inference procedure using a set of rules?

    Repeatedly select formulas in the KB, apply any rule whose premises match, and add its conclusion; stop when no new formulas can be added.

  67. What does it mean that a knowledge base derives or proves F?

    A specified set of inference rules can mechanically produce F from the KB.

  68. How does derivability differ from entailment?

    Derivability is syntactic: it depends on applying rules. Entailment is semantic: it depends on the relationship between the KB’s models and the models of the formula.

  69. What does soundness mean for a set of inference rules?

    Every formula derived using the rules is semantically entailed by the original knowledge base—nothing but the truth is derived.

  70. What does completeness mean for a set of inference rules?

    Every formula entailed by the knowledge base can be derived using the rules—the rules can produce the whole truth.

  71. Why is soundness especially important for inference rules?

    An unsound rule can produce false conclusions; an incomplete rule merely fails to derive some conclusions that are true.

  72. Why is modus ponens sound?

    Whenever P and “if P then Q” are both true, Q must be true as well.

  73. Why is inferring rain from wet and “rain implies wet” unsound?

    Wetness does not guarantee rain; other causes could make it wet, so the premises can be true while rain is false.

  74. Why is modus ponens incomplete for unrestricted propositional logic?

    It cannot in general reason through disjunctions; for example, it does not derive wet from rain together with “rain or snow implies wet,” even though wet is entailed.

  75. What is a definite clause?

    A formula of the form “P1 and … and Pk implies Q,” where Q is a single propositional symbol.

  76. What is the meaning of a definite clause?

    If all of its antecedent propositions hold, then its single consequent proposition holds.

  77. Why can a lone fact such as rain be treated as a definite clause?

    It is the zero-premise case: with no conditions to check, the proposition is simply asserted as true.

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

    Its consequent contains a disjunction rather than a single propositional symbol.

  79. What is a goal clause in the described definition of Horn clauses?

    A clause of the form “P1 and … and Pk implies false,” equivalent to the negation of the conjunction of its premises.

  80. What is a Horn clause?

    A definite clause or a goal clause.

  81. How is modus ponens generalized for definite clauses?

    If every proposition in a rule’s antecedent is known, infer its single consequent.

  82. Why is modus ponens complete for knowledge bases made only of Horn clauses?

    For such a KB, every proposition symbol that is semantically entailed can be derived by repeatedly applying modus ponens.

  83. How can forward inference derive traffic from rain, rain implies wet, weekday, and wet-and-weekday implies traffic?

    First derive wet from rain; then use wet and weekday to derive traffic.

  84. Why does modus ponens not directly handle a rule whose consequent is a disjunction?

    It cannot choose which disjunct is true, nor can it assert either one individually from the rule alone.

  85. How can a rule whose consequent is a conjunction be handled using definite clauses?

    Rewrite “A implies B and C” as two rules: “A implies B” and “A implies C.”

Card 1 of 85
Card 1 of 85

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent