gs gs122 Dynamic Programming - Assembly Line Scheduling - Quiz No.1
gs gs122 Data Communication and Computer Network Quiz
This quiz belongs to book/course code gs gs122 Data Communication and Computer Network of gs organization. We have 268 quizzes available related to the book/course Data Communication and Computer Network. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Dynamic Programming. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
time_to_reach[2][3] = {{17, 2, 7}, {19, 4, 9}} time_spent[2][4] = {{6, 5, 15, 7}, {5, 10, 11, 4}} entry_time[2] = {8, 10} exit_time[2] = {10, 7} num_of_stations = 4
For the optimal solution which should be the starting assembly line?
time_to_reach[2][3] = {{17, 2, 7}, {19, 4, 9}} time_spent[2][4] = {{6, 5, 15, 7}, {5, 10, 11, 4}} entry_time[2] = {8, 10} exit_time[2] = {10, 7} num_of_stations = 4
For the optimal solution, which should be the exit assembly line?
#include<stdio.h> int get_min(int a, int b) { if(a<b) return a; return b; } int minimum_time_required(int reach[][3],int spent[][4], int *entry, int *exit, int n) { int t1[n], t2[n],i; t1[0] = entry[0] + spent[0][0]; t2[0] = entry[1] + spent[1][0]; for(i = 1; i < n; i++) { t1[i] = get_min(t1[i-1]+spent[0][i], t2[i-1]+reach[1][i-1]+spent[0][i]); __________; } return get_min(t1[n-1]+exit[0], t2[n-1]+exit[1]); }
Which of the following lines should be inserted to complete the above code?