正在加载图片...
Elements of the sets:1.2.3.N e Sets:S1,S2,……andS;^S=(i≠j)— disjoint Example S1={6,7,8,10},S2={1,4,9},S3={2,3,5} Note: Pointers are from children 8) to parents A possible forest representation of these sets e Operations (1) Union(i)∷= Replace s;andS;bys=S∪S (2)Find (i): : Find the set Sk which contains the element i Elements of the sets: 1, 2, 3, ..., N  Sets : S1 , S2 , ... ... and Si  Sj =  ( if i  j ) —— disjoint 〖Example〗 S1 = { 6, 7, 8, 10 }, S2 = { 1, 4, 9 }, S3 = { 2, 3, 5 } 10 6 7 8 4 1 9 2 3 5 A possible forest representation of these sets Note: Pointers are from children to parents  Operations : (1) Union( i, j ) ::= Replace Si and Sj by S = Si  Sj (2) Find( i ) ::= Find the set Sk which contains the element i
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有