CS502 Assignment 3 Solution
#1
CS502 Design and Analysis of Algorithms
Assignment 3 Solution - Spring 2017

Question. 1  Consider the following Directed Acyclic Graph.
[Image: dvLRV2c.jpg]

Run BFS on this graph by taking node ‘1’ as source node and list the vertices in order while running BFS.
 
Note: Write a list of vertices only, no need to show the intermediate steps.

Answer: 1, 3, 4, 8

Question. 2
 
Two directed graphs are given below Graph (A) & Graph (B), You are required to answer the following questions
1.      Is “Graph (A)” a connected graph? State Yes / No with valid reason
2.      Is “Graph (B)” contains a Hamiltonian cycle? State Yes / No with valid reason
 
 [Image: w3zvPmJ.png][Image: yAxKbmk.png]

                        Graph (A)                                                                                Graph (B)


Answer:

  1. No, because 1 is not connected with 5 directly and also 5 is not connected with 3 directly.
  2. Yes, 1, 2, 3, 4, 1 creates a Hamiltonian cycle.
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  CS502 GDB Idea Solution Mishi Khan 0 274 02-08-2019, 01:38 AM
Last Post: Mishi Khan
  CS502 Assignment Solution Mishi Khan 0 292 02-04-2019, 07:04 PM
Last Post: Mishi Khan
  cs607 Assignment 3 Solution Mishi Khan 0 272 02-01-2019, 08:00 PM
Last Post: Mishi Khan
  CS605 Assignment Idea Solution Mishi Khan 0 125 02-01-2019, 02:00 AM
Last Post: Mishi Khan
  CS510 Assignment 2 Solution Mishi Khan 0 325 01-31-2019, 11:00 PM
Last Post: Mishi Khan
  CS504 Assignment Solution Mishi Khan 0 239 01-31-2019, 01:36 AM
Last Post: Mishi Khan
  CS501 Assignment Solution Mishi Khan 0 177 01-30-2019, 12:13 AM
Last Post: Mishi Khan
  cs507 Assignment 1 Solution Fall 2018 Mishi Khan 0 409 12-10-2018, 10:31 PM
Last Post: Mishi Khan
  CS507 Assignment solution Rubaisha(Moody Girl) 1 1,431 12-04-2018, 08:53 PM
Last Post: Malik Shafaat
  require cs506 assignment solution fahadmukhtar 0 212 12-01-2018, 06:42 PM
Last Post: fahadmukhtar



Users browsing this thread:
1 Guest(s)