Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Simplification problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
olfa  
View profile   Translate to Translated (View Original)
 More options 8 Nov, 12:08
Newsgroups: comp.soft-sys.math.mathematica
From: olfa <olfa.mra...@yahoo.fr>
Date: Sun, 8 Nov 2009 12:08:11 +0000 (UTC)
Local: Sun 8 Nov 2009 12:08
Subject: Simplification problem
Hello mathematica community
Having this system of equations:
(z1==z2 && x*t==x1*t1)||(z1+x1*t1==z2+x2*t2)
 why a function like fullsimplify or booleanminimize doesn't simplify
it into z1+x1*t1==z2+x2*t2?
same question for (y1==y2 && t1== t2)||(t1/2^y1==t2/2^y2) why it is
not simplified into t1/2^y1==t2/2^y2.
is there another function that I can use?
thank you.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Simplification problem updated" by olfa
olfa  
View profile   Translate to Translated (View Original)
 More options 9 Nov, 10:47
Newsgroups: comp.soft-sys.math.mathematica
From: olfa <olfa.mra...@yahoo.fr>
Date: Mon, 9 Nov 2009 10:47:51 +0000 (UTC)
Local: Mon 9 Nov 2009 10:47
Subject: Re: Simplification problem updated
On 8 nov, 13:08, olfa <olfa.mra...@yahoo.fr> wrote:

Sorry There is a little mistake in the names of variables: here is the
first system updated again:

 (z1==z2 && x1*t1==x2*t2)||(z1+x1*t1==z2+x2*t2) why this system is not
simplified into (z1+x1*t1==z2+x2*t2) by fullsimplify or
booleanminimize ?is there another function that I can use?
same question for the second system:(y1==y2 && t1== t2)||
(t1/2^y1==t2/2^y2)  to be simplified into t1/2^y1==t2/2^y2


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Simplification problem" by Andrzej Kozlowski
Andrzej Kozlowski  
View profile   Translate to Translated (View Original)
 More options 9 Nov, 10:56
Newsgroups: comp.soft-sys.math.mathematica
From: Andrzej Kozlowski <a...@mimuw.edu.pl>
Date: Mon, 9 Nov 2009 10:56:27 +0000 (UTC)
Local: Mon 9 Nov 2009 10:56
Subject: Re: Simplification problem

On 8 Nov 2009, at 20:51, olfa wrote:

> Hello mathematica community
> Having this system of equations:
> (z1==z2 && x*t==x1*t1)||(z1+x1*t1==z2+x2*t2)
> why a function like fullsimplify or booleanminimize doesn't simplify
> it into z1+x1*t1==z2+x2*t2?
> same question for (y1==y2 && t1== t2)||(t1/2^y1==t2/2^y2) why it is
> not simplified into t1/2^y1==t2/2^y2.
> is there another function that I can use?
> thank you.

I think I have answered very similar questions from you several times  
but you just ignore the answers and keep asking the same thing all  
over again.

The function to use is Reduce over the Reals (even if the result is  
more general, the algorithms used by Mathematica for such situations  
work over the reals). You will get a more complicated looking answer,  
but it actually "contains yours".

FullSimplify[
  Reduce[(z1 == z2 && x*t == x1*t1) || z1 + x1*t1 == z2 + x2*t2, Reals]]

  (x2 ==
     0 && ((z1 ==
         z2 && (x1 ==
           0 || (x != 0 && (t1 == 0 || t == (t1*x1)/x)))) ||
          (x1 != 0 && t1*x1 + z1 == z2 && (t1 != 0 || x == 0)))) ||
    (x2 != 0 && ((((t1*x1 + z1 ==
             t2*x2 + z2 && (x != 0 || (t1 != 0 && t2 != 0))) ||
                (t2 == 0 && x == 0 && t1*x1 + z1 == z2) || (x != 0 &&
            t == (t1*x1)/x &&
                   t1 != (t2*x2)/x1 && z1 == z2)) && x1 != 0) ||
          (x1 == 0 && ((t2 != 0 && t2*x2 + z2 == z1) ||
                (z1 == z2 && (t == 0 || t2 == 0 || x == 0)))) ||
          (t1 == 0 && t2 != 0 &&
        x == 0 && (z1 == z2 || t2*x2 + z2 == z1))))

The answer you see is a disjunction, corresponding to various terms  
being zero or non-zero. If you look at this carefully you will see  
that it does contain what you want:

x2 != 0 && ((((t1*x1 + z1 ==  t2*x2 + z2 && (x != 0 || (t1 != 0 && t2 !
= 0)))

Similarly in the second case:

  FullSimplify[
  Reduce[(y1 == y2 && t1 == t2) || t1/2^y1 == t2/2^y2, Reals]]

(t1 == 0 && t2 == 0) || (t1 == t2 && y1 == y2) ||
    (Log[2]*(y1 - y2) == Log[t1/t2] &&
       ((t1 < 0 && t2 < 0) || (t1 > 0 && t2 > 0)))

This is again essentially equivalent to the answer you wanted. You  
can't expect to get exactly what you wanted as the algorithms  
Mathematica uses are entirely different form the way you do this by  
hand.

Andrzej Kozlowski


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrzej Kozlowski  
View profile   Translate to Translated (View Original)
 More options 10 Nov, 11:09
Newsgroups: comp.soft-sys.math.mathematica
From: Andrzej Kozlowski <a...@mimuw.edu.pl>
Date: Tue, 10 Nov 2009 11:09:32 +0000 (UTC)
Local: Tues 10 Nov 2009 11:09
Subject: Re: Simplification problem
I made a hash of my previous reply due to not looking carefully at the  
question  (which was wrongly formed anyway) and the answer that I  
posted. More precisely, I did not notice that what you really wanted  
to do is to get rid of a part of a disjunction that implies the other  
part (so is logically unnecessary).

So here is a second go:

  Reduce[(z1 == z2 && x1*t1 == x2*t2) ||
   z1 + x1*t1 == z2 + x2*t2, Reals]

  z1 == -(t1*x1) + t2*x2 + z2

which is exactly what you wanted (except that one term is on the  
opposite side of the equation). Unfortunately this happens really just  
by luck, and does not work in your second case.

Reduce[(y1 == y2 && t1 == t2) || t1/2^y1 == t2/2^y2, Reals]

  (y1 == y2 && t1 == t2) || (t1 == 0 && t2 == 0) ||
    (t1 < 0 && t2 < 0 &&
       y2 == y1 - Log[t1/t2]/Log[2]) ||
    (t1 > 0 && t2 > 0 && y2 == y1 - Log[t1/t2]/Log[2])

I am pretty sure there is no way to do in Mathematica (or any other  
symbolic algebra program) what you want in general (that is, except in  
lucky cases like the first one). The reason is that functions like  
BooleanMinimize operate on expression belonging to the Boolean algebra  
of logical sentences (first order logic or predicate logic etc), while  
your expression is what is known as a first order formula in the  
language of ordered fields. Reduce and FullSimplify will transform  
such  first order formulas into certain canonical forms (for example,  
by removing quantifiers and expanding), but no attempt is made to  
transform them into the simplest "semantically" equivalent form (where  
"semantic equivalence" involves both the "logical" and the "algebraic"  
structure) because no such algorithms are known (in general).
If I recall correctly most of your posts I have seen addressed some  
version of this problem and, I am pretty sure, the answer is, it can't  
be done.

Andrzej Kozlowski

On 9 Nov 2009, at 19:44, Andrzej Kozlowski wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google