SlideShare a Scribd company logo
1 of 24
Download to read offline
Optimisation

                Dr. Stuart Mitchell
                       LMRC
               University of Auckland
               s.mitchell@auckland.ac.nz
                    Kiwi Pycon 2009
Contents of presentation
What is Mathematical Programing
        When is it useful
 The Wedding Guest Problem
What is Mathematical programing
• A simple mathematically precise way of stating
  optimisation problems.
• Use mathematically rigorous way to find a
  solution
30 teams – 162 games
What is Mathematical programing
• A simple mathematically precise way of stating
  optimisation problems.
• Use mathematically rigorous way to find a
  solution
What is Mathematical programing
• A simple mathematically precise way of stating
  optimisation problems.
• Use mathematically rigorous way to find a
  solution
When is it useful
• There is a decision problem



• There is lots of data



• There is money to be made
The wedding guest problem
• Similar to work at LMRC
• A wedding planner whats to
  work out seating allocations
              http://weddingelegante.com
    * Tables near the head table (or sweetheart table) should be reserved for your
 closest family and friends
    * If you’re using round tables, you should generally assign males and females
 to alternating seats
    * Don’t forget to use your guests’ ages and interests when assigning
    * Grouping your guests into identifiable cliques (grooms college friends, work
 colleagues, friends of your parents, etc.) will make grouping guests together at
 specific tables easier
    * Seat children under 8 years of age at the same table as their parents, but if
 you’re expecting a great deal of 8+ children to attend, you may consider creating
 a “kids-only” table
    * Leave 2-3 tables empty for vendors during their breaks or for unexpected
 guests
    * Have a large diagram of the completed seating chart on hand at the
 reception venue on your wedding day to solve any confusion
The wedding guest problem
• We need to define
  – A solution – what is the result
    we want
The wedding guest problem
• We need to define
  – A solution – what is the result
    we want
  – Variables – parts of the
    solution
The wedding guest problem
• We need to define
  – A solution – what is the result
    we want
  – Variables – parts of the solution
  – Objective function – how to
    compare solutions
The wedding guest problem
• We need to define
  – A solution – what is the result
    we want
  – Variables – parts of the solution
  – Objective function – how to
    compare solutions
  – Constraints – define a solution
     • In terms of the variables
Mathematical expression of the problem
• This is a set partitioning problem.
   – We wish to partition the set of guests into
     subsets of tables.
   – We wish to maximise happiness of the tables.
   – We want everyone to be seated at exactly one
     table.
• This is implemented in the following python code
Wedding Planning Formulation
Let guests be the set of all guests.
Wedding Planning Formulation
Use pulp.allcombinations to generate a list of all
possible table seatings.
Wedding Planning Formulation
  Then we create a binary variable that will be 1 if
the table will be in the solution, or zero
Wedding Planning Formulation
  We create the LpProblem and then make the
objective function.
Wedding Planning Formulation
  We create the LpProblem and then make the
objective function.
Wedding Planning Formulation
 We specify the total number of tables allowed in
the solution.
Wedding Planning Formulation
 Multiple similar constraints (one of each guest)
guarantee that a guest is allocated to exactly one
table.
Wedding Planning Formulation
Solve the problem and print out an answer.




   The choosen tables are out of a total of 3213:
   ('M', 'N')
   ('E', 'F', 'G')
   ('A', 'B', 'C', 'D')
   ('I', 'J', 'K', 'L')
   ('O', 'P', 'Q', 'R')
Why Pulp
• MIT Licence

• Installation (google-code or pypi)

• Syntax

• Interoperabilty

• Documentation
Next time you are talking to a client
• Is there a decision problem?



• Is there lots of data?



• Is there money to be made?

More Related Content

What's hot

Unit 11.3 probability of multiple events
Unit 11.3 probability of multiple eventsUnit 11.3 probability of multiple events
Unit 11.3 probability of multiple eventsMark Ryder
 
5.3 dynamic programming
5.3 dynamic programming5.3 dynamic programming
5.3 dynamic programmingKrish_ver2
 
How to jump into Data Science
How to jump into Data ScienceHow to jump into Data Science
How to jump into Data ScienceYury Kashnitsky
 
