MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Any One have an idea?

  • To: mathgroup at
  • Subject: [mg87821] Re: [mg87786] Re: Any One have an idea?
  • From: Murray Eisenberg <murray at>
  • Date: Fri, 18 Apr 2008 02:38:12 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <>
  • Reply-to: murray at

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>
> 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
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

  • Prev by Date: Re: heat equation through different media/problem with constant flux
  • Next by Date: Re: List concatenation - two more methods, one truly fast
  • Previous by thread: Re: Any One have an idea?
  • Next by thread: Malformed Fractions in a PDF file