Re: Idempotence
- To: mathgroup at smc.vnet.net
- Subject: [mg37763] Re: Idempotence
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 12 Nov 2002 03:13:13 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <aqo05b$fpa$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
try
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};
and
MapAll[Expand, list1 == list2 ] //. a_^_ :> a
and it return True
Regards
Jens
"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.