Addition et soustraction des nombres relatifs Classe EB7
Addition et soustraction des nombres relatifs Classe EB7Addition et soustraction des nombres relatifs Classe EB7
Addition et soustraction des nombres relatifs Classe EB7Maths avec TOMKO
 
Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Hasanain Alshadoodee
 
Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure  Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure Rabin BK
 
Probability with Cards
Probability with CardsProbability with Cards
Probability with Cardsianrhunter
 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principlenielsoli
 
Index Notation
Index NotationIndex Notation
Index Notationalphamaths
 
Row Reducing
Row ReducingRow Reducing
Row Reducingnicholsm
 
9781337102087 ppt ch04
9781337102087 ppt ch049781337102087 ppt ch04
9781337102087 ppt ch04Terry Yoast
 

What's hot (20)

8709508
87095088709508
8709508
 
Unit 11.3 probability of multiple events
Unit 11.3 probability of multiple eventsUnit 11.3 probability of multiple events
Unit 11.3 probability of multiple events
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
 
5.3 dynamic programming
5.3 dynamic programming5.3 dynamic programming
5.3 dynamic programming
 
How to jump into Data Science
How to jump into Data ScienceHow to jump into Data Science
How to jump into Data Science
 
Kruskal Algorithm
Kruskal AlgorithmKruskal Algorithm
Kruskal Algorithm
 
Prim's algorithm
Prim's algorithmPrim's algorithm
Prim's algorithm
 
Addition et soustraction des nombres relatifs Classe EB7
Addition et soustraction des nombres relatifs Classe EB7Addition et soustraction des nombres relatifs Classe EB7
Addition et soustraction des nombres relatifs Classe EB7
 
Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking 
 
Math tricks
Math tricksMath tricks
Math tricks
 
Dijkstra.ppt
Dijkstra.pptDijkstra.ppt
Dijkstra.ppt
 
Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure  Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure
 
Introduction to Rational numbers
Introduction to Rational numbersIntroduction to Rational numbers
Introduction to Rational numbers
 
Recursion DM
Recursion DMRecursion DM
Recursion DM
 
Math is Fun!
Math is Fun!Math is Fun!
Math is Fun!
 
Probability with Cards
Probability with CardsProbability with Cards
Probability with Cards
 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principle
 
Index Notation
Index NotationIndex Notation
Index Notation
 
Row Reducing
Row ReducingRow Reducing
Row Reducing
 
9781337102087 ppt ch04
9781337102087 ppt ch049781337102087 ppt ch04
9781337102087 ppt ch04
 

Similar to Optimising Wedding Seating With Mathematical Programming

computational_thinking_gcse.pptx
computational_thinking_gcse.pptxcomputational_thinking_gcse.pptx
computational_thinking_gcse.pptxbirulangit23
 
Creating Presentations That Matter - A 1-day workshop (May 4th) at SVC
Creating Presentations That Matter - A 1-day workshop (May 4th) at SVCCreating Presentations That Matter - A 1-day workshop (May 4th) at SVC
Creating Presentations That Matter - A 1-day workshop (May 4th) at SVCAshley Bright
 
Uxhk 2015art of start workshop share.key
Uxhk 2015art of start workshop share.keyUxhk 2015art of start workshop share.key
Uxhk 2015art of start workshop share.keyTed Kilian
 
Mini-Training: Using root-cause analysis for problem management
Mini-Training: Using root-cause analysis for problem managementMini-Training: Using root-cause analysis for problem management
Mini-Training: Using root-cause analysis for problem managementBetclic Everest Group Tech Team
 
Project Management Solutions Webinar
Project Management Solutions WebinarProject Management Solutions Webinar
Project Management Solutions WebinarERAUWebinars
 
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...Simplilearn
 
Predict the Oscars with Data Science
Predict the Oscars with Data SciencePredict the Oscars with Data Science
Predict the Oscars with Data ScienceCarlos Edo
 
[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)
[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)
[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)Insight Technology, Inc.
 
7 steps to master problem solving
7 steps to master problem solving7 steps to master problem solving
7 steps to master problem solvingYuri Kaminski
 
Predict oscars (4:17)
Predict oscars (4:17)Predict oscars (4:17)
Predict oscars (4:17)Thinkful
 
Predict the Oscars with Data Science
Predict the Oscars with Data SciencePredict the Oscars with Data Science
Predict the Oscars with Data ScienceThinkful
 
