Problem 1given n courses along with their course strength

Assignment Help Data Structure & Algorithms
Reference no: EM13348055

Problem 1:

Given N courses, along with their course strength, and M examination halls, along with their capacity; assign the courses to examination halls such that least number of invigilators are used. The additional constraints to the problem are:

i. For every S students, one invigilator has to be assigned. Every course assigned to a hall must have one invigilator assigned to it.

ii. Ensure that all the students for a given course are assigned to the same class room.

iii. If all students of the same course cannot be placed in the same classroom, flag the course for assignment at a later point of time.

The upper bound time complexity must be O(MN log M), and space complexity of O(1).

File formats
course.txt
cc_code strength
ex:
779 45
928 101
332 13
410 32

halls.txt
hallno capacity
ex:
1223 76
1234 45
2201 103
1217 95

Data structures: (Use dynamic arrays wherever possible)
Courses: list of courses with tuples containing at least (cc-code, strength, assigned)
Halls: list of examination halls with tuples containing at least (hallno, capacity, remaining, invigilator_count, assigned_courses)

Minimum list of methods to be implemented: (All methods in separate files)

a) readCourses(): creates the Course list from the input file
b) readHalls(): creates the Halls list from the input file
c) getNextCourse(): retrieves the next course to be assigned.
d) getNextHall(): retrieves the next hall in which a course has to assigned
e) assign(): this function uses a greedy choice to assign courses to halls.
f) count(): returns the number of invigilators required for assigning the courses to the exam halls.

Outputs:

Hall no followed by the list of courses assigned to it in each line.

Problem 2:

Data entry operators are paid on the basis of the correctness of the entries they make. For every correct entry they make, they are paid Rs. 100/-. If they miss an entry, they are penalized with Rs. 50. If they enter the wrong value, they are penalized with Rs. 200/-. Given the list of numbers entered by an operator and the actual list of values, compute the payment due to an operator. The algorithm must have time complexity of O(max(m,n)), where m and n are the lengths of the actual and entered lists respectively.

Input files:
actual.txt
entered.txt
One integer per line

Minimum list of methods to be implemented: (All methods in separate files) a) computePay(): computes the payment due for the entries considered so far.

Driver file for this problem must be named as prob2.c, and header file as prob2.h

Files to be mandatorily submitted: the driver files, header files, file (a)-(e) of problem 1, computePay.c for problem 2, the two readme files.

Reference no: EM13348055

Questions Cloud

Task 1 lewis carroll the author of alice in wonderland : task 1 lewis carroll the author of alice in wonderland liked to ask his friends to solve this puzzletake a square of 13
1nbsp i using excel estimate using regression analysis the : 1nbsp i using excel estimate using regression analysis the linear demand equation of qx on px py advertising and
There is a 10 by 10 grid on which the first player hides : there is a 10 by 10 grid on which the first player hides three battleships. each battleship takes up five consecutive
Problem 1 the queue adta queue is a fundamental abstract : problem 1. the queue adta queue is a fundamental abstract data type. it is an ordered collection of items in which the
Problem 1given n courses along with their course strength : problem 1given n courses along with their course strength and m examination halls along with their capacity assign the
How is the new technological landscape affecting the : how is the new technological landscape affecting the innovative potential of the usa?who will be the main actors
Culture consists of patterned ways of thinking feeling and : culture consists of patterned ways of thinking feeling and reacting acquired and transmitted mainly by symbols
1- which are the unique features legal cultural in the usa : 1- which are the unique features legal cultural in the usa? how are they likely to impact on the strategies of foreign
Research essay- arguing for changeobjectivesbetter : research essay- arguing for changeobjectivesbetter understand the issues and sources important to your fieldsurvey

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Question about communication recovery plan

Think about a natural or man made disaster, and explain how a communications network could be recovered from such a disaster.

  Infinite number of optimal dynamic-priority scheduling algo

Show that there exist an infinite number of optimal dynamic-priority scheduling algorithms. (Hint: Use the fact that both EDF and LLF are optimal).

  Finding majority element

Let A be an array of n elements. An element x is said to be a majority element in A if it occurs in A more than n/2 times.

  Creating dataflow diagram

Think about the level of detail involved with creating a dataflow diagram, why should the narrative be prepared? Explain why do we need the questionnaire?

  Prepare a japplet with a jbutton

Prepare a JApplet with a JButton labeled Who is number one and when the user clicks on button, display your favorite sports team. Save the document as JNumberOne.java.

  Separate inventory database

A 20-year old corporation, SewWorld, comprised of 6-locations in three states, sells sewing machines, sewing related software, and accessories. Each store sells between 3-5 different brands of sewing equipments.

  Write algorithm using pseudo code consensus algorithm

Write an algorithm, using pseudo code, "Consensus algorithm": A group of ten people need to decide which one flavor of ice cream they will all order, out of three options.

  Consider that the size of the hash tab is m=16. apply linear

Consider that the size of the hastable is M=16. Apply linear probing with f(i)=i for the following keys. Convert each of the keys to a number associated with the sequence of English alphabet and then draw a table that indicates successful and unsucce..

  Write a c program to find the intersection andor union of

write a c program to find the intersection andor union of two doubly linked lists using recursion. you are not allowed

  Algorithm on dynamic programming-minimize amount of walking

Our goal is to plan this trip so that we minimize the maximum amount of walking done in a single day. Your algorithm should be based on dynamic programming and run efficiently.

  Design an algorithm to sort the elements using merge sort

What are preorder, Inorder, postorder traversals of a binary tree? Design recursion algorithms to implement them and explain with the help of an example.

  Create time algorithm-minimum time required to finish task

Create the O(|V | + | E |) time algorithm which, given times ti and the dependencies, determines minimum time required to complete all the tasks.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd