• Welcome to the Internet Infidels Discussion Board.

The Math Thread

I was actually wondering if there was a general formula for equidistant points on a sphere, although I was pretty sure I had read there wasn't.


Next series of questions:

Between a cube and its dual, the octahedron, with an octahedron expanding into the cube, what is the ratio of their inspheres when:

1) The faces are all triangles
2) The faces are squares and regular hexagons
3) The faces are squares and triangles
4) The faces are regular octagons and triangles
q) The faces are all squares.

cube-1.00000.gif .........................cube-4.00000.gif
 
This is rather easy.

Octahedron:
Vertex: {1,0,0} -- radius 1
Face: (1/3)*{1,1,1} -- radius 1/sqrt(3)

Edge: (1/2)*{1,1,0} -- radius 1/sqrt(2)

Truncated octahedron:
Vertex: {1-x,x,0} -- radius sqrt(1 - 2x + 2x2)
Square face: {1-x,0,0} -- radius 1-x
Hexagonal face: (1/3)*{1,1,1} -- radius 1/sqrt(3)

Sqr-Hex edge: {1-x,x/2,x/2} -- radius (1/2)*sqrt(4 - 8x + 6x2)
Hex-Hex edge: (1/2)*{1,1,0} -- radius 1/sqrt(2)

Cuboctahedron:
Vertex: (1/2)*{1,1,0} -- radius 1/sqrt(2)
Square face: (1/2)*{1,0,0} -- radius 1/2
Triangular face: (1/3)*{1,1,1} -- radius 1/sqrt(3)

Sqr-Tri edge: {1/2,1/4,1/4} -- (1/4)*sqrt(6)

Truncated cube:
Vertex: (1/2)*{1,1,1-x} -- radius (1/2)*sqrt(3 - 2x + x2)
Triangular face: (1/2)*(1-x/3)*{1,1,1} -- (1/2)*radius sqrt(3)*(1-x/3)
Octagonal face: (1/2)*{1,0,0} -- radius 1/2

Tri-Oct edge: (1/2)*{1,1-x/2,1-x/2} -- radius (1/4)*sqrt(12 - 8x + 2x2)
Oct-Oct edge: (1/2)*{1,1,0} -- radius 1/sqrt(2)

Cube:
Vertex: (1/2)*{1,1,1} -- radius (1/2)*sqrt(3)
Face: (1/2)*{1,0,0} -- radius 1/2

Edge: (1/2)*{1,1,0} -- radius 1/sqrt(2)
 
I've updated my Semisimple Lie Algebras software. It's at
I have versions in Mathematica, Python, and C++. I wrote the Python version because Mma is proprietary, and the C++ version to get improved speed.

I composed it because of this problem: I had discovered some software that does Lie algebras for MacOS Classic, but its author neither (1) updated it for OSX or (2) open-sourced it, allowing others to do that. So I wrote my own.

There are four infinite families of SSLA's: A(n) = SU(n+1), B(n) = SO(2n+1), C(n) = Sp(2n), and D(n) = SO(2n), and five exceptional ones: G2, F4, E6, E7, and E8.

My code calculates some features of them, and also works with representations of them, calculating products and powers of them. It also does subalgebras, finding branching rules: how a rep in an algebra translates into reps of subalgebras. My most recent update was for doing some additional subalgebras.

I have been interested in Lie algebras because I wanted to do some particle-physics calculations, like grand-unified-theory calculations. I have succeeded in those calculations.
 
I have also written VotingAlgs.zip at Software that I have written. It is also at GitHub: lkpetrich/Preference-Voting and lkpetrich/Proportional-Allocation

Written in both Mathematica and Python.

