CS231: Topics in Combinatorial AlgorithmsProf. SuriHomework Assignment 2Handed Out: Oct. 12Due: Oct. 211. Consider the following game, defined on a bipartite graphG= (X∪Y, E), whereXis a set ofnactresses,Yis a set ofnactors, and there there is an edge (x, y) ifxandyhave co-starred in a movie.The game is played between two players,P1andP2, who take turns. Initially, theplayerP1names an actress, say,x1∈X. Then, the playerP2must name an actory1who has co-starred withx1in some movie. The playerP1must now name anactressx2who has starred with actory1in a movie, and so on, thereby generating asequencex1, y1, x2, y2, . . ., until one of the players cannot name his actor or actress.This player (who fails to name the last actor/actress) is theloserin this game.Give a polynomial-time algorithm to decide which of the two players (P1orP2) canforce a win for a given instance of the game.
This is the end of the preview.
access the rest of the document.