Number of ordered Pairs

Let S be a set of n consecutive natural numbers.
How to find the number of ordered pairs (A,B), where A and B are subsets of S and A is a proper subset of B?

For Example:
Let the set S = {1, 2, 3, 4, 5, 6, 7, 8}.
Find the number of ordered pairs (A, B), where A and B are subsets of S and A is a proper subset of B.

Source: www.testfunda.com

Find Solution here

Number of paths

For a rectangular grid having a x b cells as shown in the below figure:-

Find the number of shortest paths along the edge of the cells. Starting from the bottom-left point and end at right-up point.
For simplicity they are marked as (0,0) and (a,b)
Write a pseudo code to print all such
paths.

Find Solution here