Re: How is this collection called?
Date: Tue, 30 Mar 2004 20:59:46 -0500
Message-ID: <406A2612.40402_at_hamilton.edu>
Mikito Harakiri wrote:
> Let '*' be binary aggregation operator.
>
> Then, sets obey the following laws:
>
> a*a=a
> a*b=b*a
> a*(b*c)=(a*b)*c
>
> Bags:
>
> a*a!=a
> a*b=b*a
> a*(b*c)=(a*b)*c
>
> Lists:
>
> a*a!=a
> a*b!=b*a
> a*(b*c)=(a*b)*c
>
> What collection type meets
>
> a*a!=a
> a*b!=b*a
> a*(b*c)!=(a*b)*c
>
You've already seen some examples. The problem is a
Just noodling around when I should be working,
Rick
p.s. One could modify Michael's example and have the collection type be binary search trees and let a * b be delete (somehow) the elements of a and insert them into b.
p.p.s. Is it obvious that I'm teaching data structures this term?
p^4.s. I gotta stop this and start grading. Received on Wed Mar 31 2004 - 03:59:46 CEST