Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given a list of tasks. Let's say the tasks are represented by numbers such as 0 , 1 , 2 , 3 .

You are given a list of tasks. Let's say the tasks are represented by numbers such as 0,1,2,3..., etc. Some tasks need to be completed before some another task. Consider the following graph representation for this problem. In this directed unweighted graph the numbers inside the (yellow) nodes/circles represent a task. The directed edge between two nodes represent which one should be completed before the other. The pointed node should be completed later. For example in the following graph, Task 0 should be completed only after Task 5 and Task 4 are completed. You need to find an ordering of these tasks.
Please answer the following questions:
1. What type of searching will you do in the graph to solve this problem? Depth first search or Breadth first Search? Why would you choose that? Explain briefly in few lines.
2. What will be your algorithm to solve this problem and what will be the complexities? You do not have to write any code here. Just describe the complexities based on the approach that you have chosen.
3. Give an example of the ordering of the tasks for the following graph in the order that they need to be completed.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions