Problems as Puzzles William Gasarch, Evan Golub Department of Computer Science University of Maryland.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Great Theoretical Ideas in Computer Science for Some.
Hamiltonian Circuits and Paths
Problem Solving and Creativity John Paxton Computer Science Montana State University.
CS 206 Introduction to Computer Science II 11 / 07 / 2008 Instructor: Michael Eckmann.
Goal Setting Lawrence Fine Conducted by
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Great Theoretical Ideas in Computer Science.
Graphs. Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
CS 206 Introduction to Computer Science II 11 / 05 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 10 / 16 / 2009 Instructor: Michael Eckmann.
The Shortest Path Problem
VOCABULARY  Deck or pack  Suit  Hearts  Clubs  Diamonds  Spades  Dealer  Shuffle  Pick up  Rank  Draw  Set  Joker  Jack 
Enrichment Activities
In S.T.E.M we do Science, Technology, Engineering, Maths. So far we have only done Maths… We have also played many games in our sessions. Here are a few:-
Learning Cycle Lesson Lesson : Systems of Equations Grade: 9th (Algebra 1) Concept: Be able to solve systems of equations by graphing Expected Prior Knowledge:
GRAPH Learning Outcomes Students should be able to:
Unit 7: Non-Linear Equations & Real- World Applications Section 1: Compound Interest Using 5x³: 5 is the coefficient, x is the base, 3 is the exponent.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Graph Theory Hamilton Paths and Hamilton Circuits.
Dr. Naveed Ahmad Assistant Professor Department of Computer Science University of Peshawar.
Mark Dunlop, Computer and Information Sciences, Strathclyde University 1 Algorithms & Complexity 5 Games Mark D Dunlop.
2003 ICTM Contest Division A Orals Topic: Graph Theory
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSNB143 – Discrete Structure Topic 9 – Graph. Learning Outcomes Student should be able to identify graphs and its components. Students should know how.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Deriving Algorithms Ran Libeskind-Hadas Department of Computer Science Harvey Mudd College.
Math in Basketball EDCI 270JONAH STEVENSON Click anywhere to continue.
Graphs. 2 Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
©2009, Tom McKendree Biplanes ©2009, Tom McKendree.
Making Decisions uCode: October Review What are the differences between: o BlueJ o Java Computer objects represent some thing or idea in the real.
GRAPHING DATA. 6.EE.9 Use variables to represent two quantities in a real- world problem that change in relationship to one another; write an equation.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
How to Help in Early Years Maths. By the end of Reception these are the expectations. Children count reliably with numbers from 1 to 20, place them in.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
Click a button…get a plenary
CS 361 – Chapter 16 Final thoughts on minimum spanning trees and similar problems Flow networks Commitment: –Decide on presentation order.
Teaching to the Big Ideas K - 3. Getting to 20 You are on a number line. You can jump however you want as long as you always take the same size jump.
Hard Problems Sanghyun Park Fall 2002 CSE, POSTECH.
Discrete Mathematical Structures: Theory and Applications
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Fraction Frustration Problem Solving Project Carolyn Curran.
Combinatorial Optimization Lecturer Kononov Alexander Veniaminovich.
PROBLEM-SOLVING TECHNIQUES Rocky K. C. Chang November 10, 2015.
Math Olympiad Strategies
Graph problems Prof. Ramin Zabih
Graphs. Graph Definitions A graph G is denoted by G = (V, E) where  V is the set of vertices or nodes of the graph  E is the set of edges or arcs connecting.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Unit 2 Hamiltonian Circuits. Hamiltonian Circuit: A tour that starts at a vertex of a graph and visits each vertex once and only once, returning to where.
The material in this lecture should be review. If you have not seen it before, you should be able to learn it quickly – and on your own. So we are going.
Excursions in Modern Mathematics Sixth Edition
Network Flow.
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Section 2: Multiple choice
Lecture 16 Bipartite Matching
Great Theoretical Ideas in Computer Science
Network Flow.
Special Graphs: Modeling and Algorithms
Discrete Mathematics for Computer Science
Section 2: Multiple choice
Hamiltonian Circuits and Paths
Graphs.
Graphs.
Graphs.
Graphs.
The Pigeonhole Principle
Presentation transcript:

Problems as Puzzles William Gasarch, Evan Golub Department of Computer Science University of Maryland

