# ON THE COMPLEXITY OF THE GAME OF SET.

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 ON THE COMPLEXITY OF THE GAME OF SET KAMALIKA CHAUDHURI, BRIGHTEN GODFREY, DAVID RATAJCZAK, AND HOETECK WEE ABSTRACT. Set R is a card game played with a deck in which each card has four properties. Each property takes on one of three values. Players compete to quickly find sets of three cards such that for each property, the cards have all the same or all different values. We show that a natural generalization of the game, where the number of properties and values vary, is NPcomplete. We also study the case where the number of values is fixed at 3, as in the classic game, and the number of properties p varies. In a restricted model involving checking pairs of cards, we give an exactly (not just asymptotically) optimum Θ(n 2 p)-time algorithm. 1. INTRODUCTION 1.1. The Game of Set. The card game Set R [6] was invented in 1974 by Marsha Jean Falco, and was set loose upon the world in The game is played with a deck of 3 4 = 81 cards. Each card is unique and is printed with figures that have four properties: color, shape, shading, and number of figures. Each of these properties takes on one of three values: color is red, green, or purple; shape is oval, diamond, or squiggle; shading is solid, shaded, or open; and number of figures is one, two, or three. Define a valid set as three cards such that for each property, the three cards either have the same value or no two of them have a common value. 1 Examples of a valid set and an invalid set are shown in Figure What we refer to as a valid set is simply called a set in traditional game play. We adopt the moniker valid set to avoid overloading the mathematical meaning of set. FIGURE 1.1. The three cards on the left (which are purple, green, and red, respectively) form a valid set; the three on the right (which are red, green and green) do not. 1

2 ON THE COMPLEXITY OF THE GAME OF SET 2 The game is played as follows. 2 Twelve cards are dealt face-up. Any number of players search for valid sets among the dealt cards, and asynchronously claim them as soon as they find them. The three cards that form the valid set are removed and three new cards are dealt in their place. Play continues in this manner until all cards have been dealt and all valid sets among the dealt cards have been claimed. The winner is the player who has claimed the most valid sets The model. Because the goal is to claim valid sets faster than other players, studying the computational complexity of finding valid sets is natural. To put asymptotic analysis to use, we generalize the game to variable-size decks in a natural way: we let the number of properties p, the number of values v, and the number of dealt cards vary. Our deck will be D = {1,..., v} p. When p = 4 and v = 3, this is just the classic Set deck. For a card c D and i {1,..., p} we denote by c[i] the value of the ith property (dimension) of c; that is, c = (c[1],..., c[p]). Definition 1.1. Given v distinct cards c 1,..., c v D, we say that S = {c 1,..., c v } is valid if for all properties i {1,..., p}, either c 1 [i] = = c v [i] or the values c 1 [i],..., c v [i] are distinct. Definition 1.2. The decision problem SET is as follows. Given a set of cards C {1,..., v} p for any v > 0 and p > 0, is there a valid set S C? The problems k-value SET and k-property SET differ from SET only through added restrictions on their input: in the former, we require that v = k; in the latter, we require that p = k. Another common characterization of Set is to define a valid set as a line in Z 4 3, which implies an alternate generalization of finding lines in Z p v. This is equivalent to our model when v = 3, but not in general. The authors believe that the above model is the most natural way to generalize the original game; the reader should be aware, however, that the alternate generalization can be solved in polynomial time Our results. In Section 2 we prove that SET is NP-complete, as is k-property SET for k 3. The proof uses a simple reduction from the problem 3-DIMENSIONAL MATCHING. In section Section 3, we study the difficulty of 3-VALUE SET. In a restricted model in which algorithms are only allowed to check pairs of cards to see if they are part of a valid set in the input, we give a worst-case lower bound of n 2 /4 n/2 checks and an algorithm which performs at most this many checks Related work. The authors are unaware of any previous work on the computational complexity of Set. However, problems involving combinatorial properties of the game have been considered by many. The most popular is to determine the smallest x for which any set of x cards must contain a valid set. The answer turns out to be 21 [2]. 2. SET IS NP-COMPLETE We first give a reduction from k-dimensional MATCHING to k-property SET. Since 3-DIMENSIONAL MATCHING is NP-complete [4, 5], the main result follows easily. Note that we use the terms dimension and property interchangeably. Definition 2.1. Let v > 0, k > 0, and M {1,..., v} k. We say that M is a perfect matching if M = v so that M = {m 1,..., m v } and for all dimensions i {1,..., k}, the values m 1 [k],..., m v [k] are distinct. Definition 2.2. The decision problem k-dimensional MATCHING is as follows. Given a set C {1,..., v} k for some v > 0, is there a perfect matching M C? Lemma 2.3. There is a polynomial-time mapping reduction from k-dimensional MATCHING to k-property SET. 2 We leave some out details which do not concern our analysis, such as dealing more than 12 cards when no valid sets are present, and scoring when players claim valid sets incorrectly.

