Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Newsgroups | sci.math |
| Subject | Re: For WM, a 2-ary infinite tree: |
| Date | 2022-01-03 00:10 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <squb29$2v5$1@dont-email.me> (permalink) |
| References | <sqotum$6ja$1@dont-email.me> <squ1dn$k44$1@dont-email.me> <squ1vo$mno$1@dont-email.me> |
On 1/2/2022 9:35 PM, Chris M. Thomasson wrote:
> On 1/2/2022 9:26 PM, Chris M. Thomasson wrote:
>> On 12/31/2021 10:56 PM, Chris M. Thomasson wrote:
>>> Root 0, 2-ary:
>>>
>>>
>>> [0] 0
>>> / \
>>> / \
>>> / \
>>> / \
>>> / \
>>> [1] 1 2
>>> / \ / \
>>> / \ / \
>>> [2] 3 4 5 6
>>> / \ / \ / \ / \
>>> [3] 7 8 9 10 11 12 13 14
>>> ................................
>>>
>>> It goes on forever. There is no end. There are an infinite number of
>>> levels, however, no leafs in sight... ;^)
[...]
>> How about 1 and 2:
>>
>> parent = ceil(1 / 2 - 1) = 0
>> parent = ceil(2 / 2 - 1) = 0
>>
>> Working! What happens with zero:
>>
>> parent = ceil(0 / 2 - 1) = -1
>>
>> Humm! Does this going into another realm?
>>
>> ;^)
>>
>> The parent of 9, or 10:
>>
>> parent = ceil(9 / 2 - 1) = 4
>> parent = ceil(10 / 2 - 1) = 4
>>
>> How about 7, or 8?
>>
>> parent = ceil(7 / 2 - 1) = 3
>> parent = ceil(8 / 2 - 1) = 3
>>
>>
>> Humm... Seems to work out okay for now.
>
> Humm... Let's try to abstract it:
>
> The children of 5 are 11 and 12, lets check:
>
> child_left = 2*5+1 = 11
> child_right = 2*5+2 = 12
>
> The parent of 11 and 12 are 5, lets check:
>
> parent = ceil(11 / 2 - 1) = 5
> parent = ceil(12 / 2 - 1) = 5
>
> Therefore,
>
> ceil((2*5+1) / 2 - 1) = 5
> ceil((2*5+2) / 2 - 1) = 5
>
>
> Humm...
>
> left = ary * node_value + 1
> right = ary * node_value + 2
>
> and:
>
> parent = ceil(left / ary - 1)
> parent = ceil(right / ary - 1)
[...]
What about 3-ary? God damn ASCII art! Anyway:
[0] 0
/|\
/ | \
/ | \
/ | \
/ | \
/ | \
/ | \
[1] 1 2 3
/|\ /|\ /|\
/ | \ / | \ / | \
[2] 4 5 6 7 8 9 10 11 12
..............................................
Lets see here... This is 3-ary, therefore, the three children of, say 2
are: 7, 8, 9... Humm:
3-ary, children, for 2 are:
child_left = 3*2+1 = 7
child_middle = 3*2+2 = 8
child_right = 3*2+3 = 9
Humm... They Work!
Lets try getting the parent of say, 11, which should be 3:
ceil(11 / 3 - 1) = 3
okay, how about 10:
ceil(10 / 3 - 1) = 3
And, perhaps 12:
ceil(12 / 3 - 1) = 3
Humm... Afaict, this seems to work with a highly experimental fractal
encryption of mine called RIFC that stores data in the roots of
fractals. Humm... Interesting to me. Should world in integer land,
instead of floating heck!
Fwiw:
https://github.com/ChrisMThomasson/fractal_cipher/blob/master/RIFC/cpp/ct_rifc_sample.cpp
Back to sci.math | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-12-31 22:56 -0800
Re: For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-01-01 00:00 -0800
Re: For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-01-01 00:03 -0800
Re: For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-01-01 23:46 -0800
Re: For WM, a 2-ary infinite tree: FredJeffries <fredjeffries@gmail.com> - 2022-01-02 07:48 -0800
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 09:29 -0800
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 09:54 -0800
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 10:23 -0800
Re: For WM, a 2-ary infinite tree: Serg io <invalid@invalid.com> - 2022-01-02 13:20 -0600
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 11:27 -0800
Re: For WM, a 2-ary infinite tree: Serg io <invalid@invalid.com> - 2022-01-02 13:53 -0600
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 11:55 -0800
Re: For WM, a 2-ary infinite tree: Serg io <invalid@invalid.com> - 2022-01-02 14:01 -0600
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 12:05 -0800
Re: For WM, a 2-ary infinite tree: Scot Dino <cvb@nmo.er> - 2022-01-02 23:30 +0000
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 15:38 -0800
Re: For WM, a 2-ary infinite tree: "Ross A. Finlayson" <ross.finlayson@gmail.com> - 2022-01-02 20:48 -0800
Re: For WM, a 2-ary infinite tree: Scot Dino <cvb@nmo.er> - 2022-01-02 18:08 +0000
Re: For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-01-02 21:26 -0800
Re: For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-01-02 21:35 -0800
Re: For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-01-03 00:10 -0800
Re: For WM, a 2-ary infinite tree: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-01-03 01:17 -0800
csiph-web