Question:

What is the total number of ways to reach A to B in the network given?

Show Hint

When counting paths in a directed acyclic graph, use dynamic programming by summing ways from all incoming connections layer by layer.
Updated On: Aug 7, 2025
  • 12
  • 16
  • 20
  • 22
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Understand the structure We are given a network of nodes from A to B arranged in 4 layers of intermediate nodes. At each stage, a node connects to two or more nodes in the next layer. Step 2: Assign ways from right to left (Dynamic Programming) We’ll assign the number of ways from A to each node layer-by-layer. Let’s number the levels: - Level 0: Start node A (1 way) - Level 1: 2 nodes → both reachable from A → both get 1 way - Level 2: 3 nodes → left gets 1 (from left), mid gets 2 (from both), right gets 1 - Level 3: 2 nodes → left gets 3 (1+2), right gets 3 (2+1) - Level 4 (before B): 1 node → gets 6 (3+3) - Finally B: only one node → gets 20 ways total from all paths Final count: \[ \boxed{20} \]
Was this answer helpful?
0
0