3 ON THE COMPLEXITY OF THE GAME OF SET 3 Proof. We are given C {1,..., v} k and will produce C {1,..., v + 1} k such that C contains a valid set if and only if C contains a perfect matching. Let c {1,..., v + 1} k be the element (v + 1,..., v + 1), and pick C = C c. This reduction is illustrated in Figure 2.1. Clearly we can construct C in polynomial time. Why does it work? Suppose there is a perfect matching M C. Let M = M c. Since for all i {1,..., k} and all m M, m[i] v + 1 = c[i], and M = v + 1, M is a perfect matching and is also valid, since by definition every perfect matching is a valid set. Finally, M C, so C contains a valid set. Now suppose C contains some valid set M = {c 1,..., c v+1 }. There must be some property i {1,..., k} for which c 1 [i],..., c v+1 [i] are distinct (because otherwise the cards c 1,..., c v+1 would all be the same card, and we need v distinct cards to form a valid set). By the pigeonhole principle, for some c j M we have c j [i] = v +1. c is the only element of C which takes on the value v +1 in any dimension, so c M. Furthermore, since no other elements of M agree with c in any dimension, the elements of M must be distinct in all dimensions, which means M is a perfect matching. Thus M {c} is a perfect matching in C. Corollary 2.4. k-property SET for k 3 and SET are NP-complete. Proof. SET and k-property SET are clearly in NP: a non-deterministic algorithm can simply guess a subset of the cards and check to see whether it is valid. By Lemma 2.3 and the fact that 3-DIMENSIONAL MATCH- ING is NP-hard, 3-PROPERTY SET is NP-hard, which implies that k-property SET for k 3 and SET are also NP-hard, since they are generalizations of 3-PROPERTY SET. Note that 2-PROPERTY SET can be solved in polynomial time, as follows: View the deck as a v v matrix. A valid set is either a row or column of this matrix, or a perfect matching. We can clearly find sets of the former type in polynomial time. For sets of the latter type, we can use a polynomial-time algorithm for 2-DIMENSIONAL MATCHING [1]. 3. COMPLEXITY OF k-value SET Having shown that Set is hard when the number of values varies, we now fix the number of values at k and allow the number of properties p to vary. This is the problem k-value SET, defined in Section 1.2. In the discussion here, we focus on the case k = 3, which is of particular interest since the classic Set deck uses three values, and because three is the smallest k for which the problem is nontrivial. There is an obvious brute force Θ(n 2 p)-time algorithm for 3-VALUE SET 3 : 3 The generalization of this algorithm to arbitrary k runs in time Θ(n k 1 p). FIGURE 2.1. The reduction from k-dimensional MATCHING to k-property SET with k = 2 and v = 5. In the figure on the left, each cell represents an element of the set {1,..., 5} 2, and the shaded cells are the elements of the input C. The reduction translates this into the figure on the right, where the cells are elements of {1,..., 6} 2, and the shaded cells are the elements of C. In C, both the row and the diagonal are valid sets, but only the diagonal is a perfect matching. In C, the row is no longer a valid set, but the diagonal remains both a valid set and a perfect matching, because we have added the element c in the upper right corner.

