Click here to Skip to main content
13,197,200 members (56,591 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hello everyone,

Case Scenario :

Exams : 1, 2, 3, 4
Seats : A, B, C, D, E
Students : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Student-Exam-Map :
Exam	Student
1	1
1	2
1	3
1	4
1	5
2	1
2	3
2	5
2	7
2	9
3	2
3	4
3	6
3	8
3	10
4	1
4	3
4	2
4	5
4	10


Problem : One student can have only one seat for all exams, i can allot one seat to more than student but without conflict.

What kind of problem it is and what algorithm should i use?

Thank you

What I have tried:

I have prepared a chart to allot seat and sequentially allot seats using for loop.
The chart is :

Exam/Seat	1	2	3	4
A		1	1	6	1
B		2	7	2	2
C		3	3	8	3
D		4	9	4	
E		5	5	10


Invalid solution because for last 2 rows both 5 and 10 student require Seat E.
Posted 12-Oct-17 16:28pm
Updated 12-Oct-17 17:37pm
ppolymorphe107.6K
v4
Comments
PIEBALDconsult 12-Oct-17 23:39pm
   
Not enough information.
Raghubir_Sarkar 13-Oct-17 1:50am
   
I tried to provide all information, if you want to know anything else about the question please ask me.

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Quote:
What kind of problem it is and what algorithm should i use?

I would use a brute force backtracking algorithm.

As far as I can see, there is no solution to this dataset.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web04 | 2.8.171020.1 | Last Updated 12 Oct 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100