From: Hans Reiser <reiser@namesys.com>
To: Kevin Bealer <kevinbealer@yahoo.com>
Cc: "Alexander G. M. Smith" <agmsmith@rogers.com>, reiserfs-list@namesys.com
Subject: Re: Split Trees (my design, similar to binary treaps)
Date: Tue, 03 Jun 2003 21:49:30 +0400 [thread overview]
Message-ID: <3EDCDFAA.5050802@namesys.com> (raw)
In-Reply-To: <20030523192440.7221.qmail@web40015.mail.yahoo.com>
Kevin Bealer wrote:
>Sorry, last message was accidentally sent prematurely.
>
>To continue:
>
>Skip lists (turned 90 degrees) look like:
>
>topnode--x------x
>C0
>A1-----A1-----A1
>C2
>C3
>B4-----B4
>C5
>A6-----A6-----A6
>C7
>C8
>B9-----B9
>C11
>A12----A12----A12
>
>With pointers vertically between all aligned letters
>(conceptually at least).
>
I don't understand the diagram above, which means I don't understand the
rest. I think you are explaining something you understand too well to
explain....;-)
>
>Now here is the reason why SkipTrees do NOT need
>variable sized nodes:
>
>The Pointer from A1 to A6 is used, so is the pointer
>from A1 to B4 and from B4 to C5.
>
>However, the pointers from C2 and C3 to B4, B4 to A6,
>and B9 to A12 are NEVER USED for example. You are
>sacrificing
>pointers to get to a binary tree, but the pointers you
>lose
>are the pointers you don't need anyway.
>
>In SkipList, you need those pointers only to copy
>their value to
>other pointers which will not be used. The nodes
>can't shrink,
>because an insertion changes which pointers are used
>and which
>are not.
>
>If * is a wildcard, the rule is:
>
>No pointer from C* to B* or B* to A* is ever used. If
>you were
>going to get to A6, you would have gotten there while
>traversing
>the "A" list, and if you are at the C list level, you
>have already left
>the A and B lists behind.
>
>To convert a Skip List to a Skip Tree, note that every
>decision
>you need to make is based on a NODE->VALUE comparison.
>After each decision, processing can go in two
>directions, so there
>are two "edges" from that decision.
>
>Decisions become binary tree nodes. EDGES become left
>and
>right pointers.
>
>The first decision in following the skip list is "Is
>the search
>value greater than "1" (i.e. node A1's value is 1).
>Thus the
>top node of the Skip Tree is A1. If the value is less
>than 1,
>we look at C0. Thus C0 is on the left hand side of
>A1.
>
>Just traverse the skip list, and wherever you make a
>decision
>based on a value, there is a node. Note that this
>skip list is
>not really balanced. Due to the extra pointers, the
>policy is
>normally to have FEWER high-level nodes in a Skip List
>than
>would be predicted by the (1/2, 1/4, 1/8) progression
>from the
>bottom up. Usually 3/4 on the bottom level, then 3/4
>of the
>remaining on the next level, etc.
>
>With a skip tree, we actually want the balanced
>version, i.e.
>ratios of 1/2 on each level, although other ratios can
>be used.
>
>Kevin
>
>--- Hans Reiser <reiser@namesys.com> wrote:
>
>
>>Alexander G. M. Smith wrote:
>>
>>
>>
>>>Hans Reiser wrote on Thu, 22 May 2003 19:30:16
>>>
>>>
>>+0400:
>>
>>
>>>
>>>
>>>
>>>
>>>>Forgive me for asking some bonehead questions.....
>>>>
>>>>Are skip lists height balanced? (All paths to the
>>>>
>>>>
>>leaves are equal?)
>>
>>
>>>>
>>>>
>>>>
>>>>
>>>Only on the average, at least in the original skip
>>>
>>>
>>list algorithm. The
>>
>>
>>>height is determined randomly when the node is
>>>
>>>
>>created; there is no
>>
>>
>>>rebalancing. The random distribution is defined as
>>>
>>>
>>you would expect,
>>
>>
>>>50% of the nodes have 1 level, 25% have 2 levels,
>>>
>>>
>>... 0.5**n of the
>>
>>
>>>nodes have n levels. Surprisingly, this works
>>>
>>>
>>fairly well.
>>
>>
>>>- Alex
>>>
>>>
>>>
>>>
>>>
>>>
>>To have a level means to be on that level or lower?
>>
>>--
>>Hans
>>
>>
>>
>>
>
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>
>
>
--
Hans
next prev parent reply other threads:[~2003-06-03 17:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-08 4:22 Split Trees (my design, similar to binary treaps) Kevin Bealer
2003-05-22 15:30 ` Hans Reiser
2003-05-22 16:09 ` Alexander G. M. Smith
2003-05-22 17:16 ` Hans Reiser
2003-05-22 20:21 ` Alexander G. M. Smith
2003-05-22 22:48 ` Hans Reiser
2003-05-22 23:27 ` Alexander G. M. Smith
2003-05-23 18:56 ` Kevin Bealer
2003-06-02 17:33 ` Hans Reiser
2003-06-04 4:54 ` Kevin Bealer
2003-05-23 19:24 ` Kevin Bealer
2003-06-03 17:49 ` Hans Reiser [this message]
2003-06-04 5:17 ` Enrique Perez-Terron
2003-06-04 9:40 ` Hans Reiser
2003-06-05 22:34 ` Enrique Perez-Terron
2003-06-08 5:26 ` Kevin Bealer
2003-06-09 15:33 ` Enrique Perez-Terron
2003-06-08 5:20 ` Kevin Bealer
2003-06-04 5:22 ` Kevin Bealer
2003-06-04 9:44 ` Hans Reiser
2003-06-08 5:17 ` Kevin Bealer
2003-05-27 1:38 ` Enrique Perez-Terron
2003-05-27 20:47 ` Hans Reiser
2003-05-28 16:44 ` Kevin Bealer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EDCDFAA.5050802@namesys.com \
--to=reiser@namesys.com \
--cc=agmsmith@rogers.com \
--cc=kevinbealer@yahoo.com \
--cc=reiserfs-list@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.