Link to home
Start Free TrialLog in
Avatar of eric68
eric68

asked on

Seating arrangement program for foreign diplomats. What type of data structure to use.

I have to write a program that will create a seating arrangement for 10 diplomats from different countries.  The program has to take into account the languages spoken and the diplomatic relations between countries.  I am trying to figure out the best way to implement this program.
Avatar of eric68
eric68

ASKER

This is a description of the problem.
The table to be used for dinner is round, and seats 10 people. Your employer will be seated at the first position at the table. The other positions will be numbered clockwise from 2 to 10. The person seated to the left of your employer is in seat number 2, the person seated to the right of your employer is in seat number 10.

Persons seated next to each other must speak a common language. A person may speak to the person on the left in one common language, and speak to the person on the right in another language. The governments of the guests seated next to each other must have formally recognized each other.

The government of your employer has diplomatic relations with the governments of all of his guests. The government of a guest may or may not have diplomatic relations with the governments of all the other guests.

Two diplomats from the same country will have diplomatic relations with the same list of countries. A country will always have diplomatic relations with itself. Diplomats from the same country may or may not speak any languages in common.
ASKER CERTIFIED SOLUTION
Avatar of robear7nt
robear7nt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is homework!

;JOOP!
Is this why the world is in such a mess?
No, it's only Easter.

;JOOP!
Seriously: we, on EE,  are not allowed to solve school and course problems for students.

;JOOP!
I was concerned that C++ programmers were arranging seating for diplomats. God forbid they'd have us controlling weapon systems too.

Erm... How does that rand() function work? ....
Remember the failure of the Patriot's in the 1st Gulf War?  Software!
Avatar of eric68

ASKER

Thank you for all of the suggestions.  I am not looking for someone to solve my homework for me, I am just trying to get some suggestions on how to approach this problem (using graphs, sets, etc.), and I thought that the best people to ask would be programmers in the field since we are aloud to use any available resources.
>> I am just trying to get some suggestions on how to approach this problem

Did the posted comments help you get a better idea of what you'll need to do to implement this ?
Are you still unsure about certain parts ? (which ?)

It would maybe help if you would tell us how you think you'd do it. Explain with enough detail, so we can take a look at your approach, and give you tips on improving it if needed.
eric68,

This is an "interactive" process. The experts offer answers, suggestions, and comments to your question, then monitor the question waiting to hear feedback from you. Your feedback is vital to getting your question answered. Since this is a homework assignment, the experts can't solve it for you, but they will help guide you towards YOU being able to complete your assignment. The example in rules is: "You can teach them to count, but you can not tell them 2 + 2 = 4".

Robert
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial