There are a few friends living in the same area. They have a party every weekend and
Question:
There are a few friends living in the same area. They have a party every weekend and the place of party change each week. It is always a difficult task to select a place that is nearest to everyone. They all decided to take advantage of Computer Science to solve this problem.
Names of friends are Ahmed, Rehman, Careem, Basit, Dawood, Ghani, and Farid. Ahmed lives at 5 minutes’ walk from rehman and at 10 minutes’ walk from Careem. Careem lives at 3 minutes’ walk from Dawood. Rehman lives at 4 minutes’ walk from Basit and 2 minutes’ walk from Dawood. Dawood lives at two minutes’ walk from Farid. Ghani lives at 2 minutes’ walk from Basit.
- If we represent a graph G = V (V, E) in which set of vertices are home of each Friend and an edge represents a path between two homes. Provide the adjacency matrix of directed graph of the graph G.
- In above directed graph G. You are required to devise an algorithm to find all possible paths.
python data structure
University Physics with Modern Physics
ISBN: 978-0321696861
13th edition
Authors: Hugh D. Young, Roger A. Freedman, A. Lewis Ford