<?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 any discussions tagged with Mathematica sorted by active.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3713957" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3713948" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3713939" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3713930" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3713462" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3700131" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3644908" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/122095" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3694230" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3682128" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3540598" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3662265" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3660974" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3636637" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3645383" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1323951" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/366628" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3635801" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1077888" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3609706" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3713957">
    <title>Insphere (Inner sphere tangent to each side of the tetrahedron)</title>
    <link>https://community.wolfram.com/groups/-/m/t/3713957</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/74d52d3b-de61-4316-92f3-5b500ba485b6</description>
    <dc:creator>Alejandro Latorre Chirot</dc:creator>
    <dc:date>2026-05-09T20:43:05Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3713948">
    <title>Exespheres</title>
    <link>https://community.wolfram.com/groups/-/m/t/3713948</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/df20a2f1-2508-46fc-827f-889fbadcc2f4</description>
    <dc:creator>Alejandro Latorre Chirot</dc:creator>
    <dc:date>2026-05-09T20:39:00Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3713939">
    <title>Circumsphere</title>
    <link>https://community.wolfram.com/groups/-/m/t/3713939</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/b17033b1-5762-4865-a3b1-1296d0284269</description>
    <dc:creator>Alejandro Latorre Chirot</dc:creator>
    <dc:date>2026-05-09T20:36:19Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3713930">
    <title>Particle on a circular cone</title>
    <link>https://community.wolfram.com/groups/-/m/t/3713930</link>
    <description>Suppose that the position function of a particle in space is given by &#xD;
 r[t] = {t Cos[t], t Sin[t], 3 t}.&#xD;
 Show that the particle moves on a circular cone.&#xD;
 Find the angle between the velocity and acceleration vectors when t = 1.5.&#xD;
 Find the tangential and normal components of the acceleration when t = 1.5.&#xD;
&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/ffccbfd5-d3d9-45f0-94c2-c556851a9ae2</description>
    <dc:creator>Alejandro Latorre Chirot</dc:creator>
    <dc:date>2026-05-09T19:39:26Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3713462">
    <title>Superoscillations Part I: 1D foundations, leaky functions and quantum wavefunctions</title>
    <link>https://community.wolfram.com/groups/-/m/t/3713462</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/f7a9ddb0-2b29-4ee7-bd7e-6740cf584667</description>
    <dc:creator>Bruno Tenorio</dc:creator>
    <dc:date>2026-05-08T22:22:16Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3700131">
    <title>When will Mathematica version 15.0 be released?</title>
    <link>https://community.wolfram.com/groups/-/m/t/3700131</link>
    <description>Does anyone know when Mathematica Version 15.0 will be released?</description>
    <dc:creator>Lan Wei</dc:creator>
    <dc:date>2026-04-22T01:55:15Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3644908">
    <title>Looking for help cleaning up a Mathematica notebook into a reference implementation</title>
    <link>https://community.wolfram.com/groups/-/m/t/3644908</link>
    <description>**TL;DR** I&amp;#039;m looking for someone to refactor a Mathematica notebook I&amp;#039;ve got from a fellow researcher so I can use it as a reliable reference implementation. I expect it&amp;#039;s a few hours of work for the right person. I can offer financial compensation and/or my own technical expertise.&#xD;
&#xD;
Hello Wolfram community!&#xD;
&#xD;
I hope this is the right place for this kind of request. If not, my apologies!&#xD;
&#xD;
I&amp;#039;m a PhD student in the final stage of my project, an attempt at closed-loop control of water jets from firefighting robots using UAV imagery as feedback. The controller design is based on the Smith predictor architecture, which requires a predictive model to compensate for the long dead time of the system. Accurately predicting the trajectory of water jets is far from trivial. One of the most promising models I could find is described in https://link.springer.com/article/10.1007/s10694-021-01175-1. The model is formulated as a system of ordinary differential equations.   &#xD;
  &#xD;
I tried implementing it in Python so I can integrate it with my other components. It&amp;#039;s almost complete, but despite several months of debugging I haven&amp;#039;t been able to resolve the remaining issues. So I contacted the corresponding author. They confirmed some errors I found in the printed versions of the equations, and kindly provided their original Mathematica implementation. This helped, but my own implementation is still incomplete. The issues could stem from additional errors in the printed equations I/we haven&amp;#039;t found yet, mistakes in my implementation, or differences in solver behavior (Mathematica&amp;#039;s vs. SciPy&amp;#039;s solve_ivp() function). &#xD;
&#xD;
Unfortunately, the notebook is hard for me to follow and differs quite a bit from the published paper (structure, variable naming, angle conventions, etc.). I&amp;#039;ve never worked with Mathematica and don&amp;#039;t have the time nor patience to properly learn it before my deadline. &#xD;
&#xD;
The author is currently unable to provide further support, but since I&amp;#039;m getting more and more desperate to finish this subproject, I&amp;#039;m now seeking third-party help. I&amp;#039;m looking for someone to refactor the notebook into a clean, well-structured reference implementation. Specifically, I&amp;#039;d like them to&#xD;
&#xD;
 - remove unused and redundant code (many expressions are duplicated)&#xD;
 - improve structure&#xD;
 - improve documentation&#xD;
 - add small quality-of-life improvements if appropriate&#xD;
 - flag any noticeable discrepancies&#xD;
&#xD;
The refactored version must reproduce the original results, in particular the figures shown in the paper. Ideally, it should make it easy to experiment with the equations and parameters. One specific goal is to verify whether the rearranged equation forms I use in Python (to match SciPy&amp;#039;s solver interface) produce the same results as the original formulation.&#xD;
  &#xD;
If you&amp;#039;re interested, I&amp;#039;ll obtain the author&amp;#039;s permission and share the notebook privately so you can assess the scope before we discuss compensation. Bonus points if you have experience with physics-based simulations and are open to occasional follow-up questions :)&#xD;
&#xD;
Many thanks and regards!</description>
    <dc:creator>Merlin Stampa</dc:creator>
    <dc:date>2026-02-24T20:34:23Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/122095">
    <title>Dancing with friends and enemies: boids&amp;#039; swarm intelligence</title>
    <link>https://community.wolfram.com/groups/-/m/t/122095</link>
    <description>The latest way I have found to use my expensive math software for frivolous entertainment is this. Here&amp;#039;s is a way to describe it. 
[list]
[*]1000 dancers assume random positions on the dance-floor. 
[*]Each randomly chooses one &amp;#034;friend&amp;#034; and one &amp;#034;enemy&amp;#034;. 
[*]At each step every dancer 
[list]
[*]moves 0.5% closer to the centre of the floor
[*]then takes a large step towards their friend 
[*]and a small step away from their enemy. 
[/list]
[*]At random intervals one dancer re-chooses their friend and enemy
[/list]
Randomness is deliberately injected. Here is the dance...
[mcode]n = 1000; 
r := RandomInteger[{1, n}]; 
f := (#/(.01 + Sqrt[#.#])) &amp;amp; /@ (x[[#]] - x) &amp;amp;; 
s := With[{r1 = r}, p[[r1]] = r; q[[r1]] = r]; 
x = RandomReal[{-1, 1}, {n, 2}]; 
{p, q} = RandomInteger[{1, n}, {2, n}]; 
Graphics[{PointSize[0.007], Dynamic[If[r &amp;lt; 100, s]; 
Point[x = 0.995 x + 0.02 f[p] - 0.01 f[q]]]}, PlotRange -&amp;gt; 2][/mcode]
[img]/c/portal/getImageAttachment?filename=OPTfnlfrnds.gif&amp;amp;userId=11733[/img]

Thanks to Vitaliy for posting this on my behalf, complete with animations :-)

Background: I had read somewhere that  macro-scale behaviour of animal swarms (think of flocks of starlings or shoals of herring) is explained by each individual following very simple rules local to their vicinity, essentially 1) try to keep up and 2) try not to collide. I started trying to play with this idea in Mathematica, but it was rather slow to identify the nearest neighbours of each particle. So I wondered what would happen if each particle acted according to the locations of two other particles, regardless of their proximity. The rule was simply to move away from one and towards the other.

The contraction (x = 0.995 x) was added to prevent the particle cloud from dispersing towards infinity or drifting away from the origin. I tweaked the &amp;#034;towards&amp;#034; and &amp;#034;away&amp;#034; step sizes to strike a balance between the tendency to clump together and to spread apart (if you make the step sizes equal you get something more like a swarm of flies). With each particle&amp;#039;s attractor and repeller fixed, the system finds a sort of dynamic equilibrium, so to keep things changing I added a rule to periodically change the attractor and repeller for one of the particles. The final adjustment was to make the &amp;#034;force&amp;#034; drop towards zero for particles at very close range. This helps to stop the formation of very tight clumps, and also prevents a division-by-zero error when a particle chooses itself as its attractor or repeller.

The description of the system as a dance was an attempt to explain the swirling pattern on the screen without using mathematical language. I&amp;#039;d love to see what other &amp;#034;dances&amp;#034; can be created with other simple rules.</description>
    <dc:creator>Simon Woods</dc:creator>
    <dc:date>2013-09-11T18:31:12Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3694230">
    <title>Mathematica on MacBook Neo</title>
    <link>https://community.wolfram.com/groups/-/m/t/3694230</link>
    <description>Has anyone installed Mathematica on the new MacBook Neo? The machine uses the A18 phone processor and has only 8 GB memory, but online reviews claim it has surprisingly good performance. I&amp;#039;m considering buying one for travel, but wondering how well Mathematica performs on it.</description>
    <dc:creator>John Shonder</dc:creator>
    <dc:date>2026-04-17T13:35:21Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3682128">
    <title>Parametric equations of rotated parabola</title>
    <link>https://community.wolfram.com/groups/-/m/t/3682128</link>
    <description>A parabola is rotated 30 degrees with respect to the line x = 1 and its new parametric equations are requested.&#xD;
&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/aa3a9e67-2b63-4c3f-bdf6-893f98032c15</description>
    <dc:creator>Alejandro Latorre Chirot</dc:creator>
    <dc:date>2026-04-10T14:41:34Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3540598">
    <title>How to handle big expressions in Mathematica</title>
    <link>https://community.wolfram.com/groups/-/m/t/3540598</link>
    <description>----------&#xD;
**Foreword:**&#xD;
----------------------------&#xD;
----------&#xD;
&#xD;
Hello Everyone,&#xD;
&#xD;
I am Levente Fekésházy, a PhD student at the University of Hamburg and Eötvös Loránd University. My research focuses on precision quantum chromodynamic calculations, which heavily rely on symbolic algebra programs like Wolfram Mathematica. As my PhD approaches its end, I&amp;#039;ve decided to share a few tricks to handle large symbolic expressions in Mathematica.&#xD;
&#xD;
&#xD;
If we&amp;#039;re dealing with massive expressions, why not switch to FORM?&#xD;
----------&#xD;
&#xD;
While many researchers in high energy physics prefer FORM over Mathematica, it suffers from a critical limitation: functionality. FORM implements only a handful of high-level functions (though the recent version can interface with Flint). In contrast, Mathematica offers an extensive ecosystem of high energy physics packages like LinApart, alibrary, MultivariateApart, MT, HPL, PolylogTools, HypExp, Diogenes, FeynCalc etc. Furthermore, there are powerful built-in functions which are extremely useful and save us both time and energy.&#xD;
         Hence, it is all about convenience. Research timelines and funding rarely allow the reinvention of the wheel... or hundreds of wheels. While the physics community could theoretically port all necessary tools to FORM; and individual researchers have likely implemented many already, publication pressure discourages code sharing. Thus, for a newbie like a PhD student it is extremely hard to start their research.&#xD;
&#xD;
&#xD;
 What is the problem with Mathematica?&#xD;
----------&#xD;
&#xD;
Mathematica&amp;#039;s Achilles&amp;#039; heel is performance. Many functions critical to high energy physics haven&amp;#039;t been optimized in over a decade. Meanwhile, computational demands have exploded: where &amp;#034;large&amp;#034; once meant thousands of terms, we now routinely handle several millions. Some issues for example:&#xD;
&#xD;
 1. Mathematica stores everything in RAM, even when file-based storage would be more practical for massive expressions.&#xD;
&#xD;
 2. Despite keeping data in memory, Mathematica handles substitutions far slower than FORM, which processes terms individually from disk.&#xD;
&#xD;
 3. Parallelization is a nightmare, the overhead both at the start and end of calculations render the well-known parallel functions like ParallelTable or Parallelize impractical in computer algebra calculations.&#xD;
&#xD;
 4. Expand is one, if not the most basic function of a computer algebra calculation. However it is painstakingly slow in Mathematica; there is no nicer way to put it. Even Maple&amp;#039;s expanding function is significantly faster, let alone FORM&amp;#039;s. I only see two possibilities why it can be so:&#xD;
&#xD;
 - they sort too many times. This is confirmed by the documentation of&#xD;
   Distribute, where it states, that Expand sorts after every step;&#xD;
   which is the worst way to do it.&#xD;
&#xD;
 - it uses an old sorting algorithm and it wasn&amp;#039;t updated to a newer one, for example to power-sort.&#xD;
&#xD;
&#xD;
Despite the limitations, Mathematica remains an invaluable tool. Its intuitive syntax and gentle learning curve make it accessible, while its comprehensive functionality makes it indispensable. The key to success lies in optimization.&#xD;
         While each calculation is unique, certain optimization strategies are valid in general. This guide focuses on two frequently-used functions/operations, Series and Apart, to demonstrate various optimization techniques and their dramatic impact on performance. These examples will show how careful handling of the expressions can keep Mathematica working even with &amp;#034;larger&amp;#034; expressions. &#xD;
&#xD;
&#xD;
Notes:&#xD;
----------&#xD;
&#xD;
&#xD;
- These &amp;#034;tricks&amp;#034; are well known in the community and many, like gathering and making coefficients symbolic, have their own built-in functions even in FORM. My main goal is to spare some time and flatten the learning curve of the language for newcomers. Thus, I would like to ask the advanced users to refrain themselves from comments like:&#xD;
&#xD;
                           &amp;gt; ThiS Is TRiVial!!!4!!!&#xD;
                           &amp;gt; EvERyBODy HaS a FuNCtioN FoR THis!&#xD;
&#xD;
- In each section I will &#xD;
                           - try to motivate and introduce the philosophy very shortly,&#xD;
                           - then present the functions themself, because I believe it is important, that one can see it is not magic.&#xD;
                           - lastly I will present some examples. &#xD;
&#xD;
- The code and the examples can be found on my GitHub at &#xD;
&#xD;
    `https://github.com/fekeshazy/How_to_handle_big_expressions_in_Mathematica`&#xD;
&#xD;
- I will not explain every line of each function, since my goal is to showcase the functionality and not to write a Mathematica lecture note. However, I tired to extensively comment the code and structure it such a way, that one can understand it after giving it some thought.&#xD;
&#xD;
- I also leave out some edge-cases, error messaging and similar things in order to not clutter up the text further. Thus, these are not finished functions, in order to release them to a general userbase one must massage them a bit.&#xD;
&#xD;
- I do not hold myself to strict standards here, thus it can happen that some parts of the codes are redundant and or can be written nicer and or be optimized.&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
----------&#xD;
**Gathering:**&#xD;
-----------------------&#xD;
----------&#xD;
&#xD;
&amp;gt; Motto: If computers rebel, the first to be executed will be the programmers who write unoptimized code.&#xD;
&#xD;
&#xD;
----------&#xD;
Motivation:&#xD;
----------&#xD;
&#xD;
&#xD;
When we are working with big expressions, we must think about optimization; the first question is to ask ourselves: how would I do it?&#xD;
And I can assure you, if you were given a huge sum you would try to avoid doing the same calculation many times. However, our two example&#xD;
functions Apart and Series applies itself on every term... always... hence it does the same calculation over and over again in some cases. The situation is even worse, there is no built-in function in Mathematica, like Bracket in FORM, which would organize the expression in a way, that said functions only be applied on the variable dependent parts. What do I mean by this exactly? Let us take the following expression:&#xD;
&#xD;
         A/(x-1)/(x-2)+B/(x-1)/(x-2)+C/(x-4)/(x+5),&#xD;
