Talk:Primes - allocate descendants to their ancestors: Difference between revisions

Line 139:
 
: Do you see why I feel the task is ambiguous? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 15:59, 2 March 2015 (UTC)
 
 
- Hidden does not mean non existent. I see, you don't like small enigmas. Do I have to define what a prime factor is ? And what a decomposition in prime factor is ? I don't think so. But, I agree with you, it requires a little effort of reflection.
 
- The program counts 2 things, the ancestors and the descendants and I count each descendant for ... 1 descendant. Is it not obviousness ?
 
- I disagree with you, 20 = (2*2*5) is not a descendant of 8, it's a descendant of 9 (2+2+5).
 
9 = (3*3) is a descendant of 6 (3+3).
 
6 = (2*3) is a descendant of 5 (2+3).
 
I don't know what version of the C program you ran, but it is not the one I posted.
And no, 20 is counted for 1 descendant. Did you notice that I do not ask for the level of the descendants ? (Another hidden information).
 
- Don't worry, your english is not that bad. But, if you feel more comfortable, we can continue in french.
 
A considerable effort, really ? I don't believe you.
The main logic is concentrated in the GetChildren function (11 lines of code) where I do the sum and the product of the prime factors.
For the other functions, you can find similar functions on this site. The 'sort', with the tree method, already existed in the early sixties, far before the existence of this site.
 
- Again, you should have noticed that I do not ask for the level of the descendants, because it defaults to 1, the direct descendants.
If you want to list all the children, the grand-children, the gran-grand-children, etc... you can try.
You can go down up to the limit of your imagination or at least up to the limit of you processor (2^64 - 1).
Even if you exclude the number 4, all the prime factors and all the multiples of the prime factors greater than 97, that's going to be a very huge number of descendants.
 
- No, I don't see why you feel the task is ambiguous. The only ambiguity I can see, here, is your interpretation of the task description, because the ambiguities you see are simply truisms.
It just requires a little common sense and common sense is biological.
 
- I do not have too much time, to post on this site, I give support on a forum, very promising.
Nevertheless, I've decided to extend the delimited set of ancestors (from 1 to 99).
I think it's a good practice to let the program detect if the numbers have or have not, ancestors and/or descendants.
The source codes have been modified accordingly.
Are you happy with that extension ?
 
--[[User:Old man|Old man]] ([[User talk:Old man|talk]]) 10:27, 3 March 2015 (UTC)
Anonymous user