## GraphTheory: creating a minimum spanning tree star...

Asked by:

Suppose,  there are

• 50 vertices

• list of coordinates of these 50 vertices

Now I want to create a graph with minimum distance.

The starting point of the graph should be vertice 1. From there,  the closest point has to be added to a list X. and from this point, it should calculate again the closest point and add this value to the same list X.

So actually I want to start in point 1 and I want to see the sequence of how the graph (I think minimum spanning tree?) is created

How can I code this in Maple?

Thanks in advance!

Adam,

## How do I generate all non-isomorphic trees of orde...

Asked by:

I could keep on using the commands

with(GraphTheory):

with(RandomGraphs):

DrawGraph(RandomTree(7))

but then this is not helpful because I do not get non-isomorphic graph each time and there are repetitions. So any other suggestions would be very helpful.

## How to color a copy of a Graph without altering th...

Asked by:

Hi,

This question concerns the package GraphTheory
( Maple 2015 on a Windows 7 PC )

Let G1 be some graph and V a list of vertices in G1
The default colors DrawGraph uses for the vertices is yellow

I define the graph G2 this way :
G2 := copy(G1):
HighlightVertex(G2, V, red);
DrawGraph(G2);
Obviously the result is a graph where vertices in V are red while the remaining ones are still yellow

Question 1 :  Why does the command DrawGraph(G1) returns exactly the same picture ?
I have thought that defining G2 as a copy of G1 would have preserved the default colouring of the vertices.
Note that the same undesired (at least for me) thing occurs with the  HighlightEdges command.

Question 2 : Is it possible to retrieve the original colouring of G1 without using HighlightVertex(G1, V, yellow)  ?

Thank you in advance

## Is it possible to give an edge of a graph an infin...

Asked by:

Hi everybody,

Only weights of type "numeric" can be used in a weighted graph (package GraphTheory) .
Is it possible to bypass this limitation and affect an infinite weight to an edge ?
If not possible, does it exist some "highest numeric value" in Maple I could use instead ?
(the trick of a very high value doesn't suit me)

Subsidiary question : is it possible to change the printing format for those weights ?
For instance   GraphTheory:-SetEdgeWeight(MyGraph, MyEdge, 123.4) plots the value 123 on edfe MyEdge

Thanks in advance

## Vertex Weight graph theory...

Asked by:

how to define VertexWeight in Graph Theory package

## Search for an explanation about CycleBasis...

Asked by:

Could someone please explain to me why the procedure GraphTheory:-CycleBasis requires that the vertices of a graph be integers for it to work correctly ?
(while the definition of a graph supports other types of vertex names)

restart:
with(GraphTheory):

#------------------------------------------------------- test 1

g1 := Graph({{"a", 1}, {1, 3}, {"a", 3}});
DrawGraph(g1);
CycleBasis(g1);

Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: "a" < 1

#------------------------------------------------------- test 2

g2 := Graph({{a, 1}, {1, 3}, {a, 3}});
CycleBasis(g2);

Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: a < 1

#------------------------------------------------------- test 3

g3 := Graph({{4, 1}, {1, 3}, {4, 3}});
CycleBasis(g3);

[[1, 3, 4]]

Knowing this limitation I usually rename to integers the vertices of the graphs, next do some operations, and next go back to the original names.

Thanks for any explanation.

## How to simulate random walks on graphs?...

Asked by:

This week I am participating in 19th Ising lectures (see https://drive.google.com/folderview?id=0B0uPwoK-03XgSEZpYWljYnpXN0U&usp=sharing). The Serguei Nechaev's talk inspired me to ask the question:
"How to simulate a random walk on an undirected and unweighted (and, of course, connected) graph
(All the paths from a vertex of degree k have the same probability 1/k.)?"
A Maple procedure to this end is welcome.

## Approximate solution of Traveling Salesman Problem...

Asked by:

I am looking for a quick implementation in Maple to approximate a solution to the travelling salesman problem in a graph of several thousand vertices randomly placed in the unit square. I've tried TravelingSaleman in the GraphTheory package; it bogs down with just a handful (say, twelve) of vertices. I also tried Bruno Buerrier's implementation of the two-opt algorithm; on my machine that took more than a day for 2048 vertices.

Is anyone aware of a quicker implementation in Maple?

## Konigsberg Graph?...

Asked by:

Hello I'm having trouble create Konigsberg Graph on Maple. Here's the picture. Sorry if it's not clear enough. Thanks!

https://www.google.co.id/url?sa=i&source=images&cd=&ved=&url=https%3A%2F%2Fmvngu.wordpress.com%2F2011%2F03%2F26%2Fsimple-graphs-bridges-of-konigsberg-and-directed-graphs%2F&psig=AFQjCNFP-tdRTqi-VapOJZ-TLPdA1ndSgQ&ust=1456326114883065&rct=j

## Novice Attempt in Graph Theory...

Asked by:

I do not know! I am a novice in maple as well as in graph theory. I attach a doc in which i attempted to learn what is network. It seems alright with maple as it gives as what it understands as horizontal and vertical network. I do not expect a horizontal line as horizontal network and vertical line as vertical network, in which case a horizontal line with nodes 1 and 2 will be vertical network if  draw it vertically. The maple, in my opinion ( i am not a maple man) gives the answer in a vertical pattern, rightly so for clarity and space constraint.

I am sorry if i am confusing.  The document in my attempt to know more may give you also more insight. Thanks.

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >

## DrawNetwork horizontal option...

Asked by:

In Maple 2015, the DrawNetwork command option "horizontal" does not seem to work. Is this a bug? It doesn't even display horizontally on the online Maple Help webpage. Any help would be appreciated.

## Reading a procedure twice...

Asked by:

In the below file, I have tried to create tree using Graphtheory and export it to file. But exporting works only if I read the procedure twice and that too after running the procedure.

test.mw

testproc.txt

## How to make box shaped nodes to circle shaped in G...

Asked by:

I found some codes for drawing my Graph in Maple:

[>  with(GraphTheory);

W := Graph(undirected, {{0, 1}, {0, 2}, {0, 3}}):

HighlightEdges(W, W, black):

HighlightVertex(W, [1, 2, 3, 0], gray):

DrawGraph( W);

The way that the graph was plotted was not what I wanted to have. In fact, I expected to have something like this one:

http://i.stack.imgur.com/JMfmd.png

I mean the vertexes are shaped by circles not by boxs. Moreover, one may want to see labels below (or above) the circled nodes. My question is

" Is there any certain codes we can use to have this graph like the picture above? Can we manage the labels to be appeared near the nodes in Maple?

Thanks for your time!

## How to find nonisomorphic graphs?...

Asked by:

How to find all nonisomorphic undirected graphs with 5 vertexes? Of course, with Maple.

## do graph have invariant for invariant of cayley gr...

Asked by:

do graph have invariant for invariant of cayley graph

 1 2 Page 1 of 2
﻿