Re: ListCorrelate and functions on it with an extra

• To: mathgroup at smc.vnet.net
• Subject: [mg86352] Re: [mg86322] ListCorrelate and functions on it with an extra
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Sun, 9 Mar 2008 05:01:59 -0500 (EST)

```p[p[a1_, b1_], p[a2_, b2_]] :=
a1 == b1 && (a2 == b2 || Length[a2] < Length[b2])

Bob Hanlon

---- P_ter <peter_van_summeren at yahoo.co.uk> wrote:
> Hello,
> I have a question about the function p in the following:
> ListCorrelate[{{1, 1}, {1, 1}}, {{a1, b1, c1, d1}, {a2, b2, c2,d2}}, {1, -1}, {}, Times, p]
> The outcome is:
> {{p[p[a1, b1], p[a2, b2]], p[p[b1, c1], p[b2, c2]],p[p[c1, d1], p[c2, d2]]}}
> I have the following problem with p[p[a1, b1], p[a2, b2]].
> If a1!=b1 then the "outer"p should give False,
> if a1==b1 and a2==b2 then the outer p should give True,
> if a1==b1 and a2!=b2 but Length[a2] < Length[b2], the outer p should give True,
> for the rest the outer p should give False.
> Any idea?
> with friendly greetings,
> P_ter
>

```

• Prev by Date: Re: exclusions
• Next by Date: Re: Re: Assignment problem
• Previous by thread: Re: Create pdf document from graphics
• Next by thread: Determinant and Characteristic Polynomial not working properly