&#xD;
if we want to partial fraction it Apart will be applied on all of the terms individually, but then we would do Apart[1/(x-1)/(x-2),x]&#xD;
twice. On paper, one would immediately do the &#xD;
&#xD;
         A/(x-1)/(x-2)+B/(x-1)/(x-2)+C/(x-4)/(x+5)  -&amp;gt; (A+B)/(x-1)/(x-2)+C/(x-4)/(x+5)&#xD;
&#xD;
bracketing to avoid this. Of course, we have the Collect function but that has three drawbacks:&#xD;
&#xD;
1. we cannot apply a function on the variable dependent part,&#xD;
2. it can only separate terms by pattern,&#xD;
3. it brackets everything, so we are not getting a separation by unique structures.&#xD;
&#xD;
&#xD;
- The first means, we cannot just write&#xD;
&#xD;
                  A/(x-1)/(x-2)+B/(x-1)/(x-2)+C/(x-4)/(x+5)//Collect[#, a_/;FreeQ[a,x]&amp;amp;, #&amp;amp;, Apart[#,x]&amp;amp; ]&amp;amp;&#xD;
&#xD;
to partial fraction the expression. &#xD;
&#xD;
- The second, a_/;FreeQ[a,x]&amp;amp; pattern makes it immensely inefficient in the large term limit. &#xD;
&#xD;
- Furthermore, we need separation by unique parts, not just for Series or Apart, but also in order to use some rules, like the ones for integrating polylogarithms. So if we have:&#xD;
&#xD;
                  na+nb x + x G[x]+ 2 na nb x + na^2x G[x]+x^2+x^2G[x]//Collect[#,x]&amp;amp;&#xD;
&#xD;
 and we get &#xD;
&#xD;
                  na + x^2 (1 + G[x]) + x (nb + 2 na nb + G[x] + na^2 G[x])&#xD;
&#xD;
we cannot directly apply a rule like x^pow_. G[x] -&amp;gt; (...) . &#xD;
&#xD;
Thus, we ought to write our own function, which must also be at least as fast or faster than Collect.&#xD;
&#xD;
&#xD;
----------&#xD;
Code:&#xD;
----------&#xD;
&#xD;
&#xD;
I) Identifying the dependent terms.&#xD;
&#xD;
1. We have to expand our expression to get every dependency explicit; for that, we can use the second argument of expand.&#xD;
2. Convert it to a list.&#xD;
3. Separate the dependent and independent multiplicative terms.&#xD;
&#xD;
         ClearAll[Dependent]&#xD;
&#xD;
                  (*If the expression is free of the variable give back the expression.*)&#xD;
         Dependent[expr_,var_]:={expr,1}/;FreeQ[expr,var]&#xD;
&#xD;
                  (*&#xD;
                           -expanding of expression,&#xD;
                           -making it a list; edge case when we only have a multiplication not a sum&#xD;
                           -separate the variable dependent terms.&#xD;
                  *)&#xD;
         Dependent[expr_,var_]:=Block[&#xD;
                  {&#xD;
                  tmp=expr&#xD;
                  },&#xD;
&#xD;
                 tmp=tmp//Expand[#,var]&amp;amp;;&#xD;
                 tmp=If[Head[tmp]===Plus,List@@tmp,{tmp}];&#xD;
                 tmp=SeparateDependency[#,var]&amp;amp;/@tmp&#xD;
&#xD;
         ]&#xD;
&#xD;
&#xD;
                  (*&#xD;
                  This function separates the dependent part of an expression. This only works on single expression! Thus,&#xD;
                  expressions without any addition in the numerator and expressions which head is not Plus!&#xD;
&#xD;
                  The first 4 rules are for the special cases, when Select cannot be used. Like when:&#xD;
                           1. the expression is only one term;&#xD;
                           2. the expression is a fraction, with one term in the numerator and one in the denominator.&#xD;
                  *)&#xD;
&#xD;
         ClearAll[SeparateDependency]&#xD;
&#xD;
                  (*The expression is a special case and is free of the variable.*)&#xD;
         SeparateDependency[expr_,var_]:={expr,1}/;Head[expr]=!=Times&amp;amp;&amp;amp;FreeQ[expr,var]&#xD;
         SeparateDependency[expr_,var_]:={expr,1}/;Length[expr]===0&amp;amp;&amp;amp;FreeQ[expr,var]&#xD;
         SeparateDependency[expr_,var_]:={expr,1}/;Length[expr]===2&amp;amp;&amp;amp;Head[expr]===Power&amp;amp;&amp;amp;FreeQ[expr,var]&#xD;
&#xD;
                  (*The expression is a special case and is not free of the variable.*)&#xD;
         SeparateDependency[expr_,var_]:={1,expr}/;Head[expr]=!=Times&amp;amp;&amp;amp;!FreeQ[expr,var]&#xD;
         SeparateDependency[expr_,var_]:={1,expr}/;Length[expr]===0&amp;amp;&amp;amp;!FreeQ[expr,var]&#xD;
         SeparateDependency[expr_,var_]:={1,expr}/;Length[expr]===2&amp;amp;&amp;amp;Head[expr]===Power&amp;amp;&amp;amp;!FreeQ[expr,var]&#xD;
&#xD;
                  (*The expression is a multiplication.*)&#xD;
         SeparateDependency[expr_,var_]:=expr//{#//Select[#,FreeQ[#,var]&amp;amp;]&amp;amp;,#//Select[#,!FreeQ[#,var]&amp;amp;]&amp;amp;}&amp;amp;&#xD;
&#xD;
&#xD;
II) Writing the front of the function&#xD;
&#xD;
&#xD;
                (*&#xD;
                This function takes any expression and gathers the terms with the same unique variable dependent structure.&#xD;
                The variable can be anything, which FreeQ recognizes.&#xD;
&#xD;
                  1. The first argument is the expression.&#xD;
                  2. The second argument is the variable, which must have the head Symbol, And, Or, Alternatives or Pattern.&#xD;
                  3. The optional third argument is a function, which is going to be applied on the independent terms. The default&#xD;
                is None.&#xD;
                  4. The optional forth argument is a function, which is going to be applied on the dependent terms. The default&#xD;
                is None.&#xD;
                *)&#xD;
&#xD;
                (*&#xD;
                If the expression is free of the variable it gives back the expression. If not, then it&#xD;
                        1. expands,&#xD;
                        2. separates the dependent and independent part of each additive and/or multiplicative term,&#xD;
                        3. gathers by the dependent part,&#xD;
                        4. applies the appropiate function(s) on the appropiate term(s),&#xD;
                        5. adds together all of the independent parts for each structure.&#xD;
&#xD;
                The bootleneck might be Expand, cuz&amp;#039; it is a really slow funtion in Wolfram Mathematica.&#xD;
                *)&#xD;
&#xD;
         ClearAll[GatherByDependency]&#xD;
&#xD;
                  (*&#xD;
                  If the function is free of the variable, then the function, which ought to be applied on the independent part, &#xD;
                  should be applied on the whole expression.&#xD;
                  *)&#xD;
         GatherByDependency[&#xD;
                  expr_,&#xD;
                  var_Symbol | var_And | var_Or | var_Alternatives | var_Pattern, &#xD;
                  ApplyFunctionOnIndependent_Function | ApplyFunctionOnIndependent_Symbol: None, &#xD;
                  ApplyFunctionOnDependent_Function | ApplyFunctionOnDependent_Symbol : None]:=&#xD;
                          If[ApplyFunctionOnIndependent===None,&#xD;
&#xD;
                                  expr,&#xD;
                                  expr//ApplyFunctionOnIndependent&#xD;
                          ]/;FreeQ[expr,var]&#xD;
