Refer to the figure given below. AB, CD and EF are three parallel paths. A person starts from AB to reach EF by moving in four steps - moving from AB to O_{1} in step 1, from O1 to CD in step 2, from CD to O2 in step 3 and from O2 to EF in step 4. If he takes a curved path in one step, he cannot take a curved path in the next step. In how many ways the person can reach EF from AB?

Option 1 : 128

__ Calculation__:

**Case - 1:**

Step - 1 = He takes a curved path moving from EF to O_{2}, So the number of ways the person can reach O2 from EF = 2 ways.

Step - 2 = He takes a straight path moving from O2 to CD, So the number of ways the person can reach CD from O_{2} = 2 ways.

Step - 3 = He takes a straight path moving from CD to O_{1}, So the number of ways the person can reach O_{1} from CD = 2 ways.

Step - 4 = He takes a curved path moving from O_{1} to AB, So the number of ways the person can reach O1 from AB = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

**Case - 2:**

Step - 1 = He takes a curved path moving from EF to O2, So the number of ways the person can reach O2 from EF = 2 ways.

Step - 2 = He takes a straight path moving from O2 to CD, So the number of ways the person can reach CD from O2 = 2 ways.

Step - 3 = He takes a curved path moving from CD to O1, So the number of ways the person can reach O1 from CD = 2 ways.

Step - 4 = He takes a straight path moving from O1 to AB, So the number of ways the person can reach O1 from AB = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

Case - 3:

Step - 1 = He takes a curved path moving from EF to O2, So the number of ways the person can reach O2 from EF = 2 ways.

Step - 2 = He takes a straight path moving from O2 to CD, So the number of ways the person can reach CD from O2 = 2 ways.

Step - 3 = He takes a straight path moving from CD to O1, So the number of ways the person can reach O1 from CD = 2 ways.

Step - 4 = He takes a straight path moving from O1 to AB, So the number of ways the person can reach O1 from AB = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

Case - 4:

Step - 1 = He takes a straight path moving from EF to O2, So the number of ways the person can reach O2 from EF = 2 ways.

Step - 2 = He takes a straight path moving from O2 to CD, So the number of ways the person can reach CD from O2 = 2 ways.

Step - 3 = He takes a straight path moving from CD to O1, So the number of ways the person can reach O1 from CD = 2 ways.

Step - 4 = He takes a straight path moving from O1 to AB, So the number of ways the person can reach O1 from AB = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

Case - 5:

Step - 1 = He takes a straight path moving from EF to O2, So the number of ways the person can reach O2 from EF = 2 ways.

Step - 2 = He takes a curved path moving from O2 to CD, So the number of ways the person can reach CD from O2 = 2 ways.

Step - 3 = He takes a straight path moving from CD to O1, So the number of ways the person can reach O1 from CD = 2 ways.

Step - 4 = He takes a curved path moving from O1 to AB, So the number of ways the person can reach O1 from AB = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

Case - 6:

Step - 1 = He takes a straight path moving from EF to O2, So the number of ways the person can reach O2 from EF = 2 ways.

Step - 2 = He takes a curved path moving from O2 to CD, So the number of ways the person can reach CD from O2 = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

Case - 7:

Step - 4 = He takes a curved path moving from O1 to AB, So the number of ways the person can reach O1 from AB = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

Case - 8:

Step - 3 = He takes a curved path moving from CD to O1, So the number of ways the person can reach O1 from CD = 2 ways.

Hence the total number of ways = 2! × 2! × 2! × 2! = 16

So, 16 × 8 = 128 ways.

Hence 128 ways the person can reach EF from AB.

__Additional Information__

The combination formula is given as:

⇒** nCr = n!/((n – r)! r!)**

where n be the number of items.