disjoint sets conceptual question

This is a discussion on disjoint sets conceptual question within the C++ Programming forums, part of the General Programming Boards category; Another conceptual question, this time on disjoint sets: Show the result of the following sequence on instructions: union(1, 2) union(3, ...

  1. #1
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572

    disjoint sets conceptual question

    Another conceptual question, this time on disjoint sets:
    Show the result of the following sequence on instructions: union(1, 2) union(3, 4) union(3, 5) union(1, 7) union(3, 6), union(8, 9) union(1, 8) union(3, 10)
    I will not draw the tree i got but will give the answer in an implicit representation:
    Code:
    [ 0][ 1][ 2][ 3][ 4][ 5][ 6][ 7][ 8][ 9][10]
    [-1][-1][ 1][-1][ 3][ 3][ 3][ 1][ 1][ 8][ 3]
    what do you guys think? is it correct?

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Hmm

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. creating new sets
    By axon in forum C++ Programming
    Replies: 7
    Last Post: 12-03-2003, 05:37 PM
  3. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  4. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 08:22 PM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 09:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21