## developing a notational comma popularity metric

cmloegcmluin
Site Admin
Posts: 794
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

### Re: developing a notational comma popularity metric

Dave Keenan wrote:
Tue Sep 29, 2020 10:05 am
7/52,3
I like this one!

I think I'll go ahead and use it in the code then.

Let me know if you want me to add it to the wiki page. There we have them written in inline MathJax, so it would look more like this: \frac{13}{5}_{2,3} which looks a bit awkward to me — do you think parentheses help? \frac{13}{5}_{(2,3)}

Dave Keenan
Site Admin
Posts: 1095
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

### Re: developing a notational comma popularity metric

I think the Wiki page is OK as it is. I wouldn't want to rush into changing it. Maybe ask me again in a month's time.

\frac{13}{5}_{2,3} does look awkward. The parentheses do help \frac{13}{5}_{(2,3)}

I think the main problem is ASCIIMath .... Much of its output looks awful. LaTeX $$...$$ or $...$ looks much better. Some other options (all in LaTeX):

$$\frac{13}{5}_{2,3}$$            \frac{13}{5}_{2,3}

$$\frac{13}{5}_{\small{2,3}}$$            \frac{13}{5}_{\small{2,3}}

$$\frac{13}{5}_{\scriptsize{2,3}}$$            \frac{13}{5}_{\scriptsize{2,3}}

$$\frac{13}{5_{2,3}}$$            \frac{13}{5_{2,3}}

$$\frac{13_{2,3}}{5}$$            \frac{13_{2,3}}{5}

$$\frac{13_{2,3}}{5_{2,3}}$$            \frac{13_{2,3}}{5_{2,3}}

$$\frac{13}{5}\scriptsize{2,3}$$            \frac{13}{5}\scriptsize{2,3}

$$\frac{13}{5}\tiny{2,3}$$            \frac{13}{5}\tiny{2,3}

$$\frac{13}{5}_{(\small{2,3})}$$            \frac{13}{5}_{(\small{2,3})}

$$(\frac{13}{5})_{\small{2,3}}$$            (\frac{13}{5})_{\small{2,3}}

$$\big(\frac{13}{5}\big)_{\small{2,3}}$$            \big(\frac{13}{5}\big)_{\small{2,3}}

$$\Big(\frac{13}{5}\Big)_{\small{2,3}}$$            \Big(\frac{13}{5}\Big)_{\small{2,3}}

cmloegcmluin
Site Admin
Posts: 794
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

### Re: developing a notational comma popularity metric

I should use the LaTeX more often! I agree it looks much nicer.

Hrm. So I finally got around to improving some of the N2D3P9 code. I revised things as I described so that instead of computing all of the monzos it needs to check up front (which caused crashes for large max N2D3P9), it instead works directly from the prime exponent extremas, only ever dealing with a single monzo, mutating it each time to check the next logical one until it's exhausted all the possibilities described by the extremas. Which is great! It doesn't actually speed the code up at all, but it would permit calculation of more popular ratios than 307 one day. However what I was more interested in was the prospect of hardcoding once and for all the max numerators up to N2D3P9 of 3501, per your suggestions earlier in this thread (also brought up here). Unfortunately, while the code *can* run to completion now, it won't ever complete, at least not in approximately 5 milliion years it won't. It says it has 33664847019245570000 monzos to check, and can check about 200,000 of them a second.

Here're the extremas:
[[0,0],[0,0],[0,9],[0,6],[0,4],[0,4],[0,3],[0,3],[0,2],[0,2],[0,2],[0,2],[0,2],[0,2],[0,2],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[
0,1],[0,1],[0,1],[0,1],[0,1],[0,1]]

Surely the problem is the long tail at the end, going up to the 54th prime, which is 251, as you described per Johnny Reinhard's HHT. There's certainly a smarter way to get this list of numerators w/ GPF sorted by N2 and by N2P. But it's just not the most pressing thing at the moment. I'm just cleaning up the last of the to-dos I'd left for myself in the code base -- the ones I'd saved to last because I was the least excited about them

Dave Keenan
Site Admin
Posts: 1095
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

### Re: developing a notational comma popularity metric

I'm curious which of those LaTeX options you favour as a notation for a 2,3-equivalent ratio class?

