ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 26 May 2017 My Price 8.00

write a program that solves a classic computer science

I cannot figure how to do this assignment for my Java Programming class.

 

Programming AssignmentThis program will give you practice with a complex data structure.  You are going to write a program that solves a classic computer science problem known as the stable marriage problem.  The input file is dividedinto men and women and the program tries to pair them up so as to generate as many marriages as possible that are all stable.  A set of marriages is unstable if you can find a man and a woman who would rather be married to each other than to their spouses (in which case, the two would be inclined to divorce their spouses and marry each other).The input file for the program will list all of the men, one per line, followed by an input line with just the word “END” on it, followed by all of the women, one per line, followed by another input line with just the word “END” on it.  The men and women are numbered by their position in the input file.  To make this easier, we have numbered starting at 0 (the first man is #0, the second man is #1, and so on; the first woman is #0, the second woman is #1, and so on).  Each input line (except the two lines with “END”) has a name followed by a colon followed by a list of integers. The integers are the preferences for this particular person. For example, the following input line in the men's section:Joe: 9 7 34 8 19 21 32 5 28 6 31 15 17 24indicates that the person is named “Joe” and that his first choice for marriage is woman #9, his second choice is woman #7, and so on.  Any women not listed are considered unacceptable to Joe.  The data file has been purged of any impossible pairings where one person is interested inthe other, but the other considers that person unacceptable.  Thus, if a woman appears on Joe’s list, then Joe is acceptable to that woman.There are many ways to approach the stable marriage problem.  You are to implement a specific algorithm described below. This is the basic outline:set each person to be free;while (some man m with a nonempty preference list is free) {    w = first woman on m's list;

Attachments:

Answers

(11)
Status NEW Posted 26 May 2017 02:05 AM My Price 8.00

-----------

Attachments

file 1495765312-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)