Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Your files are now being encrypted and thrown into the bit bucket. EOF


devel / comp.lang.c / Re: Translate BinaryTree Node Number to other BinaryTree Node Number of different tree size.

SubjectAuthor
o Re: Translate BinaryTree Node Number to other BinaryTree Node NumberChris M. Thomasson

1
Re: Translate BinaryTree Node Number to other BinaryTree Node Number of different tree size.

<tsp0fi$3oe48$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24744&group=comp.lang.c#24744

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Translate BinaryTree Node Number to other BinaryTree Node Number
of different tree size.
Date: Fri, 17 Feb 2023 14:52:34 -0800
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <tsp0fi$3oe48$1@dont-email.me>
References: <ad70f6aa-43a5-4f58-a385-8cf0e393a1ffn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 17 Feb 2023 22:52:35 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="6387f4c41c3a372cb7de8503aeb45e8b";
logging-data="3946632"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19j7svxxCQPoJzSitADsxkOTYswnUjqTAA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:1zaDDYULtCvKAlzmItMkyQVHYdU=
Content-Language: en-US
In-Reply-To: <ad70f6aa-43a5-4f58-a385-8cf0e393a1ffn@googlegroups.com>
 by: Chris M. Thomasson - Fri, 17 Feb 2023 22:52 UTC

On 2/17/2023 1:30 PM, Skybuck Flying wrote:
> Problem description:
>
> Each computer has it's own binary tree. (Merkle Hash Tree).
>
> The computers want to communicate with each other. However each BinaryTree can grow in number of nodes, size, height, etc.
>
> Still the computers want to communicate with each other.
>
> They want to address each other's node data, the same data basically, each node has data.
>
> I can imagine two solutions for this problem:
>
> 1. Either a stable numbering system/scheme in which each node keeps the same number as it moves through the tree as it grows.
>
> or
>
> 2. A translation algorithm, which translates the node number from one tree to the other tree.
>
> It is possible to compute node numbers mathematical/virtually without memory consumption that would be ideal, for example by using formulas.
>
> The objective is to keep communication to a minimum and to keep the ammount of memory used also to a minimum.
>
> So it would be preferered if both trees are completely "virtual" in math basically.
>
> Not sure if translation is possible, most likely yes, there are many ways to do it, the easiest way is to simply allocate all nodes and traverse the nodes and record it's traversal path and then send the traversal path to the other computer. Maybe this could be used, many not, maybe it's flawed.
>
> Another way would be to do some kind of lookup table.
>
> Or a combination of math.
>
> Basically the information given/available for the tree would ideally be limited to the basic information about the tree, not the nodes:
>
> structure for TBinaryTree
> private
> mRoot : TTreeNode;
>
> mTotalNumberOfNodes : uint64;
> end;
>
> The height could be computed from this total number of nodes as well.
>
> Now the final objective:
>
> Write a routine which can convert a BinaryTreeNodeNumber to another BinaryTreeNodeNumber.
>
> routine TranslateNodeNumber( in TBinaryTree A, in TBinaryTree B, in NodeNumberA, out NodeNumberB )
>
> Developed an algorithm, implement it in your favorate language and post it here !
>
> (You can also ask ChatGPT to see if it can generate it for you ! ;))

Ask ChatGPT to create itself showing all of its work. lol.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor