Also available:

## TravelingSalesman - speed...

How is it possible that  GraphTheory:-TravelingSalesman
is much slower than a simple brute-force solution?

 > restart;
 > n:=10:
 > A:=Matrix(n, (i,j)->`if`(i=j,0,n*(n-i)^4+2*j+(n-i)^2+j^3)):A[1,2]:=100*n^3:A;
 (1)
 > with(GraphTheory):
 > G:=Graph(A);
 (2)
 > t:=time[real](): TravelingSalesman(G); 'time'=time[real]()-t;
 (3)
 > ############### brute-force #############
 > t:=time[real](): P:=Iterator:-Permute([seq(2..n)]): cmin:=infinity: ord:=<"none">: for  v in P do   f:=add(A[v[k],v[k+1]],k=1..n-2) + A[1,v[1]]+A[v[n-1],1];   if f
 (4)
 > # And for n=11 I had to interrupt TravelingSalesman; # brute-force still works for n=12.

## Iterator[CartesianProduct], option rank...

It seems to be a bug here:

restart;
with(Iterator):
M := CartesianProduct([1,2],[a,b],[c,d,e], rank=3):
n:=0:  for v in M do n:=n+1: print(n,v); end do:

1, [2   b   c]
2, [2   b   d]
Error, (in unknown) improper op or subscript selector

# for rank=9  ==>  [list, b, e]     ??

## Finding the Catenary...

Hi,

I posted a problem the other day to do with this specific problem and the issues got sorted out:)

The aim of the program is to find the catenary by iteration...

It's majorly diverging though and i'm not sure why.

Any ideas?

Thanks,

Rach

## Iterative scheme to get the catenary...

Hi everyone,

I recently posted about a problem I had with an iterative scheme in 2 dimensions.. someone answered that and it worked perfectly:)

I've now moved on to a slightly more complicated version. It's in 3d but only the r and z values will be used in the iteration (trying to get the catenary)

so it's not as hard as the main problem that I'm building towards.

Basically, I'm having trouble converting the points to polar coordinates and assigning them each a [j...

## Repeating an iteration process...

Hey,

I know this might seem a bit trivial but I'm trying to get Maple to use iteration to get the shortest path between two points given initial conditions that aren't a straight line. (I'm learning how to do it in the simplest form before moving on to a 3D problem.)

So I have a initial set of points that are to be moved during the process and split them into their x and y components so there's a set of x[j]'s and y[j]s.Then I defined a couple of procedures to use in the iteration.

## Iterative method in 3 dimensions...

Hi Everyone:)

I'm doing a mini project at the moment and I'm pretty stuck with how to go about something on Maple...

My aim is to get the catenoid from an initial cylinder by use of an iterative method.

To find the minimal surface r=g(θ,z) - the catenoid - I want to minimise the Dirichlet integral (in cylindrical polar coordinates)

## Iterator update available

by:

The latest version of the Iterator package is now available at the Maplesoft Application Center.  It provides a new export, MultiPartition, extensions to existing exports, and options to most exports for transforming the output to a more desirable form. The help pages have been improved, with some hopefully interesting examples.  Here is one, showing how it can be used to write a procedure for solving a generalized ...

## Maple Iterators

by:

Maple 16 introduces the ?ModuleIterator method, which can be assigned in a module so that it can be used  in a for-loop, or in the seq, add, and mul procedures.

ModuleIterator should return two procedures.  The first (referred to as hasNext) is a predicate that returns true if the iterator is not finished.  The second (referred to as ...

 Page 1 of 1
﻿