Question: Java Let S be a nonempty set, a partition of S is a collection C of subsets of S with the following properties: 1. Every
Let S be a nonempty set, a partition of S is a collection C of subsets of S with the following properties: 1. Every element of C is nonempty. 2. Every element of S belongs to one of members of C. 3. Every two different elements of S are disjoint: this is, if C_1, C_2 elementof C with C_1 notequalto C_2 then C_1 Intersection C_2 notequalto Phi This definition might be a little dry, but some examples may enlighten us a little: set S = {1, 2, 3, 4} and C = {{1}, {2, 4}, {3}} is a partition of S, but D_1 = {{1, 2}, {2, 4}, {3}}, D_2 = {{1}, {2, 4}}, and D_3 = {{1, 2}, {4}, {3}, {}} are not. (Why?) Assignment Given a finite set of integers S, generate all possible partitions of S Example Set S = {1, 2, 3) then the following are all partitions of S: 1. {{1}, {2}, {3}}. 2. {{1}, {2, 3}}. 3. {{1, 2}, {3}}. 4. {{1, 3}, {2}}. 5. {{1, 2, 3}}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
