Re: Re: Any One have an idea?
- To: mathgroup at smc.vnet.net
- Subject: [mg87821] Re: [mg87786] Re: Any One have an idea?
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Fri, 18 Apr 2008 02:38:12 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200804170233.WAA21108@smc.vnet.net>
- Reply-to: murray at math.umass.edu
It's nicer to replace that ShowGraph expression by the following expression, which shows the tour evolving in time: AnimateGraph[g, path, HighlightedEdgeColors -> Red] (By the way, Mathematica will seem to complain about the option HighlightedEdgeColors -> Red there by highlighting it in red, as if it were a syntax error. But of course it's not. Evidently it's a SyntaxInformation oversight.) Dana DeLouis wrote: >> Does anyone have any idea how to do or come up with the "knight's tour" > problem. > > (* Ver 6.01 *) > Needs["Combinatorica`"] > > g = KnightsTourGraph[8, 8]; > path = Partition[HamiltonianCycle[g], 2, 1]; > > ShowGraph[Highlight[g, {path}, HighlightedEdgeColors -> Red]] > > ----- Original Message ----- > > From: "AnnaSJ" <anna_112006 at yahoo.com> > Newsgroups: comp.soft-sys.math.mathematica > Sent: Monday, April 14, 2008 5:39 AM > Subject: [mg87786] Any One have an idea? >> >> Does anyone have any idea how to do or come up with the "knight's tour" > problem. Please give me some idea how to do it! >> The program is used a random number to select a starting position for the > knight, and select the next position by selecting one of the available > positions at random. When the knight reaches a position from which the > number of the last possible available positions, the tour is finished. -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- Re: Any One have an idea?
- From: "Dana DeLouis" <dana.del@gmail.com>
- Re: Any One have an idea?