4 ON THE COMPLEXITY OF THE GAME OF SET 4 Algorithm BruteForce: On input C = {c 1,..., c n }: (1) For each pair of cards c h, c i C 1 : (a) Compute the unique card c j such that {c h, c i, c j } is valid. (b) If c j C, then return valid set. (2) Return no valid set. ( ) n There are = Θ(n 2 2 ) pairs to check in the loop in Step 1. The computation of c j takes time Θ(p) (i.e. linear in the number of bits used to represent a card), and the check to see whether c j C can be done in expected time Θ(p) through use of a hash table. Thus the algorithm runs in expected time Θ(n 2 p). Note that the number of bits used to represent the input is m = Θ(pn), so the expected runtime can alternately be written as Θ(m 2 /p). Naturally one would like to do better than BruteForce. In particular, can we choose the pairs of cards to check smartly, rather than just checking every pair? The following theorem states that we can make only a constant factor fewer checks than BruteForce. Definition 3.1. A pair-checking algorithm is one that solves 3-VALUE SET given only n and indirect access to its input C = {c 1,..., c n } through queries to an oracle which, when given two card identifiers h, i {1,..., n}, returns true if there is a card c j C such that {c h, c i, c j } is valid, and returns false otherwise. Theorem 3.2. Any pair-checking algorithm must perform at least n 2 /4 n/2 checks in the worst case. Proof. Let A be any pair-checking algorithm. For a particular input C, let G i be the graph which has a node for each card in C and an edge (c 1, c 2 ) when after the ith check, A has not yet checked (c 1, c 2 ). Thus G 0 is the complete graph on n = C nodes, and a check corresponds to the removal of an edge. The infinite family of inputs X p = {1, 2} p contains no valid sets. (In the classic deck, this corresponds to, for example, no reds, no ovals, no solids, and no ones.) On these inputs, A must check one pair of cards from every triple of cards. To see this, suppose A didn t check some triple. Then A must behave incorrectly either on X p or on inputs of the same size as X p in which the unchecked triple was the one and only valid set. Such an input is some ordering of the cards Y p = X p {(1,..., 1, 3)} \ {(2,..., 2)}, whose only valid set is {(1,..., 1, 1), (1,..., 1, 2), (1,..., 1, 3)}. This implies that if A terminates after t checks on input X p, G t must not contain a triangle. By Turán s Theorem [7, 8] this implies that G t can have at most n 2 /4 edges. Since the initial complete graph G 0 has n 2 /2 n/2 edges, A must have made at least n 2 /4 n/2 checks. A triangle-free graph which has the maximum number of edges, as given by Turán s Theorem, is the complete bipartite graph K n/2, n/2. Taking the complement of this graph to find the edges that we should check, we arrive at the following optimum pair-checking algorithm. Algorithm OptimumPairCheck: On input C = {c 1,..., c n }: (1) Partition C into two sets C 1 = { c 1,..., c n/2 } and C2 = { c n/2 +1,..., c n }. (2) For each pair of cards c h, c i C 1 and each pair of cards c h, c i C 2 : (a) Compute the unique card c j such that {c h, c i, c j } is valid. (b) If c j C, then return valid set. (3) Return no valid set. In the classic Set game with 12 cards on the table, OptimumPairCheck uses 30 checks, as opposed to Brute- Force s 66 checks. Asymptotically, OptimumPairCheck uses half as many checks as BruteForce. 4. CONCLUSION We generalized the game of Set to variable-sized inputs, letting the number of properties p and the number of values v vary. We proved that when p 3, the game is NP-complete. When p 2 or v is fixed, the problem is in P. We then considered the case when v is fixed at 3, as in the classic game, and p varies. In a restricted model in which algorithms are only allowed to check pairs of cards to see if they are part of a valid set in