&#xD;
&#xD;
                  (*&#xD;
                  If we have an expression, which is a sum or a multiplication, then we can separate the independent parts.&#xD;
                  *)&#xD;
         GatherByDependency[&#xD;
                  expr_Plus|expr_Times,&#xD;
                  var_Symbol | var_And | var_Or | var_Alternatives | var_Pattern,&#xD;
                  ApplyFunctionOnIndependent_Function | ApplyFunctionOnIndependent_Symbol: None, &#xD;
                  ApplyFunctionOnDependent_Function | ApplyFunctionOnDependent_Symbol : None]:=&#xD;
         Block[&#xD;
                  {&#xD;
                  tmp=expr,&#xD;
                  tmpFreeOfVar,&#xD;
                  tmpNotFreeOfVar&#xD;
                  },&#xD;
&#xD;
&#xD;
                           (*Expanding the whole expression to get every dependency explicit.*)&#xD;
                 tmp=tmp//Expand[#,var]&amp;amp;;&#xD;
&#xD;
                           (*&#xD;
                           It can happen in some cases, that due to the expansion and sorting the expression evaluates to 0.&#xD;
                           In this case we have to return 0; for this we can use the second argument of Return.                           &#xD;
                           *)&#xD;
                 If[tmp===0, Return[tmp,Block] ];&#xD;
&#xD;
&#xD;
                           (*&#xD;
                           If we have only one term, then it is the easiest to quickly separate the term with Select and&#xD;
                           apply the appropriate function on the appropriate parts of the expression.&#xD;
                           *)&#xD;
                 If[Head[tmp]=!=Plus,&#xD;
				         &#xD;
                                    (*Separation.*)&#xD;
                           If[Length[tmp]===0,&#xD;
			         &#xD;
			         tmpFreeOfVar=If[FreeQ[tmp,var], tmp, 1];&#xD;
				tmpNotFreeOfVar=If[!FreeQ[tmp,var], tmp, 1];,&#xD;
				         &#xD;
		                  tmpFreeOfVar=tmp//Select[#, FreeQ[#,var]&amp;amp; ]&amp;amp;;&#xD;
		                  tmpNotFreeOfVar=tmp//Select[#, !FreeQ[#,var]&amp;amp; ]&amp;amp;;&#xD;
&#xD;
                           ]&#xD;
		         &#xD;
                                    (*Applying the function(s).*)&#xD;
                          Switch[&#xD;
                                          {&#xD;
                                          ApplyFunctionOnIndependent,&#xD;
                                          ApplyFunctionOnDependent&#xD;
                                          },&#xD;
&#xD;
                                          {None,None}, tmp=tmpFreeOfVar*tmpNotFreeOfVar;,&#xD;
                                          {_,None},    tmp=(tmpFreeOfVar//ApplyFunctionOnIndependent)*tmpNotFreeOfVar;,&#xD;
                                          {None,_},    tmp=tmpFreeOfVar*(tmpNotFreeOfVar//ApplyFunctionOnDependent);,&#xD;
                                          {_,_},       tmp=(tmpFreeOfVar//ApplyFunctionOnIndependent)*(tmpNotFreeOfVar//ApplyFunctionOnDependent);&#xD;
                                  ];&#xD;
&#xD;
                                    (*Retunr value.*)&#xD;
                          tmp,&#xD;
&#xD;
&#xD;
                           (*Separation.*)&#xD;
                 tmp=tmp//Dependent[#,var]&amp;amp;;&#xD;
&#xD;
                           (*If something goes south just return the expression*)&#xD;
                 If[Head[tmp]=!=List,&#xD;
&#xD;
                         tmp,&#xD;
&#xD;
&#xD;
                                    (*Gathering by dependencies.*)&#xD;
                         tmp=tmp//GatherBy[#,Last]&amp;amp;;&#xD;
&#xD;
                                    (*Applying the function(s).*)&#xD;
                         Switch[&#xD;
                                 {&#xD;
                                 ApplyFunctionOnIndependent,&#xD;
                                 ApplyFunctionOnDependent&#xD;
                                 },&#xD;
                                 {None,None}, tmp=Flatten[{#[[All,1]]//Total,#[[1,2]]}]&amp;amp;/@tmp;,&#xD;
                                 {_,None},    tmp=Flatten[{#[[All,1]]//Total//ApplyFunctionOnIndependent,#[[1,2]]}]&amp;amp;/@tmp;,&#xD;
                                 {None,_},    tmp=Flatten[{#[[All,1]]//Total,#[[1,2]]//ApplyFunctionOnDependent}]&amp;amp;/@tmp;,&#xD;
                                 {_,_},       tmp=Flatten[{#[[All,1]]//Total//ApplyFunctionOnIndependent,#[[1,2]]//ApplyFunctionOnDependent}]&amp;amp;/@tmp;&#xD;
                         ];&#xD;
&#xD;
                                    (*Putting everything back together.*)&#xD;
                         Plus@@Times@@@tmp&#xD;
                 ]&#xD;
&#xD;
                 ]&#xD;
&#xD;
         ]&#xD;
&#xD;
                  (*&#xD;
                  If no rule caught the function call, then apply the ApplyFunctionOnDependent function on the dependent part.&#xD;
                  *)&#xD;
         GatherByDependency[&#xD;
                  expr_, &#xD;
                  var_Symbol | var_And | var_Or | var_Alternatives | var_Pattern, &#xD;
                  ApplyFunctionOnIndependent_Function | ApplyFunctionOnIndependent_Symbol: None, &#xD;
                  ApplyFunctionOnDependent_Function | ApplyFunctionOnDependent_Symbol : None]:=&#xD;
                          If[ApplyFunctionOnDependent===None,&#xD;
&#xD;
                                  expr,&#xD;
                                  expr//ApplyFunctionOnDependent&#xD;
                          ]&#xD;
&#xD;
&#xD;
----------&#xD;
Example:&#xD;
----------&#xD;
&#xD;
&#xD;
An example is really easy to construct/find, let us use the &amp;#034;small&amp;#034; example of LinApart:&#xD;
&#xD;
         In[12]:= tmpApart= exampleSimple//Apart[#, x1]&amp;amp;;//MaxMemoryUsed//AbsoluteTiming&#xD;
&#xD;
         Out[12]= {113.761, 541151072}&#xD;
&#xD;
         In[13]:= tmpGather=exampleSimple//GatherByDependency[#,x1,None,Apart[#,x1]&amp;amp;]&amp;amp;;//MaxMemoryUsed//AbsoluteTiming&#xD;
&#xD;
         Out[13]= {11.3777, 15930864}&#xD;
&#xD;
I think it is pretty self-explanatory, that with this method, we can save both time and memory. Furthermore, I would like to highlight that it is a small example, with relatively easy and few unique structures.&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
----------&#xD;
**Making coefficients symbolic:**&#xD;
-----------------------&#xD;
----------&#xD;
&#xD;
&amp;gt;Motto: If you don&amp;#039;t know about it, it cannot hurt you.&#xD;
&#xD;
----------&#xD;
Motivation:&#xD;
----------&#xD;
&#xD;
&#xD;
Sometimes being able to ignore things is just as much useful as seeing everything. In math problems and real life there is an abundance of unnecessary information, which are just distractions. For example, it can happen that the coefficients of the unique structures are so huge, doing anything with them just use excessive amount of resources. But we can use our new function to hide what we do not need; ***HOWEVER*** it will come with a cost. We will see no cancellation in the intermediate stages!&#xD;
&#xD;
&#xD;
----------&#xD;
Code:&#xD;
----------&#xD;
&#xD;
&#xD;
             (*&#xD;
             This function takes an expression and a variable and returns the expression, where the coefficients of the variable dependent &#xD;
             parts are symbolic.&#xD;
    &#xD;
                      1) The first argument is the expression itself.&#xD;
                      2) The second argument is the variable, which must be a symbol.&#xD;
                      3) The third argument is the dummy function/symbol head, which also must be a symbol. (Unique is a useful function.)&#xD;
             *)&#xD;
    &#xD;
    ClearAll[MakeCoefficientsSymbolic]&#xD;
    &#xD;
    &#xD;
             (*If the expression is free of the variable we store the whole thing is a symbol.*)&#xD;
    MakeCoefficientsSymbolic[&#xD;
                    expr_,&#xD;
                    var_Symbol,&#xD;
                    dummyFunction_Symbol&#xD;
                                                    ]:= {dummyFunction[1], {dummyFunction[1]-&amp;gt;expr}}/;FreeQ[expr,var]&#xD;
                                                    &#xD;
             (*If the expression is a monomial we store its coefficient in a symbol.*)&#xD;
    MakeCoefficientsSymbolic[&#xD;
                    c_. var_Symbol^pow_.,&#xD;
                    var_Symbol,&#xD;
                    dummyFunction_Symbol&#xD;
                                                    ]:= {dummyFunction[1] var^pow, {dummyFunction[1]-&amp;gt;c}}&#xD;
                                                    &#xD;
             (*&#xD;
             -If the expression is not an edge-case we use GatherByDependency and its second argument.&#xD;
             -Account for the edge case, when we have a multiplication and not a sum.&#xD;
             -Construct the rules.&#xD;
             *)&#xD;
    MakeCoefficientsSymbolic[&#xD;
                    expr_,&#xD;
                    var_Symbol,&#xD;
                    dummyFunction_Symbol&#xD;
                                                    ]:=&#xD;
             Block[&#xD;
                      {&#xD;
                      tmp=expr,&#xD;
                      rules&#xD;
                      },&#xD;
    &#xD;
                      tmp=tmp//GatherByDependency[#,var,dummyFunction]&amp;amp;;&#xD;
                    &#xD;
                      If[tmp//FreeQ[#,var]&amp;amp;, Return[{dummyFunction[1], {dummyFunction[1]-&amp;gt;tmp}}, Block] ];&#xD;
                    &#xD;
                      tmp=If[Head[tmp]===Plus,List@@tmp,{tmp}];&#xD;
    &#xD;
                      rules=Table[tmp[[i]]/.c_. dummyFunction[a_]:&amp;gt;Rule[dummyFunction[i],a],{i,1,Length[tmp]}];&#xD;
                      tmp=Table[tmp[[i]]/.c_. dummyFunction[a_]:&amp;gt;c dummyFunction[i],{i,1,Length[tmp]}];&#xD;
    &#xD;
                      {Plus@@tmp,rules}&#xD;
             ]&#xD;
&#xD;
&#xD;
----------&#xD;
Example:&#xD;
----------&#xD;
&#xD;
&#xD;
This trick works best as part of an other function, but let us illustrate it with the help of a series expansion. I provided two polynomials in eps, which have somewhat, but not outrageously, big coefficients. Let us try to truncate the product of them with different methods:&#xD;
&#xD;
1. multiply them together and apply Series on them,&#xD;
2. multiply them together and apply Order on them,&#xD;
3. apply Series on them and multiply them together,&#xD;
4. make the coefficients symbolic and then apply Series. &#xD;
&#xD;
&#xD;
         In[19]:= &#xD;
         &#xD;
         {tmpSeries1,tmpSeries1Rules}=series1//MakeCoefficientsSymbolic[#,eps,Unique[dummyF]]&amp;amp;;&#xD;
         {tmpSeries2,tmpSeries2Rules}=series2//MakeCoefficientsSymbolic[#,eps,Unique[dummyF]]&amp;amp;;&#xD;
&#xD;
         seriesProduct1=series1*series2//Series[#,{eps,0,9}]&amp;amp;;//AbsoluteTiming&#xD;
         seriesProduct2=(series1)*(series2)//Plus[#,O[eps]^10]]&amp;amp;;//AbsoluteTiming&#xD;
         seriesProduct3=(series1//Series[#,{eps,0,12}]&amp;amp;)*(series2//Series[#,{eps,0,12}]&amp;amp;)//Series[#,{eps,0,9}]&amp;amp;;//AbsoluteTiming&#xD;
         seriesProduct4=tmpSeries1*tmpSeries2//&#xD;
                                             Series[#,{eps,0,9}]&amp;amp;//&#xD;
					ReplaceAll[#, Join[tmpSeries1Rules,tmpSeries2Rules]//Dispatch]&amp;amp;;//&#xD;
                                             AbsoluteTiming&#xD;
&#xD;
         Out[21]= {36.435, Null}&#xD;
&#xD;
         Out[22]= {44.8992, Null}&#xD;
&#xD;
         Out[23]= {12.0209, Null}&#xD;
&#xD;
         Out[24]= {0.058356, Null}&#xD;
&#xD;
&#xD;
We can see, that making the coefficient symbolic gave us 3 magnitudes of speedup; and this was only a smallish example without any complicated variable dependency.&#xD;
&#xD;
&#xD;
----------&#xD;
**Apart:**&#xD;
----------------------------&#xD;
----------&#xD;
&#xD;
&amp;gt;Motto: Just because it worked for decades, doesn&amp;#039;t mean it wasn&amp;#039;t bad even back then.&#xD;
&#xD;
----------&#xD;
Motivation:&#xD;
----------&#xD;
&#xD;
&#xD;
Partial fraction decomposition is a very useful operation, for example:&#xD;
         &#xD;
1. if we have a ration function as an integrand, we can use partial fractioning to separate the singularities and make integration easier.&#xD;
&#xD;
2. or if we have a massive expression, we can partial fraction the terms in order to gather by singularity enabling the possibility of cancellation to be realized.&#xD;
&#xD;
&#xD;
Due to its usefulness it is a vital operation in any symbolic calculation, thus an efficient algorithm is essential. There are three main methods, which can be used to acquire a partial fraction decomposition of a fraction:&#xD;
&#xD;
1. the equation system method,&#xD;
2. the Euclidean method,&#xD;
3. the Laurent series method.&#xD;
&#xD;
In most schools the equation system method is taught. In this case we make an ansatz, which is nothing else but the Laurent series expansion of the function, and solve for the coefficients by substituting the appropriate singularities to get an equation system for the coefficients. Let me walk you through an example:&#xD;
&#xD;
         Our fraction is:&#xD;
&#xD;
                  expr=1/(x-1)/(x-2)/(x-3)&#xD;
&#xD;
         Ansatz:&#xD;
 &#xD;
                  1/(x-1)/(x-2)/(x-3) = A/(x-1) + B/(x-2) + C/(x-3)&#xD;
&#xD;
                  1 = A (x-2) (x-3) + B (x-1) (x-3) + C (x-1) (x-2)&#xD;
&#xD;
         Generation of equation system:&#xD;
&#xD;
                  1) x=1: 1 = A (-1) (-2) -&amp;gt; A = 1/2&#xD;
                  2) x=2: 1 = B 1 (-1) -&amp;gt; B = 1&#xD;
                  3) x=3: 1 = C 2 1 -&amp;gt; C = 1/2&#xD;
&#xD;
         Solution: 1/(2 (-3 + x)) - 1/(-2 + x) + 1/(2 (-1 + x))&#xD;
&#xD;
It is quite easy right? If we only have numerical values as roots, it is super fast and easy to implement; most probably this is why Apart uses this method (https://reference.wolfram.com/language/tutorial/SomeNotesOnInternalImplementation.html). However, try to do it with symbolic roots, just substitute a[1], a[2], a[3] etc. and increase the multiplicities and or number of denominators. The whole thing will blow up and get increasingly difficult, almost exponentially.&#xD;
&#xD;
This issue was recognize long ago by mathematicians, that is why they resort themself to an iterative method. In essence they use the extended polynomial GCD to reduce pairs of denominators and iteratively substitute them until only one variable dependent denominator remains in each additive term. It is easier to explain with an example:&#xD;
&#xD;
         Our fraction is:&#xD;
&#xD;
                  expr=1/(x-1)/(x-2)/(x-3)&#xD;
&#xD;
         The polynomial extended GCD gives us the pieces for the equation: a f + b g = 1.&#xD;
&#xD;
                           (*Definition of the denominator pair.*)&#xD;
                  {f, g} = {(x - 1), (x - 2)};&#xD;
&#xD;
                           (*Polynomial extended GCD identity*)&#xD;
                  {d, {a, b}} = PolynomialExtendedGCD[f, g, x];&#xD;
&#xD;
                           (*Dividing both side of the equation with f*g.*)&#xD;
                  Rule[d/f/g, a /g + b/f]&#xD;
&#xD;
         Our rules are: &#xD;
&#xD;
                  rule1= 1/((-2 + x) (-1 + x)) -&amp;gt; 1/(-2 + x) - 1/(-1 + x)&#xD;
                  rule2= 1/((-3 + x) (-1 + x)) -&amp;gt; 1/(2 (-3 + x)) - 1/(2 (-1 + x))&#xD;
                  rule3= 1/((-3 + x) (-2 + x)) -&amp;gt; 1/(-3 + x) - 1/(-2 + x)&#xD;
&#xD;
&#xD;
         Reduction:&#xD;
&#xD;
                  tmp=1/(x-1)/(x-2)/(x-3);&#xD;
&#xD;
                  tmp=tmp/.rule1//Expand&#xD;
                  tmp=tmp/.rule2//Expand&#xD;
                  tmp=tmp/.rule3//Expand&#xD;
&#xD;
                  tmp&#xD;
&#xD;
         Solution: 1/(2 (-3 + x)) - 1/(-2 + x) + 1/(2 (-1 + x))&#xD;
&#xD;
This also can be implemented fairly simple end efficiently; I will go through its implementation in this section. But before doing that, I would like to highlight its superiority over the equation system method. This method is much less sensitive to the number of variables, meaning it uses significantly less resources; since it does not have to construct an equation system and solve it symbolically(!). (Finite field sampling would be no use here, since that method also scales horribly with the number of variables.)&#xD;
&#xD;
The main bottleneck of this algorithm is the expansion. We can try to remedy it by making the coefficients of the variable dependency symbolic, but then we have a much bigger expression to sort at the end; whether it is a good idea or not, cannot really be guessed beforehand, one has to try it out, hence the name experimental mathematics.&#xD;
&#xD;
The third method, the Laurent-series method, solves every problem and more; it is easily parallelizable. During this calculation instead of making an equation system, we just calculate the coefficient with the Residue-theorem:&#xD;
&#xD;
         Our fraction is:&#xD;
&#xD;
                  f[x]=1/(x-a[1])/(x-a[2])/(x-a[3])&#xD;
&#xD;
&#xD;
         Laurent-series:&#xD;
 &#xD;
                  ansatz = c[1,1]/(x-a[1]) + c[2,1]/(x-a[2]) + c[3,1]/(x-a[3])&#xD;
&#xD;
         Residue-theorem:&#xD;
&#xD;
                  c_ij = (x-a[i]) f[x]/.x-&amp;gt; a[i]&#xD;
&#xD;
         Our rules are:&#xD;
                  &#xD;
                  ruleCoefficients= &#xD;
                                    {&#xD;
                                    c[1,1] -&amp;gt; 1/(a[1]-a[2])/(a[1]-a[3]),&#xD;
                                    c[1,2] -&amp;gt; 1/(a[2]-a[1])/(a[2]-a[3]),&#xD;
                                    c[1,3] -&amp;gt; 1/(a[3]-a[1])/(a[3]-a[2])&#xD;
                                    };&#xD;
&#xD;
                  ruleConstants = {a[1]-&amp;gt;1, a[2]-&amp;gt;2, a[3]-&amp;gt;3};&#xD;
&#xD;
         Substitution: &#xD;
&#xD;
                  ansatz/.ruleCoefficients/.ruleConstants&#xD;
&#xD;
         Solution:&#xD;
&#xD;
                  1/(2 (-3 + x)) - 1/(-2 + x) + 1/(2 (-1 + x))&#xD;
&#xD;
&#xD;
This method is superior compared to the other two methods because:&#xD;
&#xD;
- it bypasses complicated algebra, like in the equations system method,&#xD;
- requires no expansion in the intermediate stages, like in the Euclidean method,&#xD;
- the residues are independent, thus can be calculated parallel.&#xD;
&#xD;
For fully factorized denominators, aka linear denominators, this method significantly outperforms any other. Benchmarks and the code is already available in the LinApart package. If we cannot or do not want to factorize our fraction and the denominators are irreducible, we must expand our methods to denominators with arbitrary polynomial degree. This will complicate things especially in the Laurent-series method, but this is not the scope of this blog post; the interested reader can check out LinApart2 (as soon as we publish it;) ).&#xD;
&#xD;
I implemented here the Euclidean method, because that is the most straightforward and needs no additional tricks to handle denominators with higher degrees.&#xD;
&#xD;
&#xD;
----------&#xD;
Code:&#xD;
----------&#xD;
&#xD;
&#xD;
             (*&#xD;
             This function implement the Euclidean method for partial function decomposition.&#xD;
    &#xD;
                      -The first argument is the expression, which numerator should be only a monomial.&#xD;
                      -The second argument is the variable. &#xD;
             *)&#xD;
    &#xD;
    ClearAll[EuclideanMethodPartialFraction]&#xD;
    &#xD;
    EuclideanMethodPartialFraction[expr_, var_, options: OptionsPattern[] ] :=&#xD;
     	Block[&#xD;
      	{&#xD;
       	tmp, (*Universal temporary variable.*)&#xD;
       	dens, pairs, (*Veriables for denominators.*)&#xD;
    &#xD;
             rulesGCD, (*Stores the coefficients from Belzout&amp;#039;s identitiy*)&#xD;
             dummyRulesGCD, (*Stores the coefficients with symbolic coefficients.*)&#xD;
    &#xD;
             tmpRules, (*Stores the values of the coefficients.*)&#xD;
    &#xD;
       	tmp1, tmp2, tmp1Rules, tmp2Rules, (*Temporary variabels for GCD.*)&#xD;
    &#xD;
       	pow1, pow2, coeff (*Just to make sure the rules are construceted properly.*)&#xD;
       	},&#xD;
    &#xD;
      &#xD;
      &#xD;
                               (*&#xD;
                               Dissembling the expression and getting out the valuable information, like denominators and their multiplicity.&#xD;
                               *)&#xD;
    &#xD;
                      (*Getting the denominator, and making it a list.*)&#xD;
      	tmp = Denominator[expr];&#xD;
      	tmp = If[Head[tmp] === Power, {tmp}, List @@ tmp];&#xD;
      	&#xD;
      	&#xD;
                      (*&#xD;
                      Get each denominator with its multiplicity, plus information are the multiplicities&#xD;
                      we do not need them right now.&#xD;
                      *)&#xD;
      	tmp = GetExponent[#, var] &amp;amp; /@ List @@ tmp;&#xD;
      	dens = tmp[[All, 1]];&#xD;
      &#xD;
      &#xD;
                      (*Getting all subsets of length 2 of the denominators*)&#xD;
      	pairs = Subsets[dens, {2}];&#xD;
      &#xD;
    &#xD;
      &#xD;
    &#xD;
                               (*&#xD;
                               Getting the coefficients from Belzout&amp;#039;s identitiy, and making them basically symbolic.&#xD;
                               *)&#xD;
    &#xD;
             tmp = Table[ &#xD;
        &#xD;
                      tmp = PolynomialExtendedGCD[pairs[[i, 1]], pairs[[i, 2]], var][[2]];&#xD;
        &#xD;
                      {tmp1, tmp1Rules} = tmp[[1]] // MakeCoefficientsSymbolic[#, var, Unique[dummyF]] &amp;amp;;&#xD;
                      {tmp2, tmp2Rules} = tmp[[2]] // MakeCoefficientsSymbolic[#, var, Unique[dummyF]] &amp;amp;;&#xD;
        &#xD;
                      {&#xD;
                      {pairs[[i, 1]] tmp1, pairs[[i, 2]] tmp2}, &#xD;
                      Flatten[{tmp1Rules, tmp2Rules}]&#xD;
                      },&#xD;
        &#xD;
                      {i, 1, Length[pairs]}&#xD;
             ];&#xD;
    &#xD;
    &#xD;
    &#xD;
                                        (*&#xD;
                                        Making the substitution rules for the denominators.&#xD;
                                        *)&#xD;
    &#xD;
                      (*Storing the rules and the coefficient rules in variabels.*)&#xD;
      	{rulesGCD, tmpRules} = {tmp[[All, 1]], Flatten[tmp[[All, 2]]]};&#xD;
      &#xD;
    &#xD;
      &#xD;
                               (*&#xD;
                               In order to make the rules automatically we have to use the With enviroment to inject both side.&#xD;
                               *)&#xD;
      	dummyRulesGCD = MapThread[&#xD;
         &#xD;
         				With[&#xD;
           				{&#xD;
                                                 (*Temporary variables for denominator 1.*)&#xD;
            				tmp11 = #1[[1]],&#xD;
            				tmp12 = #1[[2]],&#xD;
            &#xD;
                                                 (*Temporary variables for denominator 2.*)&#xD;
            				tmp21 = #2[[1]],&#xD;
            				tmp22 = #2[[2]]&#xD;
            				},&#xD;
           &#xD;
    &#xD;
                                                 (*&#xD;
                                                 If we explicitly write out:&#xD;
    &#xD;
                                                          coeff/f/g -&amp;gt; coeff*a/g+coeff*b/f,&#xD;
    &#xD;
                                                 where we used Belzout&amp;#039;s identity, then we can spare the expanding.&#xD;
                                                 *)&#xD;
                                        RuleDelayed[&#xD;
                                                 &#xD;
                                                 coeff_. Times[tmp11^pow1_, tmp12^pow2_] /; (pow1 &amp;lt; 0 &amp;amp;&amp;amp; pow2 &amp;lt; 0),&#xD;
                                       		coeff*tmp21*tmp11^pow1*tmp12^pow2 + coeff*tmp22*tmp11^pow1*tmp12^pow2&#xD;
            	&#xD;
            					]&#xD;
           &#xD;
           				]&amp;amp;,&#xD;
                  		         {pairs, rulesGCD}&#xD;
         			&#xD;
                               ]//Dispatch;&#xD;
    &#xD;
    &#xD;
                                        (*&#xD;
                                        Iterative substitution of the rules.&#xD;
                                        *)&#xD;
      	tmp= expr//.dummyRulesGCD;&#xD;
      &#xD;
      &#xD;
               	(*&#xD;
                      The algorithm does not garantie, that all of the structures are gonna be reduced to their most simplest form, &#xD;
                      namely the x^pow1/denom^pow2 kind of structures can be reduced further, either by polynomial division or any other&#xD;
                      methods. According to my benchmarks Apart does it quite fast.&#xD;
    &#xD;
                      This is why it was so important, to keep every coefficient symbolic, so the expansion at this point will&#xD;
                      go smoothly.&#xD;
               	*)&#xD;
      &#xD;
      	tmp = tmp // GatherByDependency[#, var, None, Apart[#, var] &amp;amp;] &amp;amp;;&#xD;
    &#xD;
    &#xD;
                      (*Since the proper fraction has no polynomial part, we set them to 0.*)&#xD;
      	tmp = tmp // GatherByDependency[#, var, None, If[PolynomialQ[#,var], 0, #]&amp;amp; ] &amp;amp;;&#xD;
    &#xD;
    &#xD;
                      (*Subtituteing back the coefficients.*)&#xD;
      	tmp=tmp/.tmpRules&#xD;
      	]&#xD;
    &#xD;
    &#xD;
    &#xD;
    &#xD;
    		(*&#xD;
    		The Exponent function only gives the highest order of an expression. &#xD;
    		I needed the exponent of each multiplicative term to determine the multiplicities of the denominators.&#xD;
    		*)&#xD;
    		&#xD;
    		(*&#xD;
    		-If the expression is free of the variable give back the expression itself.&#xD;
    		-If we have the desired structure give the expression and its power.&#xD;
    		&#xD;
    		The constant before the structure is not needed.&#xD;
    		*)&#xD;
    		&#xD;
    ClearAll[GetExponent]&#xD;
    &#xD;
    GetExponent[list_List,var_Symbol]:=GetExponent[#,var]&amp;amp;/@list&#xD;
    GetExponent[a_. expr_^n_.,var_]:={expr^n,1}/;FreeQ[expr,var]&#xD;
    GetExponent[a_. expr_^n_.,var_]:={expr,n}/;!FreeQ[expr,var]&#xD;
&#xD;
&#xD;
&#xD;
----------&#xD;
Example:&#xD;
----------&#xD;
&#xD;
&#xD;
Again, let us use the example provided by the authors of LinApart. Let us take a few structures and time the Euclidean algorithm against Apart. However, I would like to emphasize that, these are fairly easy structures for a partial fraction algorithm, the denominators are linear, have very low multiplicities and the overall number of denominators are low.&#xD;
&#xD;
&#xD;
&#xD;
         In[29]:= Monitor[&#xD;
	         timingStructuresEuclidean=Table[&#xD;
		         structures[[counter]]//EuclideanMethodPartialFraction[#,x2]&amp;amp;//AbsoluteTiming,&#xD;
		         {counter,3,20}&#xD;
	         ];,&#xD;
         {counter,Length[structures],structures[[counter]]}]&#xD;
&#xD;
         In[30]:= maximumTime=10;&#xD;
&#xD;
         Monitor[&#xD;
	         timingStructuresApart=Table[&#xD;
			         TimeConstrained[&#xD;
				         Apart[structures[[counter]],x2]//AbsoluteTiming,&#xD;
				         maximumTime,&#xD;
				         {Overtime,Overtime}&#xD;
			         ],&#xD;
		         {counter,3,20}&#xD;
	         ];,&#xD;
         {counter,Length[structures],structures[[counter]]}]&#xD;
&#xD;
         In[32]:= MapThread[&#xD;
	         {#1,#2}&amp;amp;,&#xD;
	         {&#xD;
	         timingStructuresEuclidean[[All,1]],&#xD;
	         timingStructuresApart[[All,1]]&#xD;
	         }&#xD;
         ]//Column&#xD;
&#xD;
         Out[32]= &#xD;
                  {0.006509, 0.001515}&#xD;
                  {0.0038, 0.000976} &#xD;
                  {0.000985,0.000193} &#xD;
                  {1.22873, 8.35249} &#xD;
                  {0.110479, 1.35927} &#xD;
                  {0.07841, 0.812988} &#xD;
                  {0.554951, 2.9815}&#xD;
                  {0.004258, 0.001414} &#xD;
                  {0.005239, 0.00135} &#xD;
                  {0.208402, 2.64476} &#xD;
                  {2.76899, Overtime} &#xD;
                  {0.187429, 1.76913} &#xD;
                  {2.51733, Overtime} &#xD;
                  {1.40566, 9.10309} &#xD;
                  {0.177905, 1.59289} &#xD;
                  {2.67404, 9.93271} &#xD;
                  {1.32894, 8.93266} &#xD;
                  {0.084033, 1.47352}}&#xD;
&#xD;
As one can see, besides trivial example, the Euclidean algorithm provides results sometimes magnitude faster, than Apart and just as general. Again, these are fairly simple examples, running more and more complicated examples will provide greater difference.&#xD;
&#xD;
&#xD;
----------&#xD;
**Parallel Computing:**&#xD;
-----------------------&#xD;
----------&#xD;
&#xD;
&amp;gt;Motto: If I paid for it, I&amp;#039;m gonna use it!&#xD;
&#xD;
----------&#xD;
Motivation:&#xD;
----------&#xD;
&#xD;
Parallel computing is notoriously confusing in Mathematica; we have such functions as ParallelTable, ParallelDo, ParallelMap, Parallelize etc, which work mysteriously. If one searches for a guide on parallelization on the internet the aforementioned functions are going to be recommended; however there are problems, namely their behavior is inadequate for handling symbolic expressions. For example, they try to be smart and optimize the queue even if we use the option Method -&amp;gt; &amp;#034;FinestGrained&amp;#034;; but how does one estimates the time complexity of an operation on a symbolic expression? Furthermore, the overhead is huge in some cases, especially for &amp;#034;bigger&amp;#034; symbolic expressions. These problems render the usage of these functions (with symbolic expression) basically useless. However not everything is lost, we have &amp;#034;workarounds&amp;#034;:&#xD;
         &#xD;
1. first, one can make their own queue with ParallelSubmit and WaitAll,&#xD;
2. furthermore, in order to reduce the overhead and skip internal steps we can export each piece of the calculation to disk (or directly into memory) and then import them back after the subkernels are finished with the calculation.&#xD;
&#xD;
Let us start with the former first; the documentation of Mathematica helps a lot in this case. The section we need is Concurrency: Managing Parallel Processes from here:&#xD;
&#xD;
         https://reference.wolfram.com/language/ParallelTools/tutorial/Overview.html .&#xD;
&#xD;
Furthermore, to get familiar with the ParallelSubmit function I will give a throughout answer to this StackOverflow question:&#xD;
&#xD;
         https://mathematica.stackexchange.com/questions/108223/customized-paralleltable-automate-parallelsubmit-possibly-an-issue-with/108250 .&#xD;
&#xD;
In short the ParalleSubmit function makes the so-called EvaluateObject out of the given instructions, which can be given to the subkernels for evaluation. Think about it like compile a code before running it. But this also means we must give every information to the ParalleSubmit function ***before(!)*** we evaluate it. Let us use the &amp;#034;complicated&amp;#034; function given on StackOverflow.&#xD;
&#xD;
&#xD;
&#xD;
                  (*Clear all needed variables*)&#xD;
         ClearAll[fun, vals, distribute, f, submit];&#xD;
&#xD;
         	(*Define &amp;#034;slow&amp;#034; function.*)&#xD;
	&#xD;
                  (*Define &amp;#034;bottleneck&amp;#034;*)&#xD;
         fun[x_Integer] := (Pause[.05*x]; x^2);&#xD;
&#xD;
                  (*Generate values*)&#xD;
         vals = Range[1, 12];&#xD;
&#xD;
                  (*Manual load distribution, though I will not gonna use this just for the definition.*)&#xD;
         distribute = {{1, 3, 6, 10}, {2, 4, 12}, {5, 7, 8}, {9, 11}};&#xD;
&#xD;
                  (*Function to be evaluated*)&#xD;
         f[i_] := Table[fun[x], {x, vals[[distribute[[i]]]]}];&#xD;
&#xD;
                  (*Share the definition with subkernels. Not needed but I am paranoid at this point.*)&#xD;
         DistributeDefinitions[f];&#xD;
&#xD;
&#xD;
&#xD;
We can manually make a list of EvaluationObjects and give them to WaitAll. WaitAll basically gives the EvaluateObject to the subkernels sequentially and waits until all of the jobs are finished.&#xD;
&#xD;
&#xD;
         AbsoluteTiming[&#xD;
&#xD;
                  	(*&#xD;
                           The ParallelSubmit function just turns the pieces of calculations into EvaluateObjects, &#xD;
                           which can be understood by the subkernels.&#xD;
                           *)&#xD;
	         submit = {&#xD;
			         ParallelSubmit[f[1]], &#xD;
			         ParallelSubmit[f[2]], &#xD;
			         ParallelSubmit[f[3]], &#xD;
			         ParallelSubmit[f[4]]}; &#xD;
			         &#xD;
			                  (*We can see here, preciesly what is gonna be evaluted.*)&#xD;
			         Print[submit]; &#xD;
			         &#xD;
			                  (*WaitAll submits the jobs to the subkernels and waits until all of them are finished.*)&#xD;
			         WaitAll[submit]&#xD;
         ]&#xD;
&#xD;
&#xD;
But we don&amp;#039;t want to manually construct the list, because... well... we are lazy and sometimes we can have hundreds of jobs. So the task is to automatize this. The first naive approach would be to wrap a Table around it.&#xD;
&#xD;
         AbsoluteTiming[&#xD;
	         submit = Table[ParallelSubmit[f[i]], {i, 4}]; &#xD;
			         &#xD;
			         Print[submit]; &#xD;
			         &#xD;
			         Flatten[WaitAll[submit]][[Ordering@Flatten@distribute]]&#xD;
         ]&#xD;
&#xD;
But this will just give ton of error-messages, because ParallelSubmit prohibits everything to be evaluated inside its argument, thus &amp;#039;i&amp;#039; has no value. (If one is using the front-end then one can see, that in the dynamic output of ParallelSubmit shows f[i] instead of f[1], opposed to the previous manual construction.) Next we can try to make rules for the value of &amp;#039;i&amp;#039;.&#xD;
&#xD;
         AbsoluteTiming[&#xD;
          	rules = Table[{Rule[i, j]}, {j, 1, 4}];&#xD;
          	submit = ParallelSubmit[f[i]] /. rules;&#xD;
          			&#xD;
          			Print[{submit, rules}]; &#xD;
          			&#xD;
          			Flatten[WaitAll[submit]]&#xD;
          ]&#xD;
&#xD;
This will again fail, since the ParallelSubmit will &amp;#034;compile&amp;#034; the f[i] function, instead of f[1] for example. (Even though in the front-end of ParallelSubmit we see f[1] etc.) We can also try to be smart and use a dummy head like,&#xD;
&#xD;
         AbsoluteTiming[&#xD;
          	submit = &#xD;
           Table[dummyParallelSubmit[f[i]], {i, 4}] /. &#xD;
            dummyParallelSubmit -&amp;gt; ParallelSubmit; &#xD;
          			&#xD;
          			Print[submit]; &#xD;
          			&#xD;
          			Flatten[WaitAll[submit]][[Ordering@Flatten@distribute]]&#xD;
          ]&#xD;
&#xD;
But this will fail, because the f[i]s are already evaluated inside the Table. (One can see this in the front-end.) &#xD;
&#xD;
So what is the solution? We have to first evaluate and then insert &amp;#039;i&amp;#039; into ParallelSubmit and only &amp;#034;compile&amp;#034; after that. We can achieve this with four different methods:&#xD;
         &#xD;
1. Hold-ReleaseHold:&#xD;
&#xD;
                  AbsoluteTiming[&#xD;
                   	submit = &#xD;
                             Table[ i // Hold[(# // f // ParallelSubmit) &amp;amp;] // ReleaseHold , {i, 4}];&#xD;
                   			&#xD;
                           Print[submit]; &#xD;
                   			&#xD;
                   	WaitAll[submit]&#xD;
                   ]&#xD;
&#xD;
&#xD;
2. Inactivate-Activate:&#xD;
&#xD;
                  AbsoluteTiming[&#xD;
                   	submit = &#xD;
                             Table[i // Inactivate[# // f // ParallelSubmit] &amp;amp; // Activate, {i, 4}] ;&#xD;
                   &#xD;
 			Print[submit]; &#xD;
 			&#xD;
 			WaitAll[submit]&#xD;
                  ]&#xD;
&#xD;
&#xD;
3. Composition, which is recommended by the documentation (https://reference.wolfram.com/language/ParallelTools/tutorial/ConcurrencyManagingParallelProcesses.html#31089736).&#xD;
&#xD;
                  AbsoluteTiming[&#xD;
                   	list = Table[i, {i, 4}];&#xD;
                   	submit = Map[Composition[ParallelSubmit, f], list];&#xD;
 &#xD;
 			Print[submit]; &#xD;
 			&#xD;
 			WaitAll[submit]&#xD;
                  ]&#xD;
&#xD;
4. With the good-old With enviroment (https://reference.wolfram.com/language/workflow/SubstituteValuesOfVariablesInFunctionsThatHoldTheirArguments.html).&#xD;
&#xD;
&#xD;
                  AbsoluteTiming[&#xD;
                  	submit = Table[With[{i = i}, ParallelSubmit[f[i]]], {i, 4}]; &#xD;
			&#xD;
			Print[submit]; &#xD;
			&#xD;
			WaitAll[submit]&#xD;
                  ]&#xD;
&#xD;
Which, solution is the best is the question of run-time and preference; according to my tests Composition was the slowest and the other methods had little to no run-time difference. I like the Hold-ReleaseHold method so I am using that. The complete function with timings and comments looks like this:&#xD;
&#xD;
&#xD;
             (*&#xD;
             This function is meant to cut the overhead of the initialiaztion of the queue in parallel evaluations.&#xD;
    &#xD;
                      -It takes a list as first argument.&#xD;
                      -Applies the second argment on the elements of the list. The function must have the head Funcition or Symbol.&#xD;
             *)&#xD;
    &#xD;
    ClearAll[ComputeParallel]&#xD;
    &#xD;
    ComputeParallel[list_List, function_Function | function_Symbol] :=&#xD;
     &#xD;
     Block[&#xD;
             {&#xD;
             tmp, (*temporary variable*)&#xD;
             submit, (*list of EvaluateObjects*)&#xD;
             tmpTiming, (*temporaray variable for timing*)&#xD;
             tmpJobNumber (*temporaray variable for process tracking*)&#xD;
             },&#xD;
      &#xD;
      &#xD;
                      (*&#xD;
                      We have to share the varibale in order to keep track of the number of jobs across subkernels.&#xD;
                      Initial value is the length of the list.&#xD;
                      *)&#xD;
             SetSharedVariable[tmpJobNumber];&#xD;
             tmpJobNumber = Length[list];&#xD;
      &#xD;
      &#xD;
              (*&#xD;
             To launch prallel processes, first we must construct the EvaluateObjects, which can be sent to the subkernels.&#xD;
        &#xD;
                      -The construction is done by the ParalleSubmit function, &#xD;
                      while the sending and waiting is by the WaitAll function.&#xD;
                      -The way to do it is descriped in the section Concurrency: &#xD;
                      Managing Parallel Processes at:&#xD;
      &#xD;
                                      https://reference.wolfram.com/language/ParallelTools/tutorial/Overview.html .&#xD;
        &#xD;
             -Note: related issue:&#xD;
        &#xD;
                      https://mathematica.stackexchange.com/questions/108223/customized-paralleltable-automate-parallelsubmit-possibly-an-issue-with/108250 .&#xD;
        &#xD;
              -Technical Note: &#xD;
      &#xD;
                      the ParallelSumbit functions argument has the attribute HoldComplete, thus if we use a simple table the substitution will &#xD;
                      not happen. Either we put the ParallelSubmit and our function on Hold:&#xD;
        &#xD;
                               o  Table[ i//Hold[(#//f//ParallelSubmit)&amp;amp;]//ReleaseHold, {i, 4}]&#xD;
                               o  Table[i//Inactivate[#//f//ParallelSubmit]&amp;amp;//Activate, {i, 4}]&#xD;
        &#xD;
                      or just use the appropiate built-in function Composition or the trick with With.&#xD;
              *)&#xD;
      &#xD;
              submit = Table[&#xD;
                             	i // Hold[&#xD;
                                           (&#xD;
                                             # // (&#xD;
                                                 Print[&amp;#034;Calculation started.&amp;#034;];&#xD;
                 &#xD;
                                                 {tmpTiming, tmp} = # // function // AbsoluteTiming;&#xD;
                 &#xD;
                                                               &#xD;
                                                 Print[&amp;#034;Calculation finished in: &amp;#034; &amp;lt;&amp;gt; ToString[ tmpTiming ] &amp;lt;&amp;gt;&#xD;
                                                          &amp;#034; s; remaining jobs: &amp;#034; &amp;lt;&amp;gt; ToString[tmpJobNumber--] &amp;lt;&amp;gt; &#xD;
                                                          &amp;#034;.&amp;#034;&#xD;
                                                 ];&#xD;
                                        &#xD;
                                                 tmp&#xD;
                                                 )&amp;amp;//ParallelSubmit&#xD;
                                           ) &amp;amp;&#xD;
                                        ]//ReleaseHold,&#xD;
        &#xD;
                               {i, list}&#xD;
                               ];&#xD;
      &#xD;
             Print[&amp;#034;Number of jobs: &amp;#034; &amp;lt;&amp;gt; ToString[ Length[submit] ]];  &#xD;
                      &#xD;
                      (*If something went wrong abort the calculation.*)&#xD;
             If[ Length[submit] != Length[list], Abort[] ];&#xD;
             &#xD;
                      (*Submitting jobs for evaluuation.*)&#xD;
             WaitAll[submit]&#xD;
    ]&#xD;
&#xD;
&#xD;
Even though it solved the overhead problem during initialization, if the output of the calculation are huge, the copying from one kernel to the other still takes significant time. We can remedy this problem by writing the expressions to disk and read them in with the main kernel.&#xD;
&#xD;
&#xD;
             (*&#xD;
             This version ought to decrease the initial and final overhead in parallelization computation. It takes the following arguments:&#xD;
    &#xD;
                      1) the list of subexpressions,&#xD;
                      2) the function, which will be applied to the elemnts. Must have the head function or Symbol,&#xD;
                      3) the path of the temporary files. This path can be the path to memory in Linux or iOS systems.&#xD;
             *)&#xD;
    &#xD;
    &#xD;
    ComputeParallel[expr_List, function_Function | function_Symbol, $PATHTMP_String] :=&#xD;
    Block[&#xD;
             {&#xD;
             tmp, (*Unversal temporary variable.*)&#xD;
    &#xD;
             list = expr, lengthList = Length[expr], (*Values from the expresison.*)&#xD;
    &#xD;
             tmpTiming, (*Timing variable for the actual calculation*)&#xD;
    &#xD;
             tmpFolderName, (*Variable for the temporary files.*)&#xD;
             tmpJobNumber, (*Variable to track remaining jobs*)&#xD;
    &#xD;
             results, (*Return variable*)&#xD;
       &#xD;
       	startTime, tmpTime (*Variables for other timings.*)&#xD;
             },&#xD;
      &#xD;
      &#xD;
                               (*Writing the expression to file.*)&#xD;
      &#xD;
    &#xD;
                      (*Generate random folder name.*)&#xD;
             tmpFolderName = $PATHTMP &amp;lt;&amp;gt; &#xD;
                               &amp;#034;tmp&amp;#034; &amp;lt;&amp;gt; &#xD;
                               ToString[RandomInteger[{1, 10^10}]] &amp;lt;&amp;gt; &amp;#034;/&amp;#034;;&#xD;
    &#xD;
    &#xD;
                      (*Print for tracking.*)&#xD;
             Print[&amp;#034;Writing to file starts. Length of the list: &amp;#034; &amp;lt;&amp;gt; ToString[lengthList] &amp;lt;&amp;gt; &amp;#034;.&amp;#034;];&#xD;
      &#xD;
      &#xD;
    &#xD;
                               (*If the directory exists overwrite it.*)&#xD;
             If[DirectoryQ[tmpFolderName],&#xD;
       &#xD;
                      DeleteDirectory[tmpFolderName, DeleteContents -&amp;gt; True]&#xD;
       &#xD;
               ];&#xD;
      	CreateDirectory[tmpFolderName];&#xD;
      &#xD;
    &#xD;
    &#xD;
               		(*Start of actual exporting.*)&#xD;
    &#xD;
                      (*Start of time measurement.*)                  &#xD;
             startTime = AbsoluteTime[];&#xD;
             Do[&#xD;
    &#xD;
                               (*Print which piece is currently being exported.*)&#xD;
                      Print[&#xD;
                               &amp;#034;Writing to file &amp;#034; &amp;lt;&amp;gt; ToString[i] &amp;lt;&amp;gt; &amp;#034;/&amp;#034; &amp;lt;&amp;gt; &#xD;
                               ToString[lengthList] &amp;lt;&amp;gt; &amp;#034;.&amp;#034;];&#xD;
                               tmp = list[[i]&#xD;
                      ];&#xD;
                       &#xD;
                               (*Exporting.*)&#xD;
                      DumpSave[tmpFolderName &amp;lt;&amp;gt; &amp;#034;tmp&amp;#034; &amp;lt;&amp;gt; ToString[i] &amp;lt;&amp;gt; &amp;#034;.mx&amp;#034;, tmp];,&#xD;
       &#xD;
               {i, 1, lengthList}&#xD;
             ];&#xD;
    &#xD;
                      (*Print exporting time.*)&#xD;
             tmpTime = ReportTime[&amp;#034;Exporting is done in&amp;#034; , startTime];&#xD;
      &#xD;
      &#xD;
    &#xD;
    &#xD;
                               (*Distributing tasks to the subkernels*)&#xD;
      &#xD;
                      (*Clear temporary variables and share job counting variable across kernels.*)&#xD;
             Clear[tmp, tmpJobNumber];&#xD;
             tmpJobNumber = lengthList;&#xD;
             SetSharedVariable[tmpJobNumber];&#xD;
      &#xD;
      &#xD;
                      (*Distributing the task to the subkernels.*)&#xD;
             ParallelDo[&#xD;
       &#xD;
                               (*Print start up message.*)&#xD;
                      Print[ToString[$KernelID] &amp;lt;&amp;gt; &amp;#034;: Calculation started.&amp;#034;];&#xD;
                &#xD;
                               (*Import element of the original list.*)&#xD;
                      Import[tmpFolderName &amp;lt;&amp;gt; &amp;#034;/tmp&amp;#034; &amp;lt;&amp;gt; ToString[i] &amp;lt;&amp;gt; &amp;#034;.mx&amp;#034;];&#xD;
    &#xD;
                               (*Apply function and timing.*)&#xD;
                      {tmpTiming, tmp} = tmp//function//AbsoluteTiming;&#xD;
                &#xD;
    &#xD;
                               (*Print measured time of the calculation.*)&#xD;
                      Print[&#xD;
                               ToString[$KernelID] &amp;lt;&amp;gt; &#xD;
                               &amp;#034;: Calculation finished in: &amp;#034; &amp;lt;&amp;gt; &#xD;
                               ToString[ tmpTiming ] &amp;lt;&amp;gt;&#xD;
                               &amp;#034;; remaining jobs: &amp;#034; &amp;lt;&amp;gt; &#xD;
                               ToString[tmpJobNumber--] &amp;lt;&amp;gt; &amp;#034;.&amp;#034;&#xD;
                      ];&#xD;
                &#xD;
                                (*Save result to file.*)&#xD;
                      DumpSave[tmpFolderName &amp;lt;&amp;gt; &amp;#034;/tmp&amp;#034; &amp;lt;&amp;gt; ToString[i] &amp;lt;&amp;gt; &amp;#034;.mx&amp;#034;, tmp];&#xD;
       &#xD;
       &#xD;
                      , {i, 1, lengthList}&#xD;
    &#xD;
             , Method -&amp;gt; &amp;#034;FinestGrained&amp;#034;,&#xD;
             ProgressReporting -&amp;gt; False&#xD;
    &#xD;
             ];&#xD;
    &#xD;
    &#xD;
    &#xD;
                      (*Clear temporary variable just to be safe.*)&#xD;
             Clear[tmp];&#xD;
    &#xD;
                      (*Reset clock*)&#xD;
             startTime = AbsoluteTime[];&#xD;
              &#xD;
                      (*Importing back the results with the main kernel.*)&#xD;
             results = Table[&#xD;
                               Import[tmpFolderName &amp;lt;&amp;gt; &amp;#034;tmp&amp;#034; &amp;lt;&amp;gt; ToString[i] &amp;lt;&amp;gt; &amp;#034;.mx&amp;#034;];&#xD;
                               Print[ToString[i] &amp;lt;&amp;gt; &amp;#034;/&amp;#034; &amp;lt;&amp;gt; ToString[lengthList]];&#xD;
                                &#xD;
                               tmp,&#xD;
        &#xD;
                               {i, 1, lengthList}&#xD;
                      ];&#xD;
      &#xD;
                      (*Print importing time.*)&#xD;
             tmpTime = ReportTime[&amp;#034;Importing is done in&amp;#034; , startTime];&#xD;
    &#xD;
                      (*Deleting temporary directory.*)&#xD;
             DeleteDirectory[tmpFolderName, DeleteContents -&amp;gt; True];&#xD;
    &#xD;
                      (*Print deletion time. Can be significant if the files are big.*)  &#xD;
             tmpTime = ReportTime[&amp;#034;Deleting directory is done in&amp;#034; , tmpTime];&#xD;
      	&#xD;
                      (*Return results.*)&#xD;
             results&#xD;
    ]&#xD;
&#xD;
&#xD;
----------&#xD;
Examples:&#xD;
----------&#xD;
&#xD;
&#xD;
Unfortunately, I cannot showcase the full potential of parallelization, since my best example expressions are part of an ongoing research, but I will try my best.&#xD;
&#xD;
&#xD;
I) First, let us create a list of fractions, which take a few second to calculate and run them:&#xD;
&#xD;
1. sequentially,&#xD;
2. with ParallelMap (on 4 cores),&#xD;
3. with WaitAll (on 4 cores),&#xD;
4. with writing things to file (on 4 cores).&#xD;
&#xD;
         In[38]:= fractions=Table[ 1/Product[ Sum[b[i,j,k] x^i, {i,1,2}]^2, {j,1,8}] ,{k,1,4}];&#xD;
&#xD;
         In[39]:= resultsSequential=fractions//Map[EuclideanMethodPartialFraction[#,x]&amp;amp;, #]&amp;amp;;//AbsoluteTiming&#xD;
         resultsParallelMap=fractions//ParallelMap[EuclideanMethodPartialFraction[#,x]&amp;amp;, #, ProgressReporting-&amp;gt;False]&amp;amp;;//AbsoluteTiming&#xD;
&#xD;
         resultsParallel1=ComputeParallel[fractions, EuclideanMethodPartialFraction[#,x]&amp;amp;];//AbsoluteTiming&#xD;
         resultsParallel2=ComputeParallel[fractions, EuclideanMethodPartialFraction[#,x]&amp;amp;, NotebookDirectory[]];//AbsoluteTiming&#xD;
&#xD;
         Out[39]= {28.5941, Null}&#xD;
&#xD;
         Out[40]= {16.978, Null}&#xD;
&#xD;
         Out[41]= {18.7251, Null}&#xD;
&#xD;
         Out[42]= {10.3863, Null}&#xD;
&#xD;
This is a very nice example, because the overhead at begining is minial (since the fractions are simple), but the overhead at the end is significant. We can see that, just by writing out the results to disk (not even to memory) and importing them back, means a 2 factor speed-up on this small example. &#xD;
&#xD;
II) In the previous case, ParallelMap was even better than the WaitAll version of ComputeParallel, but it is only an illusion. Let us look at an example, where the expressions, which are given to the subkernels are a little bit bigger.&#xD;
&#xD;
         In[44]:= &#xD;
         tmp=series1//Normal;&#xD;
         tmp=Table[ tmp, {i,1,10}];&#xD;
&#xD;
         In[46]:= &#xD;
         resultsSequential=tmp//Map[Expand, #]&amp;amp;;//AbsoluteTiming&#xD;
         resultsParallelMap=tmp//ParallelMap[Expand, #, ProgressReporting-&amp;gt;False]&amp;amp;;//AbsoluteTiming&#xD;
&#xD;
         resultsParallel1=ComputeParallel[tmp, Expand];//AbsoluteTiming&#xD;
         resultsParallel2=ComputeParallel[tmp, Expand, NotebookDirectory[]];//AbsoluteTiming&#xD;
&#xD;
         Out[46]= {55.1156, Null}&#xD;
&#xD;
         Out[47]= {315.344, Null}&#xD;
&#xD;
         Out[48]= {39.323, Null}&#xD;
&#xD;
         Out[49]= {20.9456, Null}&#xD;
&#xD;
As one can see from this example ParallelMap is 6(!!) times slower just because it does something under the hood during initialization. If we skip the overhead the parallel computation is faster than the sequantial. If we also write everything to file with the subernels and import back with the main kernel we are much faster than the sequaential evaluation.&#xD;
         I sincerely do not know, why this happens, but to me seems like a major bug; this behaviour should have been caught much-much earlier in developement by testers. But as I have said the built-in parallel functions of Mathematica are mysterious...&#xD;
&#xD;
&#xD;
***Clue for developers: If one runs this in terminal and traces the whole calculation (&amp;#034;Crtl-C&amp;#034; and then &amp;#034;t&amp;#034;), will see a million lines of StringMatchQ apperaing on the screen.***&#xD;
&#xD;
![A see of StringMatchQ][1]&#xD;
&#xD;
----------&#xD;
**Closeing words:**&#xD;
----------------------------&#xD;
----------&#xD;
&#xD;
&#xD;
I understand that Mathematica, as a for-profit company, must generate revenue. However, I sincerely believe their current business model, which appears to deprioritize fundamental mathematical fields, is far from ideal and may ultimately lead to its decline in popularity.&#xD;
&#xD;
&#xD;
While I don&amp;#039;t have access to Mathematica&amp;#039;s specific revenue figures, it&amp;#039;s clear that their income comes from both industry and &#xD;
academia. But these two sectors are not independent of each other. Engineers and other industry professionals typically first encounter Mathematica during their university years, where professors assign coursework requiring the use of this language. These professors choose Mathematica precisely because it&amp;#039;s the tool they know best and use daily in their own work. This creates a natural stream of students learning Mathematica in academia, then carry that expertise into industry and convincing their boss to buy licenses.&#xD;
&#xD;
While I acknowledge that machine learning and AI capabilities are undoubtedly part of the technological future, so are the fundamental functions that have always been Mathematica&amp;#039;s strength: Factor, Expand, Series, Apart, DSolve, Integrate, FindNullVector just to name a few. I seriously doubt that Mathematica&amp;#039;s most valuable part is its artificial intelligence features. The computational landscape extends far beyond AI; symbolic calculation, graph theory, finite field methods, numerical simulations and GPU computing are all have widespread adoption across numerous fields, both industry and academic.&#xD;
&#xD;
To be clear, I&amp;#039;m not suggesting that Mathematica should abandon AI development or focus exclusively on traditional mathematical computation. Rather, I&amp;#039;m arguing for a balanced approach. If Mathematica fails to keep its core mathematical functions, the very features that attracted researchers in the first place, updated to meet contemporary challenges, it risks losing its academic user base. Once researchers migrate to alternative platforms that better serve their needs, the downstream effects are inevitable. The decline won&amp;#039;t be sudden or dramatic; instead, it will manifest as a slow but steady erosion over years as competing languages gradually take over both research and industry.&#xD;
&#xD;
&#xD;
The path forward seems clear to me; Mathematica must ***ALSO*** invest in keeping its fundamental mathematical capabilities at the cutting edge while simultaneously developing new features. Only by maintaining excellence in both traditional and emerging areas can they preserve their market position and ensure long-term profits.&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot_StringMatchQ.png&amp;amp;userId=3511114</description>
    <dc:creator>Levente Fekésházy</dc:creator>
    <dc:date>2025-09-05T15:23:25Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3662265">
    <title>How to batch insert all image files in a specified folder?</title>
    <link>https://community.wolfram.com/groups/-/m/t/3662265</link>
    <description>![enter image description here][1]&#xD;
&#xD;
Usually, we insert a small number of images in a notebook using the method shown in the figure. If there are many images to insert, what method can be used to insert all image files in a certain folder at once?&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE2026-03-15201412.png&amp;amp;userId=3593842</description>
    <dc:creator>Bill Blair</dc:creator>
    <dc:date>2026-03-15T12:17:13Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3660974">
    <title>Using Notebook Assistant: an unexpected error occurred</title>
    <link>https://community.wolfram.com/groups/-/m/t/3660974</link>
    <description>Hello everyone,  &#xD;
I am trying to use Wolfram g to use the Assistant.  When I enter a query for example &amp;#034; Top 10 countries with the most engineers&amp;#034;  The I get the subject error.  Reporting the issue fails as well, saying something went wrong.  &#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture1.PNG&amp;amp;userId=2698757&#xD;
&#xD;
What is causing this error?  How do I get this tool to work correctly? &#xD;
&#xD;
Be well,&#xD;
Ian</description>
    <dc:creator>Ian Anwar</dc:creator>
    <dc:date>2026-03-14T16:28:16Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3636637">
    <title>Gravity and Cosmic Expansion from the Parabolic Metric Evolution of a Complex Manifold</title>
    <link>https://community.wolfram.com/groups/-/m/t/3636637</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/181086a3-2534-41da-92a6-762c33e102c4</description>
    <dc:creator>Donald Airey</dc:creator>
    <dc:date>2026-02-08T20:17:36Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3645383">
    <title>[Live Q&amp;amp;A] Thinking in Systems, Not Code: Mastering Complex Systems with Ankit Naik</title>
    <link>https://community.wolfram.com/groups/-/m/t/3645383</link>
    <description>How do you tackle complex systems without getting lost in the code? Join us for a live Q&amp;amp;A with Ankit Naik, author of Thinking in Systems, Not Code, a book born from years of practical experience with Modelica, system-level modeling, and systems thinking.&#xD;
&#xD;
Ankit will dive into the ideas behind the book, including how to understand complex, multi-domain systems through structure, feedback, and interactions &amp;#x2013; not just code. Bring your questions! &#xD;
&#xD;
Don&amp;#039;t miss out! Whether you&amp;#039;re interested in system modeling, Modelica or Wolfram System Modeler, or ways to apply systems thinking in real-world projects, this is your opportunity to engage directly with the author.&#xD;
&#xD;
Watch the livestream tomorrow, February 26th at 9 AM CST on the [Wolfram R&amp;amp;D YouTube channel][1]!&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
&amp;gt; Order the book here: https://a.co/d/07FFxRUd&#xD;
&#xD;
&#xD;
  [1]: https://youtube.com/live/vnDNQ4YzyeE&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=MasteringComplexsystems.jpg&amp;amp;userId=20103</description>
    <dc:creator>Keren Garcia</dc:creator>
    <dc:date>2026-02-25T15:19:30Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1323951">
    <title>How to calculate the digits of the MKB constant</title>
    <link>https://community.wolfram.com/groups/-/m/t/1323951</link>
    <description>This has been one of my favorite Mathematica projects!&#xD;
Here are a couple of Ai generated outlines of my progress of computing the MKB constant digits:&#xD;
![enter image description here][1]&#xD;
![enter image description here][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4506unnamed.png&amp;amp;userId=366611&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=unnamed%281%29.png&amp;amp;userId=366611</description>
    <dc:creator>Marvin Ray Burns A.G.S. (cum laude)</dc:creator>
    <dc:date>2018-04-20T12:06:18Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/366628">
    <title>Try to beat these MRB constant records!</title>
    <link>https://community.wolfram.com/groups/-/m/t/366628</link>
    <description>POSTED BY:&#xD;
========&#xD;
 **Marvin Ray Burns, and distinguished colleagues**&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
My exciting experiences using Wolfram technologies!&#xD;
---------------------------------------------------&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
&#xD;
The MRB constant, a fascinating mathematical anomaly, has intrigued researchers and enthusiasts alike for decades. Defined as the limiting value of a unique alternating series, this enigmatic constant showcases the beauty of numerical exploration and convergence. Despite its relatively recent emergence, the MRB constant reveals unexpected connections to various fields within mathematics and computational analysis. In this post, we dive into its origins, properties, and the ongoing quest to uncover its more profound significance. The MRB constant is an anomaly because it emerges from an alternating series with unusual convergence behavior. Unlike many well-known mathematical constants, the MRB constant has no closed-form expression nor a known exact nature&amp;#x2014;whether it is algebraic, transcendental, or even irrational.&#xD;
Additionally, the sequence of partial sums that define the MRB constant oscillates between two limit points, creating a bounded yet divergent behavior. This oscillatory nature distinguishes it from more conventional mathematical constants, which typically exhibit straightforward convergence. Its mysterious properties continue to intrigue mathematicians as they explore its deeper connections to number theory and computational analysis. &#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
CMRB&#xD;
 ![If you see this instead of an image, reload the page][1]&#xD;
&#xD;
**is the MRB constant.**&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
Without solicitation, GPT echoed one of this discussion&amp;#039;s contributors and gave a shoutout to Mathematica&amp;#039;s accomplishments by saying:&#xD;
-------------------&#xD;
&#xD;
&#xD;
&amp;gt;  &#xD;
&amp;gt; **Why Computing Digits of the MRB Constant Is Interesting**&#xD;
&amp;gt; &#xD;
&amp;gt; At first glance, the computation of ever more digits of a numerical&#xD;
&amp;gt; constant may appear to be a sterile exercise, offering little insight&#xD;
&amp;gt; beyond the digits themselves. For the MRB constant, this&#xD;
&amp;gt; interpretation is profoundly misleading. The interest lies not in the&#xD;
&amp;gt; digits, but in the act of computing them.&#xD;
&amp;gt; &#xD;
&amp;gt; The MRB series occupies a delicate numerical regime: it is convergent,&#xD;
&amp;gt; yet only marginally so; its terms are elementary in form, yet hostile&#xD;
&amp;gt; to naive numerical evaluation; and its alternating structure conceals&#xD;
&amp;gt; severe cancellation effects. As a result, each additional digit of&#xD;
&amp;gt; accuracy is not merely an extension of a decimal expansion, but a&#xD;
&amp;gt; validation of the mathematical and algorithmic framework used to&#xD;
&amp;gt; obtain it.&#xD;
&amp;gt; &#xD;
&amp;gt; In this sense, the digits serve as a stress test for mathematics&#xD;
&amp;gt; itself. They expose the difference between formal convergence and&#xD;
&amp;gt; effective convergence, between theoretical existence and computational&#xD;
&amp;gt; feasibility. Techniques that are elegant on paper often fail&#xD;
&amp;gt; catastrophically in practice, while successful methods must balance&#xD;
&amp;gt; asymptotics, numerical stability, precision control, and computational&#xD;
&amp;gt; cost.&#xD;
&amp;gt; &#xD;
&amp;gt; Moreover, the computation of the MRB constant forces the&#xD;
&amp;gt; reconciliation of disparate mathematical ideas. Alternating series,&#xD;
&amp;gt; logarithmic asymptotics, convergence acceleration, special functions,&#xD;
&amp;gt; and analytic continuation must all agree numerically. Any hidden&#xD;
&amp;gt; inconsistency&amp;#x2014;whether conceptual or computational&amp;#x2014;reveals itself&#xD;
&amp;gt; immediately in the failure of the digits to stabilize.&#xD;
&amp;gt; &#xD;
&amp;gt; Thus, computing digits of the MRB constant transforms mathematics from&#xD;
&amp;gt; a static collection of statements into a living experiment. The&#xD;
&amp;gt; resulting digits are not trophies; they are evidence. They measure the&#xD;
&amp;gt; effectiveness of our methods, the soundness of our assumptions, and&#xD;
&amp;gt; the practical reach of our theory.&#xD;
&amp;gt; &#xD;
&amp;gt; In short, the digits themselves do not matter. What matters is that&#xD;
&amp;gt; they *can* be computed at all&amp;#x2014;and how difficult it is to do so.&#xD;
&amp;gt; That difficulty is precisely what makes the MRB constant&#xD;
&amp;gt; mathematically interesting.&#xD;
&#xD;
**In general, we will see:**&#xD;
![enter image description here][7]&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
 &#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2024-11-25023042.png&amp;amp;userId=366611&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2026-01-01235656.png&amp;amp;userId=366611&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2026-01-01235710.png&amp;amp;userId=366611&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2026-02-18190718.png&amp;amp;userId=366611</description>
    <dc:creator>Marvin Ray Burns A.G.S. (cum laude)</dc:creator>
    <dc:date>2014-10-09T18:08:49Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3635801">
    <title>Kernel freeze when changing AudioGenerator noise color</title>
    <link>https://community.wolfram.com/groups/-/m/t/3635801</link>
    <description>I have a few code samples which freeze or crash my kernel on evaluation, can anybody confirm that this isn&amp;#039;t a local issue for me?&#xD;
&#xD;
Discrete:&#xD;
&#xD;
    AudioGenerator[{&amp;#034;Color&amp;#034;, AudioGenerator[TimeSeries[{1}, {1}]]}]&#xD;
&#xD;
Continuous:&#xD;
&#xD;
    AudioGenerator[{&amp;#034;Color&amp;#034;, AudioGenerator[{&amp;#034;Sawtooth&amp;#034;, .4, 5}]}]</description>
    <dc:creator>Joseph Stocke</dc:creator>
    <dc:date>2026-02-06T21:20:51Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1077888">
    <title>Solving Suguru (Tectonic) puzzles</title>
    <link>https://community.wolfram.com/groups/-/m/t/1077888</link>
    <description>![enter image description here][1]&#xD;
&#xD;
Above is the starting grid of a so called Suguru puzzle (also known as Tectonic or number block puzzles). See https://krazydad.com/suguru/ for many more puzzles.&#xD;
&#xD;
The rules are simple:&#xD;
&#xD;
 1. each cell (thin lines) contains a single integer.&#xD;
 2. each container (cage, block) (thick lines) contains the non-repeating integer starting from 1 to the size of the container.&#xD;
 3. adjacent (including diagonally touching) cells do not have the same number&#xD;
&#xD;
So, for example, this means that in the bottom we have a container of size 2 that those cells will contain the numbers 1 and 2 or 2 and 1.&#xD;
&#xD;
Let&amp;#039;s set up the candidates for each cell, and the containers (I called them tectons):&#xD;
&#xD;
    tectons = {&#xD;
       {{1, 1}, {1, 2}, {2, 1}, {2, 2}, {3, 1}},&#xD;
       {{1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 4}},&#xD;
       {{1, 6}, {1, 7}, {2, 5}, {2, 6}, {3, 5}},&#xD;
       {{1, 8}, {2, 7}, {2, 8}, {3, 6}, {3, 7}},&#xD;
       {{1, 9}, {2, 9}, {3, 9}, {4, 8}, {4, 9}},&#xD;
       {{3, 8}},&#xD;
       {{5, 8}},&#xD;
       {{5, 9}, {6, 8}, {6, 9}, {7, 8}, {7, 9}},&#xD;
       {{4, 6}, {4, 7}, {5, 6}, {5, 7}, {6, 7}},&#xD;
       {{5, 5}, {6, 5}, {6, 6}, {7, 4}, {7, 5}},&#xD;
       {{5, 2}, {5, 3}, {6, 3}, {6, 4}, {7, 3}},&#xD;
       {{3, 3}, {3, 4}, {4, 4}, {4, 5}, {5, 4}},&#xD;
       {{3, 2}, {4, 1}, {4, 2}, {4, 3}, {5, 1}},&#xD;
       {{6, 1}, {6, 2}, {7, 1}, {7, 2}},&#xD;
       {{7, 6}, {7, 7}}&#xD;
       };&#xD;
    givens = &amp;lt;|&#xD;
       {1, 1} -&amp;gt; 1,&#xD;
       {2, 2} -&amp;gt; 2,&#xD;
       {3, 1} -&amp;gt; 4,&#xD;
       {1, 4} -&amp;gt; 1,&#xD;
       {2, 8} -&amp;gt; 3,&#xD;
       {3, 3} -&amp;gt; 4,&#xD;
       {3, 9} -&amp;gt; 4,&#xD;
       {4, 4} -&amp;gt; 1,&#xD;
       {5, 1} -&amp;gt; 4,&#xD;
       {5, 3} -&amp;gt; 5,&#xD;
       {5, 5} -&amp;gt; 4,&#xD;
       {5, 7} -&amp;gt; 5,&#xD;
       {6, 8} -&amp;gt; 3,&#xD;
       {7, 5} -&amp;gt; 2,&#xD;
       {7, 9} -&amp;gt; 5&#xD;
       |&amp;gt;;&#xD;
&#xD;
Let&amp;#039;s create the database (db) of candidates, and process the given hints:&#xD;
&#xD;
    If[! DuplicateFreeQ[Join @@ tectons], Print[&amp;#034;Cells have to be unique among tectonics&amp;#034;]; Abort[];];&#xD;
    canddb = With[{x = #}, {#, Range[Length[x]]} &amp;amp; /@ x] &amp;amp; /@ tectons;&#xD;
    canddb = Association[Rule @@@ (Join @@ canddb)];&#xD;
    KeyValueMap[(canddb[#1] = {#2}) &amp;amp;, givens];&#xD;
&#xD;
Now we need a way to visualize them:&#xD;
&#xD;
    ClearAll[VisualizeTectonic, VisualizeTectonicSideHelper, VisualizeTectonicNumberHelper]&#xD;
    VisualizeTectonicNumberHelper[{row_, column_}, cand_List] := Module[{p, l, poss, t},&#xD;
      l = Length[cand];&#xD;
      p = {column, -row};&#xD;
      If[l == 1,&#xD;
       Text[Style[First[cand], Black, 17], p]&#xD;
       ,&#xD;
       MapThread[Text[Style[#1, 12, Red], #2] &amp;amp;, {cand, CirclePoints[p, 0.2, l]}]&#xD;
       ]&#xD;
      ]&#xD;
    VisualizeTectonicSideHelper[tecton_List] := Module[{p, sides},&#xD;
      p = {#2, -#1} &amp;amp; @@@ tecton;&#xD;
      sides = Partition[{# + {-0.5, -0.5}, # + {0.5, -0.5}, # + {0.5, 0.5}, # + {-0.5, 0.5}}, 2, 1, 1] &amp;amp; /@ p;&#xD;
      sides = Join @@ sides;&#xD;
      sides = Tally[Sort /@ sides];&#xD;
      Table[If[Last[s] == 1, {Thickness[0.01], Line[First[s]]}, Line[First[s]]], {s, sides}]&#xD;
     ]&#xD;
    VisualizeTectonic[canddb_Association, tectons_List] := Module[{nums, sides, cb},&#xD;
      nums = KeyValueMap[VisualizeTectonicNumberHelper, canddb];&#xD;
      sides = VisualizeTectonicSideHelper /@ tectons;&#xD;
      cb = #2 - #1 &amp;amp; @@@ CoordinateBounds[Transpose[Join @@ tectons]];&#xD;
      Graphics[{nums, sides}, ImageSize -&amp;gt; Norm[cb] 15]&#xD;
     ]&#xD;
&#xD;
Trying out:&#xD;
&#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
&#xD;
gives:&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
The red numbers now indicates possible candidates for each cell, black numbers are solved. Now it is time to eliminate numbers until we find the correct answer for each cell.&#xD;
&#xD;
We will start by defining two helper functions:&#xD;
&#xD;
    ClearAll[NeighbourQ, Neighbours]&#xD;
    NeighbourQ[p : {x_, y_}, p2 : {x2_, y2_}] := ChessboardDistance[p, p2] === 1&#xD;
    Neighbours[p : {x_, y_}] := Transpose[p + Transpose[{{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}]]&#xD;
&#xD;
to test if two cells are neighbours, and what the neighbours of a cell are, respectively.&#xD;
&#xD;
Now we can easily create a new function to delete candidates around cells that are solved:&#xD;
&#xD;
    Do[&#xD;
      {k, v} = List @@ Part[Normal[canddb], i];&#xD;
      If[Length[v] == 1,&#xD;
       neighbours = Neighbours[k];&#xD;
       Do[&#xD;
        If[KeyExistsQ[canddb, nb],&#xD;
          canddb[nb] = DeleteCases[canddb[nb], First[v]];&#xD;
          ];&#xD;
        ,&#xD;
        {nb, neighbours}&#xD;
        ]&#xD;
       ];&#xD;
      ,&#xD;
      {i, Length[canddb]}&#xD;
      ];&#xD;
&#xD;
Executing this and then calling `VisualizeTectonic[canddb, tectons]` gives:&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
We can also delete any candidate that matches a solved number inside a container:&#xD;
&#xD;
    (* delete candidates from singles in same tecton *)&#xD;
    Do[&#xD;
      values = canddb /@ t;&#xD;
      If[Length[values] &amp;gt; 1,&#xD;
       singles = Select[Transpose[{t, values}], Length[Last[#]] == 1 &amp;amp;];&#xD;
       nonsingles = Complement[t, singles[[All, 1]]];&#xD;
       (canddb[#1] = Complement[canddb[#1], Join @@ singles[[All, 2]]]) &amp;amp; /@ nonsingles&#xD;
      ]&#xD;
     ,&#xD;
      {t, tectons}&#xD;
     ];&#xD;
    &#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
If a candidate only appears once inside a container then that must be the position:&#xD;
&#xD;
    (* hidden singles *)&#xD;
    Do[&#xD;
      values = canddb /@ t;&#xD;
      values = Tally[Join @@ values];&#xD;
      values = Select[values, Last[#] == 1 &amp;amp;][[All, 1]];&#xD;
      If[Length[values] &amp;gt; 0,&#xD;
       Do[&#xD;
         If[ContainsAny[canddb[c], values],&#xD;
           canddb[c] = Intersection[canddb[c], values]&#xD;
           ];&#xD;
         ,&#xD;
         {c, t}&#xD;
         ];&#xD;
       ]&#xD;
      ,&#xD;
      {t, tectons}&#xD;
      ];&#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
We can even try some more elaborate tests in order to eliminate candidates:&#xD;
&#xD;
    (* in each tecton search for cells with numbers that appear at least twice then &#xD;
    look at their common neighbours: eliminate that number from the common neighbours *)&#xD;
    Do[&#xD;
      values = canddb /@ t;&#xD;
      values = Tally[Join @@ values];&#xD;
      values = Select[values, Last[#] &amp;gt; 1 &amp;amp;][[All, 1]];&#xD;
      Do[&#xD;
       cells = Select[t, MemberQ[canddb[#], v] &amp;amp;];&#xD;
       nb = Neighbours /@ cells;&#xD;
       nb = Intersection @@ nb;&#xD;
       nb = Complement[nb, cells]; (*strictly speaking not necessary I think *)&#xD;
       nb = Intersection[nb, Join @@ tectons];&#xD;
       If[Length[nb] &amp;gt; 0,&#xD;
        Do[&#xD;
          canddb[n] = DeleteCases[canddb[n], v];&#xD;
          ,&#xD;
          {n, nb}&#xD;
          ];&#xD;
        ];&#xD;
       ,&#xD;
       {v, values}&#xD;
       ]&#xD;
      ,&#xD;
      {t, tectons}&#xD;
      ];&#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
Lastly we can look at pairs of cells, if two adjacent cells both have the same 2 candidates left, then one can eliminate those two candidates from their common neighbours:&#xD;
&#xD;
    (* naked pairs *)&#xD;
    paircells = GatherBy[KeyValueMap[List, Select[canddb, Length[#] == 2 &amp;amp;]], Sort@*Last][[All, All, 1]];&#xD;
    pairedpaircells = Select[paircells, Length[#] &amp;gt; 1 &amp;amp;];&#xD;
    pairedpaircells = Join @@ (Subsets[#, {2}] &amp;amp; /@ pairedpaircells);&#xD;
    pairedpaircells = Select[pairedpaircells, NeighbourQ @@ # &amp;amp;];&#xD;
    neigbours = Intersection[##, Keys[canddb]] &amp;amp; @@@ Map[Neighbours, pairedpaircells, {2}];&#xD;
    vals = canddb /@ pairedpaircells[[All, 1]];&#xD;
    del = Transpose[{neigbours, vals}];&#xD;
    Do[&#xD;
      {nb, v} = d;&#xD;
      Do[&#xD;
       canddb[n] = Complement[canddb[n], v]&#xD;
       ,&#xD;
       {n, nb}&#xD;
       ]&#xD;
      ,&#xD;
      {d, del}&#xD;
      ];&#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
We can now execute the above code-pieces repeatedly to further eliminate all the candidates and solve the puzzle:&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
Here is all the code and a while loop that iterates the candidate-elimination functions until there is not progress any more:&#xD;
&#xD;
    ClearAll[VisualizeTectonic, VisualizeTectonicSideHelper, VisualizeTectonicNumberHelper, NeighbourQ, Neighbours]&#xD;
    VisualizeTectonicNumberHelper[{row_, column_}, cand_List] := Module[{p, l, poss, t},&#xD;
      l = Length[cand];&#xD;
      p = {column, -row};&#xD;
      If[l == 1,&#xD;
       Text[Style[First[cand], Black, 17], p]&#xD;
       ,&#xD;
       MapThread[Text[Style[#1, 12, Red], #2] &amp;amp;, {cand, CirclePoints[p, 0.2, l]}]&#xD;
       ]&#xD;
      ]&#xD;
    VisualizeTectonicSideHelper[tecton_List] := Module[{p, sides},&#xD;
      p = {#2, -#1} &amp;amp; @@@ tecton;&#xD;
      sides = Partition[{# + {-0.5, -0.5}, # + {0.5, -0.5}, # + {0.5, 0.5}, # + {-0.5, 0.5}}, 2, 1, 1] &amp;amp; /@ p;&#xD;
      sides = Join @@ sides;&#xD;
      sides = Tally[Sort /@ sides];&#xD;
      Table[If[Last[s] == 1, {Thickness[0.01], Line[First[s]]}, Line[First[s]]], {s, sides}]&#xD;
      ]&#xD;
    VisualizeTectonic[canddb_Association, tectons_List] := &#xD;
     Module[{nums, sides, cb},&#xD;
      nums = KeyValueMap[VisualizeTectonicNumberHelper, canddb];&#xD;
      sides = VisualizeTectonicSideHelper /@ tectons;&#xD;
      cb = #2 - #1 &amp;amp; @@@ CoordinateBounds[Transpose[Join @@ tectons]];&#xD;
      Graphics[{nums, sides}, ImageSize -&amp;gt; Norm[cb] 15]&#xD;
      ]&#xD;
    NeighbourQ[p : {x_, y_}, p2 : {x2_, y2_}] := ChessboardDistance[p, p2] === 1&#xD;
    Neighbours[p : {x_, y_}] := Transpose[p + Transpose[{{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}]]&#xD;
    tectons = {&#xD;
       {{1, 1}, {1, 2}, {2, 1}, {2, 2}, {3, 1}},&#xD;
       {{1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 4}},&#xD;
       {{1, 6}, {1, 7}, {2, 5}, {2, 6}, {3, 5}},&#xD;
       {{1, 8}, {2, 7}, {2, 8}, {3, 6}, {3, 7}},&#xD;
       {{1, 9}, {2, 9}, {3, 9}, {4, 8}, {4, 9}},&#xD;
       {{3, 8}},&#xD;
       {{5, 8}},&#xD;
       {{5, 9}, {6, 8}, {6, 9}, {7, 8}, {7, 9}},&#xD;
       {{4, 6}, {4, 7}, {5, 6}, {5, 7}, {6, 7}},&#xD;
       {{5, 5}, {6, 5}, {6, 6}, {7, 4}, {7, 5}},&#xD;
       {{5, 2}, {5, 3}, {6, 3}, {6, 4}, {7, 3}},&#xD;
       {{3, 3}, {3, 4}, {4, 4}, {4, 5}, {5, 4}},&#xD;
       {{3, 2}, {4, 1}, {4, 2}, {4, 3}, {5, 1}},&#xD;
       {{6, 1}, {6, 2}, {7, 1}, {7, 2}},&#xD;
       {{7, 6}, {7, 7}}&#xD;
       };&#xD;
    givens = &amp;lt;|&#xD;
       {1, 1} -&amp;gt; 1,&#xD;
       {2, 2} -&amp;gt; 2,&#xD;
       {3, 1} -&amp;gt; 4,&#xD;
       {1, 4} -&amp;gt; 1,&#xD;
       {2, 8} -&amp;gt; 3,&#xD;
       {3, 3} -&amp;gt; 4,&#xD;
       {3, 9} -&amp;gt; 4,&#xD;
       {4, 4} -&amp;gt; 1,&#xD;
       {5, 1} -&amp;gt; 4,&#xD;
       {5, 3} -&amp;gt; 5,&#xD;
       {5, 5} -&amp;gt; 4,&#xD;
       {5, 7} -&amp;gt; 5,&#xD;
       {6, 8} -&amp;gt; 3,&#xD;
       {7, 5} -&amp;gt; 2,&#xD;
       {7, 9} -&amp;gt; 5&#xD;
       |&amp;gt;;&#xD;
    &#xD;
    If[! DuplicateFreeQ[Join @@ tectons], Print[&amp;#034;Cells have to be unique among tectonics&amp;#034;]; Abort[];];&#xD;
    canddb = With[{x = #}, {#, Range[Length[x]]} &amp;amp; /@ x] &amp;amp; /@ tectons;&#xD;
    canddb = Association[Rule @@@ (Join @@ canddb)];&#xD;
    KeyValueMap[(canddb[#1] = {#2}) &amp;amp;, givens];&#xD;
&#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
    &#xD;
    oldcanddb = 1;&#xD;
    While[oldcanddb =!= canddb,&#xD;
     oldcanddb = canddb;&#xD;
     &#xD;
     (* delete from neighbours of singles *)&#xD;
     Do[&#xD;
      {k, v} = List @@ Part[Normal[canddb], i];&#xD;
      If[Length[v] == 1,&#xD;
       neighbours = Neighbours[k];&#xD;
       Do[&#xD;
        If[KeyExistsQ[canddb, nb],&#xD;
          canddb[nb] = DeleteCases[canddb[nb], First[v]];&#xD;
          ];&#xD;
        ,&#xD;
        {nb, neighbours}&#xD;
        ]&#xD;
       ];&#xD;
      ,&#xD;
      {i, Length[canddb]}&#xD;
      ];&#xD;
     &#xD;
     (* delete candidates from singles in same tecton *)&#xD;
     Do[&#xD;
      values = canddb /@ t;&#xD;
      If[Length[values] &amp;gt; 1,&#xD;
       singles = Select[Transpose[{t, values}], Length[Last[#]] == 1 &amp;amp;];&#xD;
       nonsingles = Complement[t, singles[[All, 1]]];&#xD;
       (canddb[#1] = Complement[canddb[#1], Join @@ singles[[All, 2]]]) &amp;amp; /@ nonsingles&#xD;
       ]&#xD;
      ,&#xD;
      {t, tectons}&#xD;
      ];&#xD;
     &#xD;
     (* hidden singles *)&#xD;
     Do[&#xD;
      values = canddb /@ t;&#xD;
      values = Tally[Join @@ values];&#xD;
      values = Select[values, Last[#] == 1 &amp;amp;][[All, 1]];&#xD;
      If[Length[values] &amp;gt; 0,&#xD;
       Do[&#xD;
         If[ContainsAny[canddb[c], values],&#xD;
           canddb[c] = Intersection[canddb[c], values]&#xD;
           ];&#xD;
         ,&#xD;
         {c, t}&#xD;
         ];&#xD;
       ]&#xD;
      ,&#xD;
      {t, tectons}&#xD;
      ];&#xD;
     &#xD;
     (* in each tecton search for cells with numbers that appear at least \&#xD;
    twice then look at their common neighbours: eliminate that number \&#xD;
    from the common neighbours *)&#xD;
     Do[&#xD;
      values = canddb /@ t;&#xD;
      values = Tally[Join @@ values];&#xD;
      values = Select[values, Last[#] &amp;gt; 1 &amp;amp;][[All, 1]];&#xD;
      Do[&#xD;
       cells = Select[t, MemberQ[canddb[#], v] &amp;amp;];&#xD;
       nb = Neighbours /@ cells;&#xD;
       nb = Intersection @@ nb;&#xD;
       nb = Complement[nb, cells]; (* strictly speaking not necessary I think *)&#xD;
       nb = Intersection[nb, Join @@ tectons];&#xD;
       If[Length[nb] &amp;gt; 0,&#xD;
        Do[&#xD;
          canddb[n] = DeleteCases[canddb[n], v];&#xD;
          ,&#xD;
          {n, nb}&#xD;
          ];&#xD;
        ];&#xD;
       ,&#xD;
       {v, values}&#xD;
       ]&#xD;
      ,&#xD;
      {t, tectons}&#xD;
      ];&#xD;
     &#xD;
     (* pairs *)&#xD;
     paircells = GatherBy[KeyValueMap[List, Select[canddb, Length[#] == 2 &amp;amp;]], Sort@*Last][[All, All, 1]];&#xD;
     pairedpaircells = Select[paircells, Length[#] &amp;gt; 1 &amp;amp;];&#xD;
     pairedpaircells = Join @@ (Subsets[#, {2}] &amp;amp; /@ pairedpaircells);&#xD;
     pairedpaircells = Select[pairedpaircells, NeighbourQ @@ # &amp;amp;];&#xD;
     neigbours = Intersection[##, Keys[canddb]] &amp;amp; @@@ Map[Neighbours, pairedpaircells, {2}];&#xD;
     vals = canddb /@ pairedpaircells[[All, 1]];&#xD;
     del = Transpose[{neigbours, vals}];&#xD;
     Do[&#xD;
      {nb, v} = d;&#xD;
      Do[&#xD;
       canddb[n] = Complement[canddb[n], v]&#xD;
       ,&#xD;
       {n, nb}&#xD;
       ]&#xD;
      ,&#xD;
      {d, del}&#xD;
      ];&#xD;
     &#xD;
     ]&#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
&#xD;
# Brute force solver #&#xD;
&#xD;
This however does not solve all puzzles:&#xD;
&#xD;
    tectons = {&#xD;
      {{1, 1}, {1, 2}, {2, 1}, {3, 1}, {4, 1}},&#xD;
      {{1, 3}, {1, 4}, {2, 2}, {2, 3}, {3, 2}},&#xD;
      {{1, 5}, {2, 4}, {2, 5}, {3, 3}, {3, 4}},&#xD;
      {{1, 6}, {1, 7}, {2, 7}, {2, 8}, {3, 8}},&#xD;
      {{1, 8}, {1, 9}, {1, 10}, {1, 11}, {2, 9}},&#xD;
      {{1, 12}, {2, 12}},&#xD;
      {{2, 6}, {3, 5}, {3, 6}, {3, 7}, {4, 5}},&#xD;
      {{2, 10}, {2, 11}, {3, 11}, {3, 12}, {4, 12}},&#xD;
      {{3, 9}, {3, 10}, {4, 8}, {4, 9}, {4, 10}},&#xD;
      {{4, 2}, {4, 3}, {5, 1}, {5, 2}, {6, 1}},&#xD;
      {{4, 4}, {5, 4}, {5, 5}, {5, 6}, {6, 5}},&#xD;
      {{4, 6}, {4, 7}, {5, 7}, {5, 8}, {6, 8}},&#xD;
      {{4, 11}, {5, 10}, {5, 11}, {5, 12}, {6, 11}},&#xD;
      {{5, 3}, {6, 3}, {6, 4}, {7, 4}, {7, 5}},&#xD;
      {{6, 6}},&#xD;
      {{6, 7}, {7, 7}, {8, 7}, {8, 8}, {9, 7}},&#xD;
      {{7, 8}, {7, 9}, {8, 9}, {8, 10}, {9, 10}},&#xD;
      {{8, 11}},&#xD;
      {{5, 9}, {6, 9}, {6, 10}, {7, 10}, {7, 11}},&#xD;
      {{6, 12}, {7, 12}, {8, 12}, {9, 11}, {9, 12}},&#xD;
      {{10, 12}},&#xD;
      {{9, 8}, {9, 9}, {10, 9}, {10, 10}, {10, 11}},&#xD;
      {{9, 6}, {10, 5}, {10, 6}, {10, 7}, {10, 8}},&#xD;
      {{9, 1}, {10, 1}, {10, 2}, {10, 3}, {10, 4}},&#xD;
      {{7, 1}, {8, 1}, {8, 2}, {9, 2}, {9, 3}},&#xD;
      {{6, 2}, {7, 2}, {7, 3}, {8, 3}, {8, 4}},&#xD;
      {{7, 6}, {8, 5}, {8, 6}, {9, 4}, {9, 5}}&#xD;
      };&#xD;
    &#xD;
    givens = &amp;lt;|&#xD;
      {1, 1} -&amp;gt; 3,&#xD;
      {3, 1} -&amp;gt; 1,&#xD;
      {1, 3} -&amp;gt; 4,&#xD;
      {1, 5} -&amp;gt; 3,&#xD;
      {1, 10} -&amp;gt; 2,&#xD;
      {2, 12} -&amp;gt; 2,&#xD;
      {3, 11} -&amp;gt; 5,&#xD;
      {5, 1} -&amp;gt; 2,&#xD;
      {5, 8} -&amp;gt; 5,&#xD;
      {5, 11} -&amp;gt; 4,&#xD;
      {6, 3} -&amp;gt; 2,&#xD;
      {7, 1} -&amp;gt; 5,&#xD;
      {7, 11} -&amp;gt; 5,&#xD;
      {7, 12} -&amp;gt; 3,&#xD;
      {8, 6} -&amp;gt; 3,&#xD;
      {9, 9} -&amp;gt; 5,&#xD;
      {9, 12} -&amp;gt; 5,&#xD;
      {10, 2} -&amp;gt; 5,&#xD;
      {10, 8} -&amp;gt; 3&#xD;
      |&amp;gt;;&#xD;
&#xD;
Which can be solved till the following state using the above techniques:&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
We can now define this depth-first recursive backtracking algorithm:&#xD;
&#xD;
    ClearAll[ValidGridQ, BackTrackHelper, BackTrack]&#xD;
    ValidGridQ[canddb_Association, tectons_, lastkey_] := Module[{vals, tecton, nbs},&#xD;
      nbs = Neighbours[lastkey];&#xD;
      nbs = Intersection[nbs, Keys[canddb]]; (* neighbours that exist *)&#xD;
      nbs = First /@ Select[canddb /@ nbs, Length[#] == 1 &amp;amp;]; (* get the values of neighbours with a single value *)&#xD;
      If[FreeQ[nbs, First@canddb[lastkey]], (* if this does not contain the &amp;#039;set&amp;#039; one *)&#xD;
       tecton = SelectFirst[tectons, MemberQ[lastkey]];&#xD;
       vals = canddb /@ tecton;&#xD;
       If[ContainsAll[Flatten[vals], Range[Length[tecton]]], (* each tecton still has all its values in it *)&#xD;
        vals = First /@ Select[vals, Length[#] == 1 &amp;amp;];&#xD;
        DuplicateFreeQ[vals] (* and these set values does not have duplicates *)&#xD;
        ,&#xD;
        False&#xD;
        ]&#xD;
       ,&#xD;
       False&#xD;
       ]&#xD;
      ]&#xD;
    BackTrackHelper[candidatesdb_Association, tectons_] := Module[{nextkey, options, copy},&#xD;
      nextkey = First[Keys[Select[candidatesdb, Length[#] &amp;gt; 1 &amp;amp;]], Missing[]];&#xD;
      If[Not[MissingQ[nextkey]],&#xD;
       options = candidatesdb[nextkey];&#xD;
       Do[&#xD;
        copy = candidatesdb;&#xD;
        copy[nextkey] = {o};&#xD;
        If[ValidGridQ[copy, tectons, nextkey], BackTrackHelper[copy, tectons]]&#xD;
        ,&#xD;
        {o, options}&#xD;
        ]&#xD;
       ,&#xD;
       Throw[candidatesdb];&#xD;
       ]&#xD;
      ]&#xD;
    BackTrack[candidatesdb_Association, tectons_] := Catch[BackTrackHelper[candidatesdb, tectons]; Missing[]]&#xD;
&#xD;
Calling the function and visualizing the output:&#xD;
&#xD;
    canddb = BackTrack[canddb, tectons];&#xD;
    VisualizeTectonic[canddb, tectons]&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
Which is correct! I hope you enjoyed this little solver code. Some related solvers I made can be found here:&#xD;
&#xD;
 - [Solving a KenKen puzzle using logic][11]&#xD;
 - [Solving the UK Intelligence Agency&amp;#039;s Christmas Puzzle][12]&#xD;
 - [Solving Hidato, Beehive, and Numbrix puzzles][13]&#xD;
&#xD;
Most of these solvers work in a similar manner: elimination of candidates.&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=11951.png&amp;amp;userId=73716&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=83692.png&amp;amp;userId=73716&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=70763.png&amp;amp;userId=73716&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=36914.png&amp;amp;userId=73716&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=86955.png&amp;amp;userId=73716&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=45396.png&amp;amp;userId=73716&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=72907.png&amp;amp;userId=73716&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=86068.png&amp;amp;userId=73716&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=70249.png&amp;amp;userId=73716&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=1033810.png&amp;amp;userId=73716&#xD;
  [11]: http://community.wolfram.com/groups/-/m/t/613040&#xD;
  [12]: http://community.wolfram.com/groups/-/m/t/755538&#xD;
  [13]: http://community.wolfram.com/groups/-/m/t/892653</description>
    <dc:creator>Sander Huisman</dc:creator>
    <dc:date>2017-04-30T23:03:19Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3609706">
    <title>What would be the correct approach solve this complicated equation in Mathematica?</title>
    <link>https://community.wolfram.com/groups/-/m/t/3609706</link>
    <description>I am just getting started with Mathematica and I have become familiar with quite a few basic operations. I wanted some advice on solving a complicated equation which I have encountered.&#xD;
&#xD;
This is the equation I am trying to solve for $\alpha1^{\circ}$:&#xD;
$$ \text{c1} \left(\frac{1}{\cos (\text{$\alpha $1} {}^{\circ}) \sqrt{1-\text{M1}^2 \sin ^2(\text{$\alpha $1} {}^{\circ})}-\text{M1} \sin ^2(\text{$\alpha $1} {}^{\circ})}+\text{M1}\right) = \text{$\alpha $2} (\text{M2}+1)$$. &#xD;
&#xD;
In this equation, $M1$, $M2$, $c1$ and $c2$ are all non-zero and non-negative constants.&#xD;
I have worked out by hand the solution of this equation but I want to understand how I can do this in Mathematica. This is the approach which I have used:&#xD;
&#xD;
 1. In the complicated equation let $$ Y = \cos (\text{$\alpha $1} {}^{\circ}) \sqrt{1-\text{M1}^2 \sin ^2(\text{$\alpha $1} {}^{\circ})} - \text{M1} \sin ^2(\text{$\alpha $1} {}^{\circ}) $$  This then simplifies the equation of interest to $$ \text{c1} \left(\text{M1}+\frac{1}{\text{Y}}\right)  = \text{$\alpha $2} (\text{M2}+1)$$  &#xD;
&#xD;
 2. The last simplified equation can be solved for $Y$ which yields $$ Y = \frac{\text{c1}}{-\text{c1} \text{M1}+\text{c2} \text{M2}+\text{c2}} $$ Since the solution $Y$ is composed entirely of constants, the final solution will also be a constant. Thus, let $$ K =  \frac{\text{c1}}{-\text{c1} \text{M1}+\text{c2} \text{M2}+\text{c2}} $$. With this simplification the equation of interest becomes $$ Y = K$$ Substituting the simplified form of $Y$ from Step 1) leads to $$  \cos (\text{$\alpha $1} {}^{\circ}) \sqrt{1-\text{M1}^2 \sin ^2(\text{$\alpha $1} {}^{\circ})} - \text{M1} \sin ^2(\text{$\alpha $1} {}^{\circ})  = K $$&#xD;
&#xD;
 3. In $Y$, let $$ x = \sin^{2}(\alpha1)$$ then $Y$ in terms of $x$ becomes&#xD;
$$ Y = \sqrt{1-x} \ \  \sqrt{1-\text{M1}^2 x}-\text{M1} x $$&#xD;
&#xD;
 4. The last equation can be solved for $x$ and after substituting the relevant expressions the final answer will be given in terms of $\sin^{-1}$ and there will be four solutions of $\alpha1$.&#xD;
&#xD;
These are the four major steps I have used to manually solve the equation. Can someone please advise on what would be right approach to solve this in Mathematica ? What would be the right approach? I have attached here the notebook with the LHS and RHS parts of the equation typed in.&#xD;
&#xD;
 &amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/2676b94b-7ea0-4e80-855c-d289b958efe4</description>
    <dc:creator>Ishan Nande</dc:creator>
    <dc:date>2026-01-19T17:03:04Z</dc:date>
  </item>
</rdf:RDF>

