Re: OR NOT Logic

2006-05-04 Thread Craig McLean
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter P. Benac wrote:
[snip]
> 
> And your domain is my Mother's Maiden Name  :)
> 
> Regards,
> Pete

Remind me who you bank with? ;-)

C.
- --
Craig McLeanhttp://fukka.co.uk
[EMAIL PROTECTED]   Where the fun never starts
Powered by FreeBSD, and GIN!
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEWfgdMDDagS2VwJ4RAvgsAKCcYO497ItTZVLoruJ77tY1L4vyHACePYe3
QHIUcm3EhUMpycvS9Ek5NWY=
=D6jx
-END PGP SIGNATURE-


Re: OR NOT Logic

2006-05-03 Thread Dan
Thank you Mouss and to everyone for answering my logic question.  I  
now understand this better than I ever thought possible.


Dan


On May 3, 2006, at 15:14, mouss wrote:


Dan wrote:


Is:

A && (B || C || D || E || F)

equivalent to?:

A && (!B && !C && !D && !E && !F)


No.  The DeMorgan laws are:
   ! ( A && B)=  !A  || !B
   !(A || B) == !A && !B
so you _dispatch_ the '!' and replace || with && and conversely.

example:

   if it is _not_ spam _and_ it is not virus, deliver it; else  
quarantine it

is the same as
   if it is _either_ spam _or_ virus, quarantine it. else deliver it







Re: OR NOT Logic

2006-05-03 Thread mouss

Dan wrote:


Is:

A && (B || C || D || E || F)

equivalent to?:

A && (!B && !C && !D && !E && !F)


No.  The DeMorgan laws are:
   ! ( A && B)=  !A  || !B
   !(A || B) == !A && !B
so you _dispatch_ the '!' and replace || with && and conversely.

example:

   if it is _not_ spam _and_ it is not virus, deliver it; else 
quarantine it

is the same as
   if it is _either_ spam _or_ virus, quarantine it. else deliver it





Re: OR NOT Logic

2006-05-02 Thread Loren Wilton
> Is:
> 
> A && (B || C || D || E || F)

if TRUE OR TRUE

true if either is true
 
> equivalent to?:
> 
> A && (!B && !C && !D && !E && !F)

if FALSE AND FALSE

true if both are false

So no, they aren't equivalent.

Loren



Re: OR NOT Logic

2006-05-02 Thread List Mail User
>...
>I believe that's a fundamental logic rule, so yes.
>
>A && B == ~A || ~B
>
>--Russell

Almost:

-- Not to confuse things with C's short ciruit operations

  |
  v
( A and B ) equals ( not ( ( not A ) or ( not B ) ) )
  ^
  |

Also known as one case of the "contrapositive".

Paul Shupak
[EMAIL PROTECTED]


Re: OR NOT Logic

2006-05-02 Thread Dan

any(@criteria) = not all(not @criteria)

Consider

Lifeboat1-has-a-seat OR
Lifeboat2-has-a-seat OR
...
LifeboatN-has-a-seat

vs.

Lifeboat1-is-full AND
Lifeboat2-is-full AND
...
LifeboatN-is-full



Thanks for the examples Matt, time for some testing

Dan


RE: OR NOT Logic

2006-05-02 Thread Matthew.van.Eerde
Dan wrote:
> Wow,
> 
> I must be confusing this with any/all is/isn't.  In various software
> (mail scripts, iTunes smart playlists, etc):
> 
>   any IS IS IS IS
> 
>   equals
> 
>   all NOT NOT NOT NOT

Exactly backwards.

any(@criteria) = not all(not @criteria)

Consider

Lifeboat1-has-a-seat OR
Lifeboat2-has-a-seat OR
...
LifeboatN-has-a-seat

vs.

Lifeboat1-is-full AND
Lifeboat2-is-full AND
...
LifeboatN-is-full


Re: OR NOT Logic

2006-05-02 Thread Dan

Wow,

I must be confusing this with any/all is/isn't.  In various software  
(mail scripts, iTunes smart playlists, etc):


any IS IS IS IS

equals

all NOT NOT NOT NOT


Dan



On May 2, 2006, at 15:11, Matt Kettler wrote:


Russell Miller wrote:

On Tuesday 02 May 2006 14:59, Dan wrote:

Is:

A && (B || C || D || E || F)

equivalent to?:

A && (!B && !C && !D && !E && !F)


No the two are NOT equivalent.

The first statement will be true if A and any one of B-F is true.

The second statement will be true if A and all of B-F are false.

