# Multinomial equations for factoring a sum of equal grade exterior products

**URL:** <https://community.wolfram.com/t/multinomial-equations-for-factoring-a-sum-of-equal-grade-exterior-products/13857>\
**Category:** Questions\
**Tags:** algebra, equation-solving, tuning-and-debugging\
**Created:** [April 1, 2019, 7:09pm UTC](https://community.wolfram.com/t/multinomial-equations-for-factoring-a-sum-of-equal-grade-exterior-products/13857 "2019-04-01T19:09:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![djmpark](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/djmpark/32/4435_2.png) [@djmpark](https://community.wolfram.com/u/djmpark)\
**Post date:** [April 1, 2019, 7:09pm UTC](https://community.wolfram.com/t/multinomial-equations-for-factoring-a-sum-of-equal-grade-exterior-products/13857/1 "2019-04-01T19:09:54Z")

</div>

I have a need to solve multinomial equations efficiently. It is part of an algorithm for factoring a sum of equal grade exterior products in n-space into a single product. The algorithm runs into efficiency problems when I get to 6 or 7 dimensional spaces and higher grades of exterior products. The Mathematica Solve routine is the time limiting part.

To illustrate a typical lower dimensional case, which is not an efficiency problem, I use the typical code:

```
canonicalEquations = {-a[1, 2] a[2, 1] + a[1, 1] a[2, 2] == 
   4, -a[1, 3] a[2, 1] + a[1, 1] a[2, 3] == 
   1, -a[1, 4] a[2, 1] + a[1, 1] a[2, 4] == 
   3, -a[1, 3] a[2, 2] + a[1, 2] a[2, 3] == 
   6, -a[1, 4] a[2, 2] + a[1, 2] a[2, 4] == 
   38, -a[1, 4] a[2, 3] + a[1, 3] a[2, 4] == 5}
solutions = Solve[canonicalEquations, MaxExtraConditions -> All]

```

I use the conditions to generate values for the free variables using a FindInstance statement.

This has 8 variables, 6 equations and 2 solutions. But a case in 6 dimensions might have 20 variables, 5 equations and 15 solutions.

I only need one solution so I’m wondering if there is a method to save time by generating only a single solution. Perhaps I could do that by specifying a specific set of variables to solve for but I don’t know how to do that in advance.

I understand that the GroebnerBasis routine is used in Solve under the hood with multinomial equations but I’m only partly familiar with its use.

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [April 1, 2019, 8:25pm UTC](https://community.wolfram.com/t/multinomial-equations-for-factoring-a-sum-of-equal-grade-exterior-products/13857/2 "2019-04-01T20:25:15Z")

</div>

using FindMinimum with an objective function of 0 and the canonicalEquations as constraints would give you a numerical solution to your equations.

---

<div class="post-metadata">

**Author:** ![djmpark](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/djmpark/32/4435_2.png) [@djmpark](https://community.wolfram.com/u/djmpark)\
**Post date:** [April 1, 2019, 9:59pm UTC](https://community.wolfram.com/t/multinomial-equations-for-factoring-a-sum-of-equal-grade-exterior-products/13857/3 "2019-04-01T21:59:20Z")

</div>

Thank you Frank. This method is somewhat problematic. It sometimes gives a solution but other times doesn’t ( saying possible infeasibility detected) when I know there is a solution because the equations were generated from a factored case that was then expanded to give the input.

Also FindMinimum gives Real answers while Solve with give Integer or Rational answers with Integer input.

---

<div class="post-metadata">

**Author:** ![danl](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/danl/32/41267_2.png) [@danl](https://community.wolfram.com/u/danl)\
**Post date:** [April 1, 2019, 10:46pm UTC](https://community.wolfram.com/t/multinomial-equations-for-factoring-a-sum-of-equal-grade-exterior-products/13857/4 "2019-04-01T22:46:42Z")

</div>

Is there some reason not to use `FindInstance` from the outset?

```
FindInstance[canonicalEquations == 0, 
 Variables[canonicalEquations]]

(* Out[298]= {{a[1, 1] -> -1, a[1, 2] -> 5, a[1, 3] -> 11/4, 
  a[1, 4] -> 53/4, a[2, 1] -> -1, a[2, 2] -> 1, a[2, 3] -> 7/4, 
  a[2, 4] -> 41/4}} *)

```

---

<div class="post-metadata">

**Author:** ![djmpark](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/djmpark/32/4435_2.png) [@djmpark](https://community.wolfram.com/u/djmpark)\
**Post date:** [April 2, 2019, 2:13am UTC](https://community.wolfram.com/t/multinomial-equations-for-factoring-a-sum-of-equal-grade-exterior-products/13857/5 "2019-04-02T02:13:58Z")

</div>

Many thanks Daniel, that works pretty well and is simpler. Trying to factor a 5-form in 7-dimensional space using Solve I aborted the calculation after 15 minutes. Using FindInstance took 6 seconds. A significant improvement!
