Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2013-10-13 12:33:54

atran
Member
Registered: 2013-07-12
Posts: 91

What's the difference between a statement and a boolean expression?

"Expressions that yield the value true or false are boolean expressions."
What's the difference between a statement and a boolean expression?

Thanks for help.

Offline

#2 2013-10-13 19:44:04

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

hi atran

These are the same.  Boolean expressions are written is a (possibly) more formal way, but the concepts are the same.

eg.  A = "It is Monday"     B is "It is raining"  A and B are statements.

A AND B is a Boolean expression.

Since (A AND TRUE) = A, that makes all simple statements  Boolean expressions too.

Furthermore, (A AND B) is a statement, thus all Boolean expressions are statements.

Conclusion

Booleans expressions are statements and statements are Boolean expressions.   

note:Wiki says that Boolean expressions are expressions in a computer programming language.  But Boolean expressions are more than just that.  They must be; Boole invented the idea long before computers were invented.

http://www.webopedia.com/TERM/B/Boolean_expression.html

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2013-10-13 21:02:18

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Hi Bob

Not all statements are boolean expressions. "That hat is nice" is not a Boolean expression, but is a statement.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#4 2013-10-13 22:50:18

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

OK, thanks for the correction.

How about if I amend to "All statements that can be either TRUE or FALSE ...."  ?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#5 2013-10-13 22:51:11

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Now, that would be true. Thus, it is also a Boolean expression. smile


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#6 2013-10-13 23:34:17

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: What's the difference between a statement and a boolean expression?

anonimnystefy wrote:

Hi Bob

Not all statements are boolean expressions. "That hat is nice" is not a Boolean expression, but is a statement.

That is a boolean expression too. The hat is either nice or not. If the hat is nice, the statement evaluates to true.

Hello Original Poster,

In programming, a statement is something which asks the CPU to do something.

For example;

#include <iostream.h> //statement
using namespace std; //statement

int main(void) 
{
int n; //declaration statement
cin << n; //declaration statement
if (n > 2) { // the part (n >2) is a boolean expression
cout << "OK"; //statement
}
return 1; //statement
}

Last edited by Agnishom (2013-10-13 23:34:46)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#7 2013-10-14 00:00:01

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

Agnishom wrote:

That is a boolean expression too. The hat is either nice or not. If the hat is nice, the statement evaluates to true.

Actually, I agree with Stefy's correction.  Whether a hat is nice is a matter of opinion.  Some people may think it is and some not.  Mathematical statements don't have that doubt about them; everyone has to agree that it is TRUE.  It is a subtle point of semantics as some statements are borderline.  See

http://en.wikipedia.org/wiki/Statement_(logic)

Note what it says about "Pegasus exists" for example.

I hope that my modification will take care of it.  When I made the first post I had in my head only mathematical statements, forgetting that other statements can exist.  I know it brings Stefy much joy to correct my English so I don't mind him doing it.  smile

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#8 2013-10-14 00:01:57

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: What's the difference between a statement and a boolean expression?

By the way, I think the OP was in need of what I posted in #6.

That is kind of correct, besides: Some statements are undecidable.

E.g, This statement is false.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#9 2013-10-14 00:09:46

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

Agnishom wrote:

By the way, I think the OP was in need of what I posted in #6.

You may be right.  That's the great thing about MIF; lots of folk contribute; each bringing their owns ideas.  The poster can pick and choose as they like.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#10 2013-10-14 00:23:59

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Agnishom wrote:

E.g, This statement is false.

That statement might not be undecidable. I like Arthur Prior's resolution of it.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#11 2013-10-14 00:51:22

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: What's the difference between a statement and a boolean expression?

What is Arthur Prior's resolution to it?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#12 2013-10-14 01:02:56

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#13 2013-10-14 01:24:19

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: What's the difference between a statement and a boolean expression?

If he thinks he has resolved the statement is false, then the statement is what it claims to be, then why is it false, again?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#14 2013-10-14 01:30:33

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Well, if you claim something to be both true and false, your claim is false. The same is here.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#15 2013-10-14 01:37:53

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: What's the difference between a statement and a boolean expression?

Nope. The order matters.

Few months ago, the statement "Agnishom is 15" was FALSE but now it is TRUE

