0

I have been give the following question for homework:

Let $p$ be the statement "She will graduate" and let $q$ be "She will find a job".
Then what would be:

"Either she will graduate and find a job, or, if she does not graduate, then she will not find a job."

My reasoning was the following:

The first part of the statement says "Either she will graduate and find a job or ...". This would translate into:

$$p \wedge q \vee $$

Then the next part is "if she does not graduate then she will not find a job". So I interpreted as:

$$\neg p \rightarrow \neg q$$

So, putting it together, I would get $$ p \wedge q \vee \neg p \rightarrow \neg q $$.

The answer at the back of the book is:

$$(p \wedge q) \vee (\neg p \rightarrow \neg q)$$

So, how do you know where the brackets go?

Thanks a bunch!

user76568
  • 4,542
Jeel Shah
  • 9,306
  • It just a convention like $1+23 = 1+(23)$. You just have to learn it. – user127.0.0.1 Jan 09 '14 at 19:52
  • Btw: I would always write $(p \wedge q) \vee (\neg p \rightarrow \neg q)$, it's much better to read and understand – user127.0.0.1 Jan 09 '14 at 19:54
  • 1
    Aside: If a fluent English speaker utters the sentence "Either she will graduate and find a job, or, if she does not graduate, then she will not find a job", they probably do not mean the literal translation given in the back of the book. It's more likely that they mean something equivalent to $p\leftrightarrow q$. – Chris Culter Jan 09 '14 at 20:10

2 Answers2

1

Since I don't want to spend to much time in trying to rewrite what you can for yourself better on Wikipedia (http://en.wikipedia.org/wiki/Boolean_algebra & http://en.wikipedia.org/wiki/Truth_table) I'll try to give you a non mathematical example: Consider the sentence:

The grass is green (,) and the sun is shing (,) or it's raining heavily (,) and the people are laughing at this stupid sentence.

As you can see if we omit all the commas the sentence loses it's meaning, one gets really disoriented while reading it because it's truly difficult to understand what we are trying to say.

Now by putting in some of those we can get the two senteces:

The grass is green and the sun is shing, or it's raining heavily and the people are laughing at this stupid sentence.

&

The grass is green , and the sun is shing or it's raining heavily, and the people are laughing at this stupid sentence.

You can clearly see that there is a big difference between these two, in the first one we get a structure:

$$(p \wedge q) \vee (r \wedge s)$$

whereas in the second it is of the form:

$$p \wedge (q \vee r) \wedge s$$

So you can see that like the commas do for a sentence, the brackets determine the "order of reading" of a mathematical (boolean) expression.

To conclude brackets are needed to evaluate any expression of more than two literals composed of different operations ("and", "or") whereas expressions of the form $$(p \wedge w \wedge s)$$ or $$(p \vee w \vee s)$$ can be valuated at once. [in general non-associative]

PS: some programming language as for example C++ have Operator Precedence (http://en.cppreference.com/w/cpp/language/operator_precedence) rules, but these are not valid in mathematics

b00n heT
  • 16,360
  • 1
  • 36
  • 46
0

The placement of the brackets (Disregarding their role for formalism) is used in order to avoid ambiguities (where such are possible).

For example I could have (by mistake) read your answer (placed brackets) as: $$(p \land (q \lor \lnot p))\to \lnot q$$ Which is logically equivalent to: $$(p \land q) \to \lnot q$$ This turns out $True$ for $p=True, \space q=False$.

This is not logically equivalent to what you meant.

user76568
  • 4,542