William Gasarch, Evan Golub - UMD2 Why puzzles? Before you can begin to code a program to solve a problem, you need to figure out how the problem can be solved. Once you know what you want to build, you need to design a plan to implement the solution. You need to devise tests to determine whether your implementation is correct. To do this, you often need to play the adversary to your own ideas. These “puzzle” stages are critical components in the life cycle of an application. Take real world problems and turn them into math and/or algorithm problems.

William Gasarch, Evan Golub - UMD3 The Dr. Ecco Series by Dennis Shasha The Puzzling Adventures of Dr. Ecco Dr. Ecco: Mathematical Detective Dr. Ecco's Cyberpuzzles Puzzling Adventures The Puzzler's Elusion …and many other books of puzzles…

William Gasarch, Evan Golub - UMD4 Cake Cutting You have a regular round cake with icing on top. You want to cut it into 16 equal pieces using only 4 straight cuts. How would you do it?

William Gasarch, Evan Golub - UMD5 Cake Cutting You have a regular round cake with icing on top. You want to cut it into 16 equal pieces using only 4 straight cuts. Lessons: Lateral Thinking Powers of 2

William Gasarch, Evan Golub - UMD6 Cake Cutting You have a regular round cake with icing on top. You want to cut it into 16 equal pieces using only 4 straight cuts. Questions: How long do you give students to work on it? What if a student wants to keep working on it until they figure it out? What if they want to ask questions as they are working on it?

William Gasarch, Evan Golub - UMD7 Single-elimination Tournament Assume you have a problem in which there are multiple candidates or players or ideas that need to compete against each other, but that one-on-one competition is the only direct test available to you, and once someone/thing loses a round, it’s out.

William Gasarch, Evan Golub - UMD8 Single-elimination Tournament Candidate A and Candidate B each have 40% of the population strongly on their side and totally opposed to the other of the two candidates. Candidate C has 20% of the population who would vote for them. Everyone must vote in every election. How can Candidate C win?

William Gasarch, Evan Golub - UMD9 Single-elimination Tournament Candidate A and Candidate B each have 40% of the population strongly on their side and totally opposed to the other of the two candidates. Candidate C has 20% of the population who would vote for them. Everyone must vote in every election. How can Candidate C win? Is there a way for Candidate C lose?

William Gasarch, Evan Golub - UMD10 Single-elimination Tournament There are four proposals. People have ranked the proposals differently: 17% of the people like C better than A, A better that D and D better than B 32% of the people like A better than B, B better that D and D better than C 34% of the people like D better than B, B better that C and C better than A 17% of the people like B better than A, A better that C and C better than D In what order would you hold the elections to make sure that Choice C wins? ___ TRY IT!

William Gasarch, Evan Golub - UMD11 Single-elimination Tournament There are four proposals. People have ranked the proposals differently: 17% of the people like C better than A, A better that D and D better than B 32% of the people like A better than B, B better that D and D better than C 34% of the people like D better than B, B better that C and C better than A 17% of the people like B better than A, A better that C and C better than D In what order would you hold the elections to make sure that Choice C wins? For each of the four choices, does there exist an ordering that will allow the choice to win?

William Gasarch, Evan Golub - UMD12 Single-elimination Tournament There are eight tennis players that need to be ranked. You may assume that if A beats B in one match and if B beats C in another match, that if A were to play C the outcome is already known; A will beat C. Assuming there is one tennis court available, and that a game takes an hour, can you rank all of the players in fewer than twenty hours? How many hours would it take if you instead had four courts available?

William Gasarch, Evan Golub - UMD13 Single-elimination Tournament Assume you have a problem in which there are multiple candidates or players or ideas that need to compete against each other, but that one-on-one competition is the only direct test available to you… Lessons: Game/Decision Trees Combinatorics Working Backwards From a Goal Sorting Parallelism

William Gasarch, Evan Golub - UMD14 Single-elimination Tournament Assume you have a problem in which there are multiple candidates or players or ideas that need to compete against each other, but that one-on-one competition is the only direct test available to you… Questions: How many different problems do you do within an area, even if the solutions are different? In how many increasingly levels of challenge do you present questions?

William Gasarch, Evan Golub - UMD15 Clock Gourds A gourd is a fruit. Let’s say that if you poke one hole in it then the water it contains will drain in exactly 11 minutes. If you poke two holes in it then the water will drain in exactly 5 minutes. Using these facts, can you time 1 minute?

