BS

Boolean Logic: Propositional Calculus Recap

Attendance and logistics (classroom management)

  • Attendance policy emphasized: you must have been in class at least once by tomorrow to avoid being marked as a no-show.

  • Manual attendance noted due to no-shows; professor asks for students to confirm presence by tomorrow.

  • If a student cannot check-in due to a system issue, they should tell the instructor in class or send a direct message on Discord so it can be recorded later.

  • Emphasis on the impact of attendance on final grade; excessive unexcused absences (over three) will hurt the grade; medical trips, official team or band travel with documentation are excused up to three unexcused absences.

  • If on a project team, absences affect the team; repeated absences can lead to being kicked off a team.

  • Students must attend Friday sessions (R3 or R4 recitations); roster issues earlier in the term are now resolved.

  • Reminder: check Blackboard daily for tutoring announcements and course updates; Blackboard announcements can be unreliable at times (e.g., email notices may not reflect the latest PDF or link).

  • Plan to move communications to Discord for announcements, with Blackboard used for official items when necessary.

  • The instructor posted an announcement with a PDF about tutoring; students should access it via Blackboard (not directly from email).

  • Tutoring details: multiple tutors with specific time slots; one online evening option; QR code to schedule; regular tutoring in Library Room 206; thirty-minute or possibly hourly slots; slots fill up quickly; come prepared so tutors can help rather than do the work for you; tutoring is optional but encouraged to use peers’ help.

  • Weekly hours requirement: for this course, 2 hours per week; Elements course requires 2 hours as well; these hours do not overlap; can be scheduled in evenings if needed.

  • The instructor plans to add a dedicated Discord channel for rosters and communications.

  • The class will return to logic topics after these announcements.

Recap and goals: propositional calculus basics

  • Propositional calculus studies objects that can be true or false; evaluate statements for truth value.

  • Boolean algebra is a formal framework operating on true/false (1/0) values using logical operators: conjunction (AND), disjunction (OR), negation (NOT), and XOR, with implications (IF-THEN) also discussed.

  • Truth tables are the fundamental tool to enumerate all possible truth values of propositions and their compound forms; practice with truth tables builds intuition and speed, useful for exams.

  • The teacher emphasizes fluency with truth tables; aim is to be able to complete tables quickly, though some topics may require deeper understanding.

Quick recap of basic operators

  • Conjunction (AND): P \land Q

    • Intuition: both statements must be true.

    • Truth table intuition: true only when both P and Q are true.

  • Disjunction (OR): P \lor Q

    • Intuition: at least one statement is true; inclusive OR.

    • Truth table intuition: true if any operand is true (including when both are true).

  • Negation (NOT): \neg P

    • Intuition: flip the truth value.

    • Applies to a single proposition.

  • Exclusive OR (XOR): P \oplus Q or P  Q

    • Intuition: exactly one of P or Q is true (one true and the other false).

    • Notation can vary; symbol often a plus inside a circle or ⊕.

  • Implication (IF-THEN): P \rightarrow Q

    • Intuition: if P is true, then Q must be true; P being false places no constraint on Q for the statement to be considered true.

    • Premise: P; Conclusion: Q; the rule connecting them is the implication.

  • Equivalence (not covered deeply in this session, but related): often written as P \leftrightarrow Q (not the focus here).

Truth tables (recap with explicit forms)

  • Conjunction: P \land Q

    • Rows: $(P,Q) = (T,T)
      ightarrow T$, $(T,F)
      ightarrow F$, $(F,T)
      ightarrow F$, $(F,F)
      ightarrow F$.

  • Disjunction: P \lor Q

    • Rows: $(T,T)
      ightarrow T$, $(T,F)
      ightarrow T$, $(F,T)
      ightarrow T$, $(F,F)
      ightarrow F$.

  • Negation: \neg P

    • Rows: $P=T
      ightarrow\neg P=F$, $P=F
      ightarrow\neg P=T$.

  • Exclusive OR: P \oplus Q

    • Rows: $(T,T)
      ightarrow F$, $(T,F)
      ightarrow T$, $(F,T)
      ightarrow T$, $(F,F)
      ightarrow F$.

  • Implication: P \rightarrow Q

    • Rows: $(T,T)
      ightarrow T$, $(T,F)
      ightarrow F$, $(F,T)
      ightarrow T$, $(F,F)
      ightarrow T$.

Negation: examples and caveats

  • Example: peanuts in peanut brittle (P) vs not having peanuts (¬P)

    • If P = true (peanuts present), then ¬P = false.

  • If P is true for peanuts in a product and you negate it, you flip the truth value.

  • Double negation: \neg(\neg P) \equiv P; beware of natural-language double negations (e.g., "you don't know nothing") which can be ambiguous.

Real-world illustration: XOR and ordinary OR

  • Ordinary OR in real life can often be inclusive (you can have both options).

  • XOR (exclusive OR) is when exactly one option is chosen or true; you cannot have both in the scenario.

  • Examples discussed in the class:

    • Salt and pepper for seasoning: often treated as regular OR (you can add salt, or pepper, or both).

    • Salt and sugar in recipes: more often exclusive (sometimes only salt or only sugar is appropriate; sometimes both depending on the recipe).

    • Vehicles example (car vs motorcycle): you can own a car, or a motorcycle, or both; XOR would capture cases like you need to fulfill one requirement but not both.

    • Early or late (not on time): you can be early or late; you cannot be both at the same time; if neither, you are on time (another interpretation of the scenario).

  • Important: the XOR truth table and the logical equivalences help model exclusive situations in software and data rules.

XOR in recitation (R3 vs R4) and logical equivalences

  • In the course, R3 and R4 sections can be modeled with XOR:

    • Truth: you attend R3 but not R4, OR you attend R4 but not R3.

    • Logical form: (R3 \land \neg R4) \;\lor\; (\neg R3 \land R4)

  • This is logically equivalent to the exclusive OR: R3 \oplus R4.

  • An alternative representation uses De Morgan-style form: (R3 \lor R4) \land \neg(R3 \land R4)

  • The instructor notes that such equivalences can be a useful way to convert between natural-language conditions and formal logic.

Implications (If-Then) in detail

  • Structure: P \rightarrow Q where P is the premise and Q is the conclusion.

  • How to evaluate: build a truth table with two sub-statements (P and Q) to see all combinations.

  • Example used in class: sprinkler on (P) implies grass wet (Q).

    • Premise: Sprinkler is on.

    • Conclusion: Grass is wet.

    • If sprinkler is on and grass is wet, the implication is true (no contradiction).

    • If sprinkler is off but grass is wet, this does not necessarily falsify the implication (could be due to other causes); implication can still be true because the premise did not occur.

    • If sprinkler is on but grass is not wet, the implication is false (the premise occurred but the conclusion did not).

    • If sprinkler is off and grass is not wet, the implication remains true (no evidence that the premise caused the conclusion).

  • Practical interpretation: in software or data analytics, an implication represents a rule that should hold given the premises; the only clear counterexample is the case P is true and Q is false.

  • Note on real-world interpretation: sometimes you may have additional factors (external failure, wrong wiring, etc.) that invalidate the rule; such cases require system diagnostics.

  • A helpful analogy the instructor used: “innocent until proven guilty” – an implication is not proven false unless you have a direct counterexample; otherwise you treat it as possibly true.

Premise and conclusion terminology

  • Premise: the initial condition or antecedent (P).

  • Conclusion: the result or consequent (Q).

  • In the sprinkler example: P = “the sprinkler is on,” Q = “the grass is wet.”

  • Truth-table analysis yields the four possible combinations of P and Q.

How to use these concepts in exams and coding practice

  • You will encounter truth-table fill-ins; practice by enumerating all possible truth values for multiple propositions.

  • Remember the semantics for each operator; misclassifying OR as XOR or vice versa is a common pitfall.

  • When translating natural-language statements into logic, identify conjunctions, disjunctions, negations, and implications; consider whether the OR is inclusive or exclusive.

  • For XOR, a convenient identity is: P \oplus Q \equiv (P \lor Q) \land \neg(P \land Q).

Practical study tips and course logistics (recap)

  • Regularly complete truth tables for all operators to build fluency; speed improves with practice.

  • Attend Fridays for recitations (R3 or R4) to reinforce understanding and teamwork.

  • If you have scheduling concerns for tutoring, use the QR code to select a course and time slot; tutoring slots are limited and fill up quickly; sessions are typically 30 minutes.

  • Tutoring hours do not overlap with your other course hours; plan ahead to fit both courses (two hours per course per week, non-overlapping).

  • The course emphasizes using Discord for announcements and Blackboard for essential items; stay on top of both platforms.

  • Install and use Anaconda with Spyder (as mentioned by the instructor) for practical coding practice; a reminder to ensure Python-based tools are ready in advance.

Summary of key formulas (LaTeX)

  • Conjunction: P \land Q

  • Disjunction: P \lor Q

  • Negation: \neg P

  • Exclusive OR: P \oplus Q

  • Implication: P \rightarrow Q

  • Equivalence (related): P \leftrightarrow Q

  • XOR equivalence forms: P \oplus Q \equiv (P \lor Q) \land \neg(P \land Q) and P \oplus Q \equiv (P \land
    eg Q) \lor (
    eg P \land Q)

Final takeaway

  • Mastery of Boolean logic, truth tables, and the correct use of logical operators is foundational for coding and data-driven decision-making; the more you practice, the faster you will be at building and debugging logical rules in software.