<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="https://community.wolfram.com">
    <title>Community RSS Feed</title>
    <link>https://community.wolfram.com</link>
    <description>RSS Feed for Wolfram Community showing questions tagged with Computer-Based Maths sorted by most replies.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/896637" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/550504" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/565372" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1732367" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/863525" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/596537" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/192257" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/210810" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2131707" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1718762" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/185649" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2411433" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1670664" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1258865" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/834882" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3665390" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/916415" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/58348" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/896287" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/57140" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/896637">
    <title>Sum positive elements of a list efficiently?</title>
    <link>https://community.wolfram.com/groups/-/m/t/896637</link>
    <description>There are many ways to sum positive elements of a list such as, e.g.,&#xD;
&#xD;
    In[1]:= list = RandomReal[{-10, 10}, 1000000];&#xD;
    &#xD;
    In[2]:= tList = {&#xD;
      Plus @@ Map[If[# &amp;lt; 0, 0, #] &amp;amp;, list] // AbsoluteTiming,&#xD;
      Total@Map[If[# &amp;lt; 0, 0, #] &amp;amp;, list] // AbsoluteTiming,&#xD;
      Total[list /. x_ /; x &amp;lt; 0 -&amp;gt; 0] // AbsoluteTiming&#xD;
      }&#xD;
    &#xD;
    Out[2]= {{2.51129, 2.49923*10^6}, {1.93032, 2.49923*10^6}, {1.6144, 2.49923*10^6}}&#xD;
    &#xD;
    In[3]:= BarChart@tList[[All, 1]]&#xD;
![enter image description here][1]&#xD;
&#xD;
Can you recommend a code better than above ones?&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=a.png&amp;amp;userId=159033</description>
    <dc:creator>Valeriu Ungureanu</dc:creator>
    <dc:date>2016-07-31T11:59:52Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/550504">
    <title>Who can fix math education, and how? Your thoughts please...</title>
    <link>https://community.wolfram.com/groups/-/m/t/550504</link>
    <description>![Look familiar...?][1]&#xD;
&#xD;
When last did you solve a quadratic equation by hand? Probably not since school, I&amp;#039;m guessing. It&amp;#039;s an open secret that maths education is way behind the times, failing to equip kids with skills they need in the real world. &#xD;
&#xD;
As a Wolfram Community member, you may well have come across the [Computer-Based Maths initiative][2], driven by Conrad Wolfram. For those who don&amp;#039;t know, it&amp;#039;s a programme designed to bring coding and computers into school maths curricula worldwide, using Wolfram technology. &#xD;
&#xD;
And now the CBM team wants *your* ideas ahead of the fourth [CBM Summit in London on 19-20 November][3]. We already have Jaak Aaviksoo, Simon Peyton Jones and Raspberry Pi&amp;#039;s Eben Upton, who [spoke at the last CBM Summit][4] in 2013. Now we&amp;#039;d like to hear from you...&#xD;
&#xD;
- Who would *you* like to hear speaking on this subject? &#xD;
- Do you have something you&amp;#039;d like to present yourself? &#xD;
- What are the most important topics that should be covered?&#xD;
&#xD;
Think about your country and your workplace too: &#xD;
&#xD;
- Are there thought leaders, education revolutionaries or forward-thinking math education projects the CBM team should know about? &#xD;
&#xD;
I&amp;#039;m looking forward to your comments...and maybe see you in London!&#xD;
&#xD;
[![CBM Summit, London, 19-20 November][5]][6]&#xD;
&#xD;
&#xD;
  [1]: /c/portal/getImageAttachment?filename=_thumb_117376.png&amp;amp;userId=383623&#xD;
  [2]: https://www.computerbasedmath.org/&#xD;
  [3]: http://www.computerbasedmath.org/events/maths-education-summit-2015/&#xD;
  [4]: https://www.youtube.com/watch?v=NZvttwpeVrc&amp;amp;list=PLzKFBYmW-UKpLGkkprg5LkHUVPaCV85R1&amp;amp;index=35&#xD;
  [5]: /c/portal/getImageAttachment?filename=SummitFooterFullSize.jpg&amp;amp;userId=383623&#xD;
  [6]: http://www.computerbasedmath.org/events/maths-education-summit-2015/</description>
    <dc:creator>Richard Asher</dc:creator>
    <dc:date>2015-08-20T15:52:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/565372">
    <title>What do you think of the OECD report on technology in education?</title>
    <link>https://community.wolfram.com/groups/-/m/t/565372</link>
    <description>The OECD has just released a [report][1] on the success (or otherwise) of technology in education, at least in terms of PISA results. &#xD;
&#xD;
This report is now being being widely quoted by media. For example, here&amp;#039;s a [BBC][2] story on it, and another one from the [Irish Times][3]. The BBC story references a [second BBC story][4] from today, written by OECD Education Director Andreas Schleicher himself.&#xD;
&#xD;
Conrad Wolfram has today responded that the report largely misses the point, which is that computers are being used to teach the wrong subject. You can read his post here: [COMPUTERS IN EDUCATION: GREAT MACHINES, WRONG RESULTS][5]&#xD;
&#xD;
Having read a couple of viewpoints, where do you stand on this issue?&#xD;
&#xD;
&#xD;
  [1]: http://www.oecd.org/education/students-computers-and-learning-9789264239555-en.htm&#xD;
  [2]: http://www.bbc.com/news/business-34174796&#xD;
  [3]: http://www.irishtimes.com/news/education/lack-of-computers-in-schools-may-be-a-blessing-oecd-report-1.2351683&#xD;
  [4]: http://www.bbc.com/news/business-34174795&#xD;
  [5]: http://www.conradwolfram.com/home/2015/9/15/computers-in-education-great-machines-wrong-results</description>
    <dc:creator>Richard Asher</dc:creator>
    <dc:date>2015-09-15T16:56:50Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1732367">
    <title>[WSC19] Generating Nets for Random Convex Polyhedra</title>
    <link>https://community.wolfram.com/groups/-/m/t/1732367</link>
    <description>## Abstract&#xD;
&#xD;
This project is a visualization of Shephard&amp;#039;s conjecture, which states that every convex polyhedron admits a self-nonoverlapping unfolding. The conjecture remains unsolved to this day. Currently, there exists unfolding data for several predefined polyhedra in the Wolfram Language, and my goal is to create a function that can do this for any random convex polyhedron. I chose this project because of my love for origami and art, and my interest in 3D visualization.&#xD;
&#xD;
## Generating a Graph for Connectivity Between Faces&#xD;
&#xD;
The first step was to create a graph that captures the relationship between faces of the polyhedron so that it could be used later to generate the net. The built-in function DualPolyhedron converts the polyhedron to one where each vertex corresponds to a face on the original. I then extracted the vertices of the dual polyhedron and partitioned and sorted them, allowing me to create a graph using those vertices.&#xD;
&#xD;
&#xD;
	polyhedronfacegraph[polyhedron_]:= &#xD;
    &#xD;
		Block[{dualpolyhedron, vertexlist, vertexpairings, sortedvertices},&#xD;
&#xD;
		dualpolyhedron = DualPolyhedron[polyhedron];  &#xD;
		vertexlist = dualpolyhedron[[2]];   &#xD;
&#xD;
		vertexpairings = Flatten[Table[Append[&#xD;
&#xD;
			Partition[vertexlist[[n]], 2, 1], &#xD;
			{Last[vertexlist[[n]]], First[vertexlist[[n]]]}],  &#xD;
			{n, 1, Length[vertexlist]}], 1];&#xD;
&#xD;
		sortedvertices = Sort /@ vertexpairings // DeleteDuplicates; &#xD;
&#xD;
	        Graph[UndirectedEdge@@@sortedvertices,VertexLabels -&amp;gt; &amp;#034;Name&amp;#034;] &#xD;
    ]&#xD;
A random polyhedron and the graph of its dual:    &#xD;
![enter image description here][1]&#xD;
&#xD;
## Generating Spanning Trees &#xD;
&#xD;
I then used the graph to generate different paths in which a polyhedron could unfold. One way to do this is by using a spanning tree, a tree generated from a graph that retains the same amount of vertices while having the minimum amount of edges. This essentially creates a simple version of what the final net should look like. Each vertex represents a face, and connections between them signify that they are adjacent. It is important to note that not every spanning tree will correspond to a non-overlapping net, which is why I generate a spanning tree from every possible vertex.&#xD;
&#xD;
	generatetrees[graph_] := Table[FindSpanningTree[{graph, n}], {n, 1, VertexCount[graph]}]&#xD;
Five of the spanning trees of the previous polyhedron:&#xD;
![enter image description here][2]&#xD;
## Generating Net Coordinates&#xD;
&#xD;
To create the net of the polyhedron, I had to implement an unfolding algorithm. My first approach was to extract each face individually, but that ended up complicating the transformations. My final algorithm consisted of applying one transformation to move one face to the xy plane, then unfolding using connections between vertices from the spanning tree. &#xD;
&#xD;
I first created a function to find the normal vector to a plane using the cross product.&#xD;
&#xD;
	normvector[coords_] := Cross[coords[[2]] - coords[[1]], coords[[3]] - coords[[1]]];  &#xD;
&#xD;
I then use transformation matrices so that one face is lying on the xy plane, and convert the new mesh into a list of its primitives. The next step is to begin unfolding the polyhedron from its bottom face using the list of spanning trees. To perform an algorithm on each step of the unfolding process, I use the function BreadthFirstScan, which can call the unfold function (discussed next) whenever a new vertex is reached. Finally, the function returns a list of coordinates of the completed net.&#xD;
 &#xD;
	generatenetcoords[mesh_, tree_]:=&#xD;
    &#xD;
		Block[{transformations, transformedmesh, meshlist, transformedmeshlist, normals, polygonfaces, transformedrotation},&#xD;
&#xD;
			polygonfaces = Reap[&#xD;
&#xD;
				meshlist = MeshPrimitives[mesh, 2][[All, 1]];&#xD;
&#xD;
				transformations =      &#xD;
				RotationTransform[{normvector[meshlist[[1]]], {0, 0, -1}}] @*   &#xD;
				TranslationTransform[-PropertyValue[{mesh, {2, 1}}, MeshCellCentroid]];  &#xD;
&#xD;
				transformedmesh = TransformedRegion[mesh, transformations];      &#xD;
				transformedmeshlist = MeshPrimitives[transformedmesh, 2][[All, 1]];     &#xD;
&#xD;
				normals = normvector[#] &amp;amp;/@ transformedmeshlist;    &#xD;
&#xD;
				Sow[transformedmeshlist[[1]], &amp;#034;flat&amp;#034;];&#xD;
&#xD;
				transformedrotation[1] = TransformationFunction[IdentityMatrix[4]];&#xD;
&#xD;
				BreadthFirstScan[tree, 1, &amp;#034;DiscoverVertex&amp;#034; -&amp;gt; unfold[transformedmeshlist, normals, transformedrotation]];,  &#xD;
				{&amp;#034;flat&amp;#034;}][[-1, All, 1]];&#xD;
			Chop[polygonfaces]&#xD;
	]&#xD;
	&#xD;
The unfold function operates by finding the intersection of two polygons, calculating the angle between them, and applying transformations using normal vectors to unfold the face. The function returns coordinates of the transformed polygons.&#xD;
&#xD;
	unfold[meshlist_, normals_, transformedrotation_][u_, v_, _] /; (u =!= v) :=&#xD;
&#xD;
		Block[{edgecoord1, edgecoord2, angle, rotation},&#xD;
&#xD;
		{edgecoord1, edgecoord2} = Intersection @@ meshlist[[{u, v}]]; &#xD;
		angle = DihedralAngle[{edgecoord1, edgecoord2}, normals[[{u, v}]]];&#xD;
		rotation = RotationTransform[angle, edgecoord2 - edgecoord1, Mean[{edgecoord1, edgecoord2}]];&#xD;
		&#xD;
		transformedrotation[u] = transformedrotation[v] @* rotation;&#xD;
		Sow[transformedrotation[u] @ meshlist[[u]], &amp;#034;flat&amp;#034;];&#xD;
	]&#xD;
    &#xD;
## Generating Possible Nets&#xD;
&#xD;
Finally, we put all the functions together. The program iterates through every spanning tree to produce nets using netcoordinates. The third element of each coordinate is deleted to convert the net to 2D. Each net is then tested for overlap by calculating the surface area of the original polyhedron and comparing it to the surface area of the net. Only nets where the two surface areas are equal are appended to the list that is returned. &#xD;
&#xD;
	generateallnets[polyhedron_] := &#xD;
    &#xD;
	    Block[{netcoords, trees, graph, mesh, surfacearea, netsurfacearea, goodnets},&#xD;
&#xD;
	    mesh = BoundaryDiscretizeGraphics[polyhedron];   &#xD;
	    graph = polyhedronfacegraph[polyhedron];&#xD;
	    trees = generatetrees[graph];&#xD;
&#xD;
	    goodnets = {};   &#xD;
&#xD;
	    Table[     &#xD;
		    netcoords = First@generatenetcoords[mesh, trees[[treeposition]]];    &#xD;
		    netcoords = Table[Delete[netcoords[[n, m]], {3}], {n, 1, Length[netcoords]}, {m, 1, 3}];        &#xD;
&#xD;
		    surfacearea = SurfaceArea[polyhedron];&#xD;
		    netsurfacearea = RegionMeasure[RegionUnion[Polygon /@ netcoords]];&#xD;
&#xD;
		    If[surfacearea == netsurfacearea,             &#xD;
		    	AppendTo[goodnets, Graphics[{Hue[0.94, 0.22, 1.], EdgeForm[{Thin, Pink}], Polygon /@ netcoords}]]        &#xD;
		    ];,  &#xD;
&#xD;
		    {treeposition, 1, Length[trees]} &#xD;
	    ];    &#xD;
&#xD;
	    Row[{Graphics3D[polyhedron], goodnets}]&#xD;
	]&#xD;
&#xD;
&#xD;
## Outputs&#xD;
&#xD;
Upon taking a polyhedron object in as its argument, the final output of the function is a 3D graphic of the original polyhedron and a list of all possible nets.&#xD;
&amp;lt;br&amp;gt;&#xD;
&amp;lt;br&amp;gt;&#xD;
An output of a random polyhedron:&#xD;
![enter image description here][3]&#xD;
&#xD;
## Summary &#xD;
&#xD;
With the help of my mentor, I was able to create a program that creates non-overlapping nets for random polyhedra. The process consisted of extracting graphs, creating spanning trees, generating nets, and checking for overlap. The function returns several successful results for every random polyhedron that I tested, although the program does run quite slowly for polyhedra with high numbers of faces, as the complexity of the graph and number of spanning trees increase drastically as the number of faces increase. From this project, I acquired knowledge of many aspects of three-dimensional modeling and geometric transformations, and I hope to work on extensions of this project in the future.&#xD;
&#xD;
## Future Work&#xD;
&#xD;
A possible extension would be applying a similar algorithm to non-convex polyhedra and showing that it is impossible to generate a non-overlapping net in some cases. Additionally, optimization algorithms could also be implemented to speed up the unfolding process. For example, another function could also be created to generate the first net that is valid, which would greatly increase speed if only one net is desired.&#xD;
&#xD;
## Acknowledgements&#xD;
&#xD;
I would like to sincerely thank my mentor, Jeremy Stratton-Smith, for providing invaluable advice and help throughout the entire project process. I would also like to thank Chip Hurst for his unfolding algorithm and tips for 3D transformations. Lastly, I would like to thank the Wolfram Summer Camp team for providing me with this opportunity to pursue a project of my choice.&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=polygraph.PNG&amp;amp;userId=1622104&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=graphs.PNG&amp;amp;userId=1622104&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=image.PNG&amp;amp;userId=1622104</description>
    <dc:creator>Sunny Wang</dc:creator>
    <dc:date>2019-07-12T01:09:08Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/863525">
    <title>Interactive Physics simulation software with Wolfram Language?</title>
    <link>https://community.wolfram.com/groups/-/m/t/863525</link>
    <description>Good morning,&#xD;
&#xD;
I&amp;#039;m a French physics and chemistry teacher looking for a replacement to the aging *Interactive Physics* simulation software.&#xD;
I&amp;#039;d like to know if Mathematica is the way to go.&#xD;
&#xD;
Typically, I&amp;#039;d use it to model systems subjected to dynamic forces such as projectiles, orbiting masses, mechanic oscillators...&#xD;
Along with the simulation showing the movements, data would be collected and/or graphs displayed.&#xD;
&#xD;
For example :&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
Is it easy to model the gravity field surrounding a planet ?&#xD;
Will I have to solve the satellite&amp;#039;s movement equations and program the animation or will Mathematica do that for me ?&#xD;
&#xD;
If in your opinion Mathematica isn&amp;#039;t what I&amp;#039;m looking for, please let me know if you heard about something that would better suit my needs.&#xD;
&#xD;
Thank you,&#xD;
&#xD;
Ch&amp;#039;Prof&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=vlcsnap-2016-05-27-09h00m07s633.png&amp;amp;userId=508746</description>
    <dc:creator>Ch&amp;#039; Prof</dc:creator>
    <dc:date>2016-05-27T14:04:18Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/596537">
    <title>Help with Halloween costumes</title>
    <link>https://community.wolfram.com/groups/-/m/t/596537</link>
    <description>Every year our family makes costumes, and this time we are making &amp;#034;the world&amp;#034; and an &amp;#034;oak tree&amp;#034;.  Does anyone have any ideas for doing these in Wolfram Language?&#xD;
&#xD;
Maybe for the world, I am thinking of projecting the map of the world onto two halves of an icosahedron.   One half attached to the front of a shirt and the other half attached to the back. I am close on this part, but maybe it has become too complicated.  Something Is wrong here, and this approach also involves more cutting and taping than I would prefer.&#xD;
&#xD;
    ToMapCoordinates[v_] := N[ToPolarCoordinates[v][[{3, 2}]]/Degree]&#xD;
    verts = Map[ToMapCoordinates,  PolyhedronData[&amp;#034;Icosahedron&amp;#034;, &amp;#034;VertexCoordinates&amp;#034;]];&#xD;
    GeoTriangle[{a_, b_, c_}] := GeoGraphics[Polygon[{a, b, c}]]&#xD;
    GeoTriangle[verts[[#]]] &amp;amp; /@  PolyhedronData[&amp;#034;Icosahedron&amp;#034;, &amp;#034;FaceIndices&amp;#034;]&#xD;
&#xD;
For the oak tree, I was trying to make oak leaves and acorns using PolarPlot.  Does anyone have an Oak leaf?  Here is my attempt at an acorn.&#xD;
&#xD;
    PolarPlot[1.4 - CubeRoot[1 + Sin[x]], {x, 0, 2 Pi}]&#xD;
    &#xD;
![acorn][1]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=acorn-fruit-image.jpg&amp;amp;userId=23275</description>
    <dc:creator>Todd Rowland</dc:creator>
    <dc:date>2015-10-24T14:51:08Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/192257">
    <title>Raspberry Pi in the Classroom</title>
    <link>https://community.wolfram.com/groups/-/m/t/192257</link>
    <description>Hello!  &#xD;
&#xD;
I&amp;#039;m trying to wrap my head around ways to incorporate Raspberry Pi in the classroom.  I teach math at the community college level and, at my campus, there is no place for a dedicated math computer lab.  Due to the low price of the RPi, I was considering having students get one.  I was also thinking of making worksheets for my students as a notebook for them to 1) learn how to code and 2) learn mathematics via Mathematica.  &#xD;
&#xD;
However, I haven&amp;#039;t figured out the logistics yet.  To my understanding, if a student wanted to use it in the classroom, they&amp;#039;d each need a monitor to hook it up to, correct?  &#xD;
&#xD;
I also read that Wolfram and Intel teamed up and will release a SD card that will have Mathematica on it. (http://company.wolfram.com/news/2014/wolfram-language-on-intel-edison/)  Does anyone have any idea how this would work?  I&amp;#039;m imagining you could plug it into your computer and run Mathematica off of it.  If so, then that would be a more practical way of getting Matthematica into the classroom at my college.&#xD;
&#xD;
Any thoughts or experiences with RPi or ideas of Intel&amp;#039;s Edison card are greatly appreciated.  &#xD;
&#xD;
Thanks!</description>
    <dc:creator>Mike McCraith</dc:creator>
    <dc:date>2014-01-28T22:00:32Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/210810">
    <title>Constructing multiple choice questions for student notebooks.</title>
    <link>https://community.wolfram.com/groups/-/m/t/210810</link>
    <description>Hello Community,&#xD;
I have been constructing a set of tutorial notebooks for teaching materials science. Students are given some material and programming assignments.&#xD;
&#xD;
I&amp;#039;ve trying create a method to pace the students&amp;#039; progress through the notebook--[i]I&amp;#039;d like them to stop and think before they can proceed[/i].&#xD;
&#xD;
Here is a simplified example of a modal multiple choice interface:[mcode]DialogInput[&#xD;
  Column[{&#xD;
    &amp;#034;What is 3 times 2?&amp;#034;,&#xD;
    TabView[{3 -&amp;gt; Tooltip[&amp;#034;Wrong&amp;#034;, &amp;#034;Oh you are just being silly&amp;#034;],&#xD;
      Exp[3] -&amp;gt; &amp;#034;Wrong&amp;#034;, &#xD;
      6 -&amp;gt; DefaultButton[&amp;#034;Correct&amp;#034;, DialogReturn[True]], &#xD;
      Cos[Pi/6] -&amp;gt; &amp;#034;Note quite&amp;#034;,&#xD;
      &amp;#034;VI&amp;#034; -&amp;gt; &#xD;
       DefaultButton[&amp;#034;Tu sunt rectam, sed asinus sapien.&amp;#034;, &#xD;
        DialogReturn[True], ImageSize -&amp;gt; Full]}, None]&#xD;
    }&#xD;
   ],&#xD;
  Modal -&amp;gt; True];[/mcode]&#xD;
Note modal is not a supported option for DialogInput, but it works anyways.&#xD;
&#xD;
In the ultimate version, the DefaultButton would programmatically open subsequent cells that will allow the students to proceed (I&amp;#039;ve seen a thread someplace that shows how to do this, but can&amp;#039;t find it now).&#xD;
&#xD;
&#xD;
Here is where I am stuck: I&amp;#039;d like to embed this a button in the tutorial notebook.  This is the functionality that I&amp;#039;d like to have, but it hangs and complains about a Dynamic which doesn&amp;#039;t evaluate (I don&amp;#039;t see a Dynamic, but perhaps ToolTip invokes one).&#xD;
&#xD;
Here is an example, but [b]warning[/b], if you evaluate the following you will have to try to abort the process 3 times.&#xD;
[mcode]Button[&amp;#034;Press Here to Continue&amp;#034;, &#xD;
DialogInput[&#xD;
   Column[{&#xD;
     &amp;#034;What is 3 times 2?&amp;#034;,&#xD;
     TabView[{3 -&amp;gt; Tooltip[&amp;#034;Wrong&amp;#034;, &amp;#034;Oh you are just being silly&amp;#034;],&#xD;
       Exp[3] -&amp;gt; &amp;#034;Wrong&amp;#034;, &#xD;
       6 -&amp;gt; DefaultButton[&amp;#034;Correct&amp;#034;, DialogReturn[True]], &#xD;
       Cos[Pi/6] -&amp;gt; &amp;#034;Note quite&amp;#034;,&#xD;
       &amp;#034;VI&amp;#034; -&amp;gt; &#xD;
        DefaultButton[&amp;#034;Tu sunt rectam, sed asinus sapien.&amp;#034;, &#xD;
         DialogReturn[True], ImageSize -&amp;gt; Full]}, None]&#xD;
     }&#xD;
    ],&#xD;
   Modal -&amp;gt; True];&#xD;
 ][/mcode]&#xD;
Can anyone see a way to acheive my multiple choice blocking dialog?  (And, if you could see a way for cumulative progress to be related to an instructor, that would be terrific.)&#xD;
&#xD;
WCC</description>
    <dc:creator>W. Craig Carter</dc:creator>
    <dc:date>2014-03-02T17:41:29Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2131707">
    <title>Manipulate in a ParametricPlot</title>
    <link>https://community.wolfram.com/groups/-/m/t/2131707</link>
    <description>Hello, I used ParamtericPlot for obtaining curves by Euler elasticity theory. The shape of the curve depends on alpha variable which is initial angle in this issue. I am trying to use Manipulate in a ParametricPlot and changing alpha, but something is wrong (the shape of the curve is constant, but I don&amp;#039;t know how to plot it without prior defining alpha). I would really appreciate your help and advise. Regards&#xD;
&#xD;
     l = 300;&#xD;
        \[Alpha] = 130 Degree;&#xD;
        k = Sin[\[Alpha]/2]^2;&#xD;
        m = 2;&#xD;
        \[Lambda]L = (2*m*EllipticK[k])/l;&#xD;
        x1L[s_] := -s + &#xD;
           2/\[Lambda]L (EllipticE[&#xD;
               JacobiAmplitude[s*\[Lambda]L + EllipticK[k], k], k] - &#xD;
              EllipticE[JacobiAmplitude[EllipticK[k], k], k]);&#xD;
        x2L[s_] := -2 k/\[Lambda]L (JacobiCN[EllipticK[k] + (s*\[Lambda]L), &#xD;
             k]);&#xD;
         Manipulate[&#xD;
         ParametricPlot[{x1L[s], x2L[s]}, {s, 0, l}, AxesLabel -&amp;gt; {x, y}, &#xD;
          LabelStyle -&amp;gt; {FontSize -&amp;gt; 10, Darker[Black], Bold}, &#xD;
          PlotLegends -&amp;gt; &amp;#034;xlocal&amp;#034;], {\[Alpha], 0, 2 Pi}]</description>
    <dc:creator>Alexandra Man</dc:creator>
    <dc:date>2020-12-07T16:51:19Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1718762">
    <title>[Numberphile] James ❤️ A Card Trick Simulation</title>
    <link>https://community.wolfram.com/groups/-/m/t/1718762</link>
    <description>####*Please download the notebook at the end of the discussion including dynamic feature*####&#xD;
&#xD;
----------&#xD;
&#xD;
![simulation][1]&#xD;
&#xD;
July 4th is a fabulous holiday season for American families to enjoy the summer with road trip and BBQ party. You can use a deck of poker to entertain your kids and family friends with [James Grime&amp;#039;s][2] new card trick on [Numberphile][3].&#xD;
&#xD;
##Background##&#xD;
&#xD;
You are given $10$ cards, from Ace to 10. Shuffle them and split them into $2$ rows with five cards in each. Sort one row in ascending order, the other in descending order. Both orders are oriented from left to right. Calculate the absolute values of the difference between two rows and add them up. You can play the poker game multiple times and you will find the sum is always $25$. If you do not have poker at hand, please take a look at the animation above. &#xD;
&#xD;
##Code##&#xD;
&#xD;
Let&amp;#039;s work on the problem with Mathematica to help us understand. In the code I use the icons from this website: &#xD;
&#xD;
    $icon=&amp;#034;https://www.iconfinder.com/icons/1331558/card_game_diamond_gambling_game_jewelry_poker_sport_icon&amp;#034;;&#xD;
&#xD;
then I directly assign them to `spade` and `diamond` in a notebook: &#xD;
&#xD;
![spadediamond][4] &#xD;
&#xD;
Use `Framed` to create a nice and simple poker card: &#xD;
&#xD;
    cardpicture1[{suit_, val_}] := Framed[Column[{val, suit}, Center, 0, ItemSize -&amp;gt; {6, 2}, &#xD;
       ItemStyle -&amp;gt; Directive[24, &amp;#034;Label&amp;#034;, Bold]], RoundingRadius -&amp;gt; 8]&#xD;
&#xD;
![poker][5]&#xD;
&#xD;
Use `Map` to create a list of poker cards: &#xD;
&#xD;
    n=10;&#xD;
    numbers = Range[n];&#xD;
    pokers1 = AssociationMap[cardpicture1[{spade, #}] &amp;amp;, numbers];&#xD;
    differences = AssociationMap[cardpicture1[{diamond, #}] &amp;amp;, numbers];&#xD;
&#xD;
Now lets shuffle the deck of 10 cards: &#xD;
&#xD;
    shuffle=Permute[numbers,RandomPermutation[10]]&#xD;
    (* {3,6,7,5,9,10,8,4,1,2} *)&#xD;
&#xD;
I use this generic permutation method because you can replace `numbers` with other list like 10 prime numbers.&#xD;
&#xD;
Then split it into two rows &#xD;
&#xD;
    {row1,row2}={#[[1;;n/2]],#[[n/2+1;;]]}&amp;amp;[shuffle]&#xD;
    (* {{3,6,7,5,9},{10,8,4,1,2}} *)&#xD;
    Style[Grid[Map[pokers1, {row1, row2}, {2}]], ImageSizeMultipliers -&amp;gt; {1, 1}]&#xD;
&#xD;
![deck][6]&#xD;
&#xD;
The last two steps are to sort two rows and find the sum of the absolute values of the pairwise differences between the two rows. I use `Grid` an `Style` to make the output neat.&#xD;
&#xD;
    With[{r1=Sort@row1,r2=Sort[row2,Greater]},&#xD;
        Module[{sum},sum=Inactive[Plus]@@Abs[r2-r1];&#xD;
            Style[Grid[{&#xD;
                pokers1/@r1,&#xD;
                pokers1/@r2,&#xD;
                (differences/@Abs[r2-r1]),&#xD;
                {Null,SpanFromLeft},&#xD;
                {Style[Row@{sum,&amp;#034; = &amp;#034;,Activate[sum]},Large,Italic],SpanFromLeft}}],&#xD;
            ImageSizeMultipliers-&amp;gt;{1, 1}]&#xD;
        ]&#xD;
    ]&#xD;
&#xD;
![sorteddeck][7]&#xD;
&#xD;
##Proof##&#xD;
&#xD;
You might already notice I have variables like `pokers1` and `cardpicture1` in the code above. I am definitely hiding from something from you. &#xD;
&#xD;
The companion pokers I have, namely `pokers2`, is a deck of super power cards of which the styles get updated given the face value greater than $5$: &#xD;
&#xD;
    pokers2 = AssociationMap[cardpicture2[{spade, #}] &amp;amp;, numbers];&#xD;
&#xD;
where &#xD;
&#xD;
    cardpicture2[{suit_, val_}] := &#xD;
     Framed[Column[{val, suit}, Center, 0, ItemSize -&amp;gt; {6, 2}, &#xD;
       ItemStyle -&amp;gt; Directive[24, &amp;#034;Label&amp;#034;, Bold]], &#xD;
      FrameStyle -&amp;gt; Directive[If[val &amp;gt; 5, Dashed, Black]],&#xD;
      RoundingRadius -&amp;gt; 8]&#xD;
&#xD;
Once we use the super power card, we can see a pattern matches exactly what James claimed in the Numberphile video (using contradiction of stacking dashed/purple numbered card): &#xD;
&#xD;
![hint][8]&#xD;
&#xD;
Lets take look at one frame: &#xD;
&#xD;
![direction][9]&#xD;
&#xD;
The third diamond line is from the following flipping transition (dash-solid or purple-black)&#xD;
&#xD;
![transition][10]&#xD;
&#xD;
$ 25 = 7 + 3 + 2 + 5 + 8$&#xD;
&#xD;
$ = (10 - 3) +  (8 - 5 ) +  (6 - 4 )+  (7 - 2 ) +  (9 - 1) $&#xD;
&#xD;
$= (10 + 9 + 8 + 7 + 6) -(1 + 2 + 3 + 4 + 5)$&#xD;
&#xD;
The sorted rows tells you that all dashed card must sit together. Same happens to the solid line cards. Therefore there is exactly one transition from solid -&amp;gt; dash or dash -&amp;gt; solid in each row. &#xD;
&#xD;
If dashed cards overlapping vertically means we either have at least 6 such cards or one row is not properly sorted. This is contradiction.&#xD;
&#xD;
##Comment##&#xD;
&#xD;
There are nice functions used here&#xD;
&#xD;
 -  Use `Inactive[Plus]@@{...}` and then to active the sum expression with `Activate[]`: prints nice hold sum formula and delayed evaluation&#xD;
 -  `AssociationMap` to create key-poker face dictionary&#xD;
 -  Animation is generated by [Refresh][11]. Attached at the end of the thread. &#xD;
 - Poker design code is from [this demonstration][12]&#xD;
&#xD;
Code snippet just for the calculation (minimum visualization):&#xD;
&#xD;
    n = 12;&#xD;
    {row1, row2} = {#[[1 ;; n/2]], #[[n/2 + 1 ;;]]} &amp;amp;[Permute[Range[n], RandomPermutation[n]]]&#xD;
    f[m_] := If[m &amp;gt; n/2, Framed[m], m]&#xD;
    {Grid[{row1,row2}],Sequence@@With[{r1=Sort@row1,r2=Reverse@Sort@row2},{Grid[Map[f,{r1,r2},{2}]],Abs[r1-r2]//Total}]}&#xD;
&#xD;
![shortcode][13]&#xD;
&#xD;
Formula: &#xD;
&#xD;
    Sum[k, {k, 2*m}] - 2*Sum[k, {k, m}] // Simplify &#xD;
    (* m^2 *)&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=simulation.gif&amp;amp;userId=23928&#xD;
  [2]: http://bit.ly/grimevideos&#xD;
  [3]: https://www.youtube.com/watch?v=_Wv_qw3nQnI&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=input.png&amp;amp;userId=23928&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=input2.png&amp;amp;userId=23928&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=usdeck.png&amp;amp;userId=23928&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=sdeck.png&amp;amp;userId=23928&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=simulation_hint.gif&amp;amp;userId=23928&#xD;
  [9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=labeld2.png&amp;amp;userId=23928&#xD;
  [10]: https://community.wolfram.com//c/portal/getImageAttachment?filename=labeld3.png&amp;amp;userId=23928&#xD;
  [11]: https://reference.wolfram.com/language/ref/Refresh.html#Examples&#xD;
  [12]: http://demonstrations.wolfram.com/Poker/&#xD;
  [13]: https://community.wolfram.com//c/portal/getImageAttachment?filename=quick.png&amp;amp;userId=23928</description>
    <dc:creator>Shenghui Yang</dc:creator>
    <dc:date>2019-07-03T18:35:12Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/185649">
    <title>Should Students Be Allowed to Use Mathematica on Tests?</title>
    <link>https://community.wolfram.com/groups/-/m/t/185649</link>
    <description>Hi all,&#xD;
&#xD;
Would love to get your thoughts on this...&#xD;
&#xD;
In this [url=http://www.wolfram.com/mathematica/customer-stories/professor-encourages-students-to-use-mathematica-on-tests.html]Customer Story[/url] Professor Alain Carmasol encourages his students to use [i]Mathematica[/i] on exams. He believes that making students complete calcualtions by hand no longer has any value in the classroom. &#xD;
&#xD;
Do you agree?&#xD;
&#xD;
-Emily</description>
    <dc:creator>Emily Suess</dc:creator>
    <dc:date>2014-01-15T21:17:31Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2411433">
    <title>Need more help on code for identity involving the Meijer G .</title>
    <link>https://community.wolfram.com/groups/-/m/t/2411433</link>
    <description>In [this][1] message at Stack Exchange, there is an identity involving the Meijer G function for M2 found at https://oeis.org/A157852.&#xD;
&#xD;
My question here is how can I code a check to a few upper limits in place of infinity to see if we can make&#xD;
&#xD;
![enter image description here][2]&#xD;
Of course, the proof is always best, particularly here where the Meijer G function for M2 is very sluggish for large upper limits! (I&amp;#039;ve never gotten over 20.)&#xD;
&#xD;
For all my work on this form of M2 see&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][3]&#xD;
&#xD;
&#xD;
  [1]: https://math.stackexchange.com/questions/4303385/can-we-find-sums-for-int-1-infty-e-pi-i-t-leftt1-t-1-right-dt&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-22063320.png&amp;amp;userId=366611&#xD;
  [3]: https://www.wolframcloud.com/obj/ba90a470-9cc6-4742-b089-613a6ee0d804</description>
    <dc:creator>Marvin Ray Burns A.G.S. (cum laude)</dc:creator>
    <dc:date>2021-11-22T11:37:59Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1670664">
    <title>Mathematica does not simplify Sqrt[x^2] in expressions?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1670664</link>
    <description>Mathematica does not simplify Sqrt[x^2] in expressions. Even if attempting:&#xD;
&#xD;
    Simplify[Sqrt[x^2]] &#xD;
or &#xD;
&#xD;
    FullSimplify[Sqrt[x^2]]&#xD;
&#xD;
The result remains: Sqrt[x^2] instead of just x.&#xD;
&#xD;
Am I missing something?&#xD;
Do I need to specify a condition like x belongs to R for it to work?</description>
    <dc:creator>LV VS</dc:creator>
    <dc:date>2019-04-27T07:52:09Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1258865">
    <title>Can someone interpret the output?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1258865</link>
    <description>Hello, &#xD;
I am very very new in Mathematica. I am deriving equations for a system of pendulums using the Lagrange function. As you can see, I wrote down the equations of the coordinates of the pendulums, and the output then is the Lagrange function, but I do not quite understand it. Can someone introduce me?</description>
    <dc:creator>Jonas Hamp</dc:creator>
    <dc:date>2018-01-04T18:15:49Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/834882">
    <title>Implement computer-based math (CBM) first at beginning or advanced classes?</title>
    <link>https://community.wolfram.com/groups/-/m/t/834882</link>
    <description>Assume we wish to ultimately restructure all K-12 and college mathematics courses to be [computer-based math][1], to the extent possible.&#xD;
&#xD;
Would the most effective approach to such long-term adoption of computer-based math curricula be to &#xD;
&#xD;
1. start with elementary courses for young children and gradually expand to ever-more advanced and sophisticated classes for older students, or instead &#xD;
&#xD;
2. start with advanced classes for older students and gradually expand to ever-more elementary and basic classes?&#xD;
&#xD;
There seem to be good reasons for each of these tactics.  Which would be most effective?&#xD;
&#xD;
----------&#xD;
&#xD;
Now that several responses have appeared, let me voice my view on my question.&#xD;
&#xD;
Indeed, both approaches have their strengths and weaknesses, but I overall I favor starting with &amp;#034;senior&amp;#034; or advanced courses and then moving towards earlier classes.  Why?  One of the key insights and motivations for computer-based math curricula is the importance of expressing a problem, such as a real-world problem, into the language of mathematics and only then turning the crank of computer-based calculation.  Older students will have a body of facts and knowledge from real-world disciplines such as physics, biology, chemistry and possibly even economics and business.  This will allow them to concentrate on the asking of sophisticated questions and casting such questions into mathematical form.  I think it would be more difficult to teach to young student both the real-world content *and* the techniques of expressing problems in mathematical form.  Moreover, advanced students are more likely to have developed some expertise in programming, thereby avoiding some of the educational burden in the mechanics and basic concepts of computation (recursion, iteration, ...).  I imagine that the pedagogical &amp;#034;lessons learned&amp;#034; from computer-based math at senior levels would expand and become incorporated to earlier classes over the course of several years.&#xD;
&#xD;
These are just my current views.  I would be quite open to changing them in light of carefully constructed educational experiments.&#xD;
&#xD;
  [1]: https://www.computerbasedmath.org/</description>
    <dc:creator>David Stork</dc:creator>
    <dc:date>2016-04-05T18:17:16Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3665390">
    <title>&amp;#034;WPGDivide&amp;#034; keep appearing in Wolfram Problem Generator step-by-step solutions</title>
    <link>https://community.wolfram.com/groups/-/m/t/3665390</link>
    <description>In the Wolfram Problem Generator Arithmetic summary Advanced, I keep seeing WPGDivide in the step-by-step solutions. Can&amp;#039;t find anything about this anywhere. Is it a glitch?&#xD;
&#xD;
Edit:Oops I&amp;#039;m dumb, just realized &amp;#034;WPG&amp;#034; probably means &amp;#034;Wolfram Problem Generator&amp;#034;. Regardless, why is this showing up and what does it mean? My apologies if this is something obvious.&#xD;
&#xD;
Could I please get help? It seems like im literally the ONLY person who has this problem. &amp;#034;expert&amp;#034; support is totally useless too. ugh retarded and infuriating.&#xD;
Arithmetic. Crazy this broken POS is $12 a month. I&amp;#039;m sorry but WOW!&#xD;
![enter image description here][1]&#xD;
![enter image description here][2]&#xD;
![enter image description here][3]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot_20260317-150428_Chrome.jpg&amp;amp;userId=3662999&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2026-03-17003953.png&amp;amp;userId=3662999&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2026-03-16220458.png&amp;amp;userId=3662999</description>
    <dc:creator>R L</dc:creator>
    <dc:date>2026-03-18T05:19:24Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/916415">
    <title>Can Wolfram|Alpha be used by elementary and middle school math students?</title>
    <link>https://community.wolfram.com/groups/-/m/t/916415</link>
    <description>I am new to WolframAlpha and I am homeschooling my grandchildren.  Can WolframAlpa use by middle and middle school math students?  &#xD;
Iam looking for step by step solving equations for fractions, mixed numbers, graphs, geomentry, Algerbraic formulus.   If WolframAlpha is not the berst website, perhaps you can recommend me a website to assist elementary and middle school  students in math.  Thank you,</description>
    <dc:creator>Thomas Turner</dc:creator>
    <dc:date>2016-08-30T23:46:56Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/58348">
    <title>A Diophantine Benchmark</title>
    <link>https://community.wolfram.com/groups/-/m/t/58348</link>
    <description>In 1997, the following problem was posed to test a programme. How many different 4 x4 matrices having nonnegative integer entries have row sums &#xD;
&#xD;
1000, 9000, 3000, 440&#xD;
&#xD;
and column sums&#xD;
&#xD;
2000, 4000, 200, 7240 ?&#xD;
&#xD;
The answer is exactly 160256589785681535184841, and it was found in 2 seconds real time on a typical workstation  at MSRI, Berkeley, in 1997!. How did they came up with that number so rapidly?&#xD;
&#xD;
The following is one of those matrices&#xD;
[mcode]Timing[MatrixForm[{{x1, x2, x3, x4}, {x5, x6, x7, x8}, {x9, x10, x11, &#xD;
     x12}, {x13, x14, x15, x16}} /. &#xD;
   First@FindInstance[(x1 + x2 + x3 + x4 == &#xD;
        1000) &amp;amp;&amp;amp; (x5 + x6 + x7 + x8 == &#xD;
        9000) &amp;amp;&amp;amp; (x9 + x10 + x11 + x12 == &#xD;
        3000) &amp;amp;&amp;amp; (x13 + x14 + x15 + x16 == &#xD;
        440) &amp;amp;&amp;amp; (x1 + x5 + x9 + x13 == &#xD;
        2000) &amp;amp;&amp;amp; (x2 + x6 + x10 + x14 == &#xD;
        4000) &amp;amp;&amp;amp; (x3 + x7 + x11 + x15 == &#xD;
        200) &amp;amp;&amp;amp; (x4 + x8 + x12 + x16 == 7240) &amp;amp;&amp;amp; x1 &amp;gt;= 0 &amp;amp;&amp;amp; x2 &amp;gt;= 0 &amp;amp;&amp;amp;&#xD;
       x3 &amp;gt;= 0 &amp;amp;&amp;amp; x4 &amp;gt;= 0 &amp;amp;&amp;amp; x5 &amp;gt;= 0 &amp;amp;&amp;amp; x6 &amp;gt;= 0 &amp;amp;&amp;amp; x7 &amp;gt;= 0 &amp;amp;&amp;amp; &#xD;
      x8 &amp;gt;= 0 &amp;amp;&amp;amp; x9 &amp;gt;= 0 &amp;amp;&amp;amp; x10 &amp;gt;= 0 &amp;amp;&amp;amp; x11 &amp;gt;= 0 &amp;amp;&amp;amp; x12 &amp;gt;= 0 &amp;amp;&amp;amp; &#xD;
      x13 &amp;gt;= 0 &amp;amp;&amp;amp; x14 &amp;gt;= 0 &amp;amp;&amp;amp; x15 &amp;gt;= 0 &amp;amp;&amp;amp; x16 &amp;gt;= 0, {x1, x2, x3, x4, &#xD;
      x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16}, &#xD;
     Integers]]][/mcode][img=width: 278px; height: 72px;]/c/portal/getImageAttachment?filename=pic060.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
if we divide all the sums by 40 (which is the gcd of the given sums) we get the following example&#xD;
&#xD;
[mcode] Timing[MatrixForm[{{x1, x2, x3, x4}, {x5, x6, x7, x8}, {x9, x10, x11, &#xD;
     x12}, {x13, x14, x15, x16}} /. &#xD;
   First@FindInstance[(x1 + x2 + x3 + x4 == &#xD;
        25) &amp;amp;&amp;amp; (x5 + x6 + x7 + x8 == 225) &amp;amp;&amp;amp; (x9 + x10 + x11 + x12 == &#xD;
        75) &amp;amp;&amp;amp; (x13 + x14 + x15 + x16 == 11) &amp;amp;&amp;amp; (x1 + x5 + x9 + x13 ==&#xD;
         50) &amp;amp;&amp;amp; (x2 + x6 + x10 + x14 == &#xD;
        100) &amp;amp;&amp;amp; (x3 + x7 + x11 + x15 == 5) &amp;amp;&amp;amp; (x4 + x8 + x12 + x16 == &#xD;
        181) &amp;amp;&amp;amp; x1 &amp;gt;= 0 &amp;amp;&amp;amp; x2 &amp;gt;= 0 &amp;amp;&amp;amp; x3 &amp;gt;= 0 &amp;amp;&amp;amp; x4 &amp;gt;= 0 &amp;amp;&amp;amp; x5 &amp;gt;= 0 &amp;amp;&amp;amp;&#xD;
       x6 &amp;gt;= 0 &amp;amp;&amp;amp; x7 &amp;gt;= 0 &amp;amp;&amp;amp; x8 &amp;gt;= 0 &amp;amp;&amp;amp; x9 &amp;gt;= 0 &amp;amp;&amp;amp; x10 &amp;gt;= 0 &amp;amp;&amp;amp; &#xD;
      x11 &amp;gt;= 0 &amp;amp;&amp;amp; x12 &amp;gt;= 0 &amp;amp;&amp;amp; x13 &amp;gt;= 0 &amp;amp;&amp;amp; x14 &amp;gt;= 0 &amp;amp;&amp;amp; x15 &amp;gt;= 0 &amp;amp;&amp;amp; &#xD;
      x16 &amp;gt;= 0, {x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, &#xD;
      x13, x14, x15, x16}, Integers]]]&#xD;
[/mcode]&#xD;
[img=width: 215px; height: 71px;]/c/portal/getImageAttachment?filename=pic_061.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
Note this solution is not the previous one divided by 40.&#xD;
&#xD;
In looking for a matrix having the first row adding to 25,  the above row {0, 22, 0, 3} must be among the following 3276&#xD;
&#xD;
[mcode] FrobeniusSolve[{1, 1, 1, 1}, 25]&#xD;
[/mcode][img=width: 658px; height: 219px;]/c/portal/getImageAttachment?filename=pic_062.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
and there are 1949476 for the second row adding to 225.  There is no need to generate all solutions to know how many are there, we know that, in general, the number of solutions to the Diophantine equation&#xD;
&#xD;
 x1 + x2 + x3 + x4 = n ,   x1, x2, x3, x4 integer values &amp;gt;= 0&#xD;
&#xD;
is Binomial[n + 3, n] so, in orther to test  all rows complying with their sums to see whether they comply with the sum of the columns as well we need to examine&#xD;
[mcode] Times @@ (Binomial[# + 3, #] &amp;amp; /@ {1000, 9000, 3000, 440})&#xD;
&#xD;
1322852284046903937703609378206302241&#xD;
[/mcode]&#xD;
cases to end up with the amount quoted at the beginning. A massive task. So, again, how did they do it ?.&#xD;
&#xD;
As I do not know the answer, I thought I could explain something to give an idea of what is involved by examining the complexities of an easier problem. Let H (n, r) denote the number of square matrices n x n with non - negative elements wherein each row and column sum is equal to r.  &#xD;
    It is easy to see that H (2, r) = r + 1.  &#xD;
    The problem to compute H (n, r) goes back to McMahon (1916) who showed that H (3, r) is equal to Binomial(r+2, 2)+3 Binomial(r+3, 4). This quantity grows as:&#xD;
&#xD;
[mcode]Table[Binomial[r + 2, 2] + 3 Binomial[r + 3, 4], {r, 20}]&#xD;
&#xD;
&#xD;
{6, 21, 55, 120, 231, 406, 666, 1035, 1540, 2211, 3081, 4186, 5565, 7260, 9316, 11781, 14706, 18145, 22155, 26796}&#xD;
[/mcode]&#xD;
The 21 above corresponds to the number of elements in the following list&#xD;
[mcode] MatrixForm /@ ({{x1, x2, x3}, {x4, x5, x6}, {x7, x8, x9}} /. &#xD;
   Solve[(x1 + x2 + x3 == x4 + x5 + x6 == x7 + x8 + x9 == &#xD;
       x1 + x4 + x7 == x2 + x5 + x8 == x3 + x6 + x9 == 2) &amp;amp;&amp;amp; x1 &amp;gt;= 0 &amp;amp;&amp;amp;&#xD;
      x2 &amp;gt;= 0 &amp;amp;&amp;amp; x3 &amp;gt;= 0 &amp;amp;&amp;amp; x4 &amp;gt;= 0 &amp;amp;&amp;amp; x5 &amp;gt;= 0 &amp;amp;&amp;amp; x6 &amp;gt;= 0 &amp;amp;&amp;amp; x7 &amp;gt;= 0 &amp;amp;&amp;amp;&#xD;
      x8 &amp;gt;= 0 &amp;amp;&amp;amp; x9 &amp;gt;= 0, {x1, x2, x3, x4, x5, x6, x7, x8, x9}, &#xD;
    Integers])&#xD;
Length[%]&#xD;
[/mcode]&#xD;
[img=width: 552px; height: 190px;]/c/portal/getImageAttachment?filename=pic_064.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
by the way, the 9316 includes magic squares .  if one wants to find out how many magic squares 3 x3 are there (disregarding equivalent ones under rotation/reflections),  a better method is the following&#xD;
[mcode] MatrixForm[Partition[#, 3]] &amp;amp; /@ &#xD;
 Select[Permutations[&#xD;
   Range[9]], ({{x1, x2, x3}, {x4, x5, x6}, {x7, x8, x9}} = &#xD;
     Partition[#, &#xD;
      3]; (x1 + x2 + x3 == x4 + x5 + x6 == x7 + x8 + x9 == &#xD;
       x1 + x4 + x7 == x2 + x5 + x8 == x3 + x6 + x9 == 15) &amp;amp;&amp;amp; (x1 == &#xD;
       Min[x1, x3, x7, x9]) &amp;amp;&amp;amp; (x3 &amp;lt; x7)) &amp;amp;]&#xD;
[/mcode]&#xD;
[img=width: 713px; height: 62px;]/c/portal/getImageAttachment?filename=pic_065.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
What could be the formula for H (4, r)?.  Stanley and Ehrhart  showed that H (n, r) is a polynomial in r of degree (n - 1)^2. For example, H (3, r) is &#xD;
[mcode] Simplify[Binomial[r + 2, 2] + 3 Binomial[r + 3, 4]]&#xD;
[/mcode]&#xD;
[img=width: 199px; height: 41px;]/c/portal/getImageAttachment?filename=pic_066.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
To obtain the expression for H(4,r) we proceed by interpolating the following values.&#xD;
[mcode] Timing[Table[&#xD;
  Length[({{x1, x2, x3, x4}, {x5, x6, x7, x8}, {x9, x10, x11, &#xD;
       x12}, {x13, x14, x15, x16}} /. &#xD;
     Solve[(x1 + x2 + x3 + x4 == x5 + x6 + x7 + x8 == &#xD;
         x9 + x10 + x11 + x12 == x13 + x14 + x15 + x16 == &#xD;
         x1 + x5 + x9 + x13 == x2 + x6 + x10 + x14 == &#xD;
         x3 + x7 + x11 + x15 == x4 + x8 + x12 + x16 == i) &amp;amp;&amp;amp; x1 &amp;gt;= 0 &amp;amp;&amp;amp;&#xD;
        x2 &amp;gt;= 0 &amp;amp;&amp;amp; x3 &amp;gt;= 0 &amp;amp;&amp;amp; x4 &amp;gt;= 0 &amp;amp;&amp;amp; x5 &amp;gt;= 0 &amp;amp;&amp;amp; x6 &amp;gt;= 0 &amp;amp;&amp;amp; &#xD;
       x7 &amp;gt;= 0 &amp;amp;&amp;amp; x8 &amp;gt;= 0 &amp;amp;&amp;amp; x9 &amp;gt;= 0 &amp;amp;&amp;amp; x10 &amp;gt;= 0 &amp;amp;&amp;amp; x11 &amp;gt;= 0 &amp;amp;&amp;amp; &#xD;
       x12 &amp;gt;= 0 &amp;amp;&amp;amp; x13 &amp;gt;= 0 &amp;amp;&amp;amp; x14 &amp;gt;= 0 &amp;amp;&amp;amp; x15 &amp;gt;= 0 &amp;amp;&amp;amp; x16 &amp;gt;= 0, {x1, &#xD;
       x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, &#xD;
       x16}, Integers])], {i, 0, 8}]]&#xD;
[/mcode]&#xD;
[img=width: 550px; height: 30px;]/c/portal/getImageAttachment?filename=pic_067.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
and the answer for H (4, r) is&#xD;
[mcode] Expand[InterpolatingPolynomial[{{0, 1}, {1, 24}, {2, 282}, {3, &#xD;
    2008}, {4, 10147}, {5, 40176}, {6, 132724}, {7, 381424}, {8, &#xD;
    981541}}, r]]&#xD;
[/mcode][img=width: 473px; height: 50px;]/c/portal/getImageAttachment?filename=pic_068.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
To date not even H (7, r) is known.</description>
    <dc:creator>Jaime Rangel-Mondragon</dc:creator>
    <dc:date>2013-07-18T17:58:09Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/896287">
    <title>Use Manipulate in a ParametricPlot ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/896287</link>
    <description>Hi, I&amp;#039;m trying to manipulate a Parametric Plot, but I clearly see its not working because I&amp;#039;m not able to fix it, that&amp;#039;s why I would love some help.&#xD;
Regards&#xD;
&#xD;
    Manipulate[ParametricPlot[{r Cos[x], r Sin[y]}, {y,1,k}, {x, 0, n}, Mesh -&amp;gt; Full], {n, 0, 2 Pi}, {k, 1, 2}]</description>
    <dc:creator>Muhammad Afzal</dc:creator>
    <dc:date>2016-07-30T07:33:09Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/57140">
    <title>How to compute the triangles of a graph via pattern matching?</title>
    <link>https://community.wolfram.com/groups/-/m/t/57140</link>
    <description>Consider the following triangulated planar object&#xD;
&#xD;
[img=width: 164px; height: 172px;]/c/portal/getImageAttachment?filename=pic4.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
We notice that it has 10 triangular faces.In general, given a planar graph, how can we obtain these triangles? Take a simple graph, for instance&#xD;
&#xD;
[mcode] g1 = Graph[{1 \[UndirectedEdge] 2, 1 \[UndirectedEdge] 5, &#xD;
   1 \[UndirectedEdge] 4, 2 \[UndirectedEdge] 4, &#xD;
   2 \[UndirectedEdge] 3, 3 \[UndirectedEdge] 4, &#xD;
   4 \[UndirectedEdge] 5}, VertexLabels -&amp;gt; &amp;#034;Name&amp;#034;, ImagePadding -&amp;gt; 10]&#xD;
[/mcode]&#xD;
[img=width: 360px; height: 153px;]/c/portal/getImageAttachment?filename=pic_070.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
according to the theory, if m is its adjacency matrix (the adjacency matrix of a graph is a 0 - 1 matrix in which the i -j element is 1 only if vertices i and j are adjacent )&#xD;
the number of  its triangles is equal to the trace of m^3 divided by 6 (the trace of a matrix is the sum of its diagonal elements). &#xD;
  For this example&#xD;
[mcode]m1 = AdjacencyMatrix[g1];&#xD;
m1 // MatrixForm&#xD;
m1.m1.m1 // MatrixForm&#xD;
Tr[m1.m1.m1]/6&#xD;
[/mcode][img=width: 111px; height: 200px;]/c/portal/getImageAttachment?filename=pic_071.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
(if you are confused by the fact that the element at row 1 column 3 is 1, even though  vertices 1 and 3 are not connected, check VertexList[g1])&#xD;
&#xD;
Another example:[mcode] g2 = Graph[{1 \[UndirectedEdge] 2, 1 \[UndirectedEdge] 5, &#xD;
   1 \[UndirectedEdge] 6, 1 \[UndirectedEdge] 7, &#xD;
   1 \[UndirectedEdge] 10, 2 \[UndirectedEdge] 6, &#xD;
   2 \[UndirectedEdge] 7, 3 \[UndirectedEdge] 5, &#xD;
   3 \[UndirectedEdge] 8, 3 \[UndirectedEdge] 9, &#xD;
   3 \[UndirectedEdge] 10, 4 \[UndirectedEdge] 6, &#xD;
   4 \[UndirectedEdge] 8, 4 \[UndirectedEdge] 9, &#xD;
   5 \[UndirectedEdge] 6, 5 \[UndirectedEdge] 8, &#xD;
   5 \[UndirectedEdge] 10, 6 \[UndirectedEdge] 8, &#xD;
   7 \[UndirectedEdge] 10, 8 \[UndirectedEdge] 9}, &#xD;
  VertexLabels -&amp;gt; &amp;#034;Name&amp;#034;, ImagePadding -&amp;gt; 10]&#xD;
[/mcode][img=width: 345px; height: 182px;]/c/portal/getImageAttachment?filename=pic_072.png&amp;amp;userId=48389[/img]&#xD;
[mcode]m2 = AdjacencyMatrix[g2];&#xD;
MatrixForm[m2]&#xD;
MatrixForm[m2.m2.m2]&#xD;
Tr[m2.m2.m2]/6&#xD;
[/mcode]&#xD;
[img=width: 251px; height: 352px;]/c/portal/getImageAttachment?filename=pic_073.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
Getting the indices of the vertices forming the triangles  takes more work. An idea is as follows.  Construct the matrix of &amp;#034;connections&amp;#034; :&#xD;
[mcode] t = Map[Flatten[Position[#, 1]] &amp;amp;, Normal[m2]]&#xD;
[/mcode][mcode] {{2, 5, 6, 7, 10}, {1, 6, 7}, {5, 8, 9, 10}, {6, 8, 9}, {1, 3, 6, 8, &#xD;
  10}, {1, 2, 4, 5, 8}, {1, 2, 10}, {3, 4, 5, 6, 9}, {3, 4, 8}, {1, 3,&#xD;
   5, 7}}&#xD;
[/mcode]&#xD;
and the &amp;#034;transformation of connections&amp;#034; :&#xD;
[mcode] tr = Thread[Range[10] -&amp;gt; t]&#xD;
[/mcode]&#xD;
[mcode] {1 -&amp;gt; {2, 5, 6, 7, 10}, 2 -&amp;gt; {1, 6, 7}, 3 -&amp;gt; {5, 8, 9, 10}, &#xD;
 4 -&amp;gt; {6, 8, 9}, 5 -&amp;gt; {1, 3, 6, 8, 10}, 6 -&amp;gt; {1, 2, 4, 5, 8}, &#xD;
 7 -&amp;gt; {1, 2, 10}, 8 -&amp;gt; {3, 4, 5, 6, 9}, 9 -&amp;gt; {3, 4, 8}, &#xD;
 10 -&amp;gt; {1, 3, 5, 7}}&#xD;
[/mcode]&#xD;
then apply it twice to t[mcode] t1 = (t /. tr);&#xD;
t2 = (t1 /. tr);&#xD;
[/mcode]and the following code gets the indices of the vertices of the triangles :[mcode] r = Map[Position[t2[[#]], #] &amp;amp;, Range[10]];&#xD;
r2 = Table[ Map[{i, t[[i, First[#]]], t[[t[[i, First[#]]], #[[2]]]]} &amp;amp;, r[[i]]], {i, 10}];&#xD;
tri = Union[Sort /@ Flatten[r2, 1]]&#xD;
[/mcode][mcode] {{1, 2, 6}, {1, 2, 7}, {1, 5, 6}, {1, 5, 10}, {1, 7, 10}, {3, 5, 8}, {3, 5, 10}, {3, 8, 9}, {4, 6, 8}, {4, 8, 9}, {5, 6, 8}}&#xD;
[/mcode]&#xD;
Alternatively, we might proceed as follows. Using our first example g1, let us substitute the  adjacency matrix by the following one[mcode] (m3 = (Normal[m1] Range[5])) // MatrixForm&#xD;
[/mcode]&#xD;
[mcode][/mcode][img=width: 102px; height: 81px;]/c/portal/getImageAttachment?filename=pic010.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
then we redefine the multiplication of matrices by taking addition as listing and multiplication as yuxtaposition. The square of the previous matrix would be&#xD;
[mcode] m4 = Table[&#xD;
   Select[Table[&#xD;
     10 m3[[i, k]] + m3[[k, j]], {k, &#xD;
      5}], (# &amp;gt; 9) \[And] (Mod[#, 10] &amp;gt; 0) &amp;amp;], {i, 5}, {j, 5}];&#xD;
MatrixForm[m4]&#xD;
[/mcode]&#xD;
[img=width: 490px; height: 89px;]/c/portal/getImageAttachment?filename=pic_074.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
and the cube of m3 would be&#xD;
[mcode] m5 = Table[&#xD;
   Select[Join @@ &#xD;
     Table[10 m4[[i, k]] + m3[[k, j]], {k, &#xD;
       5}], (# &amp;gt; 9) \[And] (Mod[#, 10] &amp;gt; 0) &amp;amp;], {i, 5}, {j, 5}];&#xD;
MatrixForm[m5]&#xD;
[/mcode]&#xD;
[img=width: 800px; height: 86px;]/c/portal/getImageAttachment?filename=pic_075.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
Actually, only elements on the diagonal interests us so it is better if we do&#xD;
[mcode] m6 = Table[&#xD;
  Select[Join @@ &#xD;
    Table[10 m4[[i, k]] + m3[[k, i]], {k, &#xD;
      5}], (# &amp;gt; 9) \[And] (Mod[#, 10] &amp;gt; 0) &amp;amp;], {i, 5}]&#xD;
[/mcode][mcode] {{142, 143, 124, 134}, {241, 214, 254, 245}, {341, 314}, {421, 431, &#xD;
  412, 452, 413, 425}, {542, 524}}[/mcode]&#xD;
&#xD;
then, the indices of the vertices of the triangles are[mcode] Select[Map[Mod[{Floor[#/100], Floor[#/10], #}, 10] &amp;amp;, &#xD;
  Flatten[m6]], OrderedQ]&#xD;
[/mcode][mcode] {{1, 2, 4}, {1, 3, 4}, {2, 4, 5}}&#xD;
[/mcode]&#xD;
Of course, the actual coordinates of the vertices of the graph have to be considered. For instance, we compute five triangles in the following graph.[mcode] pts = {{0.6, 0.5}, {0.7, 0.26}, {1.74, 2}, {-1, 0.5}, {-1.6, 1}};&#xD;
segs = {1 \[UndirectedEdge] 2, 1 \[UndirectedEdge] 3, &#xD;
   1 \[UndirectedEdge] 4, 2 \[UndirectedEdge] 3, &#xD;
   2 \[UndirectedEdge] 4, 3 \[UndirectedEdge] 4, &#xD;
   3 \[UndirectedEdge] 5, 4 \[UndirectedEdge] 5};&#xD;
m2 = AdjacencyMatrix[Graph[segs]];&#xD;
Tr[m2.m2.m2]/6&#xD;
[/mcode][mcode] 5&#xD;
[/mcode]&#xD;
but can you see them in its picture?[mcode] Graphics[{EdgeForm[Thin], ColorData[2, 6], Black, &#xD;
  Map[({a, v} = #; Line[Map[{pts[[a]], #} &amp;amp;, Part[pts, v]]]) &amp;amp;, t], &#xD;
  White, MapIndexed[{Disk[#1, .1], &#xD;
     Text[Style[#2[[1]], Black, 13, Bold], #1]} &amp;amp;, pts]}, &#xD;
 PlotRange -&amp;gt; {{-2, 2}, {0, 2.5}}]&#xD;
[/mcode][img=width: 357px; height: 210px;]/c/portal/getImageAttachment?filename=pic_076.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
&#xD;
I suspect there must be other way of computing triangles by using Mathematica pattern matching capabilities. For instance, for g1 we have the list of its edges as&#xD;
[img=width: 383px; height: 34px;]/c/portal/getImageAttachment?filename=pic018.png&amp;amp;userId=48389[/img]&#xD;
it must be possible to just say : search for all patterns of the form&#xD;
&#xD;
[img=width: 149px; height: 26px;]/c/portal/getImageAttachment?filename=pic019.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
with i &amp;lt;&amp;gt; j &amp;lt;&amp;gt; k. How? How about all the faces in a graph? The pattern would be find all cycles of the form&#xD;
&#xD;
[img=width: 242px; height: 30px;]/c/portal/getImageAttachment?filename=pic020.png&amp;amp;userId=48389[/img]&#xD;
&#xD;
for all different i&amp;#039; s and k &amp;gt; 2.  Of course, these faces have to be such that they dont contain other faces. How can we do it?</description>
    <dc:creator>Jaime Rangel-Mondragon</dc:creator>
    <dc:date>2013-07-11T00:05:45Z</dc:date>
  </item>
</rdf:RDF>