William Gasarch, Evan Golub - UMD16 Clock Gourds A gourd is a fruit. Let’s say that if you poke one hole in it then the water it contains will drain in exactly 11 minutes. If you poke two holes in it then the water will drain in exactly 5 minutes. Using these facts, can you time 1 minute? Generalize: Let a 1,...,a n be positive integers. Assume you have gourds that drain in a 1 minutes, a 2 minutes,..., a n minutes. Which “times” can you measure?

William Gasarch, Evan Golub - UMD17 Clock Gourds A gourd is a fruit. Let’s say that if you poke one hole in it then the water it contains will drain in exactly 11 minutes. If you poke two holes in it then the water will drain in exactly 5 minutes. Using these facts, can you time 1 minute? Generalize: Let a 1,...,a n be positive integers. Assume you have gourds that drain in a 1 minutes, a 2 minutes,..., a n minutes. Which “times” can you measure? Lesson: Model problems as graphs.

William Gasarch, Evan Golub - UMD18 Zoranic Monopoles The book presents a problem where there are 52 compounds, numbered from (and later increases this to 65 compounds). A box is allowed to contain any number of the compounds but if there are three compounds X, Y, Z in the box such that X+Y=Z, then the box explodes! How many boxes required to pack up all of the compounds WITHOUT having anything blow up? Let’s think of it as compounds numbered from 1…N and consider for how large an N can we solve this here today. TRY IT!

William Gasarch, Evan Golub - UMD19 Zoranic Monopoles The book presents a problem where there are 52 compounds, numbered from (and later increases this to 65 compounds). A box is allowed to contain any number of the compounds but if there are three compounds X, Y, Z in the box such that X+Y=Z, then the box explodes! How many boxes required to pack up all of the compounds WITHOUT having anything blow up? Let’s think of it as compounds numbered from 1…N and consider for how large an N can we solve this here today. Lessons: Greedy algorithms, Open problems

William Gasarch, Evan Golub - UMD20 Hovertanks in Battle Assume there are 25 hills to which a tank can go (number them 0, 1, 2, …, 24). For each hill we can only shoot at certain hills (e.g., from hill 0 we can only shoot hills 1, 2, 3, 7). We have 10 tanks available. Where should you put them so that every hill is either: –occupied –can be shot it by a hill that is occupied Generalize: A graph is a set of vertices and lines (called edges) between some of them. Given a graph and a number k, can you pick out k vertices so that every vertex is either picked or adjacent to one that is picked?

William Gasarch, Evan Golub - UMD21 Hovertanks in Battle Assume there are 25 hills to which a tank can go (number them 0, 1, 2, …, 24). For each hill we can only shoot at certain hills (e.g., from hill 0 we can only shoot hills 1, 2, 3, 7). We have 10 tanks available. Where should you put them so that every hill is either: –occupied –can be shot it by a hill that is occupied Lesson: There are problems that currently take a long time to solve perfectly, but a greedy algorithm might give a good answer in good time.

William Gasarch, Evan Golub - UMD22 Lasers on Utopia Basin There are stations on Mars. We need to be able to fly (using Laser Shuttles) from one to the other. We will set up routes from certain pairs of cities but we want to make sure that there are never any crashes! If the path from (say) A to B crosses the path from C to D we will never have A--B and C--D as routes. We want to know what is the max number of routes we can set up without two routes crossing. Generalize: Given any n points in the plane, how many straight lines can you put between pairs of them? Lesson: This is the “maximum number of edges in a Euclidean planar graph” problem!

William Gasarch, Evan Golub - UMD23 Untangling the Rosetta Web You are given two graphs. One uses the labels fig, prune, grapefruit, apricot, currant, pineapple, date, raisin, coconut. The other uses nine labels in an alien language. We know the two graphs are the same. You need to figure out which alien words to use to ask for the fruit that you know you like Lesson: This is a classic “graph isomorphism” problem. A follow-up question could be “What if there is not a unique solution?”

William Gasarch, Evan Golub - UMD24 The Richest of Them All There are 20 hecto-millionaires (over 100 million dollars) in a club. They all have between 100 million dollars and 10 billion dollars. They want to know what the least amount of money is that someone in the club has and what the most amount of money that someone in the club has. But they DO NOT want to know who those “poorest” and “richest” people ARE. They can only communicate by calling each other one-on-one and exchanging information. Can they accomplish this? TRY IT! (at home)

Puzzles and games can be great sources of problems in computational thinking which can engage and motivate students…