5 ON THE COMPLEXITY OF THE GAME OF SET 5 the input, we gave a worst-case lower bound of n 2 /4 n/2 checks and an algorithm which performs at most this many checks. The main question we leave open is the following: is there a o(n 2 d)-time non-pair-checking algorithm for 3-VALUE SET? Noting that in this case the problem is equivalent to finding three collinear points from a subset of Z p v, it may be interesting to explore possible connections with computational geometry problems such as that of finding three collinear points from a set of n points in the plane. That problem is 3SUM-hard [3]; it is an open problem to find a o(n 2 )-time 4 algorithm for any 3SUM-hard problem. REFERENCES [1] T. H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to Algorithms. MIT Press, McGraw-Hill, New York, NY, 1990, pps [2] B. Davis and D. Maclagan. The Game of SET! The Mathematical Intelligencer. To appear. [3] A. Gajentaan and M. Overmars. On a class of O(n 2 ) problems in computational geometry. Comput. Geom. Theory Appl., 5: , [4] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979, p. 50. [5] R. M. Karp. Reducibility among combinatorial problems. Complexity of Computer Computations, ed. by J. W. Thatcher and R. E. Miller, Plenum Press, New York, 1972, pps [6] Set Enterprises. [7] P. Turán. Eine Extremalaufgabe aus der Graphentheorie. Mat. Fiz Lapook 48: , [8] D. West. Introduction to Graph Theory. Prentice Hall, Upper Saddle River, NJ, 1996, pps Note that the Θ(n 2 ) runtime of the best known 3SUM algorithm assumes that arithmetic operations can be performed on integers in constant time. If we made the corresponding assumption that arithmetic operations can be performed on a card s vector in constant time, regardless of the number of properties then the runtime of BruteForce and OptimumPairCheck would also be Θ(n 2 ).

### Finite Affine Planes and Linear Algebra. Maggie Altenhof-Long Stephanie Aronson. Linear Algebra, Fall 2015

and Altenhof-Long, Fall 2015 Outline Definition A set consists of 3 cards in which each of the card s features, looked at 1 by 1, are the same on each card, or, are different on each card Definition A

### Tutorial 8. NP-Complete Problems

Tutorial 8 NP-Complete Problems Decision Problem Statement of a decision problem Part 1: instance description defining the input Part 2: question stating the actual yesor-no question A decision problem

### Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

### Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

### Offline 1-Minesweeper is NP-complete

Offline 1-Minesweeper is NP-complete James D. Fix Brandon McPhail May 24 Abstract We use Minesweeper to illustrate NP-completeness proofs, arguments that establish the hardness of solving certain problems.

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Lecture 7: NP-Complete Problems

IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

### Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Hongsik Choi and Hyeong-Ah Choi Department of Electrical Engineering and Computer Science George Washington University Washington,

### SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

31 Kragujevac J. Math. 25 (2003) 31 49. SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH Kinkar Ch. Das Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, W.B.,

### JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

### Measuring Rationality with the Minimum Cost of Revealed Preference Violations. Mark Dean and Daniel Martin. Online Appendices - Not for Publication

Measuring Rationality with the Minimum Cost of Revealed Preference Violations Mark Dean and Daniel Martin Online Appendices - Not for Publication 1 1 Algorithm for Solving the MASP In this online appendix

### NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 Introduction: Reduction and Expressiveness

Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### CSC 373: Algorithm Design and Analysis Lecture 16

CSC 373: Algorithm Design and Analysis Lecture 16 Allan Borodin February 25, 2013 Some materials are from Stephen Cook s IIT talk and Keven Wayne s slides. 1 / 17 Announcements and Outline Announcements

### COMS4236: Introduction to Computational Complexity. Summer 2014

COMS4236: Introduction to Computational Complexity Summer 2014 Mihalis Yannakakis Lecture 17 Outline conp NP conp Factoring Total NP Search Problems Class conp Definition of NP is nonsymmetric with respect

### 5.1 Bipartite Matching

CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

### Cloud Computing is NP-Complete

Working Paper, February 2, 20 Joe Weinman Permalink: http://www.joeweinman.com/resources/joe_weinman_cloud_computing_is_np-complete.pdf Abstract Cloud computing is a rapidly emerging paradigm for computing,

### Mathematics Course 111: Algebra I Part IV: Vector Spaces

Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

### OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012

