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 , Total possible way to choose X and Y simultaneously will be = = .
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:
- Fibonacci sum of a subset with all elements <= k
- Maximum subset sum such that no two elements in set have same digit in them
- Largest subset whose all elements are Fibonacci numbers
- Probability that a N digit number is palindrome
- Random number generator in arbitrary probability distribution fashion
- Check whether bitwise AND of a number with any subset of an array is zero or not
- Count number of subsets whose median is also present in the same subset
- Smallest number dividing minimum number of elements in the array | Set 2
- Number of possible permutations when absolute difference between number of elements to the right and left are given
- Smallest number dividing minimum number of elements in the Array
- Largest number dividing maximum number of elements in the array
- Sum of elements in 1st array such that number of elements less than or equal to them in 2nd array is maximum
- Probability of rain on N+1th day
- Probability of a key K present in array
- Probability that two persons will meet
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.