The Seating Arrangement Generator is a web-based application that automatically generates seating arrangements for participants while avoiding conflicts between them. It uses a backtracking algorithm to ensure that no conflicting participants sit adjacent to each other.
- 🪑 Automatic seating generation
⚠️ Conflict handling between participants- 🔄 Backtracking-based solution
- 🎨 Modern UI with animations
- 📱 Mobile responsive design
- 🔁 Generate again option
- Frontend: HTML, CSS
- Backend: Java, Spring Boot
- Template Engine: Thymeleaf
- Build Tool: Maven
src/main/java/com/example/demo/
DemoApplication.java
SeatingController.java
SeatingService.java
src/main/resources/
templates/
index.html
result.html
static/
style.css
application.properties
-
User enters:
- Number of rows & columns
- Participants
- Conflict pairs
-
Backend:
- Initializes seating matrix
- Applies backtracking algorithm
- Checks conflicts before placing each participant
-
Output:
- Displays valid seating arrangement
- If not possible → shows error message
The system takes the following inputs from the user:
-
Rows (Integer): Number of rows in seating layout
-
Columns (Integer): Number of columns in seating layout
-
Participants (String): Comma-separated names
- Example:
A,B,C,D
- Example:
-
Conflicts (String): Pairs of participants who should not sit together
- Format:
A-B,B-C
- Format:
Rows: 2
Columns: 2
Participants: A,B,C,D
Conflicts: A-B
The system generates:
-
A 2D seating arrangement (matrix)
-
Ensures:
- No conflicting participants sit adjacent (left/right/up/down)
- Each participant is placed exactly once
A C
D B
No valid arrangement possible
git clone https://github.com/your-username/seating-arrangement-generator.git
cd seating-arrangement-generator
./mvnw spring-boot:run
http://localhost:8081/
-
Backtracking
- Tries all possible seating combinations
- Places participant only if safe
- Backtracks if conflict occurs
A C
D B
- 💾 Database integration (MySQL)
- 📄 Export seating as PDF
- 🧑💼 Admin panel
- 🎯 Advanced conflict rules
- 🏫 Real exam hall system
- DESIREDDY MOHITH REDDY
This project was developed as part of academic learning to understand:
- Backtracking algorithms
- Spring Boot development
- Full-stack integration
Make sure port 8081 is free before running the application.