Skip to main content
updated sagemath script with recursive trees.
Source Link
mathoverflowUser
  • 3.1k
  • 1
  • 9
  • 36
corrected typo, added explanation
Source Link
mathoverflowUser
  • 3.1k
  • 1
  • 9
  • 36

where the right hand side $\prec$ is the lexicographic ordering of the two lists, where $(p,a) \prec (q,b) :\iff p < q \text{ or } ( p=q \text{ and } a < b)$ and the primes in the factorization list isare sorted by usual absolute value: $p_i < p_{i+1}$.

Examples : sorted

sorted by absolute value: $[2, 7, 11, 30, 60, 121]$ lexicographically

lexicographically sorted: $[2, 30, 60, 7, 11, 121]$

I used this sorting to visualize the following kernel Jaccard similarty kernel, where $\Omega$ counts the prime divisors with multiplicity:

where the right hand side $\prec$ is the lexicographic ordering of the two lists, where $(p,a) \prec (q,b) :\iff p < q \text{ or } ( p=q \text{ and } a < b)$ and the list is sorted by usual absolute value: $p_i < p_{i+1}$.

Examples : sorted by absolute value: $[2, 7, 11, 30, 60, 121]$ lexicographically sorted: $[2, 30, 60, 7, 11, 121]$

I used this sorting to visualize the following kernel Jaccard similarty kernel, where $\Omega$ counts the prime divisors with multiplicity:

where the right hand side $\prec$ is the lexicographic ordering of the two lists, where $(p,a) \prec (q,b) :\iff p < q \text{ or } ( p=q \text{ and } a < b)$ and the primes in the factorization list are sorted by usual absolute value: $p_i < p_{i+1}$.

Examples :

sorted by absolute value: $[2, 7, 11, 30, 60, 121]$

lexicographically sorted: $[2, 30, 60, 7, 11, 121]$

I used this sorting to visualize the following Jaccard similarty kernel, where $\Omega$ counts the prime divisors with multiplicity:

added link to OEIS sequence, added clarification about ordering of prime factorization, added examples
Source Link
mathoverflowUser
  • 3.1k
  • 1
  • 9
  • 36

$$m < n \iff [p_1^{a_1},p_2^{a_2},\cdots,p_r^{a_r}]<[q_1^{b_1},q_2^{b_2},\cdots,q_s^{b_s}]$$$$m \vartriangleleft n :\iff [(p_1,a_1),(p_2,a_2),\cdots,(p_r,a_r)] \prec [(q_1,b_1),(q_2,b_2),\cdots,(q_s,b_s)]$$

where the right hand side $<$$\prec$ is the lexicographic sortingordering of the two lists, where $(p,a) \prec (q,b) :\iff p < q \text{ or } ( p=q \text{ and } a < b)$ and for two prime powers this coincides with the list is sorted by usual sortingabsolute value: $p^a < q^b$$p_i < p_{i+1}$.

For instance for $n=1,\cdots , 10 $ we get the following sortingExample:

  1. For instance for $n=1,\cdots , 10 $ we get the following sorting:

$$1, 2, 6, 10, 4, 8, 3, 9, 5, 7$$

2)

Examples : sorted by absolute value: $[2, 7, 11, 30, 60, 121]$ lexicographically sorted: $[2, 30, 60, 7, 11, 121]$

[(2, 1)] = [(2, 1)]
[(2, 1)] < [(7, 1)]
[(2, 1)] < [(11, 1)]
[(2, 1)] < [(2, 1), (3, 1), (5, 1)]
[(2, 1)] < [(2, 2), (3, 1), (5, 1)]
[(2, 1)] < [(11, 2)]
[(7, 1)] > [(2, 1)]
[(7, 1)] = [(7, 1)]
[(7, 1)] < [(11, 1)]
[(7, 1)] > [(2, 1), (3, 1), (5, 1)]
[(7, 1)] > [(2, 2), (3, 1), (5, 1)]
[(7, 1)] < [(11, 2)]
[(11, 1)] > [(2, 1)]
[(11, 1)] > [(7, 1)]
[(11, 1)] = [(11, 1)]
[(11, 1)] > [(2, 1), (3, 1), (5, 1)]
[(11, 1)] > [(2, 2), (3, 1), (5, 1)]
[(11, 1)] < [(11, 2)]
[(2, 1), (3, 1), (5, 1)] > [(2, 1)]
[(2, 1), (3, 1), (5, 1)] < [(7, 1)]
[(2, 1), (3, 1), (5, 1)] < [(11, 1)]
[(2, 1), (3, 1), (5, 1)] = [(2, 1), (3, 1), (5, 1)]
[(2, 1), (3, 1), (5, 1)] < [(2, 2), (3, 1), (5, 1)]
[(2, 1), (3, 1), (5, 1)] < [(11, 2)]
[(2, 2), (3, 1), (5, 1)] > [(2, 1)]
[(2, 2), (3, 1), (5, 1)] < [(7, 1)]
[(2, 2), (3, 1), (5, 1)] < [(11, 1)]
[(2, 2), (3, 1), (5, 1)] > [(2, 1), (3, 1), (5, 1)]
[(2, 2), (3, 1), (5, 1)] = [(2, 2), (3, 1), (5, 1)]
[(2, 2), (3, 1), (5, 1)] < [(11, 2)]
[(11, 2)] > [(2, 1)]
[(11, 2)] > [(7, 1)]
[(11, 2)] > [(11, 1)]
[(11, 2)] > [(2, 1), (3, 1), (5, 1)]
[(11, 2)] > [(2, 2), (3, 1), (5, 1)]
[(11, 2)] = [(11, 2)]

prime_factorization_fractal_lexicographic_sorting_omega_kernel

