MaplePrimes - Questions and Posts tagged with graphtheory
http://www.mapleprimes.com/tags/graphtheory
en-us2017 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemWed, 26 Apr 2017 02:00:15 GMTWed, 26 Apr 2017 02:00:15 GMTThe most recent questions and posts on MaplePrimes tagged with graphtheoryhttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Questions and Posts tagged with graphtheory
http://www.mapleprimes.com/tags/graphtheory
How do I generate all non-isomorphic trees of order 7 in Maple?
http://www.mapleprimes.com/questions/221720-How-Do-I-Generate-All-Nonisomorphic?ref=Feed:MaplePrimes:Tagged With graphtheory
<p>I could keep on using the commands </p>
<p><strong>with(GraphTheory):</strong></p>
<p><strong>with(RandomGraphs):</strong></p>
<p><strong>DrawGraph(RandomTree(7))</strong></p>
<p>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. </p>
<p>I could keep on using the commands </p>
<p><strong>with(GraphTheory):</strong></p>
<p><strong>with(RandomGraphs):</strong></p>
<p><strong>DrawGraph(RandomTree(7))</strong></p>
<p>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. </p>
221720Tue, 18 Apr 2017 19:52:50 Zshrey183shrey183How to color a copy of a Graph without altering the color of this Graph ?
http://www.mapleprimes.com/questions/221471-How-To-Color-A-Copy-Of-A-Graph-Without?ref=Feed:MaplePrimes:Tagged With graphtheory
<p>Hi,<br>
<br>
This question concerns the package <strong>GraphTheory</strong><br>
( Maple 2015 on a Windows 7 PC )<br>
<br>
Let G1 be some graph and V a list of vertices in G1<br>
The default colors DrawGraph uses for the vertices is yellow<br>
<br>
I define the graph G2 this way :<br>
G2 :=<strong> copy</strong>(G1):<br>
HighlightVertex(G2, V, red);<br>
DrawGraph(G2);<br>
Obviously the result is a graph where vertices in V are red while the remaining ones are still yellow<br>
<br>
<strong>Question 1</strong> : Why does the command DrawGraph(G1) returns exactly the same picture ?<br>
I have thought that defining G2 as a <strong>copy</strong> of G1 would have preserved the default colouring of the vertices.<br>
<span style="color: rgb(0, 0, 255);">Note that the same undesired (at least for me) thing occurs with the HighlightEdges command.</span><br>
<br>
<strong>Question 2</strong> : Is it possible to retrieve the original colouring of G1 without using HighlightVertex(G1, V, yellow) ?<br>
<br>
Thank you in advance</p>
<p>Hi,<br>
<br>
This question concerns the package <strong>GraphTheory</strong><br>
( Maple 2015 on a Windows 7 PC )<br>
<br>
Let G1 be some graph and V a list of vertices in G1<br>
The default colors DrawGraph uses for the vertices is yellow<br>
<br>
I define the graph G2 this way :<br>
G2 :=<strong> copy</strong>(G1):<br>
HighlightVertex(G2, V, red);<br>
DrawGraph(G2);<br>
Obviously the result is a graph where vertices in V are red while the remaining ones are still yellow<br>
<br>
<strong>Question 1</strong> : Why does the command DrawGraph(G1) returns exactly the same picture ?<br>
I have thought that defining G2 as a <strong>copy</strong> of G1 would have preserved the default colouring of the vertices.<br>
<span style="color: rgb(0, 0, 255);">Note that the same undesired (at least for me) thing occurs with the HighlightEdges command.</span><br>
<br>
<strong>Question 2</strong> : Is it possible to retrieve the original colouring of G1 without using HighlightVertex(G1, V, yellow) ?<br>
<br>
Thank you in advance</p>
221471Fri, 17 Mar 2017 10:32:41 Zsand15sand15Is it possible to give an edge of a graph an infinite weight ?
http://www.mapleprimes.com/questions/221320-Is-It-Possible-To-Give-An-Edge-Of-A?ref=Feed:MaplePrimes:Tagged With graphtheory
<p>Hi everybody, <br>
<br>
Only weights of type "numeric" can be used in a weighted graph (package GraphTheory) .<br>
Is it possible to bypass this limitation and affect an infinite weight to an edge ?<br>
If not possible, does it exist some "highest numeric value" in Maple I could use instead ?<br>
(the trick of a very high value doesn't suit me)<br>
<br>
Subsidiary question : is it possible to change the printing format for those weights ?<br>
For instance GraphTheory:-SetEdgeWeight(MyGraph, MyEdge, 123.4) plots the value 123 on edfe MyEdge<br>
<br>
Thanks in advance</p>
<p>Hi everybody, <br />
<br />
Only weights of type "numeric" can be used in a weighted graph (package GraphTheory) .<br />
Is it possible to bypass this limitation and affect an infinite weight to an edge ?<br />
If not possible, does it exist some "highest numeric value" in Maple I could use instead ?<br />
(the trick of a very high value doesn't suit me)<br />
<br />
Subsidiary question : is it possible to change the printing format for those weights ?<br />
For instance GraphTheory:-SetEdgeWeight(MyGraph, MyEdge, 123.4) plots the value 123 on edfe MyEdge<br />
<br />
Thanks in advance</p>
221320Wed, 01 Mar 2017 06:59:50 Zsand15sand15Vertex Weight graph theory
http://www.mapleprimes.com/questions/221211-Vertex-Weight-Graph-Theory?ref=Feed:MaplePrimes:Tagged With graphtheory
<p>how to define VertexWeight in Graph Theory package</p>
<p>how to define VertexWeight in Graph Theory package</p>
221211Thu, 16 Feb 2017 15:33:21 ZhakanhakanSearch for an explanation about CycleBasis
http://www.mapleprimes.com/questions/216126-Search-For-An-Explanation-About-CycleBasis?ref=Feed:MaplePrimes:Tagged With graphtheory
<p>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 ?<br>(while the definition of a graph supports other types of vertex names)<br><br><br>restart:<br>with(GraphTheory):<br><br>#------------------------------------------------------- test 1<br><br>g1 := Graph({{"a", 1}, {1, 3}, {"a", 3}});<br>DrawGraph(g1);<br>CycleBasis(g1);</p>
<p>Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: "a" < 1<br><br></p>
<p>#------------------------------------------------------- test 2<br><br>g2 := Graph({{a, 1}, {1, 3}, {a, 3}});<br>CycleBasis(g2);</p>
<p>Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: a < 1</p>
<p> </p>
<p><strong>#------------------------------------------------------- test 3</strong><br><br><strong>g3 := Graph({{4, 1}, {1, 3}, {4, 3}});</strong><br><strong>CycleBasis(g3);</strong></p>
<p><strong>[[1, 3, 4]]</strong></p>
<p> <br><em>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.</em><br><br><br>Thanks for any explanation.</p><p>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 ?<br>(while the definition of a graph supports other types of vertex names)<br><br><br>restart:<br>with(GraphTheory):<br><br>#------------------------------------------------------- test 1<br><br>g1 := Graph({{"a", 1}, {1, 3}, {"a", 3}});<br>DrawGraph(g1);<br>CycleBasis(g1);</p>
<p>Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: "a" < 1<br><br></p>
<p>#------------------------------------------------------- test 2<br><br>g2 := Graph({{a, 1}, {1, 3}, {a, 3}});<br>CycleBasis(g2);</p>
<p>Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: a < 1</p>
<p> </p>
<p><strong>#------------------------------------------------------- test 3</strong><br><br><strong>g3 := Graph({{4, 1}, {1, 3}, {4, 3}});</strong><br><strong>CycleBasis(g3);</strong></p>
<p><strong>[[1, 3, 4]]</strong></p>
<p> <br><em>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.</em><br><br><br>Thanks for any explanation.</p>216126Wed, 17 Aug 2016 08:14:47 ZmmcdarammcdaraHow to export undirected graph to C#?
http://www.mapleprimes.com/questions/212765-How-To-Export-Undirected-Graph-To-C?ref=Feed:MaplePrimes:Tagged With graphtheory
<p>Hi all,</p>
<p>I drew a undirected graph using Maple</p>
<p>restart;<br>with(GraphTheory);<br>with(SpecialGraphs);<br>with(RandomGraphs);<br>G := Graph(undirected, {[{1, 2}, 4], {1, 4}, {2, 3}, {2, 5}, {3, 4}});<br>DrawGraph(G, style = circle);<br><br></p>
<p>I want to import this graph to picturebox or panel on C#, please help me!</p><p>Hi all,</p>
<p>I drew a undirected graph using Maple</p>
<p>restart;<br>with(GraphTheory);<br>with(SpecialGraphs);<br>with(RandomGraphs);<br>G := Graph(undirected, {[{1, 2}, 4], {1, 4}, {2, 3}, {2, 5}, {3, 4}});<br>DrawGraph(G, style = circle);<br><br></p>
<p>I want to import this graph to picturebox or panel on C#, please help me!</p>212765Thu, 26 May 2016 11:01:10 Zlongqnhlongqnh