So what is the list of max exponents for each prime individually, for N2D3P9 up to 3501. I know it is 1 for prime 251 and 11 for prime 5 [Edit: Dunno how I got that. You're right. It's 9]. But what are all those in between [Edit: I see you answered it while I was asking it] and what do you get for the number of combinations to check, when you add one to each of them and multiply them all together?

[Edit: I see it's the 239 on the end that's the killer. Total combinations around 3.4×1019. So scratch that idea.]

cmloegcmluin
Site Admin
Posts: 794
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

### Re: developing a notational comma popularity metric

Dave Keenan wrote:
Thu Oct 01, 2020 1:58 pm
I'm curious which of those LaTeX options you favour as a notation for a 2,3-equivalent ratio class?
How about $$\frac{13}{5}_{\scriptsize{(2,3)}}$$? That's \frac{13}{5}_{\scriptsize{(2,3)}}.

I think I prefer for one or the other of the quotient and the sign to be in parentheses, and of the two, I prefer the sign, because of how parentheses sometimes imply the absence of things (like in finance I think when it sometimes means negative).

By the way, unfortunately there was so subscript unicode char for comma, so I went with this in the code (which has to be able to print things out to the terminal): 7/5₋₂₃

Although it occurs to me that the code supports three format targets: terminal, spreadsheet, and forum, so it could certainly include our preferred LaTeX bbCode for the classes.
So what is the list of max exponents for each prime individually, for N2D3P9 up to 3501. I know it is 1 for prime 251 and 11 for prime 5 [Edit: Dunno how I got that. You're right. It's 9]. But what are all those in between [Edit: I see you answered it while I was asking it] and what do you get for the number of combinations to check, when you add one to each of them and multiply them all together?

[Edit: I see it's the 239 on the end that's the killer. Total combinations around 3.4×1019. So scratch that idea.]
I really need to get in the habit of either triple-checking that I've said everything I plan to say before posting, or just starting a new post if I remember something I missed

Yeah. What I'm thinking is that what this prime exponent extremas structure tells us is that you can have only up to one 251, and only up to one 241, and only up to one 239, etc. but of course it's not the most helpful structure in the sense that it does nothing to help realize the obvious fact that since you can only barely have the one 251 there's no way you'll be able to include both a 251 and a 241. But the code isn't smart enough not to check that combination. I'd conjecture that as the max N2D3P9 goes up, the proportion of monzos that are "possible" by individual primes which are "actually possible" by max N2D3P9 goes down, so that by the time we're at 3501, it's almost nothing... 3.4×1019 possibilities, but ... something less than 3501 numerators?

I can recognize what's dumb about this, but the smarter solution isn't jumping out at me. I'll simmer on it.

cmloegcmluin
Site Admin
Posts: 794
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

### Re: developing a notational comma popularity metric

Alright, I think there’s gotta be some way to do this recursively. You come up with the prime exponent extremas given above. Then starting from the top, you work your way back down. In other words, with one 251, how much N2D3P9 is left? Calc a new prime exponent extremas for that (it should be almost nothing) and recurse for each one, again working down. Sorry for the vagueness and brevity — just thought I’d dump what I’m thinking as I’m drifting off to sleep, in case it’s of any interest, and hopefully enough for you to see where I’m going with it

Dave Keenan
Site Admin
Posts: 1095
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

### Re: developing a notational comma popularity metric

cmloegcmluin wrote:
Thu Oct 01, 2020 3:06 pm
How about $$\frac{13}{5}_{\scriptsize{(2,3)}}$$? That's \frac{13}{5}_{\scriptsize{(2,3)}}.

I think I prefer for one or the other of the quotient and the sign to be in parentheses, and of the two, I prefer the sign, because of how parentheses sometimes imply the absence of things (like in finance I think when it sometimes means negative).
I'll go along with that.
By the way, unfortunately there was so subscript unicode char for comma, so I went with this in the code (which has to be able to print things out to the terminal): 7/5₋₂₃
I don't understand. Why the dash, and why no parens? Why not 7/5₍₂,₃₎ ?

I used shapecatcher and scoured the web, but in the end, just as the best subscript decimal point is an ordinary full stop, the best subscript comma is an ordinary comma. That's what I used above. I also found a suitable superscript comma.

