Re: Why Python When There Is Perl?

Liste des GroupesRevenir à col advocacy 
Sujet : Re: Why Python When There Is Perl?
De : ff (at) *nospam* linux.rocks (Farley Flud)
Groupes : comp.os.linux.advocacy
Date : 23. Mar 2024, 12:09:00
Autres entêtes
Organisation : UsenetExpress - www.usenetexpress.com
Message-ID : <17bf5ce92e8c43b4$672$1351842$802601b3@news.usenetexpress.com>
References : 1 2 3 4 5 6 7 8
On Fri, 22 Mar 2024 20:40:05 -0500, Physfitfreak wrote:

>
IMP
0 IMP 0  = 1
0 IMP 1  = 1
1 IMP 0  = 0
1 IMP 1  = 1
>
How can that be explained?...
 
 
There we go again. I spend half hour concocting a new baby problem based
on that, then after posting it I see you've already given the answer for
everybody here to see...
 

Admittedly this is a difficult thing to grasp.

But it is best to avoid explanations with words.  Let the mathematics
be the guide.

Let's consider this:

A is all prime numbers <= 100

B is all odd numbers <= 100

We have 4 possibilities:

A => B: true
A number is prime implies it is odd.  Another, more proper,
way to state this is that if a number is in set A (prime)
then it is also in set B.

~A => B: true
If a number is not prime then it is odd.  The set of ~A
includes all the even numbers as well as all the odd numbers
in B.  This statement actually says that a number being not
prime as well as odd is a possibility because ~A includes B.

A => ~B: false
Obviously, if a number is prime it cannot be not odd, that is,
if a number is in set A (prime) it cannot be in set ~B (even
numbers).

~A => ~B: true
Again, if a number is not in set A, the evens and all non-prime
odds, then it may be also not in set B, the non-prime odds.

We can also express this using Venn diagrams:

https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Venn1011.svg/1280px-Venn1011.svg.png

Let A be the circle (set) on the left and B be the
circle (set) on the right.

The truth condition, ~A OR B, is the red area.

The negation (falsification), A AND ~B, is the white area.

 


Date Sujet#  Auteur
5 Oct 24 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal