The document describes the stable matching problem and the Gale-Shapley deferred acceptance algorithm. It provides definitions for stable matching, blocking pairs, and Pareto optimality. The deferred acceptance algorithm is presented as matching doctors to hospitals in rounds, with doctors proposing to their most preferred hospitals and hospitals either accepting the doctor or retaining their current match if they prefer them. The algorithm is proven to always produce a stable matching in O(n2) time. Examples are provided to illustrate how the algorithm works in practice.
This document contain all topics of research methodology of module-3 according to the syllabus of BPUT odisha. The document is done for the PG and PHD students who are doing research.
This document contain all topics of research methodology of module-3 according to the syllabus of BPUT odisha. The document is done for the PG and PHD students who are doing research.
A chi-squared test (χ2) is basically a data analysis on the basis of observations of a random set of variables. Usually, it is a comparison of two statistical data sets. This test was introduced by Karl Pearson in 1900 for categorical data analysis and distribution. So, it was mentioned as Pearson’s chi-squared test.
This is a crash course in A/B testing from the statistical view. Focus is placed on the overall idea and framework assuming very little experience/knowledge in statistics.
1. A researcher is interested in whether students who attend priva.docxswannacklanell
1. A researcher is interested in whether students who attend private elementary schools do any better on s standard test of intelligence than the general population of elementary school children. A random sample of 75 students at a private elementary school is tested and has a mean intelligence test score of 103.5. The average for the general population of elementary school children is 100 (σ = 15).
a) Is this a one- or a two- tailed tests?
b) What are Ho and Ha for this study?
c) Compute zobt
d) What is zcv?
e) Should Ho be rejected? What should the researcher conclude?
f) Calculate the 95% confidence interval for the population mean, based on the sample mean.
2. Assume that the average person in America weights 150 pounds (μ). You want to determine whether colleges students weigh less than the average America, Following are the wights collected on a sample of colleges students: 120, 105, 166, 170, 145, 149, 135, 115, 168, 138.
a) Is this a one- or two-tailed test?
b) What are Ho and Ha for this study?
c) Compute tobt
d) What is tcv?
e) Should Ho be rejected? What should the researcher conclude?
3. How does a t test differ from a z test in terms of when it is used, how it is calculated, and how we determine significance?
4. According to the U.S. Bureau of the Census, 75% of adults regularly drank alcohol in 1985. An investigator predicts that fewer adults drink now than drank then. A sample of 100 adults is asked about their current drinking habits; 67 report drinking, and 33 report not drinking.
a) What is X2obt?
b) What is (are) the df for this test?
c) What is X2cv?
d) What conclusion should be drawn from these results?
5. A health magazine recently reported a study in which researchers claimed that iron supplements increased memory and problem-solving abilities in a random sample of college women. All of the women took memory and problem-solving tests at the beginning of the study, then took iron supplements, and then took the same tests again at the end of the study. What is wrong with this design? What confounds could be leading to the results of improved memory and problem-solving skills?
6. In an experimental study of the effects of exercise on stress, participants are randomly assigned to either the no exercise or the exercise conditions. Identify what type of study this is—between-, within-, or matched-participants. In addition, identify the independent and dependent variables and the control and experimental groups.
7. What are the advantages and disadvantages in the use of a posttest-only control group design versus a pretest-posttest control group design?
8. What is a confound and how is it related to interval validity?
9. What is the relationship between external validity and the college sophomore problem?
10. Explain what counterbalancing is, how it is achieved, and which confound it helps to minimize.
11. Explain what a Latin square is and how it helps with counterbalanc ...
This is a assigned group presentation given by my Computer Science course teacher at Green University of Bangladesh, Bangladesh.
My Presentation Topic was - Cloud Computing
This group presentation includes the work Md. Shahidul Islam Prodhan, pages no 10 - 15.
www.facebook.com/TheShahidul
www.twitter.com/TheShahidul
www.linkedin.com/TheShahidul
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
A case study of cinema management system project report..pdfKamal Acharya
A computer reservation system or central reservation system is a computerized system used to store and retrieve information and conduct transactions related to air travel, hotels, car rental, or activities. These systems typically allow users to book hotel rooms, rental cars, airline tickets as well as activities and tours. They also provide access to railway reservations and bus reservations in some markets, although these are not always integrated with the main system. For these systems to be accessible on mobile phones and computers outside the premises of the airport, cinema, train station or stadiums, they need to be on the internet or a network.
This project focuses on the design and implementation of a web based cinema management system for the allocation of seat tickets online. The system would feature the registration of users, use of serial numbers and pins gotten from scratch cards sold and a printed slip. The system would have a store of all the seats and automate the generation of fresh serial numbers and pins.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Online blood donation management system project.pdfKamal Acharya
Blood Donation Management System is a web database application that enables the public to make online session reservation, to view nationwide blood donation events online and at the same time provides centralized donor and blood stock database. This application is developed
by using ASP.NET technology from Visual Studio with the MySQL 5.0 as the database management system. The methodology used to develop this system as a whole is Object Oriented Analysis and Design; whilst, the database for BDMS is developed by following the steps in Database Life Cycle. The targeted users for this application are the public who is eligible to donate blood ,'system moderator, administrator from National Blood Center and the staffs who are working in the blood banks of the participating hospitals. The main objective of the development of this application is to overcome the problems that exist in the current system, which are the lack of facilities for online session reservation and online advertising on the nationwide blood donation events, and also decentralized donor and blood stock database. Besides, extra features in the system such as security protection by using password, generating reports, reminders of blood stock shortage and workflow tracking can even enhance the efficiency of the management in the blood banks. The final result of this project is the development of web database application, which is the BDMS.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Q.1 A single plate clutch with both sides of the plate effective is required to transmit 25 kW at 1600 r.p.m. The outer diameter of the plate is limited to 300 mm and the intensity of pressure between the plates not to exceed 0.07N / m * m ^ 2 Assuming uniform wear and coefficient of friction 0.3, find the inner diameter of the plates and the axial force necessary to engage the clutch.
Q.2 A multiple disc clutch has radial width of the friction material as 1/5th of the maximum radius. The coefficient of friction is 0.25. Find the total number of discs required to transmit 60 kW at 3000 r.p.m. The maximum diameter of the clutch is 250 mm and the axial force is limited to 600 N. Also find the mean unit pressure on each contact surface.
Q.3 A cone clutch is to be designed to transmit 7.5 kW at 900 r.p.m. The cone has a face angle of 12°. The width of the face is half of the mean radius and the normal pressure between the contact faces is not to exceed 0.09 N/mm². Assuming uniform wear and the coefficient of friction between the contact faces as 0.2, find the main dimensions of the clutch and the axial force required to engage the clutch.
Q.4 A cone clutch is mounted on a shaft which transmits power at 225 r.p.m. The small diameter of the cone is 230 mm, the cone face is 50 mm and the cone face makes an angle of 15 deg with the horizontal. Determine the axial force necessary to engage the clutch to transmit 4.5 kW if the coefficient of friction of the contact surfaces is 0.25. What is the maximum pressure on the contact surfaces assuming uniform wear?
Q.5 A soft surface cone clutch transmits a torque of 200 N-m at 1250 r.p.m. The larger diameter of the clutch is 350 mm. The cone pitch angle is 7.5 deg and the face width is 65 mm. If the coefficient of friction is 0.2. find:
1. the axial force required to transmit the torque:
2. the axial force required to engage the clutch;
3. the average normal pressure on the contact surfaces when the maximum torque is being transmitted; and
4. the maximum normal pressure assuming uniform wear.
Q.6 A single block brake, as shown in Fig. 1. has the drum diameter 250 mm. The angle of contact is 90° and the coefficient of friction between the drum and the lining is 0.35. If the torque transmitted by the brake is 70 N-m, find the force P required to operate the brake. Q.7 The layout and dimensions of a double shoe brake is shown in Fig. 2. The diameter of the
brake drum is 300 mm and the contact angle for each shoe is 90°. If the coefficient of friction for the brake lining and the drum is 0.4, find the spring force necessary to transmit a torque of 30 N-m. Also determine the width of the brake shoes, if the bearing pressure on the lining material is not to exceed 0.28N / m * m ^ 2
A chi-squared test (χ2) is basically a data analysis on the basis of observations of a random set of variables. Usually, it is a comparison of two statistical data sets. This test was introduced by Karl Pearson in 1900 for categorical data analysis and distribution. So, it was mentioned as Pearson’s chi-squared test.
This is a crash course in A/B testing from the statistical view. Focus is placed on the overall idea and framework assuming very little experience/knowledge in statistics.
1. A researcher is interested in whether students who attend priva.docxswannacklanell
1. A researcher is interested in whether students who attend private elementary schools do any better on s standard test of intelligence than the general population of elementary school children. A random sample of 75 students at a private elementary school is tested and has a mean intelligence test score of 103.5. The average for the general population of elementary school children is 100 (σ = 15).
a) Is this a one- or a two- tailed tests?
b) What are Ho and Ha for this study?
c) Compute zobt
d) What is zcv?
e) Should Ho be rejected? What should the researcher conclude?
f) Calculate the 95% confidence interval for the population mean, based on the sample mean.
2. Assume that the average person in America weights 150 pounds (μ). You want to determine whether colleges students weigh less than the average America, Following are the wights collected on a sample of colleges students: 120, 105, 166, 170, 145, 149, 135, 115, 168, 138.
a) Is this a one- or two-tailed test?
b) What are Ho and Ha for this study?
c) Compute tobt
d) What is tcv?
e) Should Ho be rejected? What should the researcher conclude?
3. How does a t test differ from a z test in terms of when it is used, how it is calculated, and how we determine significance?
4. According to the U.S. Bureau of the Census, 75% of adults regularly drank alcohol in 1985. An investigator predicts that fewer adults drink now than drank then. A sample of 100 adults is asked about their current drinking habits; 67 report drinking, and 33 report not drinking.
a) What is X2obt?
b) What is (are) the df for this test?
c) What is X2cv?
d) What conclusion should be drawn from these results?
5. A health magazine recently reported a study in which researchers claimed that iron supplements increased memory and problem-solving abilities in a random sample of college women. All of the women took memory and problem-solving tests at the beginning of the study, then took iron supplements, and then took the same tests again at the end of the study. What is wrong with this design? What confounds could be leading to the results of improved memory and problem-solving skills?
6. In an experimental study of the effects of exercise on stress, participants are randomly assigned to either the no exercise or the exercise conditions. Identify what type of study this is—between-, within-, or matched-participants. In addition, identify the independent and dependent variables and the control and experimental groups.
7. What are the advantages and disadvantages in the use of a posttest-only control group design versus a pretest-posttest control group design?
8. What is a confound and how is it related to interval validity?
9. What is the relationship between external validity and the college sophomore problem?
10. Explain what counterbalancing is, how it is achieved, and which confound it helps to minimize.
11. Explain what a Latin square is and how it helps with counterbalanc ...
This is a assigned group presentation given by my Computer Science course teacher at Green University of Bangladesh, Bangladesh.
My Presentation Topic was - Cloud Computing
This group presentation includes the work Md. Shahidul Islam Prodhan, pages no 10 - 15.
www.facebook.com/TheShahidul
www.twitter.com/TheShahidul
www.linkedin.com/TheShahidul
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
A case study of cinema management system project report..pdfKamal Acharya
A computer reservation system or central reservation system is a computerized system used to store and retrieve information and conduct transactions related to air travel, hotels, car rental, or activities. These systems typically allow users to book hotel rooms, rental cars, airline tickets as well as activities and tours. They also provide access to railway reservations and bus reservations in some markets, although these are not always integrated with the main system. For these systems to be accessible on mobile phones and computers outside the premises of the airport, cinema, train station or stadiums, they need to be on the internet or a network.
This project focuses on the design and implementation of a web based cinema management system for the allocation of seat tickets online. The system would feature the registration of users, use of serial numbers and pins gotten from scratch cards sold and a printed slip. The system would have a store of all the seats and automate the generation of fresh serial numbers and pins.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Online blood donation management system project.pdfKamal Acharya
Blood Donation Management System is a web database application that enables the public to make online session reservation, to view nationwide blood donation events online and at the same time provides centralized donor and blood stock database. This application is developed
by using ASP.NET technology from Visual Studio with the MySQL 5.0 as the database management system. The methodology used to develop this system as a whole is Object Oriented Analysis and Design; whilst, the database for BDMS is developed by following the steps in Database Life Cycle. The targeted users for this application are the public who is eligible to donate blood ,'system moderator, administrator from National Blood Center and the staffs who are working in the blood banks of the participating hospitals. The main objective of the development of this application is to overcome the problems that exist in the current system, which are the lack of facilities for online session reservation and online advertising on the nationwide blood donation events, and also decentralized donor and blood stock database. Besides, extra features in the system such as security protection by using password, generating reports, reminders of blood stock shortage and workflow tracking can even enhance the efficiency of the management in the blood banks. The final result of this project is the development of web database application, which is the BDMS.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Q.1 A single plate clutch with both sides of the plate effective is required to transmit 25 kW at 1600 r.p.m. The outer diameter of the plate is limited to 300 mm and the intensity of pressure between the plates not to exceed 0.07N / m * m ^ 2 Assuming uniform wear and coefficient of friction 0.3, find the inner diameter of the plates and the axial force necessary to engage the clutch.
Q.2 A multiple disc clutch has radial width of the friction material as 1/5th of the maximum radius. The coefficient of friction is 0.25. Find the total number of discs required to transmit 60 kW at 3000 r.p.m. The maximum diameter of the clutch is 250 mm and the axial force is limited to 600 N. Also find the mean unit pressure on each contact surface.
Q.3 A cone clutch is to be designed to transmit 7.5 kW at 900 r.p.m. The cone has a face angle of 12°. The width of the face is half of the mean radius and the normal pressure between the contact faces is not to exceed 0.09 N/mm². Assuming uniform wear and the coefficient of friction between the contact faces as 0.2, find the main dimensions of the clutch and the axial force required to engage the clutch.
Q.4 A cone clutch is mounted on a shaft which transmits power at 225 r.p.m. The small diameter of the cone is 230 mm, the cone face is 50 mm and the cone face makes an angle of 15 deg with the horizontal. Determine the axial force necessary to engage the clutch to transmit 4.5 kW if the coefficient of friction of the contact surfaces is 0.25. What is the maximum pressure on the contact surfaces assuming uniform wear?
Q.5 A soft surface cone clutch transmits a torque of 200 N-m at 1250 r.p.m. The larger diameter of the clutch is 350 mm. The cone pitch angle is 7.5 deg and the face width is 65 mm. If the coefficient of friction is 0.2. find:
1. the axial force required to transmit the torque:
2. the axial force required to engage the clutch;
3. the average normal pressure on the contact surfaces when the maximum torque is being transmitted; and
4. the maximum normal pressure assuming uniform wear.
Q.6 A single block brake, as shown in Fig. 1. has the drum diameter 250 mm. The angle of contact is 90° and the coefficient of friction between the drum and the lining is 0.35. If the torque transmitted by the brake is 70 N-m, find the force P required to operate the brake. Q.7 The layout and dimensions of a double shoe brake is shown in Fig. 2. The diameter of the
brake drum is 300 mm and the contact angle for each shoe is 90°. If the coefficient of friction for the brake lining and the drum is 0.4, find the spring force necessary to transmit a torque of 30 N-m. Also determine the width of the brake shoes, if the bearing pressure on the lining material is not to exceed 0.28N / m * m ^ 2
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Toll tax management system project report..pdfKamal Acharya
Toll Tax Management System is a web based application that can provide all the information related to toll plazas and the passenger checks in and pays the amount, then he/she will be provided by a receipt. With this receipt he/she can leave the toll booth without waiting for any verification call.
The information would also cover registration of staff, toll plaza collection, toll plaza collection entry for vehicles, date wise report entry, Vehicle passes and passes reports b/w dates.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
2. Please ask
questions!
Last time: Matching students to dorms
Sandra ‘50
Sally ‘73
Susan ‘86
Toyon Stern Branner
Key point:
Only Sandra knows* how
happy she would be in
each dorm. So we rely on
her to tell the algorithm.
* Does Sandra know that?
How do you measure happiness anyway? 2
3. Please ask
questions!
Last time: Matching students to dorms
Definition (mechanism):
Solicit inputs + algorithm + action
Definition (Strategyproof / Truthful):
A mechanism is strategyproof/truthful if misreporting preferences can never make a
participant better off.
Definition (Pareto-optimal):
An assignment 𝐴 is Pareto-optimal if for any* other assignment 𝐵,
there is a participant that (strictly) prefers 𝐴 over 𝐵.
Theorem:
Serial Dictatorship is a truthful mechanism that makes Pareto-optimal assignments.
3
* any other assignment 𝐵 such that at least
one participant strictly prefers 𝐵 to 𝐴
4. Please ask
questions!
Today: the hospital residency problem
• After completing 4 years of undergrad and 4 years of med school,
med students are finally ready to start their internship (“residency”)
• Each applicant has a preference over different residency programs
• Each program has a preference over the applicants
How should you match applicants to residencies?
4
Simplifying assumption today:
Each program has 1 slot
5. Please ask
questions!
Today: the hospital residency problem
• After completing 4 years of undergrad and 4 years of med school,
med students are finally ready to start their internship (“residency”)
• Each doctor has a preference over different hospitals
• Each hospital has a preference over the doctors
How should you match doctors with hospitals?
5
Simplifying assumption today:
Each hospital has 1 slot
7. Please ask
questions!
Dorms vs Hospitals
Main difference: dorms don’t have preference over students.
Another important difference: centralized vs optionally centralized
7
Must be incentivized
to participate!
9. Please ask
questions!
Unstable matching
Def (blocking pair):
Given Matching M, (Doctor i, Hospital j) are a blocking pair
if they prefer each other to their assignment in M
9
n n
Stanford
wants
Doctor n
n really
wants
Stanford
10. Please ask
questions!
Stable Matching
10
n n
Def (blocking pair):
Given Matching M, (Doctor i, Hospital j) are a blocking pair
if they prefer each other to their assignment in M
Def (stable matching):
M is a stable matching if there are no blocking pairs.
11. Please ask
questions!
Stable Matching
11
Def (blocking pair):
Given Matching M, (Doctor i, Hospital j) are a blocking pair
if they prefer each other to their assignment in M
Def (stable matching):
M is a stable matching if there are no blocking pairs.
For every unmatched pair (i,j):
• Doctor i prefers Hospital M(i) over Hospital j, or;
• Hospital j prefers Doctor M(j) over Doctor i
equivalent
12. Please ask
questions!
Stable Matching
12
Def (blocking pair):
Given Matching M, (Doctor i, Hospital j) are a blocking pair
if they prefer each other to their assignment in M
Def (stable matching):
M is a stable matching if there are no blocking pairs.
For every unmatched pair (i,j):
• Doctor i prefers Hospital M(i) over Hospital j, or;
• Hospital j prefers Doctor M(j) over Doctor i
equivalent
#mustknowthisdef!
13. Please ask
questions!
Stable Matching
13
Def (blocking pair):
Given Matching M, (Doctor i, Hospital j) are a blocking pair
if they prefer each other to their assignment in M
Def (stable matching):
M is a stable matching if there are no blocking pairs.
13
13
In a stable matching,
hospitals can’t find better
doctors outside the match
Key point: centralized vs optionally centralized
14. Please ask
questions!
Stable Matching
14
Def (blocking pair):
Given Matching M, (Doctor i, Hospital j) are a blocking pair
if they prefer each other to their assignment in M
Def (stable matching):
M is a stable matching if there are no blocking pairs.
14
14
In a stable matching,
hospitals can’t find better
doctors outside the match
Key point: centralized vs optionally centralized
Stable matchings are important (because of )
But can we find them efficiently?
16. Please ask
questions!
Main idea: try to match each doctor to most favorite choice;
if you discover a blocking pair, just switch the matching!
Deferred Acceptance Algorithm
Almost-pseudo-code*:
While there is an unmatched doctor i:
Try to match Doctor i to next-favorite hospital in her list;
If this hospital doesn’t have a doctor yet:
Both Doctor i and hospital are happy with this new match ☺
Else-if this hospital prefers its current match i’ over i:
Doctor i remains unmatched
Else-if this hospital prefers i over i’:
Unmatch i’; Match (i, hospital)
* there is a hidden slide with more
detailed pseudocode and runtime analysis
17. Please ask
questions!
17
freeDoctors ← Doctors
for all d in Doctors:
d.current ← 0
for all h in Hospitals:
h.D ← NIL
Deferred-Acceptance(Doctors,Hospitals):
// initialize
Deferred Acceptance Algorithm
while (exists d in freeDoctors)
h ← d.rank(d.current++)
if (h.free = true)
h.D ← d; h.free ← false
remove d from freeDoctors
else-if (h.rank(d) < h.rank(h.D))
add h.D to freeDoctors
h.D ← d
remove d from freeDoctors
return (h,h.D) for all h in Hospitals
// main loop
// h prefers d to
previous match
// h is d’s
next favorite
Running time:
Each iteration of
while loop = O(1)
Each iteration:
We +1 d.current
for some doctor
We always have:
d.current ≤ 𝑛
for every doctor
Therefore, total
run-time = 𝑂 𝑛2
34. Please ask
questions!
Main idea: try to match each doctor to most favorite choice;
if you discover a blocking pair, just switch the matching!
Deferred Acceptance Algorithm
Almost-pseudo-code:
While there is an unmatched doctor i:
Try to match i to next-favorite hospital;
If this hospital doesn’t have a doctor yet:
Match Doctor i and this hospital
Else-if this hospital prefers its current match i’ over i:
Doctor i remains unmatched
Else-if this hospital prefers i over i’:
Unmatch i’; Match (i, hospital)
Run-time analysis
• Each iteration: 𝑶(𝟏) time
• Every iteration, doctor “proposes” to
new hospital
• Never try to match same doctor and
hospital twice
• 𝑛2 possible (doctor,hospital) pairs
• Therefore, at most 𝒏𝟐 iterations
• Therefore, total 𝑶 𝒏𝟐
35. Please ask
questions!
Questions about DA before we analyze it?
35
Deferred Acceptance Almost-pseudo-code:
While there is an unmatched doctor i:
Try to match i to next-favorite hospital;
If this hospital doesn’t have a doctor yet:
Match Doctor i and this hospital
Else-if this hospital prefers its current match i’ over i:
Doctor i remains unmatched
Else-if this hospital prefers i over i’:
Unmatch i’; Match (i, hospital)
Main idea: try to match each
doctor to most favorite choice;
if you discover a blocking pair,
just switch the matching!
Def (blocking pair):
(Doctor i, Hospital j) are a
blocking pair if they prefer each
other to their assignment in M
#mustknowthisdef!
36. Please ask
questions!
Deferred Acceptance works!
Theorem: Given n doctors and n hospitals,
DA algorithm outputs a complete stable matching.
Corollary: A stable matching exists.
(This is not obvious!)
36
37. Please ask
questions!
Proof of Theorem
Theorem: Given n doctors and n hospitals,
DA algorithm outputs a complete stable matching.
Proof: Follows from Claims 1+3 below…
37
Claim 1: At every iteration, current match is stable
w.r.t. non-free doctors and hospitals.
Claim 2: Once a hospital is matched, it remains matched
(possibly to a different doctor) until end of algorithm.
Claim 3: At the end of algorithm, every doctor/hospital is matched.
38. Please ask
questions!
Proof of claims
38
Claim 1:
At every iteration, current match is stable
w.r.t. non-free doctors and hospitals.
Proof by contradiction:
Suppose (d,h) blocking pair.
→ d is currently matched worse than h.
→ d already tried to match to h.
→ h either refused d or left d later. Why?
→ h must be matched to better than d –
contradiction!
Think-pair-share:
Prove these!
Claim 3: At the end of algorithm, every
doctor/hospital is matched.
Proof by contradiction: Suppose (d,h) free.
End of algorithm → d already tried h.
→ after that step, h wasn’t free
→ by Claim 2, contradiction!
Claim 2: Once a hospital is matched,
it remains matched (possibly to a different
doctor) until end of algorithm.
“Proof”: obvious from algorithm
39. Please ask
questions!
Deferred Acceptance works!
Theorem: Given n doctors and n hospitals,
DA algorithm outputs a complete stable matching.
Proof: Follows from Claims 1+3 below…
39
Claim 1: At every iteration, current match is stable
w.r.t. non-free doctors and hospitals.
Claim 2: Once a hospital is matched, it remains matched
(possibly to a different doctor) until end of algorithm.
Claim 3: At the end of algorithm, every doctor/hospital is matched.
40. Please ask
questions!
Deferred Acceptance Algorithm recap
Blocking Pair: A doctor and hospital that prefer each other over their
respective matches.
Stable Matching: A matching without blocking pairs!
Deferred Acceptance Algorithm
“Tentatively match each free doctor to best interested hospital.
Allow the hospital to leave match when a better doctor arrives.”
Runs in time 𝑂 𝑛2 = linear in input size ☺
40
42. Please ask
questions!
The optimal matching?
DA algorithm found a stable matching…
• Is it optimal?
• What does optimality mean?
42
Theorem: Every stable matching is Pareto-optimal
Reminder (Pareto-optimal):
An assignment 𝐴 is Pareto-optimal if for any* other assignment 𝐵,
there is a participant (doctor or hospital) that prefers 𝐴 over 𝐵.
43. Please ask
questions!
The optimal matching?
Proof:
Suppose 𝐴 is stable, and let 𝐵 be any other matching.
Consider a doctor-hospital pair matched in 𝐵, and not matched in 𝐴:
By stability of 𝐴, either the doctor or the hospital must prefer their match in 𝐴.
43
Theorem: Every stable matching is Pareto-optimal
Reminder (Pareto-optimal):
An assignment 𝐴 is Pareto-optimal if for any* other assignment 𝐵,
there is a participant (doctor or hospital) that prefers 𝐴 over 𝐵.
44. Please ask
questions!
The optimal stable matching?
Theorem: The matching returned by DA is doctor-optimal,
In other words, every doctor is matched
to favorite hospital possible in any stable matching.
Corollary: DA is doctor-strategyproof
I.e. doctors cannot gain from misreporting their preferences.
44
45. Please ask
questions!
The optimal stable matching?
Theorem: The matching returned by DA is hospital-worst,
In other words, every hospital is matched
to least favorite doctor possible in any stable matching.
Caution: DA is NOT hospital-strategyproof
45
46. Please ask
questions!
The optimal stable matching?
Caution: DA is NOT hospital-strategyproof
46
Alice
Bob
Charlie
X, Y, Z
Y, X, Z
Y, Z, X
X
Y
Z
B, A, C
A, C, B
B, C, A
Alice
Bob
Charlie
X, Y, Z
Y, X, Z
Y, Z, X
X
Y
Z
B, A, C
A, B, C
B, C, A
Example 1 (true preferences):
Hospital Y matched to 2nd choice doctor
Example 2 (Hospital Y misreporting):
Hospital Y matched to top choice doctor
47. Please ask
questions!
Recap: DA as a mechanism
Pareto optimality:
Every stable matching is Pareto-optimal.
Optimality-among stable matchings
DA’s matching is doctor-optimal + hospital-worst
Deferred Acceptance and strategic behavior
1. DA is doctor-strategyproof
2. DA is not hospital-strategyproof
3. Stable matching = no (doctor,hospital) prefer to match outside
47
Think-Pair-Share:
How would you change DA to
make it hospital-optimal (and
hospital-strategyproof*)?
Which one (doctor-optimal or
hospital-optimal) is better?
* Everything we discussed so far also applies to hospitals with >1 slot.
But with >1 slot, there are no stable hospital-strategyproof mechanisms.
49. Please ask
questions!
College admission
US system:
• Universities in a decentralized system
Q: How many students to admit?
A: Estimate based on historical data
• “Whole person review” -> application fees $$ -> limit # of apps/student
• Students strategize over where to apply (“safety choices”)
In many other countries:
• Admission mostly determined by standardized test scores
• DA-like mechanisms used in Brazil, China, Hungary,
49
Aka apply to some “safety” (less competitive) schools
instead of your favorite-but-competitive choices
50. Please ask
questions!
Doctors-hospitals
How do doctors rank hospitals?
• 1950’s: DA-like National Resident Match Program (NRMP)
• At the time, very few female doctors (not to mention openly gay doctors)
• 1960’s: more couples - want to be near each other (allegedly ;))
• Aka doctors no longer have a ranked preference over hospitals
• 1980’s: Negative theory results on stable matching with couples
• Stable matching may not exist
• NP-complete computational problem
• 1990’s: Practical successful extension of DA for accommodating couples ☺ 50
51. Please ask
questions!
Doctors-hospitals
How do hospitals rank doctors?
• Interviews
Costly process: strategize over which doctors to interview (“safety choices”)
• Standardized tests?
(Probably not anymore - USMLE switched to pass/fail in Jan 2022…)
• Letters of rec, med school eval, personal statement and CV
Hospitals also strategically use “safety choices” when ranking doctors post-interview.
DA is not hospital-strategyproof, but…
Theorem: In DA, using safety choices is never safer for hospitals! 51
52. Please ask
questions!
Doctors-hospitals
How do hospitals rank doctors?
DA is not hospital-strategyproof, but it’s generally not easy to game the match:
52
Alice
Bob
Charlie
X, Y, Z
Y, X, Z
Y, Z, X
X
Y
Z
B, A, C
A, C, B
B, C, A
Recall example:
Y switched B and C to match with A.
Needed detailed knowledge of
everyone’s preferences for this to work!
53. Please ask
questions!
Doctors-hospitals
How do hospitals rank doctors?
Theorem: In DA, using safety choices is never safer for hospitals!
Formally, manipulating true rank to move i-th doctor (“safety choice”)
to higher position cannot help matching with doctor of rank i-or-better.
Proof:
• Until Doctor i tries to match with hospital, manipulation has no effect.
• After Doctor i tries to match, they can only be replaced by a better doctor.
53
54. Please ask
questions!
Doctors-hospitals
How do hospitals rank doctors?
Theorem: In DA, using safety choices is never safer for hospitals!
Hospitals still strategically use “safety choices” when ranking doctors post-interview.
Why?!
Possible explanations:
1. They didn’t pay attention during CS269I lecture
2. Reputation/ego
54
55. Please ask
questions!
Doctors-hospitals
How do hospitals rank doctors?
Theorem: In DA, using safety choices is never safer for hospitals!
Hospitals still strategically use “safety choices” when ranking doctors post-interview.
Why?!
Possible explanations:
1. They didn’t pay attention during CS269I lecture
2. Reputation/ego - “number needed to fill” statistic
55
“Number needed to fill” –
the lowest rank in hospital’s list
of a doctor matched to hospital.
57. Please ask
questions!
Doctors vs Packets
• Suppose that instead of doctors and hospitals, you
want to match packets to servers on the internet.
57
n n
Lecture2.pptx
Lecture2.pdf
58. Please ask
questions!
Doctors vs Packets
• Suppose that instead of doctors and hospitals, you
want to match packets to servers on the internet.
• When you own all the servers, you don’t have to worry
about them matching outside your algorithm...
• But it turns out that Deferred Acceptance is just very
fast in practice ☺
58
n n
Lecture2.pdf
59. Please ask
questions!
Doctors vs Packets
• Suppose that instead of doctors and hospitals, you
want to match packets to servers on the internet.
• When you own all the servers, you don’t have to worry
about them matching outside your algorithm...
• But it turns out that Deferred Acceptance is just very
fast in practice ☺
59
61. Please ask
questions!
Stanford Marriage Pact
• Matches between Stanford students who want to make a pact:
“If we don’t get married by time X, we’ll marry each other.”
• Historically, Gale-Shapley’s original paper talked about Stable Marriage
• Men = doctors; women = hospitals.
• Original Marriage Pact used variant of Deferred Acceptance
• It doesn’t any more…
61
62. Please ask
questions!
DA Applications recap
Challenges:
• Costly evaluations (US colleges, medical interviews)
• Strategic choice of candidates/applications
• Preference assumption doesn’t always hold
• Couples want close assignments
• Reputation/ego (“number needed to fill”)
Theorem: In DA, “safety choices” are never “safer”.
Opportunities:
• Distributed implementation, short lists – fast in practice! 62
65. Please ask
questions!
Stable Matching lecture recap (1/2)
Last lecture: 1-sided matching (dorms don’t have preferences!)
vs
Today: 2-sided matching (hospitals, colleges, etc have preferences!)
Blocking Pair: A pair that prefer each other over their respective matches.
Stable Matching: A matching without blocking pairs.
Deferred Acceptance Algorithm
“Tentatively match each free doctor to best interested hospital.
Allow the hospital to leave match when a better doctor arrives.”
Runs in time 𝑂 𝑛2
. Very fast in practice!
65
66. Please ask
questions!
Stable Matching lecture recap (2/2)
Deferred Acceptance in theory:
• Pareto optimal among all matchings
• Doctor-optimal and hospital-worst among stable assignments
• Doctor-strategyproof, but hospital gaming is possible
Deferred Acceptance in practice:
• Costly evaluations (US colleges, medical interviews)
• Preferences not captured by our model (e.g. couples)
66