Implementation of both the algorithms using cc code 1

Assignment Help Theory of Computation
Reference no: EM13372333

Implementation of both the algorithms using C/C++ code 1. roommates problem 2. Intern Problem

1. The Roommate Problem

The roommate problem involves a single set of agents of even cardinality n, each agent having a preference list over the other n - 1 agents. A stable matching in this case is a partition of this single set into n/2 pairs so that no two unmatched members both prefer each other over their partners under the matching. There exist instances of the roommate problem (both with and without ties) for which no stable matching exists. One such instance is due to Gale and Shapley [l], Example 1.1:

1899_Roommate Problem.png

Anyone assigned to 4 will find a person whom he prefers and who prefers him.

An efficient algorithm to constructively determine for any instance of the roommate problem without ties whether a stable assignment exists (and if one exists to determine one) has recently been discovered by Irving [3]. This algorithm is dependent on properties of the roommate problem that hold only for the case without ties. A result of this paper, to be demonstrated in Section 2 is that this dependency is unavoidable. When ties are allowed, the roommate problem is NP-complete.

The marriage problem is a special case of the roommate problem. Every instance I of the marriage problem can be converted to an instance of the roommate problem by adding to the bottom of the preference list of every agent A of I a list of the agents of the same gener as A (other than A itself) in arbitrary order. It is easy to see that the set of stable matchings of this generated instance of the roommate problem coincides with the set of stable matchings of the original marriage problem.

2. The Intern Assignment Problem (IAP)

The intern assignment problem is merely the polygamous form of the marriage problem, in which the members of one of the geners can take on up to a (preset) number of partners of the opposite gender. An algorithm that solves this problem, called the NIMP (National Internship Matching Program) algorithm, has been used since 1953 to assign graduating medical students as interns in hospitals throughout the United States (hence the name of the problem). The NIMP algorithm can be considered a generalization of the Gale-Shapley method. A description of the method and a history of this program can be found in Roth [9].

Formally stated, the intern assignment problem is a stable matching problem where a set of interns are assigned to a set of hospitals. Each
hospital has a preset number of positions it wants to fill and a priority list that ranks the interns in accordance with its preferences over whom to hire to fill those positions. Note that since a hospital's preferences are one- dimensional, one should regard these multiple positions as identical. Different sections in the same hospital should be considered as different hospitals in this scheme. A hospital can rank in its preference list the possibility of leaving a position unassigned over being assigned to some of the interns.

On the other hand, each of the interns has a preference list over the hospitals that specifies which hospitals the intern would like to be assigned to. An intern can rank in his preference list the possibility of remaining unassigned to any one among a list of undesired hospital positions.

An assignment of interns to hospitals is unstable if one of the following holds:

There exists a hospital or an intern that prefers to remain unassigned rather than accept the assignment under the matching; or There exist a hospital and an intern such that the intern prefers that hospital over the one to which the intern had been assigned and the hospital prefers that intern over the current assignment of that position.

As mentioned, the marriage problem is a special case of the intern assignment problem. An instance of the marriage problem is an instance of the intern assignment problem. The difference is that the options of polygamy and not assigning some of the agents are not used.

Reference no: EM13372333

Questions Cloud

You will implement an end-to-end document classication : you will implement an end-to-end document classi?cation system that predicts which category pages belong to using the
1 industry demand function q 14 - frac12p 0001income : 1. industry demand function q 14 - frac12p 0.001income. marginal cost is fixed and equal to 16. fixed costs 0. you
Question a a consumer organization wishes to test 12 : question a a consumer organization wishes to test 12 different new perfumes and has devised a number of tests to
Question capital gains taxin july 2011 the labour party put : question capital gains taxin july 2011 the labour party put forward a proposal to have a comprehensive capital gains
Implementation of both the algorithms using cc code 1 : implementation of both the algorithms using cc code 1. roommates problem 2. intern problem1. the roommate problemthe
In this project you need to write a program called : in this project you need to write a program called ecc.javato implement elliptic curve
Project title email spam filterabstractanalyze the emails : project title email spam filterabstractanalyze the emails and predict whether the mail is a spam or not a spam.to work
You are required to set up a small network with network id : you are required to set up a small network with network id 200.100.50.16027. in this network there are three routers
Question 1 you are designing a grocery delivery business : question 1 you are designing a grocery delivery business. via the internet your company will offer staples and frozen

Reviews

Write a Review

Theory of Computation Questions & Answers

  1let s1 and s2 be two strings of lengths m and n

1.let s1 and s2 be two strings of lengths m and n respectively. by de?nition a superstring of s1 and s2 is one which

  Explaining syntactically legal boolean expression

In this problem, we consider a very restricted subset of Boolean expressions. Define an operator to be one of  the four symbols: ¬, ∧, ∨, and →. Define a variable to be one of the five symbols

  Design unambiguous grammar to parse expressions

Write a program would read two numbers and then print all numbers between the first and the second, inclusive. Design unambiguous grammar to parse expressions

  Question 1 given the productionss-gt sa aaa absa-gt acaa

question 1. given the productions.s-gt sa aaa absa-gt acaa list the parse table. is the grammar ll1 in this form? if

  Deterministic finite and non-deterministic finite automata

Describe the difference between a Deterministic Finite Automata and Non-Deterministic Finite Automata. In general, which one is expected to have less number of states ?

  Create a program that reads integers

Create a program that reads integers in range 0 .. 9999. The event stops reading if -99 is entered. Your event should use Stack to store those numbers then it used Priority Queue to print out those numbers in ascending order.

  Provide dfa-s accepting the languages over alphabet

Provide DFA's accepting the following languages over alphabet {0,1}. Set of all strings that, when interpreted as the binary integer, is a multiple of 5.

  Each part of this problem that the eax register

Assume for each part of this problem that the EAX register contains 00 00 00 4F and the doubleword referenced by value contains FF FF FF 38. Determine whether each of the conditional jump statements causes a jump to dest.

  Create and implement a lexical analyzer for c

Create and implement a lexical analyzer for C-- as follows: Write the set of token types to be returned by lexical analyzer. Explain regular expressions for this set of token types.

  Finite-state machine design

Create a finite-state machine design to turn your FPGA development board into a simple programmable music box.

  Use algorithm np completeness of any of the problems

Use any algorithm we without writing out details of algorithm. In proving problem NP-complete, you may utilize NP completeness of any of the problems.

  Design and draw the state diagram

Design and draw the state diagram (graph-representation) of a deterministic finite-state automata that recognizes the language generated by the grammar

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