其他分享
首页 > 其他分享> > 【离散数学】 MIT 6.042J 笔记 - Lecture 7 Matching Problems

【离散数学】 MIT 6.042J 笔记 - Lecture 7 Matching Problems

作者:互联网

PDF 文件下载

【离散数学】MIT 6.042J - Fall 2010 - Note for Lecture 7

图片效果

1
2

LaTeX \LaTeX LATE​X 代码

% !TeX spellcheck = en_EN-EnglishUnitedKingdom
\documentclass{article}

\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{listings}
\usepackage{appendix}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{subfig}
\usepackage{url}
\usepackage{cite}
\usepackage{array}
\usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.65cm, bottom=2.54cm]{geometry}

\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{example}{Example}

\newcommand\rem{{\rm rem}}

% set the code style
\RequirePackage{listings}
\RequirePackage{xcolor}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{
	numbers=left,  
	frame=tb,
	aboveskip=3mm,
	belowskip=3mm,
	showstringspaces=false,
	columns=flexible,
	framerule=1pt,
	rulecolor=\color{gray!35},
	backgroundcolor=\color{gray!5},
	basicstyle={\ttfamily},
	numberstyle=\tiny\color{gray},
	morekeywords={},
	keywordstyle=\color{blue},
	commentstyle=\color{dkgreen},
	stringstyle=\color{mauve},
	breaklines=true,
	breakatwhitespace=true,
	tabsize=4
}

\title{\huge \bfseries Mathematics for Computer Science, MIT 6.042J - Fall 2010 - Note for Lecture 7}

\author{\Large Teddy van Jerry}
\date{\today}

\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage}
\chead{MIT 6.042J Lecture 6 - Matching Problems}

\begin{document}
	
	\maketitle
	
	{\Large Lecture 7: Matching Problems}
	
	\section{Matching}
	
	\begin{definition}
		Given Graph $G:(V,E)$, a \textbf{matching} is a subgraph of G where every node has edge 1.
	\end{definition}

	\begin{definition}
		A matching is perfect if it has size $\dfrac{|V|}{2}$.
	\end{definition}
	
	\begin{definition}
		The \textbf{weight} of a matching $\mathfrak{M}$ is the sum of the weights on the edges in $\mathfrak{M}$.
	\end{definition}

	\begin{definition}
		A \textbf{minimum-weight matching} for graph G is a perfect matching for G with the minimum weight.
	\end{definition}

	\begin{definition}
		Given a matching $\mathfrak{M}, x$ and $y$ form a \textbf{rogue couple} if they prefer each other to their mates in $\mathfrak{M}$.
	\end{definition}

	\begin{definition}
		A matching is \textbf{stable} if there are no rogue couples.
	\end{definition}

	Goal: Find a perfect matching that is stable.
	
	\section{Stable Marriage Problem}
	
	\subsection{Problem}
	
	\begin{itemize}
		\item $N$ boys and $N$ girls.
		\item Each boy has his own ranked list of all the girls.
		\item Each girl has his own ranked list of all the boys.
	\end{itemize}

	Goal: Find perfect matching with no rogue couples.
	
	\subsection{Mating Algorithm}
	
	Need to show:
	\begin{itemize}
		\item TMA terminates (quickly)
		\item Everyone gets married
		\item No rogue couples
		\item Fairness
	\end{itemize}

	\begin{theorem}
		TMA terminates in $\leqslant N^2+1$ days.
	\end{theorem}

	\begin{proof}
		(By contradiction)
		
		Suppose TMA does not terminate in $N^2+1$ days.
		
		Claim: If we don't terminate on a day, then one boy crosses a girl off his least that night.
		There are at most $N^2$ cross-outs, so there is the contradiction. 
	\end{proof}

	\begin{theorem}
		Everyone gets married in the end.
		\label{Thm}
	\end{theorem}

	Let $P = $ ``If a girl ever rejected a boy B, then G has a suitor who she prefers to be."

	\begin{lemma}
		$P$ is an invariant for TMA.
		\label{Lem}
	\end{lemma}

	\begin{proof}[Proof of Lemma \ref{Lem}]
		(By induction on days)
		
		Base Case: Day 0: No one rejected yet, so it is vacuously true.
		
		Inductive Step: Assume $P$ holds at the end of Day $d$.
		
		Case 1: G rejected B on day $d+1$. Then there was someone better. So $P$ is true.
		
		Case 2: G rejects B before $d+1$. $P$ implies G holds better one than B.
		G has same or better suitor on day $d+1$. So $P$ is true.
	\end{proof}

	\begin{proof}[Proof of Theorem \ref{Thm}]
		(By contradiction)
		
		Assume that somebody B that is not married at end.
		
		$\therefore$ B was rejected by every girl.
		
		$\therefore$ Every girl has suitor better than B. (Lemma \ref{Lem})
		
		$\therefore$ Every girl has married.
		
		However, it is impossible.
	\end{proof}
	
	\begin{theorem}
		TMA produces a stable matching.
	\end{theorem}

	\begin{proof}
		Let Bob and Gail be any pair that are not married.
		
		Case 1:  Gail rejected Bob. Gail marries someone she thinks than Bob. (Lemma \ref{Lem}) So Gail and Bob is not rogue.
		
		Case 2: Gail did not reject Bob. So Gail never serenades Gail. So Gail is lower on Bob's list than Bob's wife. So Gail and Bob is not rogue.
		
		$\therefore$ TMA is stable.
	\end{proof}

	\begin{theorem}
		TMA favors boys.
		\label{Thm_}
	\end{theorem}

	Let $S = $ ``set of all stable matchings". $S \neq \varnothing$.
	
	For each person $P$, we define the realm of possibility for $P$ to be $\left\{Q|\exists \mathfrak{M}\in S, \{P,Q\}\in\mathfrak{M}\right\}$
	
	\begin{definition}
		A person's optimal mate is his/her favorite from the realm of possibility.
	\end{definition}

	\begin{definition}
		A person's pessimal mate is his/her least favorite from the realm of possibility.
	\end{definition}

	\begin{theorem}
		TMA marries every boy to his optimal mate.
		\label{THM_1}
	\end{theorem}

	\begin{theorem}
		TMA marries every girl to her pessimal mate.
		\label{THM_2}
	\end{theorem}

	Assume Theorem \ref{THM_1} to be true, now prove Theorem \ref{THM_2}.
	
	\begin{proof}
		(By contradiction)
		
		Suppose that $\exists$ stable matching $\mathfrak{M}$ where $\exists$ girl G who fares worse than in TMA.
		
		Let $B'$ be the mate of $G$ in $\mathfrak{M}$.
		
		Let $B$ be the mate of $G$ in TMA.
		
		Let $G$ be the mate of $G'$ in TMA.
		
		However, according to Theorem \ref{THM_1}, $B$ loves $G$ better and $G$ loves $B$ better, so $B$ and $G$ is a rogue couple.
		
		$\therefore \mathfrak{M}$ is not stable.
	\end{proof}
	
	
	
	\section*{Appendix}
	
	~
	
	This note is written in \LaTeX.
	
	\LaTeX\ code in my blog: \url{https://blog.csdn.net/weixin_50012998/article/details/113818419}\\
	
	The webpage of the video: \url{https://www.bilibili.com/video/BV1zt411M7D2?p=7}
	
\end{document}

% Copyright 2021 Teddy van Jerry

ALL RIGHTS RESERVED © 2021 Teddy van Jerry
欢迎转载,转载请注明出处。


See also

Teddy van Jerry 的导航页

标签:usepackage,begin,end,definition,Problems,离散数学,TMA,theorem,MIT
来源: https://blog.csdn.net/weixin_50012998/article/details/113818419