MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is a Greedy strategy for Optimal storage on tape
A
Arrange all programs in decreasing order of length
B
Arrange all programs in First in first come basis
C
Arrange all programs in increasing order of length
D
Arrange all programs in random order
Explanation: 

Detailed explanation-1: -Instead of a single tape, programs are to be stored on multiple tapes. Greedy algorithm solves this problem in a similar way. It sorts the programs according to increasing length of program and stores the program in one by one in each tape.

Detailed explanation-2: -Optimal Storage on Tapes is one of the application of the Greedy Method. The objective is to find the Optimal retrieval time for accessing programs that are stored on tape. There are n programs that are to be stored on a computer tape of length L.

Detailed explanation-3: -Greedy Choice Property: Choosing the best option at each phase can lead to a global (overall) optimal solution. Optimal Substructure: If an optimal solution to the complete problem contains the optimal solutions to the subproblems, the problem has an optimal substructure.

Detailed explanation-4: -This algorithm runs in O (n²)time.

Detailed explanation-5: -Greedy algorithm is an approach to solve optimization problems (such as minimizing and maximizing a certain quantity) by making locally optimal choices at each step which may then yield a globally optimal solution.

There is 1 question to complete.