276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a \$ 1,000,000 prize for the

Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

### Best Monotone Degree Bounds for Various Graph Parameters

Best Monotone Degree Bounds for Various Graph Parameters D. Bauer Department of Mathematical Sciences Stevens Institute of Technology Hoboken, NJ 07030 S. L. Hakimi Department of Electrical and Computer

### The Classes P and NP

The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

### SIMS 255 Foundations of Software Design. Complexity and NP-completeness

SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 mdw@cs.berkeley.edu 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity

### On the Relationship between Classes P and NP

Journal of Computer Science 8 (7): 1036-1040, 2012 ISSN 1549-3636 2012 Science Publications On the Relationship between Classes P and NP Anatoly D. Plotnikov Department of Computer Systems and Networks,

### Transportation Polytopes: a Twenty year Update

Transportation Polytopes: a Twenty year Update Jesús Antonio De Loera University of California, Davis Based on various papers joint with R. Hemmecke, E.Kim, F. Liu, U. Rothblum, F. Santos, S. Onn, R. Yoshida,

### Determinants LECTURE Calculating the Area of a Parallelogram. Definition Let A be a 2 2 matrix. A = The determinant of A is the number

LECTURE 13 Determinants 1. Calculating the Area of a Parallelogram Definition 13.1. Let A be a matrix. [ a c b d ] The determinant of A is the number det A) = ad bc Now consider the parallelogram formed

### Tetris is Hard: An Introduction to P vs NP

Tetris is Hard: An Introduction to P vs NP Based on Tetris is Hard, Even to Approximate in COCOON 2003 by Erik D. Demaine (MIT) Susan Hohenberger (JHU) David Liben-Nowell (Carleton) What s Your Problem?

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

### Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

### Boulder Dash is NP hard

Boulder Dash is NP hard Marzio De Biasi marziodebiasi [at] gmail [dot] com December 2011 Version 0.01:... now the difficult part: is it NP? Abstract Boulder Dash is a videogame created by Peter Liepa and

### Week 5 Integral Polyhedra

Week 5 Integral Polyhedra We have seen some examples 1 of linear programming formulation that are integral, meaning that every basic feasible solution is an integral vector. This week we develop a theory

### An Exact Algorithm for Steiner Tree Problem on Graphs

International Journal of Computers, Communications & Control Vol. I (2006), No. 1, pp. 41-46 An Exact Algorithm for Steiner Tree Problem on Graphs Milan Stanojević, Mirko Vujošević Abstract: The paper

### On the Dimensionality of Voting Games

Proceedings of the Twenty-Third AAAI Conference on Artificial Intelligence (2008) On the Dimensionality of Voting Games Edith Elkind Electronics & Computer Science University of Southampton Southampton

### Optimal Binary Space Partitions in the Plane

Optimal Binary Space Partitions in the Plane Mark de Berg and Amirali Khosravi TU Eindhoven, P.O. Box 513, 5600 MB Eindhoven, the Netherlands Abstract. An optimal bsp for a set S of disjoint line segments

### Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples

### NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

NP-complete? NP-hard? Some Foundations of Complexity Prof. Sven Hartmann Clausthal University of Technology Department of Informatics Tractability of Problems Some problems are undecidable: no computer

### Complexity and Completeness of Finding Another Solution and Its Application to Puzzles

yato@is.s.u-tokyo.ac.jp seta@is.s.u-tokyo.ac.jp Π (ASP) Π x s x s ASP Ueda Nagao n n-asp parsimonious ASP ASP NP Complexity and Completeness of Finding Another Solution and Its Application to Puzzles Takayuki

### A Working Knowledge of Computational Complexity for an Optimizer

A Working Knowledge of Computational Complexity for an Optimizer ORF 363/COS 323 Instructor: Amir Ali Ahmadi TAs: Y. Chen, G. Hall, J. Ye Fall 2014 1 Why computational complexity? What is computational

### Integer factorization is in P

Integer factorization is in P Yuly Shipilevsky Toronto, Ontario, Canada E-mail address: yulysh2000@yahoo.ca Abstract A polynomial-time algorithm for integer factorization, wherein integer factorization

