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

Undo revision 201576 by Old man (talk)
(Undo revision 201576 by Old man (talk))
 
(19 intermediate revisions by 3 users not shown)
Line 9:
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 17:16, 24 February 2015 (UTC)
:Hi,
# 'The list layout' showed a partial ouputoutput for parent [46]. I've changed it to the full results for parent [46].
# Yes, the output is too big to be posted (5.079 KB), that's why, I give the total of all descendants.
# I did put some time comparisons, because I was so surprised, from a few seconds in C to almost 10 minutes required by the "Visual Basic .NET with collection". This is my first 'Visual Basic .NET' program, I probably did something wrong, because the program runs in 20 seconds, now. I deleted the time comparisons.
Line 114:
--[[User:Old man|Old man]] ([[User talk:Old man|talk]]) 08:30, 2 March 2015 (UTC)
 
: I think that the hidden information should not be hidden. Perhaps it is sufficient for the hidden information to be stated on the discussion page, but this hidden information is not information that I get from reading the task description in its current form. I will grant that at first blush your definitions seem like they might be obvious. But this "obviousness" does not hold up under a close examination.
 
: For example, I feel it's not clear what you mean by 'the title clearly states "allocate descendants to their ancestors", that is, each descendant is counted for 1" -- for one what?
Line 120:
: Still, after studying the output from your C program, I see that each descendant is counted once for each ancestor that it is a descendant of. For example, 20 is a descendant of 8 and it is also a descendant of 9, so it gets counted twice when both 8 and 9 are considered as parents. So if I set MAXPRIME and MAXPARENT to 11, in your C program, it's rather clear that 20 would be counted for 2 (as opposed to being counted as 20 in the total, for example).
 
: Of course, I understand that can not be what you meant. But without considerable effort spent on your code, and some time in this discussion, I would not know what you had meant. It's worth spending some time addressing the ambiguities of interpretation which necessarily arise from the use of the english language (or any language which humans have developed for speaking with each other - but in this case we are using english). There are good biological reasons for these ambiguities, and it's relatively simple to address them. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 15:42, 2 March 2015 (UTC)
 
: Another difficulty is that in your implementation, for example, 8 is an ancestor of 26, but 26 is not a descendant of 8. Why is the reason for this not stated in the task description?
 
: Quoting the generated Ancestors.txt file:
 
: <lang>[8] LEVEL: 2
ANCESTORS: 5,6
DESCENDANTS: 3
15,16,18</lang>
 
: and
 
: <lang>[26] LEVEL: 4
ANCESTORS: 5,6,8,15
DESCENDANTS: 60
69,133,169,190,228,238,286,340,408,459,484,728,819,975,1040,1155,1170,1232,1248,1375,1386,1404,1650,1715,1760,1980,2058,2112,2376,2450,2673,2940,3136,3500,3528,3969,4200,4480,4725,5000,5040,5376,5625,5670,6000,6048,6400,6750,6804,7200,7680,8100,8192,8640,9216,9720,10368,10935,11664,13122</lang>
 
: 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 where you see ambiguities, I see 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)
 
: Yeah, when I said that 20 was a descendant of 8, I was wrong. I don't remember what I was thinking there. (But that hypothesis was obviously wrong...)
 
: That said, I expected that if 5 were an ancestor of 8, that 8 would be a descendant of 5. And this seems to not be the case, and I do not see where in your task description you make this issue clear.
 
: You have made it clear in your code, and you've spent considerable time explaining to me in the comments here how I am wrong. And I appreciate that. But what I'm really looking for is an adequate task description. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 17:09, 4 March 2015 (UTC)
 
 
- No problem, everybody can do mistakes. I don't blame you, since you agree with me that 1 number can have 0 or 1 direct ancestor.
 
- It is specified. I gave the greatest number 3<sup>33</sup>. 3<sup>33</sup> is a direct descendant of 99.
But I'm good prince, I concede it, for more clarity and for newbies. I replace "all descendants" by "direct descendants".
 
The code didn't change that much since the original post. I'm surpise that you suddenly see it clearer.
But, ok, it's a good start.
 
- Considerable time ? No. I spend a few minutes between 2 supports, only, when I have some spare time.
I think you surely spend more time, trying to find flaws, than what I spend to teach you.
It is very relaxing to teach others.
 
--[[User:Old man|Old man]] ([[User talk:Old man|talk]]) 18:48, 5 March 2015 (UTC)
 
: Actually I was trying to find the definitions of your terms - I'd rather work forward from the definitions than reverse engineer your code. What you see as me trying to find flaws was, from my point of view, an attempt to piece together a set of definitions which would satisfy you and be consistent with my understanding of the words. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:09, 5 March 2015 (UTC)
 
 
Could you be more specific ?
 
--[[User:Old man|Old man]] ([[User talk:Old man|talk]]) 11:33, 6 March 2015 (UTC)
 
See [[Primes_-_allocate_descendants_to_their_ancestors#Definition_of_terms]] for my current understanding. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:11, 6 March 2015 (UTC)
 
==Parent-Child relationship==
Hi again "Old man". I thought I would note something that confuses me when reading your task descrition: The parent-child relationship seems the other way around to me?
 
When you state:
<pre>46 = 2*23 --> 2+23 = 25, is the parent of 46.</pre>
I see 25 being derived ''from'' 46. Normally I think of the child being derived from the parent but you have the derived-from relationship going the other way?<br>
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 17:37, 4 March 2015 (UTC)
 
P.S. I do note that after pondering #thedress, the answer might well be "blue and black"
 
 
:Hi,
 
:I see what you mean, but with such reasoning, humanity has absolutely no future.
 
:Personally, I'd prefer to discuss normality. I posted, 46 has 557 children and you'd like, 46 has 557 parents.
:I can say one thing : What an orgy!
:Why not ? LOL. Excellent! LOL.
:Thanks for this little touch of humor. This was missing.
 
:I didn't see the signature button, before today.
:I copied and pasted the signature from post to post, changing date and time.
:But, my signature still does not appear "blue and black", with the button.
 
--[[User:Old man|Old man]] ([[User talk:Old man|talk]]) 19:03, 5 March 2015 (UTC)
 
: To make your signature appear blue and black, you'll probably want to click through where it's red, and then save something on the page where you land. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:14, 6 March 2015 (UTC)
Anonymous user