Introduction to Linear programing.ORpptx
Introduction to Linear programing.ORpptxIntroduction to Linear programing.ORpptx
Introduction to Linear programing.ORpptxaishaashraf31
 
Visual tools and innovation games workshop - spscbus - aug 2014
Visual tools and innovation games   workshop - spscbus - aug 2014Visual tools and innovation games   workshop - spscbus - aug 2014
Visual tools and innovation games workshop - spscbus - aug 2014Ruven Gotz
 
Forecasting for beginners
Forecasting for beginnersForecasting for beginners
Forecasting for beginnersDan Brown
 
lessontwoppt
lessontwopptlessontwoppt
lessontwopptbroo209
 
Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Joel Burgess
 

Similar to Optimising Wedding Seating With Mathematical Programming (20)

computational_thinking_gcse.pptx
computational_thinking_gcse.pptxcomputational_thinking_gcse.pptx
computational_thinking_gcse.pptx
 
Creating Presentations That Matter - A 1-day workshop (May 4th) at SVC
Creating Presentations That Matter - A 1-day workshop (May 4th) at SVCCreating Presentations That Matter - A 1-day workshop (May 4th) at SVC
Creating Presentations That Matter - A 1-day workshop (May 4th) at SVC
 
Uxhk 2015art of start workshop share.key
Uxhk 2015art of start workshop share.keyUxhk 2015art of start workshop share.key
Uxhk 2015art of start workshop share.key
 
Mini-Training: Using root-cause analysis for problem management
Mini-Training: Using root-cause analysis for problem managementMini-Training: Using root-cause analysis for problem management
Mini-Training: Using root-cause analysis for problem management
 
Project Management Solutions Webinar
Project Management Solutions WebinarProject Management Solutions Webinar
Project Management Solutions Webinar
 
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
 
Predict the Oscars with Data Science
Predict the Oscars with Data SciencePredict the Oscars with Data Science
Predict the Oscars with Data Science
 
[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)
[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)
[INSIGHT OUT 2011] A21 why why is probably the right answer(tom kyte)
 
Math day 2
Math day 2Math day 2
Math day 2
 
7 steps to master problem solving
7 steps to master problem solving7 steps to master problem solving
7 steps to master problem solving
 
Predict oscars (4:17)
Predict oscars (4:17)Predict oscars (4:17)
Predict oscars (4:17)
 
$$Chapter 7 BD
$$Chapter 7 BD$$Chapter 7 BD
$$Chapter 7 BD
 
Predict the Oscars with Data Science
Predict the Oscars with Data SciencePredict the Oscars with Data Science
Predict the Oscars with Data Science
 
FDS Unit I_PPT.pptx
FDS Unit I_PPT.pptxFDS Unit I_PPT.pptx
FDS Unit I_PPT.pptx
 
Introduction to Linear programing.ORpptx
Introduction to Linear programing.ORpptxIntroduction to Linear programing.ORpptx
Introduction to Linear programing.ORpptx
 
Visual tools and innovation games workshop - spscbus - aug 2014
Visual tools and innovation games   workshop - spscbus - aug 2014Visual tools and innovation games   workshop - spscbus - aug 2014
Visual tools and innovation games workshop - spscbus - aug 2014
 
Forecasting for beginners
Forecasting for beginnersForecasting for beginners
Forecasting for beginners
 
lessontwoppt
lessontwopptlessontwoppt
lessontwoppt
 
Problem solving
Problem solvingProblem solving
Problem solving
 
Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012
 

More from Guy K. Kloss

Kauri ID - A Self-Sovereign, Blockchain-based Identity System
Kauri ID - A Self-Sovereign, Blockchain-based Identity SystemKauri ID - A Self-Sovereign, Blockchain-based Identity System
Kauri ID - A Self-Sovereign, Blockchain-based Identity SystemGuy K. Kloss
 
Qrious about Insights -- Big Data in the Real World
Qrious about Insights -- Big Data in the Real WorldQrious about Insights -- Big Data in the Real World
Qrious about Insights -- Big Data in the Real WorldGuy K. Kloss
 
WTF is Blockchain???
WTF is Blockchain???WTF is Blockchain???
WTF is Blockchain???Guy K. Kloss
 
Building a (Really) Secure Cloud Product
Building a (Really) Secure Cloud ProductBuilding a (Really) Secure Cloud Product
Building a (Really) Secure Cloud ProductGuy K. Kloss
 
