Talk:EKG sequence convergence: Difference between revisions

From Rosetta Code
Content added Content deleted
m (tidy.)
Line 14: Line 14:
* ''"I have modified the task to require EKG(9) and EKG(10)"'' - You've certainly shown that there is a need.
* ''"I have modified the task to require EKG(9) and EKG(10)"'' - You've certainly shown that there is a need.
* ''"I think all the solutions will be wrong"'' - Not necessarily, they just need to cover the extra requirements. Their algorithms may be correct I mean.
* ''"I think all the solutions will be wrong"'' - Not necessarily, they just need to cover the extra requirements. Their algorithms may be correct I mean.
::Debatable try EKG(any 4 dıgıt prıme). I stopped waıtıng after 20 mıns!!!!!--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:49, 7 December 2018 (UTC)
* ''"This divergence/convergence is illusionary"''. It is real. The Python generator that uses gcd is easiest for me to reason about. What it generates next is solely down to the state help in names <code>last</code> and <code>so_far</code>. If they coincide between two generators then those generators could not then diverge.<br>
* ''"This divergence/convergence is illusionary"''. It is real. The Python generator that uses gcd is easiest for me to reason about. What it generates next is solely down to the state help in names <code>last</code> and <code>so_far</code>. If they coincide between two generators then those generators could not then diverge.<br>
::So what ıs convergence ıf the algorithm does not have <code>last</code> and <code>so_far</code>.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:49, 7 December 2018 (UTC)


I've learnt something more. Thanks Nigel. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 21:34, 8 August 2018 (UTC)
I've learnt something more. Thanks Nigel. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 21:34, 8 August 2018 (UTC)

Revision as of 12:49, 7 December 2018

Problem with task

The task description states "Variants of the sequence can be generated starting 1, N where N is any natural number larger than one". The examples all have N prime. Is it the intention that N may be composite? If so should there be an example say 10? --Nigel Galloway (talk) 14:31, 8 August 2018 (UTC)

Hi Nigel, that second number, then one after the initial 1; can be any integer greater than one. 2 is the base, or normal sequence known as the EKG sequence when people don't mention the variants. When developing the task I noted that 3 and 7 seemed to converge then diverge before finally converging (see the second Python example), so that lead to me asking for 2, 5, and 7.
It can be other than prime. --Paddy3118 (talk) 15:27, 8 August 2018 (UTC)
I'll take that as a yes. I have modified the task to require EKG(9) and EKG(10). If ekg(0)=1 and ekg(1)=N then if N is prime ekg(2)=2N. If N is composite ekg(2)=smallest prime factor of N. As none of the code on the task page attempts to factorize N, I think all the solutions will be wrong. This divergence/convergence is illusionary. OK the video draws a nice chart and compares it to the tree of life, but this just goes to prove that people should need a license to use PowerPoint, and similar. It says nothing about the relationship of N1 and N2. More interesting would be to find how out of kilter ekg(N) is with ekg(2). That is how many transpositions are needed to convert ekg(2) to ekg(N). I think this would partition the natural numbers into a small number of sets. --Nigel Galloway (talk) 17:41, 8 August 2018 (UTC)

Hi Nigel. I will take another look at the task and convergence over the next few days. I would discourage people from adding examples until then. --Paddy3118 (talk) 21:03, 8 August 2018 (UTC)

I had a look:

  1. The first Python solution is wrong - I'll either fix it or delete it. Thanks for finding that.
  2. The second Python solution does seem to be right. It gives different results than the first Python solution for EKG(9) and EKG(10). Its results for EKG(9) and EKG(10) match those of A169849 and A169851, respectively.

Addressing your comments:

  • "I have modified the task to require EKG(9) and EKG(10)" - You've certainly shown that there is a need.
  • "I think all the solutions will be wrong" - Not necessarily, they just need to cover the extra requirements. Their algorithms may be correct I mean.
Debatable try EKG(any 4 dıgıt prıme). I stopped waıtıng after 20 mıns!!!!!--Nigel Galloway (talk) 12:49, 7 December 2018 (UTC)
  • "This divergence/convergence is illusionary". It is real. The Python generator that uses gcd is easiest for me to reason about. What it generates next is solely down to the state help in names last and so_far. If they coincide between two generators then those generators could not then diverge.
So what ıs convergence ıf the algorithm does not have last and so_far.--Nigel Galloway (talk) 12:49, 7 December 2018 (UTC)

I've learnt something more. Thanks Nigel. --Paddy3118 (talk) 21:34, 8 August 2018 (UTC)