The Art of Algorithm Design by Mohanty Sachi Nandan;Tripathy Pabitra Kumar;Satpathy Suneeta;

The Art of Algorithm Design by Mohanty Sachi Nandan;Tripathy Pabitra Kumar;Satpathy Suneeta;

Author:Mohanty, Sachi Nandan;Tripathy, Pabitra Kumar;Satpathy, Suneeta;
Language: eng
Format: epub
Publisher: CRC Press LLC
Published: 2020-06-03T12:00:00+00:00


Example:

Given ten activities along with their start and finish time as

S = <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>

Si = <1, 2, 3, 4, 5, 6, 7, 8, 9, 10>

F = <5, 3, 4, 6, 7, 8, 11, 10, 12, 13>.

Solution:

Arrange the activities in increasing order of the finish time as

Activity A2 A3 A1 A4 A5 A6 A8 A7 A9 A10

Start 2 3 1 4 5 6 8 7 9 10

Finish 3 4 5 6 7 8 10 11 12 13

Select A2 next A3 as both are noninterfering and add them to the activity list.

Since A1 interfere so reject it.

Next Select A4 and add it to activity list.

Since A5 interfere so reject it.

Next, select A6 and A8 and add them to the activity list.

Since A7 and A9 interfere so again reject it.

Next, select A10 and add it to activity list.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.