Does it mean I am not 15?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#16 2013-10-14 02:06:58

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Agnishom wrote:

Nope. The order matters.

Few months ago, the statement "Agnishom is 15" was FALSE but now it is TRUE

Does it mean I am not 15?

First, that has nothing to do with what I said. If you were to claim "Agnishom is 15 and is not 15", it would be false and that is what I am trying to say.

Second, we cannot look at different moments in time to see if the statement is true or false. We must evaluate it at only one moment (applicable for real world only).


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#17 2013-10-14 11:16:52

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: What's the difference between a statement and a boolean expression?

Let the statement with which we are working be 'This statement is False'

If the statement is false according to him,
then the global truth reduces to ~(This statement is False) // because the statement was proved to be false and thus its negation is true
which applying his explanation becomes, It is true that ~(this statement is false)
<=> It is true that this statement is true
<=> This statement is true.

Or think of it this way.
This statement is false
<=>This is true that this statement is false
Now, you've proved that the statement is actually False, So the negation of it or its extension is true. Let us again begin with that true statement.
~(This is true that the statement is False)
<=>It is True that ~(This is true that the statement is False)
<=> It is True that ~(False) // because you figured that the statement is false just a while ago
<=> It is true that True
<=> True
and you've proved it to be true again


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#18 2013-10-14 19:40:44

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

hi Agnishom and Stefy,

I'd not met the Prior argument (no pun intended) before.  Below I've shown some truth tables.  These provide a way to compare logic expressions in order to determine whether they are the same.

In the first I have combine a statement, A, with TRUE.  The resulting compound expression has the same truth values as A itself so it is OK to regard the two expressions as equivalent:

A = TRUE AND A

In the second I have combined "This is TRUE" with "This is FALSE",  again using the operation AND.

Lines (i) and (iv) cannot occur since "This is TRUE" and "This is FALSE" must have opposite truth values.

So we are left with lines (ii) and (iii).  Both lead to the compound expression being FALSE.

Therefore it is FALSE.

Prior's argument, I think, is that line (iii) must therefore be the only correct line.  ie

"This is TRUE" AND "This is FALSE" is a FALSE assertion.

What is bothering me is that the argument appears to be treating "TRUE" and "This is TRUE" as the same.

As TRUE has the truth value T, and "This is TRUE" has the truth value F, I think the argument isn't correct.

It only works when "This is TRUE" is TRUE and that re-opens the whole circular paradox.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#19 2013-10-14 21:56:53

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Hi Bob

He does not use the fact that p and T p. He uses the fact that every statement contains its own assumption of its truth value. So, if you have the statement "2 plus 2 is 4", it is the same as "this statement is true and 2 plus 2 is 4". Which I guess is basically p p and p.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#20 2013-10-14 23:07:46

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

hi Stefy,

Would you believe that after I had posted I thought you might say that.

Below is my revised truth tables to take account of that.

In table 1, I have used "This is TRUE" rather than TRUE, and considered the four cases.

In cases (i) and (ii) the situation is exactly as before.  If "This is TRUE" = TRUE then my argument still holds.

Case (iii) does not yield identical truth tables.

Case (iv) does but requires "This is TRUE" to be FALSE and we are back at the paradox.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#21 2013-10-14 23:15:17

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Hi Bob

The problem is you assume "This is FALSE" can take any value. It always has the value opposite from "This is True". And because p and not p F, the sentence must be false.

Last edited by anonimnystefy (2013-10-14 23:15:35)


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#22 2013-10-15 03:41:19

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

I thought I'd covered that by saying

Lines (i) and (iv) cannot occur since "This is TRUE" and "This is FALSE" must have opposite truth values.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#23 2013-10-15 03:48:54

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

Ah, okay. So, you agree that the statement is always false or...?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#24 2013-10-15 05:16:12

Bob
Administrator
Registered: 2010-06-20
Posts: 10,623

Re: What's the difference between a statement and a boolean expression?

It seems to me that the statement is FALSE exactly when it is TRUE.

It only works when "This is TRUE" is TRUE and that re-opens the whole circular paradox.

That seems to sew up all the loose ends nicely.  smile

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#25 2013-10-15 06:11:42

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: What's the difference between a statement and a boolean expression?

I'm not sure what you are trying to say.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

Board footer

Powered by FluxBB