Counting the size of the blocks on the main diagonal, we find the following OEIS sequence:

$$0, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 4, 2, 1, 1, 5, 2, 1, 1, 5, 2, 1, 1, 1, 6, 2, 1, 1, 1, 6, 2, 1, 1, 1, 1, 7, 2, 1, 1, 1, 1, 7, 3, 1, 1, 1, 1, 8, 3, 1, 1, 1, 1, 8, 3, 1, 1, 1, 1, 1, 9, 3, 1, 1, 1, 1, 1, 9, 3, 1, 1, 1, 1, 1, 1, 10, 3, 1, 1, 1, 1, 1, 1, 10, 4, 1, 1, 1, 1, 1, 1, 11, 4, 1, 1, 1, 1, 1, 1, 11, 4, 1, 1, 1, 1, 1, 1, 1$$

SageMath-script

$$m < n \iff [p_1^{a_1},p_2^{a_2},\cdots,p_r^{a_r}]<[q_1^{b_1},q_2^{b_2},\cdots,q_s^{b_s}]$$

where the right hand side $<$ is the lexicographic sorting of the two lists and for two prime powers this coincides with the usual sorting $p^a < q^b$.

For instance for $n=1,\cdots , 10 $ we get the following sorting:

$$1, 2, 6, 10, 4, 8, 3, 9, 5, 7$$

prime_factorization_fractal_lexicographic_sorting_omega_kernel

$$m \vartriangleleft n :\iff [(p_1,a_1),(p_2,a_2),\cdots,(p_r,a_r)] \prec [(q_1,b_1),(q_2,b_2),\cdots,(q_s,b_s)]$$

where the right hand side $\prec$ is the lexicographic ordering of the two lists, where $(p,a) \prec (q,b) :\iff p < q \text{ or } ( p=q \text{ and } a < b)$ and the list is sorted by usual absolute value: $p_i < p_{i+1}$.

Example:

  1. For instance for $n=1,\cdots , 10 $ we get the following sorting:

$$1, 2, 6, 10, 4, 8, 3, 9, 5, 7$$

2)

Examples : sorted by absolute value: $[2, 7, 11, 30, 60, 121]$ lexicographically sorted: $[2, 30, 60, 7, 11, 121]$

[(2, 1)] = [(2, 1)]
[(2, 1)] < [(7, 1)]
[(2, 1)] < [(11, 1)]
[(2, 1)] < [(2, 1), (3, 1), (5, 1)]
[(2, 1)] < [(2, 2), (3, 1), (5, 1)]
[(2, 1)] < [(11, 2)]
[(7, 1)] > [(2, 1)]
[(7, 1)] = [(7, 1)]
[(7, 1)] < [(11, 1)]
[(7, 1)] > [(2, 1), (3, 1), (5, 1)]
[(7, 1)] > [(2, 2), (3, 1), (5, 1)]
[(7, 1)] < [(11, 2)]
[(11, 1)] > [(2, 1)]
[(11, 1)] > [(7, 1)]
[(11, 1)] = [(11, 1)]
[(11, 1)] > [(2, 1), (3, 1), (5, 1)]
[(11, 1)] > [(2, 2), (3, 1), (5, 1)]
[(11, 1)] < [(11, 2)]
[(2, 1), (3, 1), (5, 1)] > [(2, 1)]
[(2, 1), (3, 1), (5, 1)] < [(7, 1)]
[(2, 1), (3, 1), (5, 1)] < [(11, 1)]
[(2, 1), (3, 1), (5, 1)] = [(2, 1), (3, 1), (5, 1)]
[(2, 1), (3, 1), (5, 1)] < [(2, 2), (3, 1), (5, 1)]
[(2, 1), (3, 1), (5, 1)] < [(11, 2)]
[(2, 2), (3, 1), (5, 1)] > [(2, 1)]
[(2, 2), (3, 1), (5, 1)] < [(7, 1)]
[(2, 2), (3, 1), (5, 1)] < [(11, 1)]
[(2, 2), (3, 1), (5, 1)] > [(2, 1), (3, 1), (5, 1)]
[(2, 2), (3, 1), (5, 1)] = [(2, 2), (3, 1), (5, 1)]
[(2, 2), (3, 1), (5, 1)] < [(11, 2)]
[(11, 2)] > [(2, 1)]
[(11, 2)] > [(7, 1)]
[(11, 2)] > [(11, 1)]
[(11, 2)] > [(2, 1), (3, 1), (5, 1)]
[(11, 2)] > [(2, 2), (3, 1), (5, 1)]
[(11, 2)] = [(11, 2)]

prime_factorization_fractal_lexicographic_sorting_omega_kernel

Counting the size of the blocks on the main diagonal, we find the following OEIS sequence:

$$0, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 4, 2, 1, 1, 5, 2, 1, 1, 5, 2, 1, 1, 1, 6, 2, 1, 1, 1, 6, 2, 1, 1, 1, 1, 7, 2, 1, 1, 1, 1, 7, 3, 1, 1, 1, 1, 8, 3, 1, 1, 1, 1, 8, 3, 1, 1, 1, 1, 1, 9, 3, 1, 1, 1, 1, 1, 9, 3, 1, 1, 1, 1, 1, 1, 10, 3, 1, 1, 1, 1, 1, 1, 10, 4, 1, 1, 1, 1, 1, 1, 11, 4, 1, 1, 1, 1, 1, 1, 11, 4, 1, 1, 1, 1, 1, 1, 1$$

SageMath-script

added second image / kernel
Source Link
mathoverflowUser
  • 3.1k
  • 1
  • 9
  • 36
Loading
Source Link
mathoverflowUser
  • 3.1k
  • 1
  • 9
  • 36
Loading