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

  • SEARCH
  • Home
  • 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 876095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:22:40+00:00 2026-05-15T11:22:40+00:00

Having had success with my last CLRS question, here’s another: In Introduction to Algorithms

  • 0

Having had success with my last CLRS question, here’s another:

In Introduction to Algorithms, Second Edition, p. 501-502, a linked-list representation of disjoint sets is described, wherein each list member the following three fields are maintained:

  • set member
  • pointer to next object
  • pointer back to first object (the set representative).

Although linked lists could be implemented by using only a single “Link” object type, the textbook shows an auxiliary “Linked List” object that contains a pointer to the “head” link and the “tail” link. Having a pointer to the “tail” facilitates the Union(x, y) operation, so that one need not traverse all of the links in a larger set x in order to start appending the links of the smaller set y to it.

However, to obtain a reference to the tail link, it would seem that each link object needs to maintain a fourth field: a reference to the Linked List auxiliary object itself. In that case, why not drop the Linked List object entirely and use that fourth field to point directly to the tail?

Would you consider this an omission in the text?

  • 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-05-15T11:22:41+00:00Added an answer on May 15, 2026 at 11:22 am

    I just opened the text and the textbook description seems fine to me.

    From what I understand the data-structure is something like:

    struct Set {
        LinkedListObject * head;
        LinkedListObject * tail;
    };
    
    struct LinkedListObject {
        Value set_member;
        Set *representative;
        LinkedListObject * next;
    };
    

    The textbook does not talk of any “auxillary” linked list structure in the book I have (second edition). Can you post the relevant paragraph?

    Doing a Union would be something like:

    // No error checks.
    Set * Union(Set *x, Set *y) {
    
        x->tail->next = y->head;    
        x->tail = y->tail;
    
        LinkedListObject *tmp = y->head;
    
        while (tmp) {
    
            tmp->representative = x;
            tmp = tmp->next;
    
        }
        return x;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some code here, and I'm having a had time. I have a
I've been having problems with this code I had spent the last 3 hours
I've had success with LuaSocket 's TCP facility, but I'm having trouble with its
After having had a dev PC HD corrupt, I'm considering the idea of making
We're starting to standardise on a Ruby-based testing framework, having had some very good
I'm having a scenario where I had to deploy multiple directories for different languages.
Having been an imperative developer for some years now, I had never had the
I'm just wondering if anyone has had any problems having too many subscribers for
I'm having the error Unable to instantiate activity ComponentInfo in my app. I had
I'm having a problem with some code I've written. I've had to anonymize it,

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.