It would be true if you modified the second rule to be:

A && !(!B && !C && !D && !E && !F)




I believe that's a fundamental logic rule, so yes.

A && B == ~A || ~B


No, that is not a fundamental logic rule. It is not even true, they  
are in fact

exact opposites of each other.

I'm going to change the use of ~ to !, just to match the OP's  
syntax of the NOT

operation. ( A && B == !A || !B )


Truth tables:

A  B  (A && B) ( !A || !B)
0  0 0  1
0  1 0  1
1  0 0  1
1  1 1  0



The correct rule is:

!( A && B) == !A || !B

It's called DeMorgan's theorem. Note the difference being that  
there's negation

on both sides.

A  B  !(A && B) ( !A || !B)
0  0 1  1
0  1 1  1
1  0 1  1
1  1 0  0




Re: OR NOT Logic

2006-05-02 Thread Matt Kettler
Russell Miller wrote:
> On Tuesday 02 May 2006 14:59, Dan wrote:
>> Is:
>>
>> A && (B || C || D || E || F)
>>
>> equivalent to?:
>>
>> A && (!B && !C && !D && !E && !F)

No the two are NOT equivalent.

The first statement will be true if A and any one of B-F is true.

The second statement will be true if A and all of B-F are false.

It would be true if you modified the second rule to be:

A && !(!B && !C && !D && !E && !F)

>>
> I believe that's a fundamental logic rule, so yes.
> 
> A && B == ~A || ~B

No, that is not a fundamental logic rule. It is not even true, they are in fact
exact opposites of each other.

I'm going to change the use of ~ to !, just to match the OP's syntax of the NOT
operation. ( A && B == !A || !B )


Truth tables:

A  B  (A && B) ( !A || !B)
0  0 0  1
0  1 0  1
1  0 0  1
1  1 1  0



The correct rule is:

!( A && B) == !A || !B

It's called DeMorgan's theorem. Note the difference being that there's negation
on both sides.

A  B  !(A && B) ( !A || !B)
0  0 1  1
0  1 1  1
1  0 1  1
1  1 0  0


Re: OR NOT Logic

2006-05-02 Thread Peter P. Benac
No!1

In the first example if A is postive  and any one of the () variable are
positive it will pass.

In the second example A would have to be positive and all the () variable
would have to be negative to pass.

And your domain is my Mother's Maiden Name  :)

Regards,
Pete

>
> Is:
>
> A && (B || C || D || E || F)
>
> equivalent to?:
>
> A && (!B && !C && !D && !E && !F)
>
> as in:
>
> meta __FORGED_OUTLOOK_DOLLARS (__OUTLOOK_DOLLARS_MUA && !
> __OUTLOOK_DOLLARS_MSGID && !__OUTLOOK_DOLLARS_OTHER && !__IMS_MSGID
> && !__UNUSABLE_MSGID)
>
>
> Thanks,
> Dan
>



Peter P. Benac, CCNA
Emacolet Networking Services, Inc
Providing Network and Systems Project Management and Installation and
Web Hosting.
Phone: 919-618-2557
Web: http://www.emacolet.com
Need quick reliable Systems or Network Management advice visit
http://www.nmsusers.org

To have principles...
First have courage.. With principles comes integrity!!!



Re: OR NOT Logic

2006-05-02 Thread Russell Miller
On Tuesday 02 May 2006 14:59, Dan wrote:
> Is:
>
> A && (B || C || D || E || F)
>
> equivalent to?:
>
> A && (!B && !C && !D && !E && !F)
>
I believe that's a fundamental logic rule, so yes.

A && B == ~A || ~B

--Russell

> as in:
>
> meta __FORGED_OUTLOOK_DOLLARS (__OUTLOOK_DOLLARS_MUA && !
> __OUTLOOK_DOLLARS_MSGID && !__OUTLOOK_DOLLARS_OTHER && !__IMS_MSGID
> && !__UNUSABLE_MSGID)
>
>
> Thanks,
> Dan


OR NOT Logic

2006-05-02 Thread Dan


Is:

A && (B || C || D || E || F)

equivalent to?:

A && (!B && !C && !D && !E && !F)

as in:

meta __FORGED_OUTLOOK_DOLLARS	(__OUTLOOK_DOLLARS_MUA && ! 
__OUTLOOK_DOLLARS_MSGID && !__OUTLOOK_DOLLARS_OTHER && !__IMS_MSGID  
&& !__UNUSABLE_MSGID)



Thanks,
Dan