Re: Idempotence
- To: mathgroup at smc.vnet.net
- Subject: [mg37760] Re: [mg37748] Idempotence
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Tue, 12 Nov 2002 03:13:08 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Assuming that that's all you want (and, in particular, that you are happy with the commutativity of multiplication), it is easy: In[1]:= a/:a^2=a; In[2]:= b/:b^2=b; In[3]:= c/:c^2=c; list1={b+a c-a b c,c,1}; list2={2 b+2 a c-a b c-a c (b+a c- a b c)-b (b+2 a c-a b c-a c (b+a c-a b c)),c,1}; In[6]:= list1==list2//Simplify Out[6]= True On Monday, November 11, 2002, at 07:10 PM, Tilo Schröder wrote: > Hello, > > I'm quite new in operating with Mathematica. Solving a problem > concerning > network reliability I have to implement an algorithm which uses > idempotence > (e.g.: a*a=a, a^2*b^3=ab). > As a result of this fact, the following lists should be the same: > > list1={b+a c-a b c,c,1} > list2={2 b+2 a c-a b c-a c (b+a c-a b c)-b (b+2 a c-a b c-a c (b+a c-a > b > c)),c,1} > > The result of "list1===list2" should be true. > > Does anybody have a hint or an idea how to solve it with Mathematica? I > couldn't find anything about it even on Wolfram's webpage. > > Thank you in advance. > > Tilo. > > > > > Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/