Skip to content

jayyy-cs/stable-matching-algorithm

Repository files navigation

Stable Matching Algorithm

Overview

This project implements a stable matching algorithm to assign Teaching Assistants (TAs) to classes based on mutual preference lists.

The problem is modeled after the classic stable matching (Gale–Shapley) algorithm, ensuring that no TA–class pair would prefer each other over their assigned match.

Features

  • Implementation of a stable matching algorithm (Gale–Shapley style)
  • Custom generic queue using C++ templates
  • Preference-based matching using unordered_map
  • Guarantees a stable assignment (no blocking pairs)

Technical Details

Stable Matching Algorithm

  • Unassigned TAs propose to their preferred classes
  • Classes accept or reject proposals based on preference ranking
  • Process continues until all TAs are matched
  • Ensures stability:
    • No TA and class prefer each other over current assignment

Data Structures

  • Custom GenericQueue<T> for managing unmatched TAs
  • unordered_map for storing final assignments
  • Preference lists stored from input files

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors