Back to Explore

Forming Logic Expressions — Study Notes Summary & Study Notes

These study notes provide a concise summary of Forming Logic Expressions — Study Notes, covering key concepts, definitions, and examples to help you review quickly and study effectively.

693 words4 views
Notes

🧭 Steps to form logic expressions

Identify the atomic propositions: Break the situation into basic true/false statements (for example, “is a student”, “is 65 or older”, “order ≥ $20”). Give each a short variable name.

Choose a clear variable convention: Decide whether a variable is 1 for true or 1 for false. The usual convention is 1 = true, but always follow the problem’s table if it gives a different mapping.

Combine with logical operators: Use OR (\lor), AND (\land), and NOT (¬\lnot) to combine atomic propositions. Use parentheses to fix order of evaluation.

Translate the English condition into logic: Convert phrases like “either ... or ...” to \lor, “and” to \land, and negations like “not a student” to ¬\lnot.

Simplify and check: Use Boolean identities (e.g., De Morgan’s laws, distributive/associative laws) to simplify. Always test a few cases or build a small truth table to verify the expression.

Canonical forms & tools: If needed, convert to DNF or CNF, or use a Karnaugh map for minimization.

✳️ Quick examples

  • If SS = "is a student", AA = "is 65 or older", MM = "order ≥ 20":thecondition(studentOR65+)ANDorder20": the condition “(student OR 65+) AND order ≥20$” is

    X=(SA)MX = (S \lor A) \land M.

  • If a problem’s table defines a variable opposite to your preferred meaning (e.g., variable VV = 1 means "not a student"), express the intended proposition with a NOT: "student" = ¬V\lnot V.

✅ Common identities to use

  • De Morgan: ¬(PQ)=(¬P)(¬Q)\lnot (P \land Q) = (\lnot P) \lor (\lnot Q) and ¬(PQ)=(¬P)(¬Q)\lnot (P \lor Q) = (\lnot P) \land (\lnot Q).
  • Distributive: P(QR)=(PQ)(PR)P \land (Q \lor R) = (P \land Q) \lor (P \land R).
  • Double negation: ¬(¬P)=P\lnot(\lnot P) = P.

Use these steps and rules each time you form or simplify a logic expression.

🧾 Problem statement (from screenshot)

Situation: The restaurant gives a discount (X=1X = 1) if the person ordering is either a student or is 65 years or older, and the order amount is $20.00 or over.

The screenshot gives three rules with 0/1 encodings:

  • Rule A: a student = 0, not a student = 1
  • Rule B: under 65 years old = 0, 65 years or older = 1
  • Rule C: under 20.00=0,20.00 = 0,20.00 or over = 1

Because the table uses 1 for “not a student” for rule A, be careful with the meaning of that variable.

🔧 Define variables (matching the screenshot labels)

Let the given variables be:

  • AA: 1 means not a student, 0 means a student
  • BB: 1 means 65 years or older, 0 means under 65
  • CC: 1 means order 20.00orover20.00 or over, 0 means under 20.0020.00

The discount variable is XX where X=1X=1 means discount given.

🧠 Form the logic expression

The English rule: "discount if (student OR 65+) AND amount ≥ 20".Usingthescreenshotvariablemeanings,"student"isthenegationof20". Using the screenshot variable meanings, "student" is the negation ofA,i.e., i.e.\lnot A.Theageconditionis. The age condition isB,andtheamountconditionis, and the amount condition isC$. So the expression is:

X=(¬AB)CX = (\lnot A \lor B) \land C

This reads: give discount when (student OR 65+) is true and order ≥ $20 is true.

🔍 Alternative if you prefer 1 = true for "student"

If you redefine variables so SS = "student" (1 = student), GG = "65+" (1 = 65+), MM = "order ≥ $20" (1 = yes), the expression is the simpler form:

X=(SG)MX = (S \lor G) \land M

Both forms are equivalent once you map the variables consistently.

✔️ Quick truth-check

  • A student with C=1C=1 (order ≥ 2020): A=0A=0, B=0B=0, C=1C=1X=(¬00)1=(10)1=1X = (\lnot 0 \lor 0) \land 1 = (1 \lor 0) \land 1 = 1 (discount given).
  • Non-student, 65+, with C=1C=1: A=1A=1, B=1B=1, C=1C=1X=(¬11)1=(01)1=1X = (\lnot 1 \lor 1) \land 1 = (0 \lor 1) \land 1 = 1.
  • Student with order under 2020: C=0C=0X=...0=0X = ... \land 0 = 0 (no discount).

These checks confirm X=(¬AB)CX = (\lnot A \lor B) \land C is the correct translation of the screenshot problem.

Sign up to read the full notes

It's free — no credit card required

Already have an account?

Create your own study notes

Turn your PDFs, lectures, and materials into summarized notes with AI. Study smarter, not harder.

Get Started Free