Your IP : 216.73.216.40


Current Path : /var/www/html/rkala/daaC1Q1/
Upload File :
Current File : /var/www/html/rkala/daaC1Q1/IIT2019041.txt

Note:
i. Very lengthy paper with an objective marking. Please do not waste any time in writing any text which will not be evaluated. 
ii. In all the following questions, show the tabulation (memorization table) for a bottom-up approach only used by Dynamic Programming (without the header row or header column) and the final cost. Suppose the tabulation table is m*n. Your answer should be m rows with each row containing n integers. The next line should be the final answer. Both need to be submitted as a text in the online form. 
iii. The rough work done should be submitted separately whose link will be provided later. No programs must be written, however, the recurrence relation/formula/logic used should be on the rough work submitted. 
iv. You need to compute the complete tabulation table even if the solution is obvious for the given input. This should appear as a complete dry run of Dynamic Programming. Do not stop when you believe the solution is obvious for the specific input. Correct final answer but no tabulation table will be awarded 0 marks.
v. In every question, first a generic description is provided with an example. That is for understanding only. The input over which you should be working is on a new line underneath the question. Only use that input.


question no. 1: 
Several students are sitting in a row. The instructor wants the students to sit as per roll number. The instructor thus selects a sub-sequence of students who are strictly in an increasing order as per roll number. Find the largest number of students who are sitting as per an increasing order of roll number. Suppose the students are IIT001, IIT059, IIT022, IIT088, IIT023, and IIT099. The sequence IIT001, IIT022, IIT023, and IIT099 is strictly increasing and a valid subset of students who can be said to be sitting as per roll number. The answer is thus 4. 

List of students as per the current seating sequence: IIT002, IIT009, IIT004, IIT006, IIT010, IIT005, IIT007, IIT001, IIT008, IIT003



question no. 2: 
You are asked to cook 2 dishes in this quarantine season for your family that involves putting several ingredients in the same order in the respective pans. Ingredients may be repeated several times in the sequence. Each ingredient is denoted by a letter code. Hence cooking involves either picking one ingredient and putting it into either pan (not preferred); or picking one ingredient and putting into both pans (preferred). Suppose the ingredients of the first dish are a, b, a, c, d, b; and the ingredients of the second dish are b, d, a, c, b. It makes sense to put ingredients b, a, c and b simultaneously on both pans. Cooking happens by maximizing the number of times an ingredient can be put on both dishes simultaneously. If the cooking of both dishes simultaneously is optimally sequenced, compute the number of times the person puts both ingredients simultaneously on both pans. 

Ingredients of dish 1: e, e, c, e, a
Ingredients of dish 2: a, c, a, e, b, b



question no. 3: 
Many students have submitted essay-type solutions for the C1 review test. The instructor allows a student to change the answer. The marks given will be full marks with 3 mark penalty for adding any character, 1 mark penalty for deleting any character, and 2 mark penalty for changing any character to another character. Suppose the student’s answer is abcde and the correct answer is cbdef, the student will opt to delete a (1), change b to c (2) and c to b (2) and add f (3), giving a cost of 8. Given the student’s answer and the correct answer, calculate the total penalty. 

Student's answer: ebcce
Correct answer: acbcdd



question no. 4: 
Many students have submitted essay-type solutions for the C1 review test. The solutions need to be checked by a TA. However, the TA can only check solutions whose total combined sum of words is W words or less. Suppose the number of words in the students’ solution is 10, 20, 15, 31, 5 and W=30. The TA can evaluate students with 10, 5 and 15 words evaluating 3 students. The instructor would like the TA to evaluate the maximum number of students. Given the number of words in the solution sheet of every student, print the total number of students who are evaluated by the TA. 

W=10
Word counts of submissions: 6, 2, 6, 7, 4, 1



question no. 5: 
Many students have submitted essay-type solutions for the C1 review test. The solutions need to be checked by 2 TAs. However, the TAs agree to evaluate solutions such that each TA must read exactly the same number of words. No TA agrees to read even a word more than the other. Suppose the number of words in the students’ solution is 5, 3, 10, 6, and 4, an evaluation is possible if the 1st TA checks for solutions with word counts 5, 3 and 6; while the second TA checks for solutions with word count 10 and 4. Given the number of words written by each student of the course, determine if an evaluation is possible. The final answer is either 1 (evaluation possible) or 0 (no evaluation possible). 

Word counts of submissions: 3, 4, 3, 2, 2, 2, 1, 3