Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:05:16+00:00 2026-06-03T12:05:16+00:00

What is the expected space used by the skip list after inserting n elements?

  • 0

What is the expected space used by the skip list after inserting n elements?

I expect that in the worst case the space consumption may grow indefinitely.

Wikipedia says “Space O(n)”.

How can this be proven one way or another?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:05:17+00:00Added an answer on June 3, 2026 at 12:05 pm

    According to this thesis, which I find more reliable then wikipedia, wikipedia is wrong. Probabilistic Skip List is Theta(nlogn) worst case space complexity.

    Despite the fact that on the average the PSL performs reasonably well,
    in the worst case its Theta(n lg n) space and Theta(n) time complexity are
    unacceptably high

    The worst case is not infinite because you can limit yourself to f(n) number of lists, where f(n) = O(logn), and stop flipping coins when you reached this height. So, if you have f(n) complete rows, you get O(nlogn) total number of nodes, thus the space complexity in this case is O(nlogn), and not O(n).


    EDIT:

    If you are looking for expected space consumption, and not worst as initially was stated in the question then:

    Let’s denote “column” as a bottom node and all the nodes “up” from it.

    E(#nodes) = Sigma(E(#nodes_for_column_i)) (i in [1,n]) 
    

    The above equation is true because linearity of expected value.

    E(#nodes_for_column_i) = 1 + 1/2 + ... + 1/n < 2 (for each i). This is because with probability 1 it has 1 node, with p=1/2, each of these has an extra node. with p’=1/2, each of these has an extra node (total p*p’=1/4) ,…. Thus we can derive:

    E(#nodes) = n*E(#nodes_for_each_column) = n*(1+1/2+...+1/n) < 2n = O(n)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it expected behavior that two encodings can map to the same decoding? I'm
I want to determine the available disk space on windows. I don't care that
The function CreateFileMapping can be used to allocate space in the pagefile (if the
I've set the following options in .vimrc set listchars=tab:▸\ ,trail:· set list And expected
Historic question. Note that 15 years later, .imagePadding is the space between the image
Basic question, but I expected this struct to occupy 13 bytes of space (1
Expected Outcome: Successful installtion of Plone 4.1.4 Actual Outcome: Installation fails with: libxml2: cmmi
Expected output & output I get in debug mode, and release mode under VS2010,
I expected this to print [b] but it prints [] : $x = abc;
I expected to see the word test appear in the output once and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.