Subsets Using Binomial Theorem How many subsets we can make from the numbers between 1 and 5 Solution The naive way to compute that is to enumerate all possibilities as follows: Groups of 1: 1, 2, 3, 4, 5 Groups …

## Making Binary Numbers

Problem Given four binary digits all ones 1111 and two binary digits all zeros 00 we need to create a six digit binary number using these ones and zeros such that no two zeros are next to each other. How …

## Forming a Team

Problem A group of 4 boys and 3 girls. We want to form a team of 5 players. We are required to select 2 girls and 3 boys. If 2 boys can not play together. How many possible ways we …

## Color Signals

Problem You are given 1 red flag, 2 green flags and 3 blue flags. You are asked to generate 6 symbol based signals using these flags. How many signals you can generate. Solution This problem can be solved using permutations …

## California License Plate Numbers

Problem A typical car license plate number in California starts with a decimal digit then three capital letters then three decimal digits. If repetition is not allowed and we need to generate a license plate number randomly, what is the …

## Defective Antennas

Problem Consider the system where we have a chain of 4 antennas lined up next to each other. In order for the system to be functional no two defective antennas should be lined up next to each other. Given that …

## Ternary Search Tree Java

Problem Write a java program to construct and print a ternary Tree. A ternary tree is similar to a binary tree except a parent node can have up to three children instead of two. The left child value is less …