Lab 2: Identifying Logical Operators and their meaning

CC-BY 2026 Chris Liu & James B. Wilson

The Theoretical Logic of the problem.

The sporting goods store Bats-&-Balls recently bought their competitor Shoes-&-Socks.

 

 

They want to merge the customer loyalty programs.

 

 

If the two databases have an entry with the same name and either the same address or the same phone number then they should be merged.

The Theoretical Logic of the problem.

1. Label the components of the client's objective with variable names.

 

 

 

2. Shape the goal as single logical sentence, first in words, then replace key logical operators with appropriate logical symbols and grammar.

 

If the two databases have an entry with the same name and either the same address or the same phone number then they should be merged.

E.g. \(N_{B}\) client name in the Bats-&-Balls, \(N_{S}\) for Shoes-and-Socks database.

 

The Theoretical Logic of the problem.

2. Shape the goal as single logical sentence, first in words, then replace key logical operators with appropriate logical symbols and grammar.

 

 

 

 

 

If the two databases have an entry with the same name and either the same address or the same phone number then they should be merged.

E.g. \((N_B=N_S) \wedge \biggl( (P_B=P_S)\vee (A_B=A_S)\biggr)\)

Towards Practical Logic.

The client shares their concern.

"Customers don't always properly fill out the customer loyalty application."

3. Identify 3 problems or confusions that might arise when comparing the databases entries.

E.g. Perhaps a user used a nickname

4. Write the impact of the confusion on the logical form from part 2.

If \(N_{B}\) used a nickname and \(N_{S}\) used a full name then \(N_{B}\neq N_{S}\) .

Resolving the Logical Tension

You advise the client that you can create a test that measures if names, addresses, and phone numbers are

  • Equal \((=)\),

  • Partially Equal \((\approx)\),

  • Rather unrelated \((\neq)\)

You ask the client to clarify how they want you to handle these cases.

Resolving the Logical Tension

Equal \((=)\),  Partially Equal \((\approx)\), Rather unrelated \((\neq)\)

  1. Write a semantics table (truth-value table) for the operators in 2 given that you will be using this 3-valued logic \((\top, +,\bot)\) for equality. (You may abbreviate the table if you witness a pattern.). 

 

\((N_B\neq N_S)\wedge ((P_B = P_S)\vee (A_B \approx A_S))\) \(\bot\) No Merge
     
\((N_B=N_S)\wedge ((P_B=P_S)\vee (A_B=A_S))\) \(\top\) Merge

Identify the Computational Tension

You recall that your engineering team meeting last week made a stink about work orders that included logic like this: \[+ \circledast + = +\] Assigning a step as "partially true" doesn't give them any clue what they should do when this happens. 

Review your semantic table and identify all places where operators resolve at an ambiguous \(+\).

Write in words the type of error message that would describe that occurrence, or a rule a client might adopt to handle that merger.

Identify the Computational Tension

Review your semantic table and identify all places where operators resolve at an ambiguous \(+\).

Write in words the type of error message that would describe that occurrence, or a rule a client might adopt to handle that merger.

E.g.

\((N_B\approx N_S)\wedge ((P_B=P_S)\vee  (A_B=A_S))\) \(+\) Approve merger

 

A client may modify the rule saying that equal numbers or address, the small differences in names is enough.

Lab 2: Identifying Logical Operators and their meaning

By James Wilson

Lab 2: Identifying Logical Operators and their meaning

Recognizing the logical operators and their meaning from story problems.

  • 29