Re: discuss dancing links
- From: chenyan2002@xxxxxxxxx (chenyan)
- Date: 26 Apr 2005 10:31:04 -0700
"gcrhoads@xxxxxxxxx" <gcrhoads@xxxxxxxxx> wrote in message news:
>
> The point of the technique is that you can back up to previous
> states without having to make independent copies of all the
> intermediate states. In your program with the adjacency list
> representation, are you able to easily (i.e. without searching
> through the adjacency lists) able to back up to previous states
> of your graph without making independent copies of each successive
> graph? If so, then there is no reason to go to the doubly-linked
> list method described in Knuth's "dancing links" paper. In such
> a case, the singly-linked adjacency list method is likely to be
> faster because the doubly-linked list has twice as many links to
> set and reset.
I think the advantage of this technique is we don't have to check
whether a node is valid or not. When choosing a node we can delete all
the adjacent nodes so that we can sure all the remaining nodes are
valid. While in adjacency lists deleting a node and then add it when
backtracing can be time-consuming. So in my program, I delete adjacent
nodes in dancing links while checking whether a node is valid in
adjacency list representation. I don't know whether saving the
checking time compensates for the waste of maintaining the
doubly-linked list. Can it be efficient in some graphs with special
structure?
.
- Follow-Ups:
- Re: discuss dancing links
- From: gcrhoads@xxxxxxxxx
- Re: discuss dancing links
- References:
- Re: discuss dancing links
- From: gcrhoads@xxxxxxxxx
- Re: discuss dancing links
- Prev by Date: optimized string storage for phrases/dictionary
- Next by Date: Re: optimized string storage for phrases/dictionary
- Previous by thread: Re: discuss dancing links
- Next by thread: Re: discuss dancing links
- Index(es):
Relevant Pages
|