Skip to content
BetterDL

Counterexample

Also called: counter-example, counterexamples, disproof by example

One input combination where two expressions give different outputs. A single counterexample proves they are not equal.

A counterexample is a specific input that breaks a claim. For a claimed identity between two expressions, it is a row where the two sides disagree.

The logic is lopsided:

  • To prove two expressions are equivalent, you must cover every row, or use the laws.
  • To disprove it, one row is enough.

That makes counterexamples the fastest tool for checking your own work. If you suspect a step, try an input that makes the changed part matter.

How to find one quickly: look at what differs between the two sides and choose values that make that part decide the output. For versus , the difference only shows when A = 0 (otherwise both are 1), and then B = 1 makes true but false.

Counterexamples also explain the common myths. Cancelling fails because A = 1, B = 0, C = 1 makes = while B ≠ C.

Worked examples

Example

Disproving a false De Morgan

A student claims = . Find a counterexample.

  1. 1.

    The two sides can only differ when exactly one of A, B is 1.

  2. 2.

    Try A = 1, B = 0.

  3. 3.

    = = 1.

  4. 4.

    = 0 · 1 = 0.

  5. 5.

    They differ, so the claim is false. The correct rule is = .

Example

Combining two differences

Is equal to A?

  1. 1.

    Choose A = 1 and try to make both terms 0: B = 1, C = 1.

  2. 2.

    = 0 and = 0, so the left side is 0.

  3. 3.

    The right side is A = 1.

  4. 4.

    Counterexample found: terms that differ in two variables do not combine.

Common mistakes

  • Testing only rows where both sides happen to agree, and concluding the claim is true.

  • Thinking you need several counterexamples. One is a complete disproof.

Practice Counterexample

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Counterexample is taught in Boolean Algebra.