Re: WM and end segments...

Liste des GroupesRevenir à s math 
Sujet : Re: WM and end segments...
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : sci.math
Date : 22. Jul 2024, 22:20:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v7mifg$qehd$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 7/21/2024 1:38 PM, Chris M. Thomasson wrote:
For some damn reason when I hear end segments from WM I think of a tree. Take the following infinite 2-ary tree that holds the positive integers:
___________________________________________
                   0
                  / \
                 /   \
                /     \
               /       \
              1         2
             / \       / \
            /   \     /   \
           3     4   5     6
          / \   / \ / \   / \
       .........................
___________________________________________
[...]
To get at a parent node from any node, root 0 is "special" here...:
1 = ceil(1/2) - 1 = 0
2 = ceil(2/2) - 1 = 0
3 = ceil(3/2) - 1 = 1
4 = ceil(4/2) - 1 = 1
5 = ceil(5/2) - 1 = 2
6 = ceil(6/2) - 1 = 2
On the mirror side:
       (-1)  (-2)
          \ /
           0
          / \
       (+1)  (+2)
The parent of -1 and -2 should be zero wrt the negative side:
-1 = floor(-1/2) + 1 = 0
-2 = floor(-2/2) + 1 = 0
good. Now, the parent of say, -3 and -4 should be -1:
    (-3) (-4)
       \ /
       (-1)  (-2)
          \ /
           0
          / \
       (+1)  (+2)
-3 = floor(-3/2) + 1 = -1
-4 = floor(-4/2) + 1 = -1
the parent of -5 and -6 should be -2:
-5 = floor(-5/2) + 1 = -2
-6 = floor(-6/2) + 1 = -2
Seems to work okay, the root node is interesting here, makes me think of signed zero... :^)
Wrt ceil: this is right, but they are is children not its parents...
0 = ceil(0/2) - 1 = -1
0 = ceil(0/2) - 2 = -2  lol?
Humm...

Date Sujet#  Auteur
2 Jul 25 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal