Discrete Optimization Lecture-11
|
|
- Bertha Brown
- 5 years ago
- Views:
Transcription
1 Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm 2011 () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
2 A scheduling problem Discussion A company owns 7 ships. During a 12 days period they are scheduled to visit 7 ports. See the schedule table in the next slide. Due to size limitations no two ships can dock on the same day in the same port. During this 12 days period every ship has to stop at some port and remain there for the remaining period for maintenance. So if ship S2 decides to stop on day 2 in port No. 3 it will not visit the remaining ports on its schedule and it will block the ship S3 which is not acceptable. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
3 We need to find a schedule to assign the ships to the ports according to the given schedule subject to the following rules: a. No two ships should be docked at the same port on the same day. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
4 We need to find a schedule to assign the ships to the ports according to the given schedule subject to the following rules: a. No two ships should be docked at the same port on the same day. b. Once a ship chooses a port to stop (according to its schedule) it stays there until the end of the period. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
5 We need to find a schedule to assign the ships to the ports according to the given schedule subject to the following rules: a. No two ships should be docked at the same port on the same day. b. Once a ship chooses a port to stop (according to its schedule) it stays there until the end of the period. c. No ship will interfere with the schedule of another ship; thus S5 cannot decide to stop at port 2 on day 1 because it will block S1 on day 2 or S3 on day 5. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
6 We need to find a schedule to assign the ships to the ports according to the given schedule subject to the following rules: a. No two ships should be docked at the same port on the same day. b. Once a ship chooses a port to stop (according to its schedule) it stays there until the end of the period. c. No ship will interfere with the schedule of another ship; thus S5 cannot decide to stop at port 2 on day 1 because it will block S1 on day 2 or S3 on day 5. Question This sounds like a matching problem, matching ships to ports with constraints. So how do we approach this problem? () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
7 We need to find a schedule to assign the ships to the ports according to the given schedule subject to the following rules: a. No two ships should be docked at the same port on the same day. b. Once a ship chooses a port to stop (according to its schedule) it stays there until the end of the period. c. No ship will interfere with the schedule of another ship; thus S5 cannot decide to stop at port 2 on day 1 because it will block S1 on day 2 or S3 on day 5. Question This sounds like a matching problem, matching ships to ports with constraints. So how do we approach this problem? () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
8 We need to find a schedule to assign the ships to the ports according to the given schedule subject to the following rules: a. No two ships should be docked at the same port on the same day. b. Once a ship chooses a port to stop (according to its schedule) it stays there until the end of the period. c. No ship will interfere with the schedule of another ship; thus S5 cannot decide to stop at port 2 on day 1 because it will block S1 on day 2 or S3 on day 5. Question This sounds like a matching problem, matching ships to ports with constraints. So how do we approach this problem? We can try a greedy selection: () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
9 A schedule sample A greedy selection will assign S6 to port 5 on day 12, S7 to port 6 on day 12, S5 to port 4 on day 11, S1 to port 7 on day 11 and so on? Day S1 S2 S3 S4 S5 S6 S7 1 * * 1 * 2 * * * 1 5 * * 3 3 * 5 * * * * * * 1 * 6 * 4 * * 3 7 * * * * 7 4 * * * * 11 7 * * * 12 * * * * * 5 6 () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
10 The stable marriage problem The stable marriage problem is a very famous combinatorial optimization problem with many applications. Google it and you will find hundreds of references. Basically, it is a matching problem with constraints. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
11 The stable marriage problem The stable marriage problem is a very famous combinatorial optimization problem with many applications. Google it and you will find hundreds of references. Basically, it is a matching problem with constraints. The origin of the problem is not clear. It seems that the first reference to the problem was an attempt to place medical interns in various departments in a hospital. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
12 The stable marriage problem The stable marriage problem is a very famous combinatorial optimization problem with many applications. Google it and you will find hundreds of references. Basically, it is a matching problem with constraints. The origin of the problem is not clear. It seems that the first reference to the problem was an attempt to place medical interns in various departments in a hospital. Here is what happened: Trung was placed in dermatology, but he prefered surgery. So he enquired with the surgery department, they checked the list of interns that were assigned to them and indeed found out that they prefered Trung on Hoang, so they dumped Hoang and offered Trung an internishp. Hoang was not terriby disappointed as he prefered gynecology. So he applied to them, they checked their list and found out that they liked Hoang better than Duy, so they dunped Duy and offered the internship to Hoang, so now Duy...you can imagine the rest of the story. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
13 What is a stable marriage? In 1962 David Gale and Lloyd Shapley asked whether it is possible to design an algorithm that will assign people to jobs that will be stable. That is if Duy will try to apply to surgery, surgery will not accept him becuase they prefer all their current recruits and if gynecology will try to recruit Hang she will not accept the invitation because she prefers pediatrics where she is currently accepted. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
14 What is a stable marriage? In 1962 David Gale and Lloyd Shapley asked whether it is possible to design an algorithm that will assign people to jobs that will be stable. That is if Duy will try to apply to surgery, surgery will not accept him becuase they prefer all their current recruits and if gynecology will try to recruit Hang she will not accept the invitation because she prefers pediatrics where she is currently accepted. A simple version of the problem gave it its name. Assume that we have n females and n men. Each person submits a list of preferences in which he/she lists all persons of opposite sex in order of preference. Definition A matching M is stable if it is perfect and there is no pair of matches f i m i and f j m j such that f i prefers m j over m i and m j prefers f i over f j. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
15 Example Let us match 4 couples. This is their list of preferences: 1 (3, 1, 2, 4) 1 (2, 4, 1, 3) 2 (1, 4, 3, 2) 2 (2, 1, 4, 3) 3 (3, 2, 1, 4) 3 (4, 1, 2, 3) 4 (3, 2, 4, 1) 4 (2, 1, 4, 3) () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
16 Example Let us match 4 couples. This is their list of preferences: 1 (3, 1, 2, 4) 1 (2, 4, 1, 3) 2 (1, 4, 3, 2) 2 (2, 1, 4, 3) 3 (3, 2, 1, 4) 3 (4, 1, 2, 3) 4 (3, 2, 4, 1) 4 (2, 1, 4, 3) Is the match (i, i) Stable? Try to find a a stable matching. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
17 The algorithm Given a list of preferences by n females and males does a stable marriage exist and can it be constructed efficiently. Comment Once again, we face a problem which is conceptually very simple. Try all permutations. For each permutation check whether it is stable. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
18 The algorithm Given a list of preferences by n females and males does a stable marriage exist and can it be constructed efficiently. Comment Once again, we face a problem which is conceptually very simple. Try all permutations. For each permutation check whether it is stable. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
19 The algorithm Given a list of preferences by n females and males does a stable marriage exist and can it be constructed efficiently. Comment Once again, we face a problem which is conceptually very simple. Try all permutations. For each permutation check whether it is stable. Easier said than done. Imagine doing it just for a small list of 50 pairs. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
20 The algorithm Given a list of preferences by n females and males does a stable marriage exist and can it be constructed efficiently. Comment Once again, we face a problem which is conceptually very simple. Try all permutations. For each permutation check whether it is stable. Easier said than done. Imagine doing it just for a small list of 50 pairs. The Gale-Shapley algorithm is an efficient implementation of an algorithm that also proves that a stable marriage exists regardless of the preference lists. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
21 The algorithm Given a list of preferences by n females and males does a stable marriage exist and can it be constructed efficiently. Comment Once again, we face a problem which is conceptually very simple. Try all permutations. For each permutation check whether it is stable. Easier said than done. Imagine doing it just for a small list of 50 pairs. The Gale-Shapley algorithm is an efficient implementation of an algorithm that also proves that a stable marriage exists regardless of the preference lists. During the algorihtm the men go thorugh three stages: a. Free. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
22 The algorithm Given a list of preferences by n females and males does a stable marriage exist and can it be constructed efficiently. Comment Once again, we face a problem which is conceptually very simple. Try all permutations. For each permutation check whether it is stable. Easier said than done. Imagine doing it just for a small list of 50 pairs. The Gale-Shapley algorithm is an efficient implementation of an algorithm that also proves that a stable marriage exists regardless of the preference lists. During the algorihtm the men go thorugh three stages: a. Free. b. engaged. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
23 The algorithm Given a list of preferences by n females and males does a stable marriage exist and can it be constructed efficiently. Comment Once again, we face a problem which is conceptually very simple. Try all permutations. For each permutation check whether it is stable. Easier said than done. Imagine doing it just for a small list of 50 pairs. The Gale-Shapley algorithm is an efficient implementation of an algorithm that also proves that a stable marriage exists regardless of the preference lists. During the algorihtm the men go thorugh three stages: a. Free. b. engaged. c. Matched. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
24 Gale-Shapley s algorithm () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
25 Gale-Shapley s algorithm 1 Initially all men and women are free. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
26 Gale-Shapley s algorithm 1 Initially all men and women are free. 2 Select a free man m i. Let him propose to a woman on top of his preference list among the women he has not proposed to yet. If she is free then the algorithm matches them as engaged. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
27 Gale-Shapley s algorithm 1 Initially all men and women are free. 2 Select a free man m i. Let him propose to a woman on top of his preference list among the women he has not proposed to yet. If she is free then the algorithm matches them as engaged. 3 If she is in a tentaive match with m k but she prefers m i then we engagedly match them and make m k free. Else m i remains free and we choose another man. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
28 Gale-Shapley s algorithm 1 Initially all men and women are free. 2 Select a free man m i. Let him propose to a woman on top of his preference list among the women he has not proposed to yet. If she is free then the algorithm matches them as engaged. 3 If she is in a tentaive match with m k but she prefers m i then we engagedly match them and make m k free. Else m i remains free and we choose another man. 4 When there are no more free men the algorihtm returns the list of engaged matches. This is a stable match. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
29 Analysis The algorithm has the following properties: 1 During the execution of the algorithm every man and female is in one of three stages: free, engaged or matched. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
30 Analysis The algorithm has the following properties: 1 During the execution of the algorithm every man and female is in one of three stages: free, engaged or matched. 2 Every person is engaged to at mots one other person. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
31 Analysis The algorithm has the following properties: 1 During the execution of the algorithm every man and female is in one of three stages: free, engaged or matched. 2 Every person is engaged to at mots one other person. 3 Once a female is engaged, she will remain engaged (not necessarily to the same male) till the end of the algorithm. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
32 Analysis The algorithm has the following properties: 1 During the execution of the algorithm every man and female is in one of three stages: free, engaged or matched. 2 Every person is engaged to at mots one other person. 3 Once a female is engaged, she will remain engaged (not necessarily to the same male) till the end of the algorithm. 4 Males can be engaged or become free. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
33 Analysis The algorithm has the following properties: 1 During the execution of the algorithm every man and female is in one of three stages: free, engaged or matched. 2 Every person is engaged to at mots one other person. 3 Once a female is engaged, she will remain engaged (not necessarily to the same male) till the end of the algorithm. 4 Males can be engaged or become free. 5 A step in the algorihtm is when m i proposes to w j (step number 2 in the G-S algorithm). () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
34 Analysis The algorithm has the following properties: 1 During the execution of the algorithm every man and female is in one of three stages: free, engaged or matched. 2 Every person is engaged to at mots one other person. 3 Once a female is engaged, she will remain engaged (not necessarily to the same male) till the end of the algorithm. 4 Males can be engaged or become free. 5 A step in the algorihtm is when m i proposes to w j (step number 2 in the G-S algorithm). 6 Every pair (m i, w j ) is considered at most once during the execution of the algorithm. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
35 Analysis The algorithm has the following properties: 1 During the execution of the algorithm every man and female is in one of three stages: free, engaged or matched. 2 Every person is engaged to at mots one other person. 3 Once a female is engaged, she will remain engaged (not necessarily to the same male) till the end of the algorithm. 4 Males can be engaged or become free. 5 A step in the algorihtm is when m i proposes to w j (step number 2 in the G-S algorithm). 6 Every pair (m i, w j ) is considered at most once during the execution of the algorithm. 7 At the end of the algorithm everyone will be engaged. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
36 Analysis Discussion () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
37 Analysis Discussion A1. Since there are n 2 distinct pairs and each pair is considered at most once, the algorithn executes at most n 2 steps, in other words, it is efficient. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
38 Analysis Discussion A1. Since there are n 2 distinct pairs and each pair is considered at most once, the algorithn executes at most n 2 steps, in other words, it is efficient. A2. By the end of the algorithm, if a free man remains, there will also be a free woman. So he will be able to propose to her. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
39 Analysis Discussion A1. Since there are n 2 distinct pairs and each pair is considered at most once, the algorithn executes at most n 2 steps, in other words, it is efficient. A2. By the end of the algorithm, if a free man remains, there will also be a free woman. So he will be able to propose to her. A3. We still need to prove that a stable matching will be produced by the algorithm. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
40 Analysis Discussion A1. Since there are n 2 distinct pairs and each pair is considered at most once, the algorithn executes at most n 2 steps, in other words, it is efficient. A2. By the end of the algorithm, if a free man remains, there will also be a free woman. So he will be able to propose to her. A3. We still need to prove that a stable matching will be produced by the algorithm. Theorem The gale-shapley algorithm produces a stable marriage. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
41 We can prove this by induction. Remark We first note that if there are k stable engagements and m k+1 proposes to w and w is free, then adding the pair (m k+1, w) cannot cause an instability because none of the men on w s preference list that she prefers over m k+1 proposed to her earlier, or she would not be free. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
42 Chứng minh. Induction hypothesis: When the algorithm engages k pairs, the engagements are stable. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
43 Chứng minh. Induction hypothesis: When the algorithm engages k pairs, the engagements are stable. 1 Obviously true for k = 1. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
44 Chứng minh. Induction hypothesis: When the algorithm engages k pairs, the engagements are stable. 1 Obviously true for k = 1. 2 Assume true for k = m and we now execute step 2 in the algorithm. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
45 Chứng minh. Induction hypothesis: When the algorithm engages k pairs, the engagements are stable. 1 Obviously true for k = 1. 2 Assume true for k = m and we now execute step 2 in the algorithm. 3 m k+1 is proposing to w. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
46 Chứng minh. Induction hypothesis: When the algorithm engages k pairs, the engagements are stable. 1 Obviously true for k = 1. 2 Assume true for k = m and we now execute step 2 in the algorithm. 3 m k+1 is proposing to w. 4 If she is free then they become engaged and clearly there is no in-stability in this engagement. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
47 Chứng minh. Induction hypothesis: When the algorithm engages k pairs, the engagements are stable. 1 Obviously true for k = 1. 2 Assume true for k = m and we now execute step 2 in the algorithm. 3 m k+1 is proposing to w. 4 If she is free then they become engaged and clearly there is no in-stability in this engagement. 5 If she is engaged and prefers m k+1 she will become engaged to him. So we still have only k stable engagements. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
48 Chứng minh. Induction hypothesis: When the algorithm engages k pairs, the engagements are stable. 1 Obviously true for k = 1. 2 Assume true for k = m and we now execute step 2 in the algorithm. 3 m k+1 is proposing to w. 4 If she is free then they become engaged and clearly there is no in-stability in this engagement. 5 If she is engaged and prefers m k+1 she will become engaged to him. So we still have only k stable engagements. 6 Since every male has all n females on his list of preferences and only k females are engaged, this process cannot cycle indefinitely. Eventually the k + 1 attempt to add a stable engagement wil succeed by finding a free female in his list. () Discrete Optimization Lecture-11 Ngày 2 tháng 11 năm / 12
Graph Theory II. Po-Shen Loh. June edges each. Solution: Spread the n vertices around a circle. Take parallel classes.
Graph Theory II Po-Shen Loh June 009 1 Warm-up 1. Let n be odd. Partition the edge set of K n into n matchings with n 1 edges each. Solution: Spread the n vertices around a circle. Take parallel classes..
More information1 The Arthur-Merlin Story
Comp 260: Advanced Algorithms Tufts University, Spring 2011 Prof. Lenore Cowen Scribe: Andrew Winslow Lecture 1: Perfect and Stable Marriages 1 The Arthur-Merlin Story In the land ruled by the legendary
More informationMatchings, Ramsey Theory, And Other Graph Fun
Matchings, Ramsey Theory, And Other Graph Fun Evelyne Smith-Roberge University of Waterloo April 5th, 2017 Recap... In the last two weeks, we ve covered: What is a graph? Eulerian circuits Hamiltonian
More informationNetwork Flow. November 23, CMPE 250 Graphs- Network Flow November 23, / 31
Network Flow November 23, 2016 CMPE 250 Graphs- Network Flow November 23, 2016 1 / 31 Types of Networks Internet Telephone Cell Highways Rail Electrical Power Water Sewer Gas... CMPE 250 Graphs- Network
More informationREU 2006 Discrete Math Lecture 5
REU 2006 Discrete Math Lecture 5 Instructor: László Babai Scribe: Megan Guichard Editors: Duru Türkoğlu and Megan Guichard June 30, 2006. Last updated July 3, 2006 at 11:30pm. 1 Review Recall the definitions
More informationTheorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path.
3 Matchings Hall s Theorem Matching: A matching in G is a subset M E(G) so that no edge in M is a loop, and no two edges in M are incident with a common vertex. A matching M is maximal if there is no matching
More informationAPPLIED MECHANISM DESIGN FOR SOCIAL GOOD
APPLIED MECHANISM DESIGN FOR SOCIAL GOOD JOHN P DICKERSON Lecture #8 09/22/2016 CMSC828M Tuesdays & Thursdays 12:30pm 1:45pm LET S TALK ABOUT PROJECTS 2 THIS CLASS: MATCHING & NOT THE NRMP 3 OVERVIEW OF
More informationBalls Into Bins Model Occupancy Problems
Balls Into Bins Model Occupancy Problems Assume that m balls are thrown randomly is n bins, i.e., the location of each ball is independently and uniformly chosen at random from the n possibilities. How
More informationDiscrete Mathematics and Probability Theory Summer 2016 Dinh, Psomas, and Ye HW 2
CS 70 Discrete Mathematics and Probability Theory Summer 2016 Dinh, Psomas, and Ye HW 2 Due Tuesday July 5 at 1:59PM 1. (8 points: 3/5) Hit or miss For each of the claims and proofs below, state whether
More informationMatchings. Saad Mneimneh
Matchings Saad Mneimneh 1 Stable matching Consider n men and n women. A matching is a one to one correspondence between the men and the women. In finding a matching, however, we would like to respect the
More informationLecture 7: Bipartite Matching
Lecture 7: Bipartite Matching Bipartite matching Non-bipartite matching What is a Bipartite Matching? Let G=(N,A) be an unrestricted bipartite graph. A subset X of A is said to be a matching if no two
More informationAssignment and Matching
Assignment and Matching By Geetika Rana IE 680 Dept of Industrial Engineering 1 Contents Introduction Bipartite Cardinality Matching Problem Bipartite Weighted Matching Problem Stable Marriage Problem
More informationOn Galvin s Theorem and Stable Matchings. Adam Blumenthal
On Galvin s Theorem and Stable Matchings by Adam Blumenthal A thesis submitted to the Graduate Faculty of Auburn University in partial fulfillment of the requirements for the Degree of Master of Science
More informationMath and Marriage - Don t Call a Lawyer Yet!
Math and Marriage - Don t Call a Lawyer Yet! Ron Gould Emory University Supported by the Heilbrun Distinguished Emeritus Fellowship October 7,27 Philip Hall, 935 Definition By a system of distinct representatives
More information2. Matching. Maximum bipartite matchings. Stable marriage problem. Matching 2-1
Matching 2-1 2. Matching Maximum bipartite matchings Stable marriage problem Matching 2-2 Matching in graphs given a graph G = (V ; E), a matching M = fe 1; : : :g E is a subset of edges such that no two
More informationReading 1 : Introduction
CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti and Gautam Prakriya Reading 1 : Introduction Welcome to CS 240, an introduction to discrete mathematics. This reading
More informationDiscrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Midterm 1
CS 70 Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Midterm 1 PRINT Your Name:, (last) SIGN Your Name: (first) PRINT Your Student ID: CIRCLE your exam room: 1 Pimentel 141 Mccone
More informationCopyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.
Iterative Improvement Algorithm design technique for solving optimization problems Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible
More informationMC302 GRAPH THEORY Thursday, 10/24/13
MC302 GRAPH THEORY Thursday, 10/24/13 Today: Return, discuss HW 3 From last time: Greedy Algorithms for TSP Matchings and Augmenting Paths HW 4 will be posted by tomorrow Reading: [CH] 4.1 Exercises: [CH]
More informationInduction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets
EECS 310: Discrete Math Lecture 5 Graph Theory, Matching Reading: MIT OpenCourseWare 6.042 Chapter 5.1-5.2 Induction Review Basic Induction: Want to prove P (n). Prove base case P (1). Prove P (n) P (n+1)
More informationCPSC W1: Midterm #1
CPSC 320 2016W1: Midterm #1 2016-10-20 Thu 1 O'd to a Pair of Runtimes [10 marks] Consider the following pairs of functions (representing algorithm runtimes), expressed in terms of the positive variables
More informationMidterm 1. Replace by cover page.
Midterm 1 Replace by cover page. Replace by conduct during examinations page. WRITE UGRAD IDs HERE (-1 mark if any missing or incorrect; use only the boxes you need) UGRAD ID #1: UGRAD ID #2: UGRAD ID
More informationLet s Talk About Logic
Let s Talk About Logic Jan van Eijck CWI & ILLC, Amsterdam Masterclass Logica, 2 Maart 2017 Abstract This lecture shows how to talk about logic in computer science. To keep things simple, we will focus
More informationSources for this lecture. 3. Matching in bipartite and general graphs. Symmetric difference
S-72.2420 / T-79.5203 Matching in bipartite and general graphs 1 3. Matching in bipartite and general graphs Let G be a graph. A matching M in G is a set of nonloop edges with no shared endpoints. Let
More informationCPSC W1: Midterm #1 (Group Version) Thu
CPSC 320 2016W1: Midterm #1 (Group Version) 2016-10-20 Thu 1 2 1 O'd to a Pair of Runtimes [10 marks] Consider the following pairs of functions (representing algorithm runtimes), expressed in terms of
More informationCPSC 320 Midterm #1. February 4, 2015
CPSC 320 Midterm #1 February 4, 2015 1 2 Reminders (but do not miss the problem also on this page!): ˆ f(n) O(g(n)) (big-o, that is) exactly when there is a positive real constant c and positive integer
More informationDiscrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1
CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 PRINT Your Name:, (last) READ AND SIGN The Honor Code: As a member of the UC Berkeley community, I act with honesty,
More informationGreedy Homework Problems
CS 1510 Greedy Homework Problems 1. (2 points) Consider the following problem: INPUT: A set S = {(x i, y i ) 1 i n} of intervals over the real line. OUTPUT: A maximum cardinality subset S of S such that
More informationGraph Theory: Matchings and Factors
Graph Theory: Matchings and Factors Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT Kharagpur pallab@cse.iitkgp.ernet.in Matchings A matching of size k in a graph G is a set of k
More informationPart 1. An Implementation of the Gale-Shapley Algorithm
Part 1 An Implementation of the Gale-Shapley Algorithm CSCI 3110 Code Fall 2015 1 Introduction Here s the pseudo-code of the Gale-Shapley algorithm from class: GALESHAPLEY(M, W ) while there is an unmarried
More informationCS483 Analysis of Algorithms Lecture 09 Linear Programming 01
CS483 Analysis of Algorithms Lecture 09 Linear Programming 01 Jyh-Ming Lien April 09, 2009 this lecture note is based on Algorithms by S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani and to the Design
More informationA Random Walk through CS70
A Random Walk through CS70 CS70 Summer 2016 - Lecture 8B David Dinh 09 August 2016 UC Berkeley 1 Today (and tomorrow, and Wednesday) Review: what have we done in class? Future classes: where do you go
More informationMatching and Covering
Matching and Covering Matchings A matching of size k in a graph G is a set of k pairwise disjoint edges The vertices belonging to the edges of a matching are saturated by the matching; the others are unsaturated
More informationImplementing Algorithms
Implementing Algorithms 1 Data Structures implementing algorithms arrays and linked lists 2 Implementing the Gale-Shapley algorithm selecting data structures overview of the selected data structures 3
More informationLecture 6: Graph Properties
Lecture 6: Graph Properties Rajat Mittal IIT Kanpur In this section, we will look at some of the combinatorial properties of graphs. Initially we will discuss independent sets. The bulk of the content
More informationReview for Midterm Exam
Review for Midterm Exam 1 Policies and Overview midterm exam policies overview of problems, algorithms, data structures overview of discrete mathematics 2 Sample Questions on the cost functions of algorithms
More information5 Matchings in Bipartite Graphs and Their Applications
5 Matchings in Bipartite Graphs and Their Applications 5.1 Matchings Definition 5.1 A matching M in a graph G is a set of edges of G, none of which is a loop, such that no two edges in M have a common
More informationToday. Finish Euclid. Bijection/CRT/Isomorphism. Review for Midterm.
Today Finish Euclid. Bijection/CRT/Isomorphism. Review for Midterm. Finding an inverse? We showed how to efficiently tell if there is an inverse. Extend euclid to find inverse. Euclid s GCD algorithm.
More informationModule 7. Independent sets, coverings. and matchings. Contents
Module 7 Independent sets, coverings Contents and matchings 7.1 Introduction.......................... 152 7.2 Independent sets and coverings: basic equations..... 152 7.3 Matchings in bipartite graphs................
More informationConnecting Statements. Today. First there was logic jumping forward.. ..and then proofs and then induction...
Today Review for Midterm. First there was logic... A statement is a true or false. Statements? 3 = 4 1? Statement! 3 = 5? Statement! 3? Not a statement! n = 3? Not a statement...but a predicate. Predicate:
More information1 / 43. Today. Finish Euclid. Bijection/CRT/Isomorphism. Fermat s Little Theorem. Review for Midterm.
1 / 43 Today Finish Euclid. Bijection/CRT/Isomorphism. Fermat s Little Theorem. Review for Midterm. 2 / 43 Finding an inverse? We showed how to efficiently tell if there is an inverse. Extend euclid to
More information1. (15 points) Solve the decanting problem for containers of sizes 199 and 179; that is find integers x and y satisfying.
May 9, 2003 Show all work Name There are 260 points available on this test 1 (15 points) Solve the decanting problem for containers of sizes 199 and 179; that is find integers x and y satisfying where
More informationCPSC W1: Midterm 1 Sample Solution
CPSC 320 2017W1: Midterm 1 Sample Solution January 26, 2018 Problem reminders: EMERGENCY DISTRIBUTION PROBLEM (EDP) EDP's input is an undirected, unweighted graph G = (V, E) plus a set of distribution
More informationReview implementation of Stable Matching Survey of common running times. Turn in completed problem sets. Jan 18, 2019 Sprenkle - CSCI211
Objectives Review implementation of Stable Matching Survey of common running times Turn in completed problem sets Jan 18, 2019 Sprenkle - CSCI211 1 Review: Asymptotic Analysis of Gale-Shapley Alg Not explicitly
More informationFinite Termination of Augmenting Path Algorithms in the Presence of Irrational Problem Data
Finite Termination of Augmenting Path Algorithms in the Presence of Irrational Problem Data Brian C. Dean Michel X. Goemans Nicole Immorlica June 28, 2006 Abstract This paper considers two similar graph
More informationPackage matchingr. January 26, 2018
Type Package Title Matching Algorithms in R and C++ Version 1.3.0 Date 2018-01-26 Author Jan Tilly, Nick Janetos Maintainer Jan Tilly Package matchingr January 26, 2018 Computes matching
More informationProblem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel.
CS261, Winter 2017. Instructor: Ashish Goel. Problem set 2 Electronic submission to Gradescope due 11:59pm Thursday 2/16. Form a group of 2-3 students that is, submit one homework with all of your names.
More informationSTABILITY AND PARADOX IN ALGORITHMIC LOGIC
STABILITY AND PARADOX IN ALGORITHMIC LOGIC WAYNE AITKEN, JEFFREY A. BARRETT Abstract. Algorithmic logic is the logic of basic statements concerning algorithms and the algorithmic rules of deduction between
More information5 Graph Theory. 5.1 Definitions Simple Graphs. mcs-ftl 2010/9/8 0:40 page 121 #127
mcs-ftl 2010/9/8 0:40 page 121 #127 5 Graph Theory Informally, a graph is a bunch of dots and lines where the lines connect some pairs of dots. An example is shown in Figure 5.1. The dots are called nodes
More informationThe College Admissions Problem Reconsidered
The College Admissions Problem Reconsidered Zhenhua Jiao School of Economics Shanghai University of Finance and Economics Shanghai, 200433, China Guoqiang Tian Department of Economics Texas A&M University
More informationCS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018
CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Recap: Stable Matching Problem Definition of a Stable Matching Stable Roomate Matching Problem Stable matching does not
More informationCPSC 536N: Randomized Algorithms Term 2. Lecture 5
CPSC 536N: Randomized Algorithms 2011-12 Term 2 Prof. Nick Harvey Lecture 5 University of British Columbia In this lecture we continue to discuss applications of randomized algorithms in computer networking.
More informationReal-World Applications of Graph Theory
Real-World Applications of Graph Theory St. John School, 8 th Grade Math Class February 23, 2018 Dr. Dave Gibson, Professor Department of Computer Science Valdosta State University 1 What is a Graph? A
More informationOn the Stable Marriage of Maximum Weight Royal Couples
On the Stable Marriage of Maximum Weight Royal Couples Anan Marie, Avigdor Gal Technion Israel Institute of Technology Haifa 32000, Israel {sananm@cs,avigal@ie}.technion.ac.il Abstract In this paper we
More informationSeptember 4, Input: two strings s 1 and s 2 of length n. s 1 = AGGCTACC s 2 = CAGGCTAC
COMPSCI 311: Introduction to Algorithms COMPSCI 311: Introduction to Algorithms Marius Minea marius@cs.umass.edu University of Massachusetts Amherst slides credit: Akshay Krishnamurthy, Andrew McGregor,
More informationApplications of Linear Programming
Applications of Linear Programming lecturer: András London University of Szeged Institute of Informatics Department of Computational Optimization Lecture 6 based on Juraj Stacho s lecture notes ad the
More informationFinding a princess in a palace: A pursuit evasion problem
Finding a princess in a palace: A pursuit evasion problem John R. Britnell Department of Mathematics Imperial College London London SW7 2AZ United Kingdom j.britnell@imperial.ac.uk Mark Wildon Department
More informationCs445 Homework #1. Due 9/9/ :59 pm DRAFT
Cs5 Homework #. Due 9/9/06 :59 pm DRAFT Instructions.. Solution may not be submitted by students in pairs.. You may submit a pdf of the homework, either printed or hand-written and scanned, as long as
More informationStable Marriage Problem Based Adaptation for Clone Detection and Service Selection
Stable Marriage Problem Based Adaptation for Clone Detection and Service Selection Hosam Hasan M. Al Hakami STRL De Montfort University This thesis is submitted in partial fulfilment of the requirements
More informationDiscrete Mathematics and Probability Theory Fall 2015 Rao Midterm 1
CS 70 Discrete Mathematics and Probability Theory Fall 2015 Rao Midterm 1 PRINT Your Name:, (last) SIGN Your Name: (first) PRINT Your Student ID: CIRCLE your exam room: 2050 VLSB A1 Hearst Annex 120 Latimer
More informationGraph Theory Part A. Peter Keevash
Graph Theory Part A Peter Keevash This course provides a short introduction to Graph Theory (the mathematical theory of networks ). Our approach will be to develop the theory as it is needed for the rigorous
More informationBasic Graph Theory with Applications to Economics
Basic Graph Theory with Applications to Economics Debasis Mishra February 6, What is a Graph? Let N = {,..., n} be a finite set. Let E be a collection of ordered or unordered pairs of distinct elements
More informationBasic Graph Theory with Applications to Economics
Basic Graph Theory with Applications to Economics Debasis Mishra February, 0 What is a Graph? Let N = {,..., n} be a finite set. Let E be a collection of ordered or unordered pairs of distinct elements
More information(Refer Slide Time: 00:18)
Programming, Data Structures and Algorithms Prof. N. S. Narayanaswamy Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 11 Lecture 58 Problem: single source shortest
More informationDiscrete Structures. Fall Homework3
Discrete Structures Fall 2015 Homework3 Chapter 5 1. Section 5.1 page 329 Problems: 3,5,7,9,11,15 3. Let P(n) be the statement that 1 2 + 2 2 + +n 2 = n(n + 1)(2n + 1)/6 for the positive integer n. a)
More informationCoalitional Permutation Manipulations in the Gale-Shapley Algorithm
Coalitional Permutation Manipulations in the Gale-Shapley Algorithm Yuan Deng Duke University ericdy@cs.duke.edu Weiran Shen IIIS, Tsinghua University emersonswr@gmail.com Pingzhong Tang IIIS, Tsinghua
More informationTheorem 2.9: nearest addition algorithm
There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used
More informationCSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD
Recap. Growth rates: Arrange the following functions in ascending order of growth rate: n 2 log n n log n 2 log n n/ log n n n Introduction Algorithm: A step-by-step way of solving a problem. Design of
More information1.1 Reasons for choosing this project
Chapter 1 Introduction 1.1 Reasons for choosing this project Constraint Satisfaction is an area of operational research which particularly interests me. In my second year at university, I studied computing
More informationInterlude: Problem Solving
Lecture 4 Interlude: Problem Solving Supplemental reading in CLRS: None This lecture was originally given as a pep talk before the take-home exam. In note form, this chapter will be light reading, a break
More informationLECTURE NOTES OF ALGORITHMS: DESIGN TECHNIQUES AND ANALYSIS
Department of Computer Science University of Babylon LECTURE NOTES OF ALGORITHMS: DESIGN TECHNIQUES AND ANALYSIS By Faculty of Science for Women( SCIW), University of Babylon, Iraq Samaher@uobabylon.edu.iq
More information(Refer Slide Time: 06:01)
Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 28 Applications of DFS Today we are going to be talking about
More informationIntroduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16
600.463 Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16 11.1 Introduction Dynamic programming can be very confusing until you ve used it a
More informationER modeling. Lecture 4
ER modeling Lecture 4 1 Copyright 2007 STI - INNSBRUCK Today s lecture ER modeling Slides based on Introduction to Entity-relationship modeling at http://www.inf.unibz.it/~franconi/teaching/2000/ct481/er-modelling/
More informationEfficiency and Respecting Improvements in College Admissions
Efficiency and Respecting Improvements in College Admissions Zhenhua Jiao School of Economics Shanghai University of Finance and Economics Shanghai, 200433, China Guoqiang Tian Department of Economics
More informationNgày 9 tháng 12 năm Discrete Mathematics Lecture-15
Discrete Mathematics Lecture-15 Ngày 9 tháng 12 năm 2011 ex ex ex a 1 mod b (gcd(a,b) = 1) ex a 1 mod b (gcd(a,b) = 1) Returns an integer c < b such that a c mod b = 1. ex a 1 mod b (gcd(a,b) = 1) Returns
More informationData Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.
Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 18 Tries Today we are going to be talking about another data
More informationTask Assignment Problem in Camera Networks
Task Assignment Problem in Camera Networks Federico Cerruti Mirko Fabbro Chiara Masiero Corso di laurea in Ingegneria dell Automazione Università degli Studi di Padova Progettazione di sistemi di controllo
More informationMatching Theory. Figure 1: Is this graph bipartite?
Matching Theory 1 Introduction A matching M of a graph is a subset of E such that no two edges in M share a vertex; edges which have this property are called independent edges. A matching M is said to
More information6 Extensive Form Games
6 Extensive Form Games 6.1 Example: Representing a Simultaneous 22 Game Alice H HHHH O H HH o Q Bob H QQQ h o HHHH h 2 1 1 2 Figure 1: The Battle of the Sexes in Extensive Form So far we have described
More informationMatchings and Covers in bipartite graphs
Matchings and Covers in bipartite graphs A bipartite graph, also called a bigraph, is a set of graph vertices decomposed into two disjoint sets such that no two graph vertices within the same set are adjacent.
More informationHomework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08
Homework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08 1. Signatures and Attacks Recall that to use the ElGamal signature scheme, Alice randomly selects her private signing key x
More informationLecture 4: examples of topological spaces, coarser and finer topologies, bases and closed sets
Lecture 4: examples of topological spaces, coarser and finer topologies, bases and closed sets Saul Glasman 14 September 2016 Let s give the definition of an open subset of R. Definition 1. Let U R. We
More informationSolutions to Math 381 Quiz 2
Solutions to Math 381 Quiz 2 November 7, 2018 (1) In one sentence, what is the goal of your class project? Each team has a different answer here. (2) Write a function in Python which computes a linear
More informationThe vertex set is a finite nonempty set. The edge set may be empty, but otherwise its elements are two-element subsets of the vertex set.
Math 3336 Section 10.2 Graph terminology and Special Types of Graphs Definition: A graph is an object consisting of two sets called its vertex set and its edge set. The vertex set is a finite nonempty
More informationMinimum Maximal Matching Is NP-Hard in Regular Bipartite Graphs
Minimum Maximal Matching Is NP-Hard in Regular Bipartite Graphs M. Demange 1 and T. Ekim 2, 1 ESSEC Business School, Avenue Bernard HIRSH, BP 105, 95021 Cergy Pontoise cedex France demange@essec.fr 2 Boğaziçi
More information1 A Tale of Two Lovers
CS 120/ E-177: Introduction to Cryptography Salil Vadhan and Alon Rosen Dec. 12, 2006 Lecture Notes 19 (expanded): Secure Two-Party Computation Recommended Reading. Goldreich Volume II 7.2.2, 7.3.2, 7.3.3.
More informationMathematical and Algorithmic Foundations Linear Programming and Matchings
Adavnced Algorithms Lectures Mathematical and Algorithmic Foundations Linear Programming and Matchings Paul G. Spirakis Department of Computer Science University of Patras and Liverpool Paul G. Spirakis
More informationCounting. Ngày 29 tháng 10 năm Counting
Ngày 29 tháng 10 năm 2010 Question What do we count? Question What do we count? Question What do we count? Question Why do we count? Question What do we count? Question Why do we count? Question What do
More informationthe Computability Hierarchy
2013 0 the Computability Hierarchy Eric Hehner Department of Computer Science, University of Toronto hehner@cs.utoronto.ca Abstract A computability hierarchy cannot be constructed by halting oracles. Introduction
More informationSolution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343
DISCRETE MATHEMATICS HOMEWORK 5 SOL Undergraduate Course College of Computer Science Zhejiang University Fall-Winter 2014 HOMEWORK 5 P344 1. There are 18 mathematics majors and 325 computer science majors
More information1. Solve the following linear programming problems geometrically. maximize 3x + y subject to x + y 1 2x + y 4. maximize x +2y subject to 4x y y 3+x
This file contains the exercises, hints, and solutions for Chapter 0 of the book Introduction to the Design and Analysis of Algorithms, 2nd edition, by A. Levitin. The problems that might be challenging
More information2. Lecture notes on non-bipartite matching
Massachusetts Institute of Technology 18.433: Combinatorial Optimization Michel X. Goemans February 15th, 013. Lecture notes on non-bipartite matching Given a graph G = (V, E), we are interested in finding
More informationCluster-based Similarity Aggregation for Ontology Matching
Cluster-based Similarity Aggregation for Ontology Matching Quang-Vinh Tran 1, Ryutaro Ichise 2, and Bao-Quoc Ho 1 1 Faculty of Information Technology, Ho Chi Minh University of Science, Vietnam {tqvinh,hbquoc}@fit.hcmus.edu.vn
More informationGAME CHROMATIC NUMBER OF CARTESIAN PRODUCT GRAPHS. 1. Introduction
GAME CHROMATIC NUMBER OF CARTESIAN PRODUCT GRAPHS T. BARTNICKI, B. BREŠAR, J. GRYTCZUK, M. KOVŠE, Z. MIECHOWICZ, AND I. PETERIN Abstract. The game chromatic number χ g is considered for the Cartesian product
More informationGreedy Algorithms CHAPTER 16
CHAPTER 16 Greedy Algorithms In dynamic programming, the optimal solution is described in a recursive manner, and then is computed ``bottom up''. Dynamic programming is a powerful technique, but it often
More informationExtremal Graph Theory: Turán s Theorem
Bridgewater State University Virtual Commons - Bridgewater State University Honors Program Theses and Projects Undergraduate Honors Program 5-9-07 Extremal Graph Theory: Turán s Theorem Vincent Vascimini
More informationV1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0).
CS4234: Optimisation Algorithms Lecture 4 TRAVELLING-SALESMAN-PROBLEM (4 variants) V1.0: Seth Gilbert, V1.1: Steven Halim August 30, 2016 Abstract The goal of the TRAVELLING-SALESMAN-PROBLEM is to find
More informationThe Entity-Relationship (ER) Model
The Entity-Relationship (ER) Model Week 1-2 Professor Jessica Lin The E-R Model 2 The E-R Model The Entity-Relationship Model The E-R (entity-relationship) data model views the real world as a set of basic
More informationProperties of matching algorithm in college admission problem with variable capacity quotas. Robert Golański Warsaw School of Economics
Properties of matching algorithm in college admission problem with variable capacity quotas Robert Golański Warsaw School of Economics Social Choice and Welfare Moscow, July 2010 1 College admission problem:
More information