Question

For one of my beginning CS classes, we are going over "truth functional logic."

My question pertains to English translations. Note that ^ is AND; v is (inclusive)OR; ~ is NOT. -> is IF

Well, we had this: "RENT being paid is a necessary condition for staying in BUSINESS"

RENT -> BUSINESS

Whenever we graded everything this was wrong. I asked the teacher why and she said nothing more then that "if there is no then in the sentence, then the antecedent is always last"

I would like some more explanation as to how this is wrong. And how the sentence is not ambiguous. Something more than "there was no then so it's always this way."

Also, a side note: Where did the IF boolean operator come from? I've never heard of such an operator that is basically equivalent in Cish code to a==true?b:true. I have a very hard time grasping it's usage.

edit: The correct answer was

BUSINESS -> RENT
Was it helpful?

Solution

If you pay rent, you're not necessarily in business. Rent !(->) Business.

However, if you're in business, you must pay rent. Business -> Rent.

OTHER TIPS

I think it should have been written:

BUSINESS -> RENT

"If you're staying in business, then you're paying rent."

P -> Q

can be stated "P implies Q," "If P, then Q," or "Q if P."

She is right. It is a classic a implies b but b does not imply a. What you are saying business is a necessary condition of paying rent which is wrong.

Where did the IF boolean operator come from? I've never heard of such an operator that is basically equivalent in Cish code to a==true?b:true. I have a very hard time grasping it's usage.

This operator is more commonly called “implication”. What do you mean by “where did [it] come from”?

And yes, implication is hard to grasp and your mistake is completely typical.

You can explain the implication by noting that under false premises, everything can be explained, even bogus (for example, we can mathematically prove that 1 = 2 if we use the premise that division by 0 is legal). For that reason, 0 -> x is always true, no matter the value of x (i.e. the implication can produce the result).

On the other hand, if your premises are correct, an implication will lead to a correct result, thus 1 -> 1 is true (a true premise implies a true result), and 1 -> 0 is false (a true premise cannot imply a false result).

!RENT -> !BUSINESS

If you're not paying rent, then you're not in business. This is the "contrapositive" of

BUSINESS -> RENT

If you're in business, then you're paying rent.

Other ways to say this (since a -> b === (!a || b) ):

!BUSINESS || RENT
RENT || !BUSINESS

Either you're not in business or you're paying rent or both (or vice-versa).

!(!RENT && BUSINESS)

You're not both not paying rent and in business (or vice-versa).

ADDED: BTW, this is how resolution works. Put your knowledge into conjunctive normal form, where each clause consists of a disjunction of atomic terms, each of which can be negated. If you know you're not paying rent, then that is a clause, which you can resolve (i.e. cancel terms) with the implication to deduce a new clause, namely that you are not in business.

RENT || !BUSINESS
!RENT
--------
!BUSINESS

Similarly, if you know that you are in business, you can cancel terms to conclude that you are paying rent.

RENT || !BUSINESS
BUSINESS
--------
RENT

That's the attraction of resolution theorem provers - one inference rule covers both forward and backward inference.

It also handles case-reasoning nicely, like if A->C and B->C, and A||B, it lets you conclude C:

1. !A || C
2. !B || C
3.  A || B
----------
4.  B || C  (resolve 3 and 1)
5.  C       (resolve 4 and 2)

The key here is the word "necessary." We have here a sentence of the form "X is necessary for Y." What this means is that X must be true for Y to be true. In everyday language we think of this as "Y can not be true unless X is true". And this translates very clearly into "if X is false then Y is false" because if X were false but Y were true then we would be violating Y can not be true unless X is true. But if X is false then Y is false translates symbolically to !X => !Y which has contrapositive Y => X. This is why "X is necessary for Y" is equivalent to Y => X.

Here is an example: being odd is necessary to be prime and larger than two. What this means is that if a number is prime and larger than two, it must be odd because being odd is a necessary condition of being prime and larger than two. Said another way, if a number is prime and larger than two, it must be odd. The converse (if a number is odd it must be prime) is absurd.

This should convince you that X is necessary for Y is equivalent to Y => X.

There is a different but related relationship between statements that takes the following form: "X is a sufficient condition for Y". In everyday language we would say that "knowing X is true is grounds for Y to be true", or X => Y.

These two implicational (it's a word now!) relationships are duals of each other. In fact, in mathematics, a very important form is "X is a necessary and sufficient condition for Y." This means that X => Y and Y => X, or that X <=> Y. We say that X and Y are equivalent, and we sometimes say "X if and only if Y" and sometimes abbreviate it "X iff Y."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top