Given a set containing N elements. If two subset X and Y picked then find the probability that both of them contains the same number of elements.
Let’s choose a subset X that has r number of elements then Y must contain r number of elements. A subset can have minimum 0 elements and maximum N elements.
Total number of subset of a set contains N number of elements is
Let, P = Total possible way to choose X and Y such that both has same number of elements.
Then P =
So the required probability will be
Below is the implementation of the above Approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Maximum subset sum such that no two elements in set have same digit in them
- Largest possible Subset from an Array such that no element is K times any other element in the Subset
- Probability of distributing M items among X bags such that first bag contains N items
- Conditional Probability and Independence - Probability | Class 12 Maths
- Length of array pair formed where one contains all distinct elements and other all same elements
- Find maximum subset sum formed by partitioning any subset of array into 2 partitions with equal sum
- Sum of maximum and minimum of Kth subset ordered by increasing subset sum
- Split array into two equal length subsets such that all repetitions of a number lies in a single subset
- Minimum size binary string required such that probability of deleting two 1's at random is 1/X
- Count number of subsets whose median is also present in the same subset
- Probability of getting two consecutive heads after choosing a random coin among two different types of coins
- Partition a set into two non-empty subsets such that the difference of subset sums is maximum
- Minimum number of increment/decrement operations such that array contains all elements from 1 to N
- Find the length of the Largest subset such that all elements are Pairwise Coprime
- Rearrange two given arrays such that sum of same indexed elements lies within given range
- Find two numbers with sum N such that neither of them contains digit K
- Minimize elements to be added to a given array such that it contains another given array as its subsequence | Set 2
- Probability of cutting a rope into three pieces such that the sides form a triangle
- Loss when two items are sold at same price and same percentage profit/loss
- Maximize product of same-indexed elements of same size subsequences
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.