Proportional allocation is often used for political parties in legislatures, and it is also used to find out how many Representatives each US State gets in the US House of Representatives. One may naively calculate it as (total number of seats) * (party's number of votes) / (total number of votes), but in general, that is not an integer. But each party's number of seats is an integer number, and one must somehow get integers from non-integers.

A naive way of doing that is rounding off, but that often does not add up correctly.

I have implemented both highest-averages and largest-remainder methods, methods that avoid that problem.

A simple form of largest remainder is the Hamilton method - Electowiki. Round down to get the numbers of seats, with the remaining ones being given to whichever parties have the largest remainders.

This has a risk of the Alabama paradox - Electowiki, where increasing the number of seats may reduce some parties' representation.

One can avoid that with the highest-averages method. In it, one adds seats one at a time, with at each step, calculating (number of votes)/(function of number of seats). Whichever party has the highest one gets the next seat.

A common divisor function for legislatures is the D'Hondt method, N + 1, for N seats. Another one is Sainte-Lague: 2N + 1. For the US Congress, Huntington-Hill: sqrt(N*(N+1)) One starts off with one seat each.

To work, a divisor function must tend to a multiple of N as N gets large.

A hybrid method is round downward, then do the rest with highest averages.
 
Now for preference voting.

There is a theorem about preference voting called Arrow's Theorem, proved by economist Kenneth Arrow. It states that there is no preference-voting algorithm that always has certain nice properties. It can have one of them, at the expense of some other. However, an algorithm can have them in most common circumstances.

But with circular preferences and the like, one can think of cases like the one in Math Alive -- Voting & Social Choice -- Lab 1 It features a set of ballots where five different methods give five different results.

 Comparison of electoral systems goes into very gory detail


In my code, the ballots are lists of candidates from most preferred on down, with each ballot having a weight value. For unweighted ballots, I've written a function that adds a weight of 1 to each one.

I have implemented a large number of methods. Here are some of them:

TopOne -- simulates single-choice voting.

TopNum -- uses the n top preferences to simulate approval voting.

Borda -- the Borda count -- in each ballot, top choice gets (# cands) votes, next gets (# cands - 1), etc.

ModBorda -- modification of it -- one uses (# ballot entries) instead.

CumulBorda -- like ModBorda, but with division by (# ballot entries) -- simulates cumulative voting.

TopTwoRunoff -- do TopOne, then redo with only the top two candidates in it, wherever they are in the ballots.

SequentialRunoff -- Instant Runoff or Alternative Vote -- do TopOne, then remove the candidate with the fewest votes. Repeat until one candidate gets a majority.

Condorcet methods:

Turn each ballot into all possible one-on-one contests in it. Then add up the results of this virtual round robin. The winner is whoever consistently beats all the others. But there may be no Condorcet winner, and there are several algorithms for finding the winner in such a case.

Schulze -- find beatpaths, paths where each member wins against the next one, find the smallest beat margin in each one, and select the one with the largest one of those smallest margins.

Copeland -- find the count of (individual victories) - (individual defeats) for each candidate.

Minimax -- find the maximum loss of each candidate relative to the other candidates, and the winner is the one with the minimum of these maximum losses.

KemenyYoung -- find the ordering of candidates that makes the largest total of how much each candidate beats the later ones.

Dodgson -- Dodgson's method (Lewis Carroll) -- applies permutations to all the ballots and finds the Condorcet winner for each permutation. The overall winner is the winner for the permutation with the smallest permutation distance from the identity permutation.

RankedPairs -- Tideman -- find the pair of candidates with the largest beat margin, noting the direction of that margin. Then find the others with the next largest beat margins, as long as as one cannot go in a cycle by finding their directions. Then find the overall order.

MaximalLotteries -- generalizes the Condorcet-winner index to be partial values, one for each candidate. For this problem, I had to write some linear-programming functions. First, a random line-search function, then a simplex function.


I also calculate the Schwartz and Smith sets of candidates. The Schwartz set is the smallest set of candidates that beat all the others, while the Smith one is similar, but of candidates that beat or tie all the others. If there is a Condorcet winner, then both sets contain only that winner.


Kemeny-Young and Dodgson are both factorial time in the number of candidates, while all the rest are polynomial time.
 
The Math Alive pages contain this interesting example.

The ballots run vertically, and each one has a weight or multiplicity on top. Their numbers are preference values, starting with 1.
[table="class: grid"]
[tr]
[td]-[/td]
[td]18[/td]
[td]12[/td]
[td]10[/td]
[td]9[/td]
[td]4[/td]
[td]2[/td]
[/tr]
[tr]
[td]Killians[/td]
[td]5[/td]
[td]1[/td]
[td]2[/td]
[td]4[/td]
[td]2[/td]
[td]4[/td]
[/tr]
[tr]
[td]Molson[/td]
[td]1[/td]
[td]5[/td]
[td]5[/td]
[td]5[/td]
[td]5[/td]
[td]5[/td]
[/tr]
[tr]
[td]Samuel Adams[/td]
[td]2[/td]
[td]3[/td]
[td]4[/td]
[td]1[/td]
[td]3[/td]
[td]3[/td]
[/tr]
[tr]
[td]Guinness[/td]
[td]4[/td]
[td]4[/td]
[td]1[/td]
[td]2[/td]
[td]4[/td]
[td]2[/td]
[/tr]
[tr]
[td]Meister Brau[/td]
[td]3[/td]
[td]2[/td]
[td]3[/td]
[td]3[/td]
[td]1[/td]
[td]1[/td]
[/tr]
[/table]
Let's see who wins.

Top One:
  • Molson: 18
  • Killians: 12
  • Guinness: 10
  • Samuel Adams: 9
  • Meister Brau: 6
Winner: Molson

Top-Two Runoff:
Killians and Molson survive the first round, and they get
  • Killians: 37
  • Molson: 18
Winner: Killians

Sequential Runoff:
Killians, Molson, Guinness, and Samuel Adams survive the first round. They get
  • Molson: 18
  • Killians: 16
  • Guinness: 12
  • Samuel Adams: 9
Molson, Killians, and Guinness survive the second round. They get
  • Guinness: 21
  • Molson: 18
  • Killians: 16
Guinness and Molson survive the third round. They get
  • Guinness: 37
  • Molson: 18
Winner: Guinness

Borda Count:
Preferences are translated into numbers of points: 1 -> 5, 2 -> 4, 3 -> 3, 4 ->2, 5 -> 1. Counting them up gives
  • Samuel Adams: 191
  • Meister Brau: 189
  • Guinness: 162
  • Killians: 156
  • Molson: 127
Winner: Samuel Adams

Condorcet method:

Condorcet matrix of (row) beating (column)
[table="class: grid"]
[tr]
[td]-[/td]
[td]Gui[/td]
[td]Kil[/td]
[td]MBr[/td]
[td]Mol[/td]
[td]SAd[/td]
[/tr]
[tr]
[td]Guinness[/td]
[td]0[/td]
[td]39[/td]
[td]19[/td]
[td]37[/td]
[td]12[/td]
[/tr]
[tr]
[td]Killians[/td]
[td]16[/td]
[td]0[/td]
[td]22[/td]
[td]37[/td]
[td]26[/td]
[/tr]
[tr]
[td]Meister Brau[/td]
[td]36[/td]
[td]33[/td]
[td]0[/td]
[td]37[/td]
[td]28[/td]
[/tr]
[tr]
[td]Molson[/td]
[td]18[/td]
[td]18[/td]
[td]18[/td]
[td]0[/td]
[td]18[/td]
[/tr]
[tr]
[td]Samuel Adams[/td]
[td]43[/td]
[td]29[/td]
[td]27[/td]
[td]37[/td]
[td]0[/td]
[/tr]
[/table]
Winner: Meister Brau

Notice that each method has a different winner.

Different Condorcet methods give varying results for the rest of the candidates.
  • Schulze: Meister Brau, Samuel Adams, Guinness, Killians, Molson
  • Copeland: Meister Brau, Samuel Adams, Guinness, Killians, Molson
  • Minimax (all three): Meister Brau, Samuel Adams, Molson, Killians, Guinness
  • Kemeny-Young: Meister Brau, Samuel Adams, Guinness, Killians, Molson
  • Dodgson: Meister Brau, Guinness and Molson (tie), Samuel Adams, Killians
  • Ranked Pairs: Meister Brau, Samuel Adams, Guinness, Killians, Molson
  • Maximal Lotteries: Meister Brau 1, all the rest 0
 
Here are some videos on the subject of voting systems:
Arrow's Impossibility Theorem | Infinite Series - YouTube
Voting Systems and the Condorcet Paradox | Infinite Series - YouTube

The second one refers to these papers:
Voting and Elections: Election Decision Methods -- AMS :: Feature Column from the AMS
The mathematics of voting, power, and sharing - Part 1 -- Notes1.pdf

The AMS paper used these preference ballots with these multiplicities:
  • 18: A D E C B
  • 12: B E D C A
  • 10: C B E D A
  • 9: D C E B A
  • 4: E B D C A
  • 2: E C D B A
Here is a dictionary between that paper's letters, Kelsey Houston-Edwards's colors, and Math Alive's beers:
  • A - Green - Molson
  • B - Blue - Killians
  • C - Purple - Guinness
  • D - Red - Samuel Adams
  • E - Orange - Meister Brau
 
  • A - Green - Molson - crisp, but skunked
  • B - Blue - Killians - a bit too sweet, but if you get hammered in da' burgh, people won't know you're threatening them
  • C - Purple - Guinness - good in chile, cake, and other stuff. Like car bombs.
  • D - Red - Samuel Adams - they sell beer, but they aren't actually Sam Adams... Maybe beers are Sam Atoms??
  • E - Orange - Meister Brau - a nag ram of Mister EU Bra. Ehhh... I suppose it's more fun to talk to a drunk Canadian than a sober one?
 
I don't pretend to be a beer connoisseur, so I can't comment on that.

But if I was using this example, I'd do ice-cream flavors or fruits or something like that. Vanilla, chocolate, strawberry, cookie dough, mint chip? Apple, orange, pineapple, raspberry, grapefruit?
 
So I've been thinking about infinite nested roots again, and the constants they create (for the past few days).

And I avoided posting here for a couple of days.... but then 3blue1brown attacked with his lighthouse video this morning (after I almost posted yesterday!!!), which basically has Viete/Catalan's Pi formula built right into it, which is the first nested root equation that I was thinking about using as an example (it's the easiest one from an integer standpoint... which I will explain later).


There is a series of constants defined by:

\( \,\,Q_{x,n,k} = \,\, \left(nx^{n-1}\right)^k \times \left(x-\sqrt[n]{x^n-x+\sqrt[n]{x^n-x+\sqrt[n]{x^n-x+\dots}}} \right)\)

With k being the number of radicals +1. The first one gives you 3blue1brown's lighthouse intensity sum times 4 (although the lighthouse sum is more natural):

\(Q_{2,2,k\to\infty} = \frac{\pi^2}{4} \times 4\)


You might see cos (pi/4^k) in the details (you'll have to rearrange some stuff to find its exact representation), k=100 below:

\(p_0=Q_{2,2,100}\sim \frac{2\, \pi^2}{2!}\)

\(p_1 =4^{101}\times \left(\frac{2 \, \pi^2}{2!}-p_0 \right)\sim\frac{2 \, \pi^4}{4!} \)

\(p_2 =4^{101}\times \left(\frac{2 \, \pi^4}{4!}-p_1)\sim \frac{2 \, \pi^6}{6!} \)

\(p_3 =4^{101}\times \left(\frac{2 \, \pi^6}{6!}-p_2) \sim \frac{2 \, \pi^8}{8!} \)
..... p_m, m->infinity = 0


So I wondered several things (again... this is an old topic):

Do the other so called (by me) "Q constants" (I couldn't find them in Dixon J Jones' "A CHRONOLOGY OF CONTINUED SQUARE ROOTS
AND OTHER CONTINUED COMPOSITIONS,
THROUGH THE YEAR 2016", but I think beero pointed me to where they were in there before... I couldn't find it when I looked around yesterday) have geometric applications?


What is the general formula for integer ratios of successive terms (demonstrated above in the Viete Catalan cosine (2n)! type integer progression, and below in another)?

I'd call pi^2 Q_2,2
Q_3,2 ~ 20.1939452
Q_2,3 ~ 26.5564375

Q_1.5,2 = 6.42675515... (for below, I calculated it to k=333)

\(p_0=Q_{1.5,2} \)

Below, second Q term in p_1 has k=60:

First integer=6 =3^2-3^1
\(p_1 =3^{61}\times \left(p_0- Q(1.5,2,60)\right) \sim \frac{2 \, \left( Q_{1.5,2} \right)^2}{12} \)

int=72 = ( 3^5-3^4-3^3+3^2 )/2
\(p_2 =3^{61}\times \left(\frac{2 \, Q_{1.5,2}^2}{12}-p_1\right) \sim\frac{2 \, \left( Q_{1.5,2} \right)^3}{12*12} \)

int=1404 = ???
\(p_3 =3^{61}\times \left(\frac{2 \, Q_{1.5,2}^3}{144}-p_2\right)\sim \frac{2 \, \left( Q_{1.5,2} \right)^4}{12*12*13*3} \)
..... p_m, m->infinity = 0
int=
For different Q_x,(integer n) you get different integer patterns, like the 2!,4!,6!,8!... for Q_2,2; or Q_1.5,2: 12/2,144/2,2808/2...

Q_9,2 integer pattern (18^2-18),
(18^5-18^4-18^3+18^2)/2, I don't know the pattern yet.


Etc... It appears that all Q constants have specific cosine-like functions associated with specific integer patterns, such as (2n)! for Viete Catalan pi.


So I want a coefficient formula for the cosine-like functions, to generate the integer coefficients of the cosine-like functions.
 
Since your radical expression converges to x (if it converges at all), the key thing to calculate is the rate of convergence as k goes to infinity. Presumably, you'll find it asymptotic to some multiple of 1/(nx^(n-1))^k, where the coefficient is the value you're looking for.
 
The radicals converge to x.

Q_x,n,k= (x-nested radicals)* [nx^(n-1)]^k k= number of radicals+1


The successive (x-nested radical) values, as k--> infinity, tend towards (bottom has one more nesting):

\( n x^{n-1} = \,\, \frac{x - \sqrt[n]{x^n-x+\sqrt[n]{x^n-x+\sqrt[n]{x^n-x+\dots}}}}{{x - \sqrt[n]{x^n-x+\sqrt[n]{x^n-x+\sqrt[n]{x^n-x+\sqrt[n]{x^n-x+\dots \dots}}}}}\)


Q_2,2, (k-->infinity) =pi^2

The residuals for various (Q_x,n,infinity - Q_x,n,k) follow specific patterns, including the cosine pattern for Q_2,2, where:

\(Q_{2,2,k} = \,\,\ \frac{2 pi^2}{2! 4^{0k}} - \frac{2 pi^4}{4! 4^{1k}} +\frac{2 pi^6}{6! 4^{2k}} - \frac{2 pi^8}{8! 4^{3k}} \dots \)

That Q constant is as easy as pi. The other ones are a bit more tough (for me). I'm having problems figuring out the integer coefficient pattern for successive terms (or a closed for solution for it). Maybe I didn't check OEIS thoroughly enough?

Q_1.5,2,infinity = I'll call it \(\Phi_{1.5,2}\)..

\(Q_{1.5,2,k} = \,\,\ \frac{\Phi_{1.5,2}}{1} - \frac{\Phi_{1.5,2}^2}{6 \times 3^{1k}} +\frac{\Phi_{1.5,2}^3}{72\times 3^{2k}} - \frac{\Phi_{1.5,2}^4}{1404\times 3^{3k}} + \frac{ \Phi_{1.5,2}^5}{\frac{673920\times 3^{4k}}{17}} - \dots \)

Q_2,2 (pi one with 2/n! expanded):
\(Q_{2,2,k} = \,\,\ \frac{ pi^2}{ 4^{0k}} - \frac{pi^4}{12 \times 4^{1k}} +\frac{ pi^6}{360 \times 4^{2k}} - \frac{ pi^8}{20160 \times 4^{3k}} \dots \)

Q_2.5,2

\(Q_{2.5,2,k} = \,\,\ \frac{ \Phi_{2.5,2}}{ 5^{0k}} - \frac{\Phi_{2.5,2}^2}{20 \times 5^{1k}} +\frac{ \Phi_{2.5,2}^3}{1200 \times 5^{2k}} - \frac{ \Phi_{2.5,2}^4}{148800 \times 5^{3k}} +\frac{\Phi_{2.5,2}^5}{32240000 \times 5^{4k}} \dots \)


Q_3,2:

\(Q_{3,2,k} = \,\,\ \frac{\Phi_{3,2}}{1} - \frac{\Phi_{3,2}^2}{30 \times 6^{1k}} +\frac{\Phi_{3,2}^3}{3150\times 6^{2k}} - \frac{\Phi_{3,2}^4}{\frac{8127000 \times 6^{3k}}{11}} + \frac{ \Phi_{3,2}^5}{\frac{31573395000\times 6^{4k}}{97}} - \dots \)


I'm pretty sure you and/or Loren came up with a quick fix for this before, and a reason it wasn't useful from an applied or theoretical perspective, but I'm once again feeling curious about the possibility of cosine like transcendental functions that have periods other than pi.




So basically, I'm trying to find a general formula for the integer coefficients for the cosine like patterns of the other Q_x,n constants (again, because I couldn't find your old reply for the same thing...).
 
Last edited:
I remember from my childhood a discussion of mathematics that featured the locations of points on a sphere such that their distances from each other are maximized.

I have decided to return to it, though using numerical methods. Doing so has the problem that one is not guaranteed to reach a global optimum, but that is a risk that I have decided to take. So here goes.

  • One point: trivial
  • Two points: antipodes
  • Three points: an equilateral triangle in a great circle
  • Four points: a regular tetrahedron
  • Five points: a 3-bipyramid
  • Six points: a regular octahedron (4-bipyramid)
  • Seven points: a 5-bipyramid
  • Eight points: a 4-antiprism, winning over a cube by a tiny margin
After that, it gets more complicated. Those that I can interpret are gyroelongated bipyramids: antiprisms with pyramid caps.
  • Ten points: 4-APPC
  • Twelve points: regular icosahedron (5-APPC)
  • Fourteen points: 6-APPC

For eighteen points, I got a sort of extended 4-antiprism with pyramid caps. Instead of alternating opposite-pointed triangles, it's alternating up-and-down pentagonal pyramids that overlap.

I made the shape identification with the help of spherical Delaunay triangulation, and for Mathematica, I used its now-built-in convex-hull function in 3D.
 
I remember from my childhood a discussion of mathematics that featured the locations of points on a sphere such that their distances from each other are maximized.

I have decided to return to it, though using numerical methods. Doing so has the problem that one is not guaranteed to reach a global optimum, but that is a risk that I have decided to take. So here goes.

  • One point: trivial
  • Two points: antipodes
  • Three points: an equilateral triangle in a great circle
  • Four points: a regular tetrahedron
  • Five points: a 3-bipyramid
  • Six points: a regular octahedron (4-bipyramid)
  • Seven points: a 5-bipyramid
  • Eight points: a 4-antiprism, winning over a cube by a tiny margin
After that, it gets more complicated. Those that I can interpret are gyroelongated bipyramids: antiprisms with pyramid caps.
  • Ten points: 4-APPC
  • Twelve points: regular icosahedron (5-APPC)
  • Fourteen points: 6-APPC

For eighteen points, I got a sort of extended 4-antiprism with pyramid caps. Instead of alternating opposite-pointed triangles, it's alternating up-and-down pentagonal pyramids that overlap.

I made the shape identification with the help of spherical Delaunay triangulation, and for Mathematica, I used its now-built-in convex-hull function in 3D.

If you're doing max-min, this is the  Tammes problem, which is the special 3D case of the  spherical codes problem. I believe that optimal solutions have been proved for up to around 14 points or so, plus a few larger sporadic cases, with conjectured solutions for larger point sets. Proofs get really hard for questions like this in discrete geometry because most of the solutions lack a lot of the nice symmetries one would hope for in a simple-to-state problem like this. Computationally, Mathematica has SpherePoints[n], which presumably has some kind of numerical energy minimization built in.
 
Back
Top Bottom