Re: connected?
Jon <[email protected]>
| Newsgroups | gmane.org.ballistichelmet.lambda |
|---|---|
| Message-ID | <[email protected]> |
dvanhorn wrote:
> dvanhorn wrote:
>
>>David Van Horn wrote:
>>
>>>Aaron S. Hawley wrote:
>>>
>>>>start at some arbitrary element in S.
>>>>find it's connected set and "color" (mark as visited) each.
>>>>iterate through all elements in S verifying that they are present in the
>>>>connected set ("colored").
>>>
>>>This sounds right too. You visit each element and accumulate the set of
>>>elements it immediately touches. If s is connected, you'll generate the same
>>>set s by visiting all elements in s.
>>
>>Nope, that ain't right. Consider (connected? '((1 1) (1 2) (7 8) (8 8)))
>>
>>You color them all, but they are not connected. Mine gets this right. Who
>>would've thought set theory is your friend?
>
>
> Sorry, I think you have it right originally, it's only my interpretation that
> was wrong. You generate the set connected to an arbitrary element by any
> number of touching elements and compare that to the original set. This is
> exactly what I do.
>
yeah, that was what i was going to say.
ha. interesting none-the-less.
is this in relation to the checkers contest this past weekend?