Combinatorial Optimization Lecturer Kononov Alexander Veniaminovich.

Slides:



Advertisements
Similar presentations
Dynamic Programming 25-Mar-17.
Advertisements

Cooperating Intelligent Systems
CS Section 600 CS Section 002 Dr. Angela Guercio Spring 2010.
Problem Solving Well-formed predicate calculus expressions provide a means of describing objects and relations in a problem domain and inference rule.
Introduction to Algorithms Greedy Algorithms
BackTracking Algorithms
Types of Algorithms.
Analysis of Algorithms
Greed is good. (Some of the time)
Problem Solving and Creativity John Paxton Computer Science Montana State University.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
1 The Limits of Computation Intractable and Non-computable functions.
Recursion Lecture 18: Nov 18.
Page 1 Recursion and Exhaustion Yip Lik Yau. Page 2 Why Exhaustion?  Many problems can be solved by brute force in a reasonable amount of time if the.
Transform & Conquer Lecture 08 ITS033 – Programming & Algorithms
CSE115/ENGR160 Discrete Mathematics 02/28/12
Discrete Structure Li Tak Sing( 李德成 ) Lectures
Problem of the Day Problem of the Day next Geometry - Connect the Dots
Artificial Intelligence
1 Greedy Algorithms. 2 2 A short list of categories Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
CS 206 Introduction to Computer Science II 10 / 14 / 2009 Instructor: Michael Eckmann.
The max flow problem
Analysis of Algorithms CS 477/677
Dr Eleni Mangina – COURSE: LOGIC PROGRAMMING (during a joint degree with Fudan University in Software Engineering) DEPT. OF COMPUTER SCIENCE UCD Problem.
Backtracking.
CS 206 Introduction to Computer Science II 02 / 25 / 2009 Instructor: Michael Eckmann.
Algorithm design techniques
February 17, 2015Applied Discrete Mathematics Week 3: Algorithms 1 Double Summations Table 2 in 4 th Edition: Section th Edition: Section th.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
 Four people are crossing a rickety bridge at night. It is dark and they have to light the path with a flashlight; however, the bridge can only hold two.
Lecture 23. Greedy Algorithms
NP-Complete Problems CSC 331: Algorithm Analysis NP-Complete Problems.
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
1 State Space of a Problem Lecture 03 ITS033 – Programming & Algorithms Asst. Prof.
Chapter An Introduction to Problem Solving 1 1 Copyright © 2013, 2010, and 2007, Pearson Education, Inc.
Lecture 5: Backtracking Depth-First Search N-Queens Problem Hamiltonian Circuits.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Algorithm: definition An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process.
CS 206 Introduction to Computer Science II 02 / 23 / 2009 Instructor: Michael Eckmann.
Erdal Kose CC30.10 These slides are based of Prof. N. Yanofsky Lecture notes.
1 Algorithms & Data Structures for Games Lecture 2A Minor Games Programming.
Discrete Mathematical Structures: Theory and Applications
Puzzle of Week 1 You have 2 identical straight pieces of rope. Each takes 1 hour to burn if you light it from 1 side (it doesn’t matter which one). Show.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
LIMITATIONS OF ALGORITHM POWER
PROBLEM-SOLVING TECHNIQUES Rocky K. C. Chang November 10, 2015.
Dynamic Programming.  Decomposes a problem into a series of sub- problems  Builds up correct solutions to larger and larger sub- problems  Examples.
CS 3343: Analysis of Algorithms Lecture 19: Introduction to Greedy Algorithms.
Copyright © 2014 Curt Hill Algorithms From the Mathematical Perspective.
Introduction to NP Instructor: Neelima Gupta 1.
1 Computability Tractable, Intractable and Non-computable functions.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
(CSC 102) Lecture 30 Discrete Structures. Graphs.
Modeling the Game of Brain Cube Leslie Muzulu, Kristal Jameson, and Kathy Radloff; St. Catherine University Game Description Brain Cube is a puzzle game.
Ch3 /Lecture #4 Brute Force and Exhaustive Search 1.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
Excursions in Modern Mathematics Sixth Edition
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Greedy Algorithms.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Design and Analysis of Algorithm
Professor, Computer Science and Engineering Department
The Wolf, the Goat, and the Cabbage
Advanced Analysis of Algorithms
4. Computational Problem Solving
Applied Combinatorics, 4th Ed. Alan Tucker
Graph Searching.
Presentation transcript:

Combinatorial Optimization Lecturer Kononov Alexander Veniaminovich

Combinatorial Optimization Computational problems are not only things that have to be solved, they are also objects that can be worth studying. Problems and algorithms can be formalized and analyzed mathematically. C.H.Papadimitriou

A Wolf, A Goat and a Cabbage A man finds himself on a riverbank with a wolf, a goat, and a head of cabbage. He needs to transport all three to the other side of the river in his boat. However, the boat has room for only the man himself and one other item (either the wolf, the goat or the cabbage). In his absence, the wolf would eat the goat, and the goat would eat the cabbage. Show how the man can get all these passengers to the other side.

Jigsaw Puzzle Assembly A jigsaw puzzle contains 500 pieces. A “section” of the puzzle is a set of one or more pieces that have been connected to each other. A “move” consists of connecting two sections. What is the minimum number of moves in which the puzzle can be completed.

A Fake Among Eight Coins There are eight identical-looking coins; one of these coins is counterfeit and is known to be lighter than the genuine coins. What is the minimum number of weighings needed to identify the fake coin with a two-pan balance scale without weights.

