Purchase Solution

# Seating arrangement to increase social contact

Not what you're looking for?

College Students go out for a party. To increase social contact, they would love to sit at tables so that no two students from the same programme are at the same table. Show how to find such a seating arrangement or prove that no such seating plan is possible.

The input is the p programmes, for each i the number ai indicates the students from programme i, and the seating capacities of the q tables with table j seating bj people. Give the time complexity of your algorithm with a brief justification.

##### Solution Summary

Solution is presented in pseudo-code form along with plain description. Count of comparisons or complexity is marked for various steps in the given implementation. Solution analyzes the given implementation for worst case complexity (in terms of number of comparisons) in achieving a successful seating arrangement.

##### Solution Preview

To grasp this solution easily, try to mentally picture the situation when going through the explanations.
You may like to refer to http://en.wikipedia.org/wiki/Sorting_algorithm for a comparison of sorting algorithms.

procedure SeatingArrangement

Input: Array Students[1..p], Tables[1..q]

// Students[i] gives number of students in program i.
// Tables[i] gives available seating capacity of table i. This array gets modified in this solution.
// p indicates number of programs.
// q indicates number of tables.
// Considering that a worst case NlogN sorting algorithm is chosen wherever sorting is required.

Sort ...

##### Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

##### Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

##### Javscript Basics

Quiz on basics of javascript programming language.

##### Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

##### Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.