MaplePrimes - Newest Posts
http://www.mapleprimes.com/posts
en-us2021 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemSun, 11 Apr 2021 18:27:12 GMTSun, 11 Apr 2021 18:27:12 GMTThe latest posts added to MaplePrimeshttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Newest Posts
http://www.mapleprimes.com/posts
Buy Bitcoin Instantly
https://www.mapleprimes.com/posts/214549-Buy-Bitcoin-Instantly?ref=Feed:MaplePrimes:New Posts
<p><strong>Website :</strong> <a href="https://buybitcoinswithcreditcard.info/">https://buybitcoinswithcreditcard.info/</a></p>
<p><strong>Address :</strong> 6701 Center Dr W, Los Angeles, CA 90045</p>
<p><strong>Phone :</strong> +1 888-223-5676</p>
<p>How to buy bitcoins with a credit card, debit card or PayPal? How to buy Altcoins with a credit card? And how to buy bitcoins instantly with a credit card without registration? These are just a few of the questions most asked when considering the future of digital currencies like those used in Paypes.<br>
Many people are not sure of how these digital currencies work, what the advantages are and whether they will succeed or fail.</p>
<p><strong>Website :</strong> <a href="https://buybitcoinswithcreditcard.info/">https://buybitcoinswithcreditcard.info/</a></p>
<p><strong>Address :</strong> 6701 Center Dr W, Los Angeles, CA 90045</p>
<p><strong>Phone :</strong> +1 888-223-5676</p>
<p>How to buy bitcoins with a credit card, debit card or PayPal? How to buy Altcoins with a credit card? And how to buy bitcoins instantly with a credit card without registration? These are just a few of the questions most asked when considering the future of digital currencies like those used in Paypes.<br>
Many people are not sure of how these digital currencies work, what the advantages are and whether they will succeed or fail.</p>
214549Sun, 11 Apr 2021 17:51:40 ZbuybitcoininstantlybuybitcoininstantlyFree books and software for Maple
https://www.mapleprimes.com/posts/214524-Free-Books-And-Software-For-Maple?ref=Feed:MaplePrimes:New Posts
<p><strong>The <a href="https://sites.google.com/view/aladjevbookssoft/home">https://sites.google.com/view/aladjevbookssoft/home</a> site contains free books in English and Russian along with software created under the guidance of the main author prof. V. Aladjev in such areas as general theory of statistics, theory of cellular automata, programming in Maple and Mathematica systems. Each book is archived, including its cover and book block in pdf format. The software with freeware license is designed for Maple and Mathematica.</strong></p>
<p><strong>The <a href="https://sites.google.com/view/aladjevbookssoft/home">https://sites.google.com/view/aladjevbookssoft/home</a> site contains free books in English and Russian along with software created under the guidance of the main author prof. V. Aladjev in such areas as general theory of statistics, theory of cellular automata, programming in Maple and Mathematica systems. Each book is archived, including its cover and book block in pdf format. The software with freeware license is designed for Maple and Mathematica.</strong></p>
214524Thu, 08 Apr 2021 04:39:55 ZVlad4247Vlad4247Formulas for the MRB Constant
https://www.mapleprimes.com/posts/214522-Formulas-For-The-MRB-Constant?ref=Feed:MaplePrimes:New Posts
<p><strong>C</strong><sub><em>MRB</em></sub> is defined below. See <a href="http://mathworld.wolfram.com/MRBConstant.html">http://mathworld.wolfram.com/MRBConstant.html</a>.</p>
<p>Starting by using Maple on the <a href="http://wayback.cecm.sfu.ca/projects/ISC/ISCmain.html">Inverse Symbolic Calculato</a>r, with over 21 years of research and ideas from users like you, I developed this shortlist of formulas for the MRB constant.</p>
<ul>
<li><strong>C</strong><sub><em>MRB=</em></sub> <img alt="eta equals" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=10514Capture5.JPG&userId=366611"> <img alt="enter image description here" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=47625a.JPG&userId=366611"></li>
</ul>
<p>That is proven below by an internet scholar going by the moniker "Dark Malthorp:"</p>
<p><img alt="Dark Marthorp's proof" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=6657Capture12.JPG&userId=366611"></p>
<p> </p>
<ul>
<li><img alt="eta sums" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=2081Capture14.JPG&userId=366611"> denoting the kth derivative of the Dirichlet eta function of k and 0 respectively was first discovered in 2012 by Richard Crandall of Apple Computer.</li>
</ul>
<p>The left half is proven below by Gottfried Helms and it is proven more rigorously considering the conditionally convergent sum,<img alt="enter image description here" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=3959Capture7.JPG&userId=366611"> below that. Then the right half is a Taylor expansion of η(s) around s = 0.</p>
<blockquote>
<p><img alt="n^(1/n)-1" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=10297Capture.JPG&userId=366611"></p>
</blockquote>
<p>At <a href="https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal">https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal</a>,</p>
<p>it has been noted that "even though one has cause to be a little bit wary around formal rearrangements of conditionally convergent sums (see the <a href="https://en.wikipedia.org/wiki/Riemann_series_theorem">Riemann series theorem</a>), it's not very difficult to validate the formal manipulation of Helms. The idea is to cordon off a big chunk of the infinite double summation (all the terms from the second column on) that we know is absolutely convergent, which we are then free to rearrange with impunity. (Most relevantly for our purposes here, see pages 80-85 of this <a href="https://www.math.ucdavis.edu/~hunter/intro_analysis_pdf/ch4.pdf">document</a>, culminating with the Fubini theorem which is essentially the manipulation Helms is using.)"</p>
<blockquote>
<p><img alt="argrument 1" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=7211Capture.JPG&userId=366611"> <img alt="argrument 2" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=10837Capture.JPG&userId=366611"></p>
</blockquote>
<p><strong>C</strong><sub><em>MRB</em></sub> is defined below. See <a href="http://mathworld.wolfram.com/MRBConstant.html">http://mathworld.wolfram.com/MRBConstant.html</a>.</p>
<p>Starting by using Maple on the <a href="http://wayback.cecm.sfu.ca/projects/ISC/ISCmain.html">Inverse Symbolic Calculato</a>r, with over 21 years of research and ideas from users like you, I developed this shortlist of formulas for the MRB constant.</p>
<ul>
<li><strong>C</strong><sub><em>MRB=</em></sub> <img alt="eta equals" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=10514Capture5.JPG&userId=366611"> <img alt="enter image description here" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=47625a.JPG&userId=366611"></li>
</ul>
<p>That is proven below by an internet scholar going by the moniker "Dark Malthorp:"</p>
<p><img alt="Dark Marthorp's proof" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=6657Capture12.JPG&userId=366611"></p>
<p> </p>
<ul>
<li><img alt="eta sums" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=2081Capture14.JPG&userId=366611"> denoting the kth derivative of the Dirichlet eta function of k and 0 respectively was first discovered in 2012 by Richard Crandall of Apple Computer.</li>
</ul>
<p>The left half is proven below by Gottfried Helms and it is proven more rigorously considering the conditionally convergent sum,<img alt="enter image description here" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=3959Capture7.JPG&userId=366611"> below that. Then the right half is a Taylor expansion of η(s) around s = 0.</p>
<blockquote>
<p><img alt="n^(1/n)-1" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=10297Capture.JPG&userId=366611"></p>
</blockquote>
<p>At <a href="https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal">https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal</a>,</p>
<p>it has been noted that "even though one has cause to be a little bit wary around formal rearrangements of conditionally convergent sums (see the <a href="https://en.wikipedia.org/wiki/Riemann_series_theorem">Riemann series theorem</a>), it's not very difficult to validate the formal manipulation of Helms. The idea is to cordon off a big chunk of the infinite double summation (all the terms from the second column on) that we know is absolutely convergent, which we are then free to rearrange with impunity. (Most relevantly for our purposes here, see pages 80-85 of this <a href="https://www.math.ucdavis.edu/~hunter/intro_analysis_pdf/ch4.pdf">document</a>, culminating with the Fubini theorem which is essentially the manipulation Helms is using.)"</p>
<blockquote>
<p><img alt="argrument 1" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=7211Capture.JPG&userId=366611"> <img alt="argrument 2" src="https://community.wolfram.com//c/portal/getImageAttachment?filename=10837Capture.JPG&userId=366611"></p>
</blockquote>
<hr>
<hr>
<hr>214522Thu, 08 Apr 2021 01:12:31 ZMarvin Ray BurnsMarvin Ray BurnsAnnouncing Maple Flow
https://www.mapleprimes.com/maplesoftblog/214395-Announcing-Maple-Flow?ref=Feed:MaplePrimes:New Posts
<p><img src="/view.aspx?sf=214395_post/LaunchBlogPost_Header.jpg"></p>
<p>I’m excited to announce the launch of a new math tool called Maple Flow. Here, I’ll outline our motivation for developing this product, and talk about its features.</p>
<p>A large fraction of Maple users are professional engineers .</p>
<p>All use Maple, but very few say that they do math for a living, in much the same way a plumber wouldn’t say they use a wrench for a living.</p>
<p>They say things like:</p>
<ul>
<li>I design concrete retaining walls</li>
<li>I simulate the transients on a transmission line</li>
<li>I design heat exchangers</li>
<li>I model the absorbency of diapers</li>
<li>I design subsea pipelines</li>
<li>I need to optimize the trajectory of a space shuttle</li>
<li>I work for a power generation company doing load flow analysis</li>
<li>I model how a robot arm needs to move</li>
</ul>
<p>Some of these applications are mathematically simple (but are based on scientific principles, such as the conservation of heat, mass and momentum). The equations consist of basic arithmetic operations, trig and log functions, sprinkled with the occasional numeric integration.</p>
<p style="text-align: center;"><img src="/view.aspx?sf=214395_post/Lifting_lug.png"></p>
<p>Sometimes, the equations are already formalized in design guides, published by organizations like the IEEE, ASME or ISO. Given the specific physical context, engineers just need to implement the calculations in the right order (this is especially true for Civil and Structural engineering). These applications require you to think at an <em>engineering</em> level.</p>
<p>These are what we call <em>design calculations</em>, done by <em>design engineers</em>.</p>
<p>On the other end of the spectrum, some of these applications are mathematically complex. You might need to derive equations, manipulate PDEs, work with quaternions or transformation matrices, or do some programming. These applications require you to think at a <em>mathematical</em> level.</p>
<p>Let’s call the engineers doing this type of work <em>research engineers</em>. Research engineers are often more closely aligned with mathematicians than design engineers.</p>
<p>So we have design engineers and research engineers (and of course we have engineers with feet in both camps, to a varying degree).</p>
<p>Research engineers and design engineers do different mathematical things, and have different mathematical needs. Both groups use Maple, but one size doesn’t always fit well. Either the toe pinches a little, or the shirt is a mite too baggy.</p>
<p>This is where Maple Flow enters stage right.</p>
<p>Maple Flow is a new tool that we’ve built (and are continuing to expand and improve) with the needs of design engineers in mind.</p>
<ul>
<li>The worksheet lets you put math anywhere – just point, click and type</li>
<li>The evaluation model is forward-in-space (unlike Maple’s forward in time evaluation model). This means the execution order is explicitly given by the position of the math on the canvas.</li>
<li>The worksheet updates automatically, so results are never stale</li>
<li>We’ve made several simplifications to massage away some of the complexity of the Maple programming language.</li>
<li>You can use nearly all of tools in the Maple programming language.</li>
</ul>
<p>Here’s how we see people using Maple Flow. They</p>
<ul>
<li>Enter a few major equations somewhere, followed by some parameters scattered around</li>
<li>Make the equations “see” the parameters by moving the parameters above the equations</li>
<li>Insert any parameters or equations you’ve forgotten, and move them into position, shifting the existing content out of the way to make room</li>
<li>Add text, and perhaps an image or plot</li>
<li>Finally, align math and format text for a presentable document</li>
</ul>
<p>I’ve been using Maple Flow for a while now. I like the fact that the nature of Maple Flow means that you don’t have to start with a grand plan, with every computational detail planned out in advance. You’re encouraged to make things up as you go along, and gradually sculpt your calculations into shape.</p>
<p>Basically, Maple Flow doesn’t issue stiff penalties for making mistakes. You fix them, and then move on.</p>
<p>I also like that Maple Flow makes you feel like you’re “touching” your equations, shifting things about easily with either the mouse or the keyboard. There’s a certain <em>tactility</em> and <em>immediacy</em> to Maple Flow that gives me a micro dose of dopamine every time I use it.</p>
<p>Maple Flow’s freeform interface lets you experiment with space, alignment and layout, drawing attention to different groups of equations.</p>
<p>For example, you can design calculation documents that look like this.</p>
<p><img src="/view.aspx?sf=214395_post/highway_pavement_2.png"></p>
<p>You can use nearly all of the Maple programming language in Flow. Here’s a command from the plots package.</p>
<p><img src="/view.aspx?sf=214395_post/radiation_pattern.png"></p>
<p>Here’s fsolve in action.</p>
<p><img src="/view.aspx?sf=214395_post/fsolve.png"></p>
<p>The <a href="http://www.maplesoft.com/products/mapleflow/">Maple Flow website</a> has more information, including a demo video.</p>
<p>As ever, your feedback is gratefully received.</p>
<p><img src="/view.aspx?sf=214395_post/LaunchBlogPost_Header.jpg"></p>
<p>I’m excited to announce the launch of a new math tool called Maple Flow. Here, I’ll outline our motivation for developing this product, and talk about its features.</p>
<p>A large fraction of Maple users are professional engineers .</p>
<p>All use Maple, but very few say that they do math for a living, in much the same way a plumber wouldn’t say they use a wrench for a living.</p>
<p>They say things like:</p>
<ul>
<li>I design concrete retaining walls</li>
<li>I simulate the transients on a transmission line</li>
<li>I design heat exchangers</li>
<li>I model the absorbency of diapers</li>
<li>I design subsea pipelines</li>
<li>I need to optimize the trajectory of a space shuttle</li>
<li>I work for a power generation company doing load flow analysis</li>
<li>I model how a robot arm needs to move</li>
</ul>
<p>Some of these applications are mathematically simple (but are based on scientific principles, such as the conservation of heat, mass and momentum). The equations consist of basic arithmetic operations, trig and log functions, sprinkled with the occasional numeric integration.</p>
<p style="text-align: center;"><img src="/view.aspx?sf=214395_post/Lifting_lug.png"></p>
<p>Sometimes, the equations are already formalized in design guides, published by organizations like the IEEE, ASME or ISO. Given the specific physical context, engineers just need to implement the calculations in the right order (this is especially true for Civil and Structural engineering). These applications require you to think at an <em>engineering</em> level.</p>
<p>These are what we call <em>design calculations</em>, done by <em>design engineers</em>.</p>
<p>On the other end of the spectrum, some of these applications are mathematically complex. You might need to derive equations, manipulate PDEs, work with quaternions or transformation matrices, or do some programming. These applications require you to think at a <em>mathematical</em> level.</p>
<p>Let’s call the engineers doing this type of work <em>research engineers</em>. Research engineers are often more closely aligned with mathematicians than design engineers.</p>
<p>So we have design engineers and research engineers (and of course we have engineers with feet in both camps, to a varying degree).</p>
<p>Research engineers and design engineers do different mathematical things, and have different mathematical needs. Both groups use Maple, but one size doesn’t always fit well. Either the toe pinches a little, or the shirt is a mite too baggy.</p>
<p>This is where Maple Flow enters stage right.</p>
<p>Maple Flow is a new tool that we’ve built (and are continuing to expand and improve) with the needs of design engineers in mind.</p>
<ul>
<li>The worksheet lets you put math anywhere – just point, click and type</li>
<li>The evaluation model is forward-in-space (unlike Maple’s forward in time evaluation model). This means the execution order is explicitly given by the position of the math on the canvas.</li>
<li>The worksheet updates automatically, so results are never stale</li>
<li>We’ve made several simplifications to massage away some of the complexity of the Maple programming language.</li>
<li>You can use nearly all of tools in the Maple programming language.</li>
</ul>
<p>Here’s how we see people using Maple Flow. They</p>
<ul>
<li>Enter a few major equations somewhere, followed by some parameters scattered around</li>
<li>Make the equations “see” the parameters by moving the parameters above the equations</li>
<li>Insert any parameters or equations you’ve forgotten, and move them into position, shifting the existing content out of the way to make room</li>
<li>Add text, and perhaps an image or plot</li>
<li>Finally, align math and format text for a presentable document</li>
</ul>
<p>I’ve been using Maple Flow for a while now. I like the fact that the nature of Maple Flow means that you don’t have to start with a grand plan, with every computational detail planned out in advance. You’re encouraged to make things up as you go along, and gradually sculpt your calculations into shape.</p>
<p>Basically, Maple Flow doesn’t issue stiff penalties for making mistakes. You fix them, and then move on.</p>
<p>I also like that Maple Flow makes you feel like you’re “touching” your equations, shifting things about easily with either the mouse or the keyboard. There’s a certain <em>tactility</em> and <em>immediacy</em> to Maple Flow that gives me a micro dose of dopamine every time I use it.</p>
<p>Maple Flow’s freeform interface lets you experiment with space, alignment and layout, drawing attention to different groups of equations.</p>
<p>For example, you can design calculation documents that look like this.</p>
<p><img src="/view.aspx?sf=214395_post/highway_pavement_2.png"></p>
<p>You can use nearly all of the Maple programming language in Flow. Here’s a command from the plots package.</p>
<p><img src="/view.aspx?sf=214395_post/radiation_pattern.png"></p>
<p>Here’s fsolve in action.</p>
<p><img src="/view.aspx?sf=214395_post/fsolve.png"></p>
<p>The <a href="http://www.maplesoft.com/products/mapleflow/">Maple Flow website</a> has more information, including a demo video.</p>
<p>As ever, your feedback is gratefully received.</p>
214395Wed, 17 Mar 2021 19:42:54 ZSamir KhanSamir KhanMaximal paths via breadth-first search
https://www.mapleprimes.com/posts/214389-Maximal-Paths-Via-Breadthfirst-Search?ref=Feed:MaplePrimes:New Posts
<p>Yesterday, user <a href="/users/lcz">@lcz</a> , while responding as a third party to one of my Answers regarding <strong>GraphTheory</strong>, asked about breadth-first search. So, I decided to write a more-interesting example of it than the relatively simple example that was used in that Answer. I think that this is general enough to be worthy of a Post.</p>
<p>This application generates all maximal paths in a graph that begin with a given vertex. (I'm calling a path <em>maximal</em> if it cannot be extended and remain a path.) This code requires Maple 2019 or later and 1D input. This works for both directed and undirected graphs. Weights, if present. are ignored.</p>
<pre class="prettyprint">
<span style="color:#B22222;"><strong>restart:
AllMaximalPaths:= proc(G::GRAPHLN, v)
description
"All maximal paths of G starting at v by breadth-first search"
;
option `Author: Carl Love <carl.j.love@gmail.com> 2021-Mar-17`;
uses GT= GraphTheory;
local
P:= [rtable([v])], R:= rtable(1..0),
VL:= GT:-Vertices(G), V:= table(VL=~ [$1..nops(VL)]),
Departures:= {op}~(GT:-Departures(G))
;
while nops(P) <> 0 do
P:= [
for local p in P do
local New:= Departures[V[p[-1]]] minus {seq}(p);
if New={} then R,= [seq](p); next fi;
(
for local u in New do
local p1:= rtable(p); p1,= u
od
)
od
]
od;
{seq}(R)
end proc
:
</strong></span><span style="color:#000000;"><strong>#large example:</strong></span><span style="color:#B22222;"><strong>
GT:= GraphTheory:
K9:= GT:-CompleteGraph(9):
Pa:= CodeTools:-Usage(AllMaximalPaths(K9,1)):</strong></span>
<span style="color:#0000FF;">memory used=212.56MiB, alloc change=32.00MiB,
cpu time=937.00ms, real time=804.00ms, gc time=312.50ms
</span>
<span style="color:#B22222;"><strong>nops(Pa);</strong></span>
<span style="color:#0000FF;">40320</span>
<strong>#fun example:</strong>
<strong><span style="color:#B22222;">P:= GT:-SpecialGraphs:-PetersenGraph():
Pa:= CodeTools:-Usage(AllMaximalPaths(P,1)):</span></strong>
<span style="color:#0000FF;">memory used=0.52MiB, alloc change=0 bytes,
cpu time=0ns, real time=3.00ms, gc time=0ns
</span>
<span style="color:#B22222;"><strong>nops(Pa);</strong></span>
<span style="color:#0000FF;">72</span>
<span style="color:#B22222;"><strong>Pa[..9]; </strong></span><span style="color:#000000;"><strong>#sample paths</strong></span>
<span style="color:#0000FF;">{[1, 2, 3, 4, 10, 9, 8, 5], [1, 2, 3, 7, 8, 9, 10, 6],
[1, 2, 9, 8, 7, 3, 4, 5], [1, 2, 9, 10, 4, 3, 7, 6],
[1, 5, 4, 3, 7, 8, 9, 2], [1, 5, 4, 10, 9, 8, 7, 6],
[1, 5, 8, 7, 3, 4, 10, 6], [1, 5, 8, 9, 10, 4, 3, 2],
[1, 6, 7, 3, 4, 10, 9, 2]}</span>
</pre>
<p>Notes on the procedure:</p>
<p>The two dynamic data structures are</p>
<ul>
<li><strong>P</strong>: a list of vectors of vertices. Each vector contains a path which we'll attempt to extend.</li>
<li><strong>R</strong>: a vector of lists of vertices. Each list is a maximal path to be returned.</li>
</ul>
<p>The static data structures are</p>
<ul>
<li><strong>V</strong>: a table mapping vertices (which may be named) to their index numbers.</li>
<li><strong>Departures</strong>: a list of sets of vertices whose k<sup>th</sup> set is the possible next vertices from vertex number k.</li>
</ul>
<p>On each iteration of the outer loop, <strong>P</strong> is completely reconstructed because each of its entries, a path <strong>p</strong>, is either determined to be maximal or it's extended. The set <strong>New </strong>is the vertices that can be appended to the <strong>p </strong>(connected to vertex <strong>p[-1]</strong>). If <strong>New </strong>is empty, then <strong>p</strong> is maximal, and it gets moved to <strong>R</strong>. </p>
<p><br>
The following code constructs an array plot of all the maximal paths in the Petersen graph. I can't post the array plot, but you can see it in the attached worksheet: <a href="/view.aspx?sf=214389_post/BreadthFirst.mw">BreadthFirst.mw</a></p>
<pre class="prettyprint">
<span style="color:#B22222;"><strong>#Do an array plot of each path embedded in the graph:
n:= nops(Pa):
c:= 9:
plots:-display(
(PA:= rtable(
(1..ceil(n/c), 1..c),
(i,j)->
if (local k:= (i-1)*ceil(n/c) + j) > n then
plot(axes= none)
else
GT:-DrawGraph(
GT:-HighlightTrail(P, Pa[k], inplace= false),
stylesheet= "legacy", title= typeset(Pa[k])
)
fi
)),
titlefont= [Times, Bold, 12]
);
</strong></span><span style="color:#000000;"><strong>#And recast that as an animation so that I can post it:
</strong></span><span style="color:#B22222;"><strong>plots:-display(
[seq](`$`~(plots:-display~(PA), 5)),
insequence
); </strong></span>
</pre>
<p><img src="/view.aspx?sf=214389_post/PetersenPaths.gif"></p>
<p> </p>
<p>Yesterday, user <a href="/users/lcz">@lcz</a> , while responding as a third party to one of my Answers regarding <strong>GraphTheory</strong>, asked about breadth-first search. So, I decided to write a more-interesting example of it than the relatively simple example that was used in that Answer. I think that this is general enough to be worthy of a Post.</p>
<p>This application generates all maximal paths in a graph that begin with a given vertex. (I'm calling a path <em>maximal</em> if it cannot be extended and remain a path.) This code requires Maple 2019 or later and 1D input. This works for both directed and undirected graphs. Weights, if present. are ignored.</p>
<pre class="prettyprint">
<span style="color:#B22222;"><strong>restart:
AllMaximalPaths:= proc(G::GRAPHLN, v)
description
"All maximal paths of G starting at v by breadth-first search"
;
option `Author: Carl Love <carl.j.love@gmail.com> 2021-Mar-17`;
uses GT= GraphTheory;
local
P:= [rtable([v])], R:= rtable(1..0),
VL:= GT:-Vertices(G), V:= table(VL=~ [$1..nops(VL)]),
Departures:= {op}~(GT:-Departures(G))
;
while nops(P) <> 0 do
P:= [
for local p in P do
local New:= Departures[V[p[-1]]] minus {seq}(p);
if New={} then R,= [seq](p); next fi;
(
for local u in New do
local p1:= rtable(p); p1,= u
od
)
od
]
od;
{seq}(R)
end proc
:
</strong></span><span style="color:#000000;"><strong>#large example:</strong></span><span style="color:#B22222;"><strong>
GT:= GraphTheory:
K9:= GT:-CompleteGraph(9):
Pa:= CodeTools:-Usage(AllMaximalPaths(K9,1)):</strong></span>
<span style="color:#0000FF;">memory used=212.56MiB, alloc change=32.00MiB,
cpu time=937.00ms, real time=804.00ms, gc time=312.50ms
</span>
<span style="color:#B22222;"><strong>nops(Pa);</strong></span>
<span style="color:#0000FF;">40320</span>
<strong>#fun example:</strong>
<strong><span style="color:#B22222;">P:= GT:-SpecialGraphs:-PetersenGraph():
Pa:= CodeTools:-Usage(AllMaximalPaths(P,1)):</span></strong>
<span style="color:#0000FF;">memory used=0.52MiB, alloc change=0 bytes,
cpu time=0ns, real time=3.00ms, gc time=0ns
</span>
<span style="color:#B22222;"><strong>nops(Pa);</strong></span>
<span style="color:#0000FF;">72</span>
<span style="color:#B22222;"><strong>Pa[..9]; </strong></span><span style="color:#000000;"><strong>#sample paths</strong></span>
<span style="color:#0000FF;">{[1, 2, 3, 4, 10, 9, 8, 5], [1, 2, 3, 7, 8, 9, 10, 6],
[1, 2, 9, 8, 7, 3, 4, 5], [1, 2, 9, 10, 4, 3, 7, 6],
[1, 5, 4, 3, 7, 8, 9, 2], [1, 5, 4, 10, 9, 8, 7, 6],
[1, 5, 8, 7, 3, 4, 10, 6], [1, 5, 8, 9, 10, 4, 3, 2],
[1, 6, 7, 3, 4, 10, 9, 2]}</span>
</pre>
<p>Notes on the procedure:</p>
<p>The two dynamic data structures are</p>
<ul>
<li><strong>P</strong>: a list of vectors of vertices. Each vector contains a path which we'll attempt to extend.</li>
<li><strong>R</strong>: a vector of lists of vertices. Each list is a maximal path to be returned.</li>
</ul>
<p>The static data structures are</p>
<ul>
<li><strong>V</strong>: a table mapping vertices (which may be named) to their index numbers.</li>
<li><strong>Departures</strong>: a list of sets of vertices whose k<sup>th</sup> set is the possible next vertices from vertex number k.</li>
</ul>
<p>On each iteration of the outer loop, <strong>P</strong> is completely reconstructed because each of its entries, a path <strong>p</strong>, is either determined to be maximal or it's extended. The set <strong>New </strong>is the vertices that can be appended to the <strong>p </strong>(connected to vertex <strong>p[-1]</strong>). If <strong>New </strong>is empty, then <strong>p</strong> is maximal, and it gets moved to <strong>R</strong>. </p>
<p><br>
The following code constructs an array plot of all the maximal paths in the Petersen graph. I can't post the array plot, but you can see it in the attached worksheet: <a href="/view.aspx?sf=214389_post/BreadthFirst.mw">BreadthFirst.mw</a></p>
<pre class="prettyprint">
<span style="color:#B22222;"><strong>#Do an array plot of each path embedded in the graph:
n:= nops(Pa):
c:= 9:
plots:-display(
(PA:= rtable(
(1..ceil(n/c), 1..c),
(i,j)->
if (local k:= (i-1)*ceil(n/c) + j) > n then
plot(axes= none)
else
GT:-DrawGraph(
GT:-HighlightTrail(P, Pa[k], inplace= false),
stylesheet= "legacy", title= typeset(Pa[k])
)
fi
)),
titlefont= [Times, Bold, 12]
);
</strong></span><span style="color:#000000;"><strong>#And recast that as an animation so that I can post it:
</strong></span><span style="color:#B22222;"><strong>plots:-display(
[seq](`$`~(plots:-display~(PA), 5)),
insequence
); </strong></span>
</pre>
<p><img src="/view.aspx?sf=214389_post/PetersenPaths.gif"></p>
<p> </p>
214389Wed, 17 Mar 2021 05:40:33 ZCarl LoveCarl LoveMath exams: Maplesoft needs to take print/export to pdf seriously!
https://www.mapleprimes.com/posts/214377-Math-Exams-Maplesoft-Needs-To-Take?ref=Feed:MaplePrimes:New Posts
<p>I am a high school Teacher in Denmark, who have been using Maple since version 12, more than 12 years ago. I suggested it for my school back then and our math faculty finally decided to purchase a school license. We are still there. We have watched Maple improve in a lot of areas (function definitions, context panels, graphically etc., etc ). Often small changes makes a big difference! We have been deligted. We we are mostly interested in improvements in GUI and lower level math, and in animations and quizzes. I have also been enrolled as a beta tester for several years yet. </p>
<p>One of the areas, which is particually important is print and export to pdf, because Danish students have to turn in their papers/solutions at exams in pdf format! I guess the Scandinavian countries are ahead in this department. They may quite possible be behind in other areas however, but this is how it is. </p>
<p>Now my point: Maplesoft is lacking terrible behind when regarding screen look in comparison with print/export to pdf. </p>
<p>I am very frustrated, because I have been pinpointing this problem in several versions of Maple, both on Mapleprimes and in the beta groups. Some time you have corrected it, but it has always been bouncing back again and again! I have come to the opinion that you are not taking it seriously? Why?</p>
<p>Students may loose grades because of missing documentations (marking on graphs etc.). </p>
<p>I will be reporting yet another instance of this same problem. When will it stop?</p>
<p>Erik<br>
<br>
</p>
<p>I am a high school Teacher in Denmark, who have been using Maple since version 12, more than 12 years ago. I suggested it for my school back then and our math faculty finally decided to purchase a school license. We are still there. We have watched Maple improve in a lot of areas (function definitions, context panels, graphically etc., etc ). Often small changes makes a big difference! We have been deligted. We we are mostly interested in improvements in GUI and lower level math, and in animations and quizzes. I have also been enrolled as a beta tester for several years yet. </p>
<p>One of the areas, which is particually important is print and export to pdf, because Danish students have to turn in their papers/solutions at exams in pdf format! I guess the Scandinavian countries are ahead in this department. They may quite possible be behind in other areas however, but this is how it is. </p>
<p>Now my point: Maplesoft is lacking terrible behind when regarding screen look in comparison with print/export to pdf. </p>
<p>I am very frustrated, because I have been pinpointing this problem in several versions of Maple, both on Mapleprimes and in the beta groups. Some time you have corrected it, but it has always been bouncing back again and again! I have come to the opinion that you are not taking it seriously? Why?</p>
<p>Students may loose grades because of missing documentations (marking on graphs etc.). </p>
<p>I will be reporting yet another instance of this same problem. When will it stop?</p>
<p>Erik<br />
<br />
</p>
214377Mon, 15 Mar 2021 18:07:39 Zerik10erik10