Raw

1. Objective / Мета роботи

Understand propositional logic and implement two computational tools for it: an evaluator of logical expressions and an automated truth-table generator.

By the end of the work the student should be able to:

  • state the meaning of the basic logical connectives NOT (¬\neg), AND (\wedge), and OR (\vee) through their truth tables;
  • read a compound expression such as (A AND B) OR (NOT C) with the correct operator precedence and parentheses, and evaluate it under a given assignment of truth values to its variables;
  • parse an expression in code (tokenising and respecting precedence) and compute its value without relying on the host language’s eval;
  • generate the full truth table of an expression by enumerating all 2n2^n assignments of its nn variables;
  • reason about tautologies, contradictions, and the exponential growth of a truth table with the number of variables.

The work builds on the algebra of Boolean operations and prepares the ground for canonical forms, satisfiability, and logic circuits studied later in the course.

Laboratory/Laboratory4/1purpose.md · 1.1 KB · updated 2026-07-31 21:14