Derived Variables A derived variable v is simply a function

Slides:



Advertisements
Similar presentations
The Mathematics Of 1950s Dating: Who wins the battle of the sexes? Great Theoretical Ideas In Computer Science Steven Rudich CS Spring 2003 Lecture.
Advertisements

Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.
Marriage, Honesty, & Stability N ICOLE I MMORLICA, N ORTHWESTERN U NIVERSITY.
Le Châtelier’s Principle
Tutorial 5 of CSCI2110 Eulerian Path & Hamiltonian Cycle Tutor: Zhou Hong ( 周宏 )
Selecting the the k-th smallest element in a set.
Social Networks 101 P ROF. J ASON H ARTLINE AND P ROF. N ICOLE I MMORLICA.
1 Discrete Structures & Algorithms Graphs and Trees: IV EECE 320.
Stable Marriage Problem William Kozma Jr ECE 443/543.
3 Gallon Jug5 Gallon Jug Greatest Common Divisor Lecture 8: Sep 30.
1 Bipartite Matching Polytope, Stable Matching Polytope x1 x2 x3 Lecture 10: Feb 15.
Mr. Chapman Chemistry 30.  A concentrated solution – contains a relatively large amount of solute  A dilute solution – contains a relatively small amount.
Hopefully this lesson will give you an inception of what recursion is.
The Mathematics Of Dating and Marriage: Who wins the battle of the sexes? The Mathematics Of Dating and Marriage: Who wins the battle of the sexes? (adapted.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Adapted from a presentation by Stephen Rudich.
결혼문제로 본 조합론.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Presentation by Shuchi Chawla with some modifications.
Solving Polynomial Equations – Factoring Method A special property is needed to solve polynomial equations by the method of factoring. If a ∙ b = 0 then.
Stable Matchings a.k.a. the Stable Marriage Problem
Great Theoretical Ideas in Computer Science.
Marriage and Mathematics Lau Ting Sum Samson Suen Wai.
AP Physics C Electric Circuits.
Stable Matching Lecture 7: Oct 3. Matching A B C DE Boys Girls Today’s goal: to “match” the boys and the girls in a “good” way.
Stable Marriages (Lecture modified from Carnegie Mellon University course Great Theoretical Ideas in Computer Science)
Great Theoretical Ideas in Computer Science for Some.
Matching Lecture 19: Nov 23.
Table of Contents Solving Polynomial Equations – Factoring Method A special property is needed to solve polynomial equations by the method of factoring.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? CS Lecture 2.
18.1 CompSci 102 Today’s topics 1950s TV Dating1950s TV Dating.
Electric Circuits AP Physics C. Potential Difference =Voltage=EMF In a battery, a series of chemical reactions occur in which electrons are transferred.
AF2. Turn off your phones Primes, gcd, some examples, reading.
Algorithms used by CDNs Stable Marriage Algorithm Consistent Hashing.
18.1 CompSci 102 Today’s topics Impaired wanderingImpaired wandering Instant InsanityInstant Insanity 1950s TV Dating1950s TV Dating Final Exam reviewFinal.
Dating Advice from Mathematics
If more pigeons than pigeonholes, Pigeonhole Principle.
Chapter 2.   prime number  composite number  prime factorization  factor tree  common factor  equivalent fractions  simplest form  multiple 
מתמטיקה בדידה Discrete Math Lecture 12 1 TexPoint fonts used in EMF.
Matching Boys Girls A B C D E
Cybernetica AS & Tartu University
Stable Marriage Problem
The Stable Marriage Problem
Increasing and Decreasing Functions
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes?
The Binomial Theorem.
Great Theoretical Ideas in Computer Science
Electric Circuits.
Solving Inequalities (3-2)
The Mathematics Of 1950’s Dating: Who wins The Battle of The Sexes?
Computational Processes
Discrete Mathematics for Computer Science
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes?
S. Raskhodnikova; based on slides by K. Wayne
Computational Processes II
Lesson #7 LCM and GCF.
Defining one variable in terms of another variable
EVALUATING EXPRESSIONS
Evaluating Expressions
Year 2 Autumn Term Week 13 Lesson 5
Discrete Math for CS CMPSC 360 LECTURE 9 Last time: Strong induction
13.9 Day 2 Least Squares Regression
Who does better, boys or girls?
Computational Processes II
Computational Processes
If the chance of having a boy or girl were the same, would you expect there to be more days on which at least 60% of the babies born were boys in a large.
Piyush Kumar (Lecture 3: Stable Marriage)
How to Read a.
Warm up Factor Completely 5x2 – 13x + 6 x2 – 9y2 3) y2 + 2y – 48
To Start: 10 Points Find the unit price of 40 gallons of gas for $132 $3.30 per gallon There are 64 boys and 72 girls in the 7th grade. Find the ratio.
Year 2 Summer Term Week 13 Lesson 2
Year 2 Summer Term Week 13 Lesson 2
Presentation transcript:

Derived Variables A derived variable v is simply a function that associate value with state. Die Hard Example: total amount of water in the two jugs v ::= b + l

For GCD, already have variables Derived Variables For GCD, already have variables x, y.

Derived Variables Proof of GCD termination: Show that variable y is strictly decreasing and natural number valued.

Derived Variables Termination follows by least number principle: y must take a least value, and thus the algorithm is stuck.

Strictly Decreasing Variable 16 12 8 4 State

Weakly Decreasing Variable 16 12 8 4 State

Weakly Decreasing Variable We used to call weakly decreasing variables “nonincreasing” variables. OK terminology but remember: nondecreasing is NOT EQUAL to “not decreasing.”

There are 5 girls and 5 boys Stable Marriage There are 5 girls and 5 boys 1 A 2 B 3 C 4 D 5 E

Stable Marriage Preferences: Boys Girls 1: CBEAD A: 35214 2 : ABECD B : 52143 3 : DCBAE C : 43512 4 : ACDBE D : 12345 5 : ABDEC E : 23415

Stable Marriage Preferences: Marry 1 with C: Boys 1: CBEAD 2 : ABECD 3 : DCBAE 4 : ACDBE 5 : ABDEC Marry 1 with C: 1 C

Stable Marriage Only 4 boys and 4 girls left. Boys 2 : ABED 3 : DBAE 4 : ADBE 5 : ABDE 2 3 4 5 A B D E

Stable Marriage A problem: Rogue couples 1 C 4 B Girl C likes like boy 4 better Boy 4 like girl C better

Stable marriage The mating algorithm – day by day Morning: boys serenade favorite girls Afternoon: girl rejects all but best Serenader Evening: rejected boys cross off girls

Stable marriage Termination condition: stop when no rejection is possible. The algorithm terminates. Everybody ends up married. The resulting marriages are stable.

Infinitely Wide Trees … …

Infinitely Wide Trees … …

Infinitely Wide Trees

Infinitely Wide Trees

Tutorial Problem 1