STATUS: Draft
import numpy as np
import sympy as sp
import pickle
from IPython.display import HTML
import ipywidgets as widgets
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
mpl.rcParams['legend.fontsize'] = 10
import pandas as pd
import itertools
pd.set_option('display.max_colwidth', None)
#
# function to print latex
def renderListToLatex(e):
latex_rendering = []
for i in range(len(e)):
latex_rendering.append("$$" + sp.latex(e[i]) + "$$<br/>")
return(HTML("".join(latex_rendering[0:])))
Aim: Explore the quartic equation and bBiTriQuad numbers
Ref: The BiTri array can be found on OEIS (A104978), seen in diagonals
Ref: Interesting related reference: John Zhau, Fat and Thin Emergent Geometries of Hermitial One-Matrix Models (math physics)
Observe: a solution to a general cubic equation
$$C(m_2, m_3) \equiv(-1)^{m_3 + 1} \frac{(2 m_{2} + 3 m_{3})!}{(1 + m_{2} + 2 m_{3})!m_2!m_3!} \frac{c_0^{1 + m_{2} + 2 m_{3}} c_2^{m_2} c_3^{m_3} }{c_1^{2 m_{2} + 3 m_{3} + 1}}$$Create needed unknown types
c_0, c_1, c_2, c_3, c_4, x, t, a_0, a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, a_9, x_1, x_2, s_1, s_2 = sp.symbols('c_0, c_1, c_2, c_3, c_4, x, t, a_0, a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, a_9, x_1, x_2, s_1, s_2')
Let $P1$, $P2$, $P3$ be from notebook 6.
with open('./SharedOutputs/SPE6.pickle', 'rb') as input:
imported_outputs_from_another_notebook = pickle.load(input)
P1 = imported_outputs_from_another_notebook['xSubstitution']
P2 = imported_outputs_from_another_notebook['generalQuarticEquation']
P3 = imported_outputs_from_another_notebook['solutionForXForQuartic']
Observe: $P2$ was presented in Notebook 6 as a general quartic equation. Subsitutions were made, replacing $c_0$ with $t$ and $x$ with $P1$
renderListToLatex([P2, P1])
Observe: A solution for $x$ was found, $P3$.
P3
Observe: The general form of each term in thesolution:
$$\frac{c_0^{m_0} c_2^{m_2} c_3^{m_3} c_4^{m_4}}{c_1^{m_1}} $$Observe: Based on the data in the solution, 2 conditions for relationships between the $m_i$ terms can be seen:
Observe: the Degree of each term in the quartic satisfies: $m_0 + m_2 + m_3 + m_4 - m_1 = 0$
Observe: the Index Degree of each term in the quartic solution satisfied: $ m_1 + 2m_2 + 3m_3 + 4m_4 = -1$
Observe: It is possible to use these equations to create the following equivalencies:
$$m_0 = 1 + m_2 + 2m_3 + 3m_4 $$$$ m_1 = 1 + 2m_2 + 3m_3 + 4m_4 $$Observe: these identities appear to be an extension of cubic case.
Observe: the General term is given by:
$$ F(m_2, m_3, m_4) = (-1)^{m_3 + 1} \frac{(2m_2 + 3m_3 + 4m_4)! }{(1 + m_2 + 2m_3 + 3m_4)!m_2!m_3!m_4!} \frac{c_0^{ 1 + m_2 + 2m_3 + 3m_4 } c_2^{m_2} c_3^{m_3} c_4^{m_4}}{c_1^{1 + 2m_2 + 3m_3 + 4m_4}} $$Observe: This can be written equivalently in terms of $m, n, p$ to simplify subscripts in the variables.
Let $F1$ be an implementation of $F$
def F1(m, n, p, returnCoefficientsOnly = False, returnCoefficientsOnlyWithoutSigns = False, returnCoefficientsAsFactorialStrings = False):
c_0, c_1, c_2, c_3, c_4 = sp.symbols('c_0, c_1, c_2, c_3, c_4')
s1 = (-1)**(n + 1)
s2 = sp.factorial(2 * m + 3 * n + 4 * p)
s3 = sp.factorial(1 + m +2 * n + 3 * p) * sp.factorial(m) * sp.factorial(n) * sp.factorial(p)
s4 = c_0**(1 + m + 2 * n + 3 * p) * c_2**m *c_3**n * c_4**p
s5 = c_1**(1 + 2 * m + 3 * n + 4 * p)
s7 = str(2 * m + 3 * n + 4 * p) + "!"
s8 = str(1 + 2 * m + 3 * n + 4 * p) + "!" + str(m) + "!" + str(n) + "!" + str(p) + "!"
if returnCoefficientsOnly:
s6 = s1 * (s2 / s3)
elif returnCoefficientsOnlyWithoutSigns:
s6 = (s2 / s3)
elif returnCoefficientsAsFactorialStrings:
s6 = str(s7 + " | " + s8)
else:
s6 = s1 * (s2 / s3) * (s4 / s5)
return(s6)
Let $P6$ be an $8 \times 8 \times 1$ array of values evaluated with $F1$
P4 = np.arange(8)
P5 = np.array([[F1(j, i, 1) for i in P1] for j in P4])
P6 = sp.Matrix(P5)
P6
Let $P8$ be an $8 \times 8 \times 1$ array of values evaluated with $F1$ returning coefficients only and ignoring signs
P7 = np.array([[F1(j, i, 1, returnCoefficientsOnlyWithoutSigns=True) for i in P1] for j in P4])
P8 = sp.Matrix(P7)
P8
Observe: these coefficients can be regarded as BiTriQuad and are also sub multinomial
Observe: It is a natural conjecture, based on the assumption that if $m$ and $n$ relate to the number of ways of subdividing triangles and quadrilaterals, $p$ could relate to the number of ways of subdividing petagons. These numbers numbers may provide insight into the number of ways of subdividing polygons into triangles, quadrilaterals and pentagrams.
Observe: If this function is evaluated at $(m, n, 0)$ the BiTri (Catalan and Fuss numbers) will be recovered. This suggests a relatinoship between polynomials of increasing degrees.
Aim: Explore the BiTriQuad numbers in a similiar fashion to exploring the BiTri numbers
Method: Explore different combinations of inputs such as $m, m + 1, n, n + 1, p, p + 1$ and keeping one variables as this is a 3D array of numbers.
Observe: In the case of $(m, n, 1)$, the result given by $P8$, the first column of values is the OEIS entry A236194
Observe: In the case of $(m, n, 1)$, the result given by $P8$, the first row of values is the OEIS entry A002694
Todo: Check other patterns against OEIS
Conjecture: The BiTriQuad Numbers, which is the coeffiencts of F(m, n, p) counts the number of a diagonal subidivisons of a $(2 + m + 2n + 3p)$ sided polygon into $m$ triangles, $n$ quadrialterals and $p$ pentagons. In particular, this shows that $F(m, n, p)$ must a an integer
Observe: To "count" sides, start with 2, and then add one for every triangle that is being created. Quadrilaterals will add 2 new vertices/ edges Petagrams will add 3 vertices/edges. This is conjecture is true, this number will always be an integer.
Todo: Go through combinations in a similar way to the cubic case, and look at recursive relations.