Newsgroups: comp.lang.scheme
From: George Caswell <tetsu...@maine.rr.com>
Date: Fri, 11 Jan 2002 08:57:39 GMT
Local: Fri, Jan 11 2002 3:57 am
Subject: Re: Subsets of a list
On 10 Jan 2002, Max Hailperin wrote:
> George Caswell <tetsu...@maine.rr.com> wrote in message <news:Pine.LNX.3.96.1020110005414.7936B-100000@adamant.homeworlds.net>... Hrm, I guess you're right, though I wouldn't have thought so. My brain's > ... > [tree-recursive procedure to find subsets of size n from a list, l] > > The basic problem here is that certain subsets are being calculated more > > than once: ...[comparison with tree-recursive fib]... > Actually, there is no big efficiency gain to be had in this case, having a little difficulty with why that's the case. Anyway, my implementation, "subs" uses up a lot of heap space compared to, (define (expand xs sets) (define (subs xs n) Sorry if I spread a bunch of misinformation with that tree-recursion ---GEC 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.
| ||||||||||||||