### Lecture 3: Linear Programming Relaxations and Rounding

Lecture 3: Linear Programming Relaxations and Rounding 1 Approximation Algorithms and Linear Relaxations For the time being, suppose we have a minimization problem. Many times, the problem at hand can

### Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs Yong Zhang 1.2, Francis Y.L. Chin 2, and Hing-Fung Ting 2 1 College of Mathematics and Computer Science, Hebei University,

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

### Permutation Betting Markets: Singleton Betting with Extra Information

Permutation Betting Markets: Singleton Betting with Extra Information Mohammad Ghodsi Sharif University of Technology ghodsi@sharif.edu Hamid Mahini Sharif University of Technology mahini@ce.sharif.edu

### Fairness in Routing and Load Balancing

Fairness in Routing and Load Balancing Jon Kleinberg Yuval Rabani Éva Tardos Abstract We consider the issue of network routing subject to explicit fairness conditions. The optimization of fairness criteria

### Integer Factorization using the Quadratic Sieve

Integer Factorization using the Quadratic Sieve Chad Seibert* Division of Science and Mathematics University of Minnesota, Morris Morris, MN 56567 seib0060@morris.umn.edu March 16, 2011 Abstract We give

### Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

### Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

### Geometric models of the card game SET

Geometric models of the card game SET Cherith Tucker April 17, 2007 Abstract The card game SET can be modeled by four-dimensional vectors over Z 3. These vectors correspond to points in the affine four-space

### Linear Codes. In the V[n,q] setting, the terms word and vector are interchangeable.

Linear Codes Linear Codes In the V[n,q] setting, an important class of codes are the linear codes, these codes are the ones whose code words form a sub-vector space of V[n,q]. If the subspace of V[n,q]

### Application Placement on a Cluster of Servers (extended abstract)