<Multi_key> <6> <.> : "ᐧ" U1427 # CANADIAN SYLLABICS FINAL MIDDLE DOT (superscript decimal point)
<Multi_key> <6> <,> : "˒" U02D2 # MODIFIER LETTER CENTERED RIGHT HALF RING (superscript comma)

<Multi_key> <-> <.> : "." U002E # FULL STOP (subscript decimal point)
<Multi_key> <-> <,> : "," U002C # COMMA (subscript comma)
Although it occurs to me that the code supports three format targets: terminal, spreadsheet, and forum, so it could certainly include our preferred LaTeX bbCode for the classes.
Cool.
Yeah. What I'm thinking is that what this prime exponent extremas structure tells us is that you can have only up to one 251, and only up to one 241, and only up to one 239, etc. but of course it's not the most helpful structure in the sense that it does nothing to help realize the obvious fact that since you can only barely have the one 251 there's no way you'll be able to include both a 251 and a 241. But the code isn't smart enough not to check that combination. I'd conjecture that as the max N2D3P9 goes up, the proportion of monzos that are "possible" by individual primes which are "actually possible" by max N2D3P9 goes down, so that by the time we're at 3501, it's almost nothing... 3.4×1019 possibilities, but ... something less than 3501 numerators?

I can recognize what's dumb about this, but the smarter solution isn't jumping out at me. I'll simmer on it.
Even if we raised our sights to a max N2D3P9 of 5298.2 which is N2D3P9(510), we know that nothing with a numerator larger than 510 could have a lower N2D3P9, and so we'd have a lot less to check if we just checked every integer from 1 to 510 = 9 765 625. Or rather every integer that's one more or one less than a multiple of 6 from 5 to 9 765 625. That's only 3 255 207 to check.

But then we'd be forced to factorise every such number, which would slow things down. But we'd only have to test for divisibility by primes from 5 to 307.

Dave Keenan
Site Admin
Posts: 1095
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

### Re: developing a notational comma popularity metric

cmloegcmluin wrote:
Thu Oct 01, 2020 4:48 pm
Alright, I think there’s gotta be some way to do this recursively. You come up with the prime exponent extremas given above. Then starting from the top, you work your way back down. In other words, with one 251, how much N2D3P9 is left? Calc a new prime exponent extremas for that (it should be almost nothing) and recurse for each one, again working down. Sorry for the vagueness and brevity — just thought I’d dump what I’m thinking as I’m drifting off to sleep, in case it’s of any interest, and hopefully enough for you to see where I’m going with it
That might work. But it sounds hard to write and debug. Mine is bruter force and dumber. Notice that you don't need to generate a monzo for each number, you only need to count its prime factors and record the greatest one.

cmloegcmluin
Site Admin
Posts: 794
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

### Re: developing a notational comma popularity metric

Dave Keenan wrote:
Thu Oct 01, 2020 5:27 pm
I don't understand. Why the dash, and why no parens? Why not 7/5₍₂,₃₎ ?
It simply failed to occur to me that a non-subscript comma might look alright there. Now that I've got the sign installed, though, updating it is a simple matter of replacing the constant and doing a global find-and-replace for any test expectations. Not that adding it was a huge endeavor or anything. Thanks for your investigations and better suggestion!
Even if we raised our sights to a max N2D3P9 of 5298.2 which is N2D3P9(510), we know that nothing with a numerator larger than 510 could have a lower N2D3P9, and so we'd have a lot less to check if we just checked every integer from 1 to 510 = 9 765 625. Or rather every integer that's one more or one less than a multiple of 6 from 5 to 9 765 625. That's only 3 255 207 to check.

But then we'd be forced to factorise every such number, which would slow things down. But we'd only have to test for divisibility by primes from 5 to 307.
Brute force and dumb? Maybe. I'd call it clever. Maybe call mine "dumberer". Sometimes a situation just calls for intelligent brutality. Alright, I'll give your strategy a shot.

cmloegcmluin
Site Admin
Posts: 794
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

### Re: developing a notational comma popularity metric

It appears that indeed going by the numerators and factorizing them is better than going by the factorizations and getting their integer form. I didn't even write any specialized code for optimizing performance — I just kicked it off overnight. It hasn't found any new N2D3P9 ≤ 3501 results since 1953125 which is just 59, one less 5 than our max, but it ...might find one? By my estimation it should be finished running in the next hour or so.