Making Pancakes You have to make n ≥ 1 pancakes using a skillet that can hold only two pancakes at a time. Each pancake has to be fried on both sides; frying one side of a pancake takes 1 minute, regardless of whether one or two pancakes are fried at the same time. Design an algorithm to do this job in the minimum amount of time. What is the minimum amount of time as a function of n?

Team Ordering Suppose you have the results of a completed round-robin tournament in which n teams played each other once. Assuming there were no ties, is it always possible to list the teams in a sequence so that every team won the game with the team listed immediately after it?

How long people are interested in similar problems?

The Königsberg bridge problem Was it possible, in a single stroll, to cross all seven bridges of Königsberg exactly once and return to the starting point? The problem is solved by Euler (1736).

Propositiones ad acuendos juvenes "Problems to sharpen the young” ( ~800 A.D, Alcuin ) –18. Puzzle of the wolf, a goat and the cabbages. –27. Puzzle of the four-sided city. There is a four-sided city which has one side of 1100 feet, another side of 1000 feet, a front of 600 feet, and a final side of 600 feet. I want to put some houses there so that each house is 40 feet long and 30 feet wide. How many houses ought the city to contain? –28. Puzzle of the triangular city.

How do people (not mathematics) solve such problems?

Two strongly opposite methods. Exhaustive search Greedy Approach

Exhaustive search Theoretically, many combinatorial problems (puzzles) can be solved by exhaustive search --- a problem-solving strategy that simply tries all possible candidate solutions until a solution to the problem is found.

Disadvantage of the method The most important limitation of exhaustive search is its inefficiency: as a rule, the number of solution candidates that need to be processed grows at least exponentially with the problem size, making the approach inappropriate not only for human but often for a computer as well.

Magic Square Fill the 3×3 table with nine district integers from 1 to 9 so that the sum of the numbers in each row, column, and corner-to-corner diagonal is the same.

Magic Square Fill the 3×3 table with nine district integers from 1 to 9 so that the sum of the numbers in each row, column, and corner-to-corner diagonal is the same. Solving this problem by exhaustive search would imply generating all possible arrangements of distinct integers from 1 to 9 in the table and checking for each of the arrangements, whether all its row, column and diagonal sums are the same.

Magic Square 5×5 The number of candidate solutions the exhaustive search algorithm is equal to (5 2 )!. It would take a computer making 10 trillion operations per second about years to finish the job.

Running time Let A be an algorithm which accepts inputs from a set X, and let f:D  R +. If there exist a constant α>0 such that A terminates its computation after at most αf(x) elementary steps (including arithmetical operations) for each input x  X, then we say that A runs in O(f) time. We also say that the running time (or the time complexity) of A is O(f).

Input size The input size of an instance with rational data is the total number of bits needed for the binary representation.

Polynomial-time algorithm Definition 1.4 An algorithm with rational input is said to run in polynomial time if there is an integer k such that it runs in O( n k ) time, where n is the input size, and all numbers in intermediate computations can be sorted with O( n k ) bits. An algorithm with arbitrary input is said to run in strongly polynomial time if there is an integer k such that it runs in O( n k ) time for any input consisting of n numbers and it runs in polynomial time for rational input. In the case k=1 we have a linear-time algorithm.

Greedy Approach The greedy approach solves an optimization problem by a sequence of steps, each expanding a partially constructed solution until a complete solution is reached. At each step --- and this is the central point of this strategy --- the choice is to produce the largest immediate gain without violating the problems constraints. This simple minded approach works in some cases and fails in others.

Non-Attacking Kings Place the greatest possible number of kings on an 8×8 chessboard so that no two kings are placed on adjacent --- vertically, horizontally, or diagonally --- squares.

Bridge Crossing at Night A group of four people, who have one flashlight, need to cross a rickety bridge at night. A maximum of two people can cross the bridge at one time, and any party that crosses (either one or two people) must have the flashlight with them. The flashlight must be walked back and forth; it cannot be thrown. Person A takes 1 minute to cross the bridge, person B takes 2 minutes, person C takes 5 minutes, and person D takes 10 minutes. A pair must walk together at the rate of the slower person’s pace. Find the fastest way they can cross the bridge.

Transform-and-Conquer The transform-and-conquer is a well-known approach to problem solving that is based on idea of transformation. A problem is solved in two stages. –First, in the transformation stage, it is modified into another problem that, for one reason or another, is more amenable to solution. –Then, in the second, conquering stage, it is solved.

Guarini’s Puzzle There are four knights on the 3×3 chessboard as shown in Fig. 1; The goal is to switch the knights in the minimum number of Moves so that the white knights are at the upper corners and The black knights are at the bottom corners. No two knights can occupy the same square at the same time. Figure 1

Exercise 1.1: Jigsaw Puzzle Assembly A jigsaw puzzle contains 500 pieces. A “section” of the puzzle is a set of one or more pieces that have been connected to each other. A “move” consists of connecting two sections. What is the minimum number of moves in which the puzzle can be completed.

Exercise 1.2: Team Ordering Suppose you have the results of a completed round-robin tournament in which n teams played each other once. Assuming there were no ties, is it always possible to list the teams in a sequence so that every team won the game with the team listed immediately after it?

Homework Six knights. There are six knights on a 3×4 chessboard: the three white knights are at the bottom row; and the three black knights at the top row. The object is to exchange black and white knights in the fewest possible number of their moves. No two knights can occupy the same square at the same time. Represent the six knight problem as the graph problem. Solve the problem.