Consider a set of movies M1, M2, ... , Mk. There is a set of customers, each one of which indicates the two movies they would like to see this weekend. Movies are shown on Saturday evening and Sunday evening. Multiple movies may be screened at the same time. You must decide which movies should be televised on Saturday and which on Sunday, so that every customer gets to see the two movies they desire. Is there a schedule where each movie is shown at most once? Design an efficient algorithm to find such a schedule if one exists.
Q: ou are tasked with shipping a number n of goods gi € {1,., n} to a target location t;. In your very…
A: According to the question we have to (a) Formulate the problem as an ILP, and relax to an…
Q: You are organizing a conference that has received n submitted papers. Your goal is to get people to…
A: A concept of game theory where the optimal outcome of a game is one where no player has an incentive…
Q: Mr. Cook is the manager of Code cinemas and after a long break the theatres are open to the public…
A: Input-Output Format: The first line of input will contain a single integer T, denoting the number of…
Q: A book salesperson living in New York needs to visit clients in Utah, Jersey, LA, and Milan within a…
A: Given Data : The distance of each city from the other cities. To find : The distance traveled…
Q: There are n cats in a line, labeled from 1 to n, with the i-th cat at position i. They are bored of…
A: # include <iostream>using namespace std; void rotate(int arr[], int n){ int x = arr[n - 1],…
Q: Question 4: Consider the following network. Suppose all 4 nodes are customers. We want to open a DC…
A: Here we can solve our both the problems by using the Dijkstra's algorithm, were you can put you…
Q: The chef has N marks. Each marker has a cap. For each valid i, the ith tag has color ai And…
A: Input - Output Description: First input contains a single integer T denoting the number of test…
Q: You are scheduling production of your popular Rustic Coffee Table. The table requires a top, four…
A:
Q: Customers are arriving at a queue at the rate of 6 customers per hour. Of these. 20% require a fored…
A: l = 6/hr = 0.1/min20% - 2 min duration or service rate is 1/2 (entities/min) = 0.580% - expo service…
Q: Bob has recently joined the Ninja Academy for higher education, while filling the admission form, he…
A: Given:
Q: Note: Please Answer in C++ Only Mr. Cook is the manager of Code cinemas and after a long break the…
A: Start read the number of test cases T. For each test case, read the number of rows N and columns M.…
Q: Note: Please Answer in C++ Only Mr. Cook is the manager of Code cinemas and after a long break the…
A: According to the information given:- We have to follow the instruction in order to get the desired…
Q: Note: Please Answer in C++ Only Mr. Cook is the manager of Code cinemas and after a long break the…
A: In this question we need to write a C++ program to find the number of tickets that can be sold. We…
Q: Let a network be given by nodes V = {S, A, B,C,D,T} and ares, capacities c and a flow f according to…
A:
Q: (a) In how many ordered ways can the television director schedule 6 different commercials during the…
A: According to the question, there are 6 different time slots to host commercials. Director has to…
Q: You work for a company that has warehouses of items. The items are all packaged in boxes that are…
A: Required: to create a program for the above mention scenario.
Q: In a prison, there is a door b/w any pair of adjacent cells and one exit guarded by a guard G. One…
A: The stunt here is that maniac can go on his adjoining cell, kill its detainee and move back to his…
Q: The input to this problem is a sequence of n points p1; ; pn in the Euclidean plane. You are…
A: answer : we will arrange the points like [P1 P2 P3 ........Pn-1 Pn]. we will start from point P1 try…
Q: There are n trading posts along a river numbered 1, 2, 3, ., n. At any of the posts you can rent a…
A:
Q: Imagine a couple that agreed to meet this evening, but cannot recall if they will be attending the…
A: This is game theory problem: If they cannot communicate, where should they go then followiing…
Q: A seller has an indivisible asset to sell. Her reservation value for the asset is s, which she knows…
A: Answer: I have given answered in the handwritten format
Q: Note: Please Answer in C++ Only Mr. Cook is the manager of Code cinemas and after a long break the…
A: The question is to write c++ code for the given problem.
Q: The International Air Transport Association surveys business travelers to develop quality ratings…
A: Concepts and reason The confidence interval is defined as the range of values with a specified…
Q: Mr. Cook is the manager of Code cinemas and after a long break the theatres are open to the public…
A: Program plan: Implement a loop that runs the program for a specified number of test cases. Get the…
Q: a) Metro bus travel from Rawalpindi to Islamabad every day. The metro buses pass through Chamman…
A: Here Data given,table of x and P(x)and n=50.But new token function is = 2x-1 X=(2x-1) X [2(4)-1]7…
Q: A school is creating class schedules for its students. The students submit their requested courses…
A: In the above problem where we need to find the optimal schedule for all the students, this is a type…
Q: Mr. Cook is the manager of Code cinemas and after a long break the theatres are open to the public…
A: Input-Output Format: The first line of input will contain a single integer T, denoting the number…
Q: A gym offers personal trainers for a customized 45-minute lunch hour workout special. Customers…
A: the correct statement is
Q: uppose we have a set S = {al, a2, ..., an} of n proposed activities that wish to use a esource, such…
A: #include<bits/stdc++.h> using namespace std; vector<pair<int,int>>…
Q: Consider the following snapshot of a system: Allocation: A B C D T0 0 0 1 2 T1 1 0 0 0 T2…
A: Unsafe
Q: ve an example of a situation in which the total denial of a service to a user (the user receiving no…
A: Introduction: A Denial of Service (DoS) attack renders a resource (website, program, or server)…
Q: Consider the following scenarios. A high school has 1000 students and 1000 lockers, one locker for…
A: Program Approach:- 1. Create the class Main 2. In the main function, Declare arrayUse for…
Q: You work for a company that has warehouses of items. The items are all packaged in boxes that are…
A: To Create a Warehouse class with shelf count, shelf capacity and functions receive and ship.
Q: You are organizing a conference that has received n submitted papers. Your goal is to get people to…
A: A concept of game theory where the optimal outcome of a game is one where no player has an incentive…
Q: The Rohit has N marks. Each marker has a cap. For each valid i, the ith tag has color ai and…
A: The above question is solved in step 2 :-
Q: You are organizing a conference that has received n submitted papers. Your goal is to get people to…
A: An individual can receive no incremental benefit from changing actions, under the assumption that…
Q: A school is creating class schedules for its students. The students submit their requested courses…
A: A school is creating class schedules for its students. The students submit their requested courses…
Q: A large apple farm distributes their apples in boxes that they can source from any one of a number…
A: GIVEN: A list of possible capacities of boxes that holds apples. TO FIND: The size of a small batch…
Q: In a service center you must first go to server 1, then to server 2, and finally to server 3.…
A: The expected amount of time spent in the service center is the sum of the expected times spent in…
Q: 2. A friend needs to drive from City X to City l and would like to find the shortest route between…
A: Here, I have to find the minimum distance from city X to city I.
Q: Q4 telephone switch with 3 circuits (servers) is modeled as an M/M/C queuing system with respective…
A: Telephone switch with 3 circuit is modeled as an M/M/C queuing system with respective call arrival…
Q: 8. A school is creating class schedules for its students. The students submit their requested…
A: As per the given problem, the most optimal schedules need to be found out. Finding the exact…
Q: Julia is a freelance hakers, She receives a few cake orders, for this Saturday. Since she got quite…
A:
Q: You are organizing a conference that has received n submitted papers. Your goal is to get people to…
A: I'm providing the answer of the above question. I hope this will help.
Q: Draw a DFA that describes the behavior of vending machine which accepts Indian rupees and quarters…
A: At the stage $1.00, there should not be a self-loop for input $1.00,$0.25. I have corrected it. I…
Q: We have two lists of the same length representing sensors data. The second sensor is supposed to be…
A: The program is written in Python. Check the program screenshot for the code correct indentation.…
Q: Consider the challenge of determining whether a witness questioned by a law enforcement agency is…
A: Find an explanation below.
Q: After college, a group of students of a certain height planned to go to the movies. The cinema they…
A: In software engineering, merge sort is a productive, broadly useful, and correlation-based sorting…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Suppose a business person launches new cinema at Islamabad and ask his team to develop a ticket system for box office. He assigns some requirements about system that how should it work. The requirements are such a way that there are only '5' number of box office windows in the theatre. Each window can have at max '20' number of people waiting in line. To start with, only one window is opened. If the number of people waiting in line in that window exceeds 20, then the next window is opened and people can join the line in that window. Likewise, if both the first and second windows have n number of people waiting in each queue, then a third window is opened. This can go on until the maximum number of windows w is reached. Let us assume that once a window is opened it never closes. A new window is only opened if all open windows are full. Each person can buy only one ticket. So, the system should not allot more than one ticket per person. Let us assume that the system issues one ticket…A certain cat shelter has devised a novel way of making prospective adopters choose their new pet. To remove pet owners’ biases regarding breed, age, or looks, they are led blindfolded into a room containing all the cats up for adoption and must bring home whichever they pick up. Suppose you are trying to adopt two cats, and the shelter contains a total of N cats in one of only two colors: black or orange. is it still possible to pick up two black cats with probability ½, given that there is an even number of orange cats in the room? If so, how many cats should be in the room? How many black, how many orange?Consider the following scenario A student has a name, which consists of a given name and a family name, and a student IID. Each student is uniquely identified by his/her student ID.A course has a subject and a course ID. For each course, we want to record the number of students taking that course and the type of equipment being used for the course. A course is uniquely identified by its course ID.A student can be enrolled in an arbitrary number of courses, and an arbitrary number of students can be enrolled in a course. For each course in which they are enrolled students receive a lab mark and an exam mark.A course cannot exist if there is no student enrolled in it.A school is distinguished by the honour's degree that it awards. We also want to record to which faculty a school belongs. A student is registered with at most one school, while a school can have an arbitrary number of students. Questions a) Draw an Entity Relationship Diagram b) translate the ERD into a relational data…
- There are a set of courses, each of them requiring a set of disjoint time intervals. For example, a course could require the time from 9am to 11am and 2pm to 3pm and 4pm to 5pm. You want to know, given a number K, if it’s possible to take at least K courses. You can only take one course at any single point in time (i.e. any two courses you choose can’t overlap). Show that the problem is NP-complete, which means that choosing courses is indeed a difficult thing in our life. Use a reduction from the Independent set problem.After college, a group of students of a certain height planned to go to the movies. The cinema they go to is quite unique because the number of cinema rows is always 2 and the number of seats is as many as the number of students. Because this is a unique cinema, the way they sit is also unique. They will try to minimize their height difference with the one next to it so that the biggest height difference of each pair of students next to each other is as minimal as possible. Example: There are 6 students with height of 1, 6, 9, 7, 2, and 3. There are various sequences that can produce the biggest difference in height. Ordering 1:1 3 62 7 9Difference 1 and 3 is 2.Difference 3 and 6 is 3.Difference 2 and 7 is 5.Difference 7 and 9 is 2.So the biggest difference in height is 5. Ordering 2:1 3 26 7 9The biggest difference in height is 2.This difference is also an optimal answer. Format Input : There are T test cases. Each testcase contains integers N which indicates the number of students…You are organizing a conference that has received n submitted papers. Your goal is to get people to review as many of them as possible. To do this, you have enlisted the help of k reviewers. Each reviewer i has a cost sij for writing a review for paper j. The strategy of each reviewer i is to select a subset of papers to write a review for. They can select any subset S; C {1,2, ..., n}, as long as the total cost to write all reviews is less than T (the time before the deadline): 2 Sij 1. (b) Show that for B = 2 this fraction is close to 1/3. [Hint: You can consider an instance with 3n + 1 papers and only n will be reviewed.]
- ABC is a retail store selling products for day-to-day use. Consider that a customer is buying any three types of products from ABC store, where each product has a fixed price on it. After choosing the products, the customer has to go to the cashier and can ask any of the following services: Please note that you have to choose the three products of your choice with some appropriate prices available in the retail store. 1. Make a new purchase: The cashier enters the number of items for each type of product then the program calculates the total price, apply a VAT of 5% and displays the payment amount to the customer 2. Exchange an item: The cashier enters the code of the product to be exchanged and the code of the new product. The program displays the amount to be reimbursed to the customer or to be added by him taken into consideration the VAT percentage. 3. Check the price of one product: The cashier enters the code of the product and the program displays its price. You are requested…Admission to college is just beginning and Chef has also just finished his high school. There are N colleges, listed from 11 to N, and listed from 11 to N. Each college has only one seat left. To apply for a college, each student must submit the same examination, the result of which determines their future, that is, the best student (the highest scorer) gets the first choice of college. Each student has a list of favourite colleges. They will want to get to the top ranked college on their list. If they can't get into it, they'll want to get into a second-ranked college in the middle of their list, and so on. If one vacant college seat is filled, that year's admission closes at that college. Then, people who have applied for that college should look for a lower college in their preferred list as long as it still has vacancies. Looking at the information about MM students, about their exam scores (given as standards) and the college IDs they apply for, find out which college the Chef…A basketball league wants to keep track of its teams and players. For each team, they need to track the name, city, and the number of years the team has been in the league. A city can host multiple teams, but a team can only ever represent one city. They also wish to store the population of each city. Multiple players play for each team (a new team might not yet have any players). For each player, the league wants to keep track of the first and last names, and the player’s jersey number. They only track the player’s most recent team – no historical data are stored. One and only one player on each team is designated the captain – this also needs to be stored. Each team is owned by one or more owners. For each owner, they need to track to the first and last name, all of the owner’s phone numbers, and the percentage of the team that each owner owns. Owners can own more than one team at the same time. At the end of the season, the league needs to publish a season-end report that…
- Let’s consider a long, quiet country road with houses scattered very sparsely along it. (We can picture the road as a long line segment, with an eastern endpoint and a western endpoint.) Further, let’s suppose that despite the bucolic setting, the residents of all these houses are avid cell phone users. You want to place cell phone base stations at certain points along the road, so that every house is within four miles of one of the base stations. Give an efficient algorithm that achieves this goal, using as few base stations as possible. Give the psudo code.You have a backpack that can carry at most 15 kg of stuff (following image). There are ten boxes of five types (A, B, C, D, and E), with two boxes of each type. The weights and values of the boxes are given in the figure. You want to select some of these boxes to put in your backpack in order to maximize their total value, but you cannot exceed the backpack’s weight capacity. Additionally,• if a type B box is selected, then no type C box can be selected• at least one box of either type A or type D must be selected Formulate an integer linear programming model to help you make the bag packing decision. To assist you, below are your decision variables.• yi: select (= 1) or not select (= 0) type i box, i = A, B, C, D, E.• xj: The number of type j boxes selected, j = A, B, C, D, E.Help me