bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: Empty set is and is not a subset of empty set]


From: Andrew Makhorin
Subject: [Fwd: Empty set is and is not a subset of empty set]
Date: Thu, 13 Mar 2025 21:55:11 +0300

-------- Forwarded Message --------
From: Piotr Kocia <peter.kocia@gmail.com>
To: bug-glpk@gnu.org
Subject: Empty set is and is not a subset of empty set
Date: Thu, 13 Mar 2025 18:45:04 +0000

> Hello,
> 
> I have been writing a model that evaluates an expression when a
> relevant arithmetic set is not a subset of another arithmetic set. I
> was getting incorrect results, so I spent some time narrowing down the
> issue and eventually I arrived at the following snippet:
> 
> ---
> display 1..2 inter 3..4;
> display (100..120 inter 130..150);
> display (100..120 inter 130..150) within (1..2 inter 3..4);
> display (100..120 inter 130..150) not within (1..2 inter 3..4);
> ---
> 
> The output of the above with GLPK 5.0 is:
> 
> ---
> Display statement at line 108
> set is empty
> Display statement at line 109
> set is empty
> Display statement at line 110
> true
> Display statement at line 111
> true
> ---
> 
> The empty set is indeed a subset of itself, but can it also be not a
> subset of itself at the same time? I suppose it depends on the
> definition of the subset operation, but the most common one I have
> come across is 'A is a subset of B if every element in A is in B'. The
> negation of this would be 'A is not a subset of B if there exists an
> element in A that is not in B'. There are no such elements in the
> empty set, which implies that '{} not within {}' should be false.
> 
> Best regards
> Piotr Kocia
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]