Representational State Transfer (REST) and HATEOAS
Representational State Transfer (REST) and HATEOASRepresentational State Transfer (REST) and HATEOAS
Representational State Transfer (REST) and HATEOASGuy K. Kloss
 
Introduction to LaTeX (For Word users)
 Introduction to LaTeX (For Word users) Introduction to LaTeX (For Word users)
Introduction to LaTeX (For Word users)Guy K. Kloss
 
MataNui - Building a Grid Data Infrastructure that "doesn't suck!"
MataNui - Building a Grid Data Infrastructure that "doesn't suck!"MataNui - Building a Grid Data Infrastructure that "doesn't suck!"
MataNui - Building a Grid Data Infrastructure that "doesn't suck!"Guy K. Kloss
 
Python Data Plotting and Visualisation Extravaganza
Python Data Plotting and Visualisation ExtravaganzaPython Data Plotting and Visualisation Extravaganza
Python Data Plotting and Visualisation ExtravaganzaGuy K. Kloss
 
Lecture "Open Source and Open Content"
Lecture "Open Source and Open Content"Lecture "Open Source and Open Content"
Lecture "Open Source and Open Content"Guy K. Kloss
 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with SubversionGuy K. Kloss
 
Beating the (sh** out of the) GIL - Multithreading vs. Multiprocessing
Beating the (sh** out of the) GIL - Multithreading vs. MultiprocessingBeating the (sh** out of the) GIL - Multithreading vs. Multiprocessing
Beating the (sh** out of the) GIL - Multithreading vs. MultiprocessingGuy K. Kloss
 
Thinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationThinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationGuy K. Kloss
 
Thinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationThinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationGuy K. Kloss
 
Gaining Colour Stability in Live Image Capturing
Gaining Colour Stability in Live Image CapturingGaining Colour Stability in Live Image Capturing
Gaining Colour Stability in Live Image CapturingGuy K. Kloss
 
LaTeX Introduction for Word Users
LaTeX Introduction for Word UsersLaTeX Introduction for Word Users
LaTeX Introduction for Word UsersGuy K. Kloss
 
Thinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationThinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationGuy K. Kloss
 

More from Guy K. Kloss (16)

Kauri ID - A Self-Sovereign, Blockchain-based Identity System
Kauri ID - A Self-Sovereign, Blockchain-based Identity SystemKauri ID - A Self-Sovereign, Blockchain-based Identity System
Kauri ID - A Self-Sovereign, Blockchain-based Identity System
 
Qrious about Insights -- Big Data in the Real World
Qrious about Insights -- Big Data in the Real WorldQrious about Insights -- Big Data in the Real World
Qrious about Insights -- Big Data in the Real World
 
WTF is Blockchain???
WTF is Blockchain???WTF is Blockchain???
WTF is Blockchain???
 
Building a (Really) Secure Cloud Product
Building a (Really) Secure Cloud ProductBuilding a (Really) Secure Cloud Product
Building a (Really) Secure Cloud Product
 
Representational State Transfer (REST) and HATEOAS
Representational State Transfer (REST) and HATEOASRepresentational State Transfer (REST) and HATEOAS
Representational State Transfer (REST) and HATEOAS
 
Introduction to LaTeX (For Word users)
 Introduction to LaTeX (For Word users) Introduction to LaTeX (For Word users)
Introduction to LaTeX (For Word users)
 
MataNui - Building a Grid Data Infrastructure that "doesn't suck!"
MataNui - Building a Grid Data Infrastructure that "doesn't suck!"MataNui - Building a Grid Data Infrastructure that "doesn't suck!"
MataNui - Building a Grid Data Infrastructure that "doesn't suck!"
 
Python Data Plotting and Visualisation Extravaganza
Python Data Plotting and Visualisation ExtravaganzaPython Data Plotting and Visualisation Extravaganza
Python Data Plotting and Visualisation Extravaganza
 
Lecture "Open Source and Open Content"
Lecture "Open Source and Open Content"Lecture "Open Source and Open Content"
Lecture "Open Source and Open Content"
 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with Subversion
 
Beating the (sh** out of the) GIL - Multithreading vs. Multiprocessing
Beating the (sh** out of the) GIL - Multithreading vs. MultiprocessingBeating the (sh** out of the) GIL - Multithreading vs. Multiprocessing
Beating the (sh** out of the) GIL - Multithreading vs. Multiprocessing
 
Thinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationThinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ Integration
 
Thinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationThinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ Integration
 
Gaining Colour Stability in Live Image Capturing
Gaining Colour Stability in Live Image CapturingGaining Colour Stability in Live Image Capturing
Gaining Colour Stability in Live Image Capturing
 
LaTeX Introduction for Word Users
LaTeX Introduction for Word UsersLaTeX Introduction for Word Users
LaTeX Introduction for Word Users
 
Thinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ IntegrationThinking Hybrid - Python/C++ Integration
Thinking Hybrid - Python/C++ Integration
 

Recently uploaded

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Optimising Wedding Seating With Mathematical Programming

  • 1. Optimisation Dr. Stuart Mitchell LMRC University of Auckland s.mitchell@auckland.ac.nz Kiwi Pycon 2009
  • 2. Contents of presentation What is Mathematical Programing When is it useful The Wedding Guest Problem
  • 3. What is Mathematical programing • A simple mathematically precise way of stating optimisation problems. • Use mathematically rigorous way to find a solution
  • 4. 30 teams – 162 games
  • 5.
  • 6. What is Mathematical programing • A simple mathematically precise way of stating optimisation problems. • Use mathematically rigorous way to find a solution
  • 7. What is Mathematical programing • A simple mathematically precise way of stating optimisation problems. • Use mathematically rigorous way to find a solution
  • 8. When is it useful • There is a decision problem • There is lots of data • There is money to be made
  • 9. The wedding guest problem • Similar to work at LMRC • A wedding planner whats to work out seating allocations http://weddingelegante.com * Tables near the head table (or sweetheart table) should be reserved for your closest family and friends * If you’re using round tables, you should generally assign males and females to alternating seats * Don’t forget to use your guests’ ages and interests when assigning * Grouping your guests into identifiable cliques (grooms college friends, work colleagues, friends of your parents, etc.) will make grouping guests together at specific tables easier * Seat children under 8 years of age at the same table as their parents, but if you’re expecting a great deal of 8+ children to attend, you may consider creating a “kids-only” table * Leave 2-3 tables empty for vendors during their breaks or for unexpected guests * Have a large diagram of the completed seating chart on hand at the reception venue on your wedding day to solve any confusion
  • 10. The wedding guest problem • We need to define – A solution – what is the result we want
  • 11. The wedding guest problem • We need to define – A solution – what is the result we want – Variables – parts of the solution
  • 12. The wedding guest problem • We need to define – A solution – what is the result we want – Variables – parts of the solution – Objective function – how to compare solutions
  • 13. The wedding guest problem • We need to define – A solution – what is the result we want – Variables – parts of the solution – Objective function – how to compare solutions – Constraints – define a solution • In terms of the variables
  • 14. Mathematical expression of the problem • This is a set partitioning problem. – We wish to partition the set of guests into subsets of tables. – We wish to maximise happiness of the tables. – We want everyone to be seated at exactly one table. • This is implemented in the following python code
  • 15. Wedding Planning Formulation Let guests be the set of all guests.
  • 16. Wedding Planning Formulation Use pulp.allcombinations to generate a list of all possible table seatings.
  • 17. Wedding Planning Formulation Then we create a binary variable that will be 1 if the table will be in the solution, or zero
  • 18. Wedding Planning Formulation We create the LpProblem and then make the objective function.
  • 19. Wedding Planning Formulation We create the LpProblem and then make the objective function.
  • 20. Wedding Planning Formulation We specify the total number of tables allowed in the solution.
  • 21. Wedding Planning Formulation Multiple similar constraints (one of each guest) guarantee that a guest is allocated to exactly one table.
  • 22. Wedding Planning Formulation Solve the problem and print out an answer. The choosen tables are out of a total of 3213: ('M', 'N') ('E', 'F', 'G') ('A', 'B', 'C', 'D') ('I', 'J', 'K', 'L') ('O', 'P', 'Q', 'R')
  • 23. Why Pulp • MIT Licence • Installation (google-code or pypi) • Syntax • Interoperabilty • Documentation
  • 24. Next time you are talking to a client • Is there a decision problem? • Is there lots of data? • Is there money to be made?