Application Placement on a Cluster of Servers (extended abstract) Bhuvan Urgaonkar, Arnold Rosenberg and Prashant Shenoy Department of Computer Science, University of Massachusetts, Amherst, MA 01003 {bhuvan,

### Definition 11.1. Given a graph G on n vertices, we define the following quantities:

Lecture 11 The Lovász ϑ Function 11.1 Perfect graphs We begin with some background on perfect graphs. graphs. First, we define some quantities on Definition 11.1. Given a graph G on n vertices, we define

### ENUMERATION OF INTEGRAL TETRAHEDRA

ENUMERATION OF INTEGRAL TETRAHEDRA SASCHA KURZ Abstract. We determine the numbers of integral tetrahedra with diameter d up to isomorphism for all d 1000 via computer enumeration. Therefore we give an

### 3. Linear Programming and Polyhedral Combinatorics

Massachusetts Institute of Technology Handout 6 18.433: Combinatorial Optimization February 20th, 2009 Michel X. Goemans 3. Linear Programming and Polyhedral Combinatorics Summary of what was seen in the

### Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 13 Overview Graphs and Graph

### A Note on Maximum Independent Sets in Rectangle Intersection Graphs

A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada tmchan@uwaterloo.ca September 12,

### NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

### Factoring & Primality

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

### On the k-path cover problem for cacti

On the k-path cover problem for cacti Zemin Jin and Xueliang Li Center for Combinatorics and LPMC Nankai University Tianjin 300071, P.R. China zeminjin@eyou.com, x.li@eyou.com Abstract In this paper we

### Pigeonhole Principle Solutions

Pigeonhole Principle Solutions 1. Show that if we take n + 1 numbers from the set {1, 2,..., 2n}, then some pair of numbers will have no factors in common. Solution: Note that consecutive numbers (such

### Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity

### Combinatorics: The Fine Art of Counting

Combinatorics: The Fine Art of Counting Week 9 Lecture Notes Graph Theory For completeness I have included the definitions from last week s lecture which we will be using in today s lecture along with

### Computational complexity theory

Computational complexity theory Goal: A general theory of the resources needed to solve computational problems What types of resources? Time What types of computational problems? decision problem Decision

### Algorithm Design and Analysis

Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;

GENERATING SETS KEITH CONRAD 1 Introduction In R n, every vector can be written as a unique linear combination of the standard basis e 1,, e n A notion weaker than a basis is a spanning set: a set of vectors

### Guessing Game: NP-Complete?

Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple

### The Card Game Zero sumz and its Mathematical Cousins

The Card Game Zero sumz and its Mathematical Cousins Jonathan Lenchner, IBM T.J. Watson Research Center August 1, 2012 Zero sumz was created with Alejandro Erickson, University of Victoria, and Mathieu

### Two General Methods to Reduce Delay and Change of Enumeration Algorithms

ISSN 1346-5597 NII Technical Report Two General Methods to Reduce Delay and Change of Enumeration Algorithms Takeaki Uno NII-2003-004E Apr.2003 Two General Methods to Reduce Delay and Change of Enumeration

### Cycle transversals in bounded degree graphs

Electronic Notes in Discrete Mathematics 35 (2009) 189 195 www.elsevier.com/locate/endm Cycle transversals in bounded degree graphs M. Groshaus a,2,3 P. Hell b,3 S. Klein c,1,3 L. T. Nogueira d,1,3 F.

### CS/COE 1501 http://cs.pitt.edu/~bill/1501/

CS/COE 1501 http://cs.pitt.edu/~bill/1501/ Lecture 01 Course Introduction Meta-notes These notes are intended for use by students in CS1501 at the University of Pittsburgh. They are provided free of charge

### THE CARD GAME SET BENJAMIN LENT DAVIS AND DIANE MACLAGAN

THE CARD GAME SET BENJAMIN LENT DAVIS AND DIANE MACLAGAN set 1 is an extremely addictive, fast-paced card game found in toy stores nationwide. Although children often beat adults, the game has a rich mathematical

### Orthogonal Projections

Orthogonal Projections and Reflections (with exercises) by D. Klain Version.. Corrections and comments are welcome! Orthogonal Projections Let X,..., X k be a family of linearly independent (column) vectors

### Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24

Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24 The final exam will cover seven topics. 1. greedy algorithms 2. divide-and-conquer algorithms

### Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

1. (Chapter 1 supplementary, problem 7): There are 12 men at a dance. (a) In how many ways can eight of them be selected to form a cleanup crew? (b) How many ways are there to pair off eight women at the

### P versus NP, and More

1 P versus NP, and More Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 If you have tried to solve a crossword puzzle, you know that it is much harder to solve it than to verify

### Finding the Shortest Move-Sequence in the Graph-Generalized 15-Puzzle is NP-Hard

Finding the Shortest Move-Sequence in the Graph-Generalized 15-Puzzle is NP-Hard Oded Goldreich Abstract. Following Wilson (J. Comb. Th. (B), 1975), Johnson (J. of Alg., 1983), and Kornhauser, Miller and

### Small Maximal Independent Sets and Faster Exact Graph Coloring

Small Maximal Independent Sets and Faster Exact Graph Coloring David Eppstein Univ. of California, Irvine Dept. of Information and Computer Science The Exact Graph Coloring Problem: Given an undirected

### Discrete Mathematics, Chapter 3: Algorithms

Discrete Mathematics, Chapter 3: Algorithms Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 1 / 28 Outline 1 Properties of Algorithms

### Survey of Terrain Guarding and Art Gallery Problems

Survey of Terrain Guarding and Art Gallery Problems Erik Krohn Abstract The terrain guarding problem and art gallery problem are two areas in computational geometry. Different versions of terrain guarding

### princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

### Analysis of Algorithms, I

Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications

### Permutation Betting Markets: Singleton Betting with Extra Information

Permutation Betting Markets: Singleton Betting with Extra Information Mohammad Ghodsi Sharif University of Technology ghodsi@sharif.edu Hamid Mahini Sharif University of Technology mahini@ce.sharif.edu

### Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

### Online and Offline Selling in Limit Order Markets

Online and Offline Selling in Limit Order Markets Kevin L. Chang 1 and Aaron Johnson 2 1 Yahoo Inc. klchang@yahoo-inc.com 2 Yale University ajohnson@cs.yale.edu Abstract. Completely automated electronic

### Chapter 1. NP Completeness I. 1.1. Introduction. By Sariel Har-Peled, December 30, 2014 1 Version: 1.05

Chapter 1 NP Completeness I By Sariel Har-Peled, December 30, 2014 1 Version: 1.05 "Then you must begin a reading program immediately so that you man understand the crises of our age," Ignatius said solemnly.

### Theoretical Computer Science (Bridging Course) Complexity

Theoretical Computer Science (Bridging Course) Complexity Gian Diego Tipaldi A scenario You are a programmer working for a logistics company Your boss asks you to implement a program that optimizes the

### Cycles in a Graph Whose Lengths Differ by One or Two

Cycles in a Graph Whose Lengths Differ by One or Two J. A. Bondy 1 and A. Vince 2 1 LABORATOIRE DE MATHÉMATIQUES DISCRÉTES UNIVERSITÉ CLAUDE-BERNARD LYON 1 69622 VILLEURBANNE, FRANCE 2 DEPARTMENT OF MATHEMATICS

### Using determinants, it is possible to express the solution to a system of equations whose coefficient matrix is invertible:

Cramer s Rule and the Adjugate Using determinants, it is possible to express the solution to a system of equations whose coefficient matrix is invertible: Theorem [Cramer s Rule] If A is an invertible

### Notes from Week 1: Algorithms for sequential prediction

CS 683 Learning, Games, and Electronic Markets Spring 2007 Notes from Week 1: Algorithms for sequential prediction Instructor: Robert Kleinberg 22-26 Jan 2007 1 Introduction In this course we will be looking

### Polynomial Degree and Lower Bounds in Quantum Complexity: Collision and Element Distinctness with Small Range

THEORY OF COMPUTING, Volume 1 (2005), pp. 37 46 http://theoryofcomputing.org Polynomial Degree and Lower Bounds in Quantum Complexity: Collision and Element Distinctness with Small Range Andris Ambainis

### Planar Tree Transformation: Results and Counterexample

Planar Tree Transformation: Results and Counterexample Selim G Akl, Kamrul Islam, and Henk Meijer School of Computing, Queen s University Kingston, Ontario, Canada K7L 3N6 Abstract We consider the problem

### Solving Systems of Linear Equations

LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how

### CAD Algorithms. P and NP

CAD Algorithms The Classes P and NP Mohammad Tehranipoor ECE Department 6 September 2010 1 P and NP P and NP are two families of problems. P is a class which contains all of the problems we solve using

### ARTICLE IN PRESS. European Journal of Operational Research xxx (2004) xxx xxx. Discrete Optimization. Nan Kong, Andrew J.

A factor 1 European Journal of Operational Research xxx (00) xxx xxx Discrete Optimization approximation algorithm for two-stage stochastic matching problems Nan Kong, Andrew J. Schaefer * Department of

### 2.1 Complexity Classes

15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Complexity classes, Identity checking Date: September 15, 2004 Scribe: Andrew Gilpin 2.1 Complexity Classes In this lecture we will look

### ISOMETRIES OF R n KEITH CONRAD

ISOMETRIES OF R n KEITH CONRAD 1. Introduction An isometry of R n is a function h: R n R n that preserves the distance between vectors: h(v) h(w) = v w for all v and w in R n, where (x 1,..., x n ) = x

### CS 4310 HOMEWORK SET 1

CS 4310 HOMEWORK SET 1 PAUL MILLER Section 2.1 Exercises Exercise 2.1-1. Using Figure 2.2 as a model, illustrate the operation of INSERTION-SORT on the array A = 31, 41, 59, 26, 41, 58. Solution: Assume

### Running head: A GEOMETRIC INTRODUCTION 1

Running head: A GEOMETRIC INTRODUCTION A Geometric Introduction to Mathematical Induction Problems using the Sums of Consecutive Natural Numbers, the Sums of Squares, and the Sums of Cubes of Natural Numbers