APCS Study Guide Part I (Free Response)

Size: px
Start display at page:

Download "APCS Study Guide Part I (Free Response)"

Transcription

1 APCS Study Guide Part I (Free Response) Name: The final exam will have 2 free response questions on it. Use this review to develop your free response question skills. Feel free to write your answers on a separate sheet of paper so that you have more room. I also encourage you to code your solutions when you are finished in order to check your answers. Directions: SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Notes: - Assume that the classes listed in the Quick Reference found in the Appendix have been imported where appropriate. - Unless otherwise noted in the question, assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied. - In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined in that question. Writing significant amounts of code that can be replaced by a call to one of these methods may not receive full credit. Question #1: A statistician is studying sequences of numbers obtained by repeatedly tossing a six-sided number cube. On each side of the number cube is a single number in the range of 1 to 6, inclusive, and no number is repeated on the cube. The statistician is particularly interested in runs of numbers. A run occurs when two or more consecutive tosses of the cube produce the same value. For example, in the following sequence of cube tosses, there are runs starting at positions 1, 6, 12, and 14. Index Result The number cube is represented by the following class. public class NumberCube an integer value between 1 and 6, inclusive public int toss() /* implementation not shown You will implement a method that collects the results of several tosses of a number cube and another method that calculates the longest run found in a sequence of tosses.

2 (a) Write the method getcubetosses that takes a number cube and a number of tosses as parameters. The method should return an array of the values produced by tossing the number cube the given number of times. Complete method getcubetosses below. /** Returns an array of the values obtained by tossing a number cube numtosses times. cube a NumberCube numtosses the number of tosses to be recorded * Precondition: numtosses > 0 an array of numtosses values public static int[] getcubetosses(numbercube cube, int numtosses) (b) Write the method getlongestrun that takes as its parameter an array of integer values representing a series of number cube tosses. The method returns the starting index in the array of a run of maximum size. A run is defined as the repeated occurrence of the same value in two or more consecutive positions in the array. For example, the following array contains two runs of length 4, one starting at index 6 and another starting at index 14. The method may return either of those starting indexes. If there are no runs of any value, the method returns -1. Index Result Complete method getlongestrun below. /** Returns the starting index of a longest run of two or more consecutive repeated values * in the array values. values an array of integer values representing a series of number cube tosses * Precondition: values.length > 0 the starting index of a run of maximum size; * -1 if there is no run public static int getlongestrun(int[] values)

3 Question #2: The Chinese calendar associates an animal and an element with each year. There are 12 animals, associated with successive years, that rotate in a twelve-year cycle. The five elements, wood, fire, earth, metal, and water, combined with an elder or younger attribute, rotate in a ten-year cycle. The class ChineseZodiac below defines the names of the animals and the elements and provides static methods for determining the Zodiac description for a given year and for finding a year that matches the given animal and element: public class ChineseZodiac private static final int startyear = 1924; private static final String[] animals = rat, ox, tiger, rabbit, dragon, snake, horse, sheep, monkey, chicken, dog, pig private static final String[] elements = elder wood (fir), younger wood (bamboo), elder fire (burning wood), younger fire (lamp flame), elder earth (hill), younger earth (plain), elder metal (weapon), younger metal (kettle), elder water (wave), younger water (brook) ; //returns the zodiac string in the form // animal, element description that corresponds to year //precondition: year >= startyear public static String tozodiacstring(int year) /* to be implemented in part a The year startyear = 1924 was the year of the animal rat and the element fir as indicated by the values of animals[0] and elements[0]. The following year, 1925, was the year of the animal ox and the element bamboo as indicated by animals[1] and elements[1]. Note that in the past 60 years there were several years that were the year of the dragon but only one year that was both dragon and elder earth (hill).

4 A public class ChineseCalendar is a client of the ChineseZodiac class: public class ChineseCalendar //returns the zodiac string in the form // animal/informal element that corresponds to the year //precondition: year meets the precondition of the tozodiacstring method // of the ChineseZodiac class public String shortzodiac(int year) /* to be implemented in part b public int getyear(int year, String animal, String element) /* to be implemented in part c // constructors, other methods and instance variables // not shown (a) Write a method tozodiacstring of the ChineseZodiac class that returns a string that combines the animal name with the full element name for a given year, separated by a comma and a space. For example, tozodiacstring(1925) should return the string ox, younger wood (bamboo) Complete the method tozodiacstring below. // returns the zodiac string in the form // animal, element description that corresponds to year // precondition: year >= startyear public static String tozodiacstring(int year)

5 (b) Write a method shortzodiac of the class ChineseCalendar. shortzodiac returns a zodiac string for a given year in the colloquial format: a string that contains the animal name and the informal element name, removed from parentheses, separated by a slash character. For example, shortzodiac(1925) returns the string ox/bamboo Assume that tozodiacstring in the ChineseZodiac class works as specified, regardless of what you wrote in part (a). Complete method shortzodiac below. // returns the zodiac string in the form // animal/informal element that corresponds to year // precondition: year meets the precondition of the tozodiacstring method of the // ChineseZodiac class public String shortzodiac(int year) (c) Write a method getyear of the class ChineseCalendar. getyear returns the year of the first occurrence of a given animal and element (described by its full or informal name) since a specified year. For example, getyear(1924, ox, younger wood (bamboo) ) and getyear(1924, ox, bamboo ) both return The method should return 0 if either the animal or the element string is invalid. Assume that the methods described in parts (a) and (b) work as specified, regardless of what you wrote. Complete the method getyear below. //returns the year of the first occurrence of animal and //element in the Chinese calendar, since year //(year included); returns 0 if such year is not found //precondition: year meets the precondition of the // tozodiacstring method of the // ChineseZodiac class public int getyear(int year, String animal, String element)

6 Question #3: A game uses square tiles that have numbers on their sides. Each tile is labeled with a number on each of its four sides and may be rotated clockwise, as illustrated below. The tiles are represented by the NumberTile class, as given below. public class NumberTile /** Rotates the tile 90 degrees clockwise public void rotate() /* implementation not shown value at left edge of tile public int getleft() /* implementation not shown value at right edge of tile public int getright() /* implementation not shown Tiles are placed on a game board so that the adjoining sides of adjacent tiles have the same number. The following figure illustrates an arrangement of tiles and shows a new tile that is to be placed on the game board.

7 In its original orientation, the new tile can be inserted between the tiles at positions 2 and 3 or between the tiles at positions 3 and 4. If the new tile is rotated once, it can be inserted before the tile at position 0 (the first tile) or after the tile at position 4 (the last tile). Assume that the new tile, in its original orientation, is inserted between the tiles at positions 2 and 3. As a result of the insertion, the tiles at positions 3 and 4 are moved one location to the right, and the new tile is inserted at position 3, as shown below. A partial definition of the TileGame class is given below. public class TileGame /** represents the game board; guaranteed never to be null private ArrayList<NumberTile> board; public TileGame() board = new ArrayList<NumberTile>(); /** Determines where to insert tile, in its current orientation, into game board tile the tile to be placed on the game board the position of tile where tile is to be inserted: * 0 if the board is empty; * -1 if tile does not fit in front, at end, or between any existing tiles; * otherwise, 0 position returned board.size() private int getindexforfit(numbertile tile) /* to be implemented in part (a) /** Places tile on game board if it fits (checking all possible tile orientations if necessary). * If there are no tiles on the game board, the tile is placed at position 0. * The tile should be placed at most 1 time. * Precondition: board is not null tile the tile to be placed on the game board true if tile is placed successfully; false otherwise * Postcondition: the orientations of the other tiles on the board are not changed * Postcondition: the order of the other tiles on the board relative to each other is not changed public boolean inserttile(numbertile tile) /* to be implemented in part (b)

8 (a) Write the TileGame method getindexforfit that determines where a given tile, in its current orientation, fits on the game board. A tile can be inserted at either end of a game board or between two existing tiles if the side(s) of the new tile match the adjacent side(s) of the tile(s) currently on the game board. If there are no tiles on the game board, the position for the insert is 0. The method returns the position that the new tile will occupy on the game board after it has been inserted. If there are multiple possible positions for the tile, the method will return any one of them. If the given tile does not fit anywhere on the game board, the method returns -1. For example, the following diagram shows a game board and two potential tiles to be placed. The call getindexforfit(tile1) can return either 3 or 4 because tile1 can be inserted between the tiles at positions 2 and 3, or between the tiles at positions 3 and 4. The call getindexforfit(tile2) returns -1 because tile2, in its current orientation, does not fit anywhere on the game board. Complete method getindexforfit below. /** Determines where to insert tile, in its current orientation, into game board tile the tile to be placed on the game board the position of tile where tile is to be inserted: * 0 if the board is empty; * -1 if tile does not fit in front, at end, or between any existing tiles; * otherwise, 0 position returned board.size() private int getindexforfit(numbertile tile)

9 (b) Write the TileGame method inserttile that attempts to insert the given tile on the game board. The method returns true if the tile is inserted successfully and false only if the tile cannot be placed on the board in any orientation. Assume that getindexforfit works as specified, regardless of what you wrote in part (a). Complete method inserttile below. /** Places tile on the game board if it fits (checking all possible tile orientations if necessary). * If there are no tiles on the game board, the tile is placed at position 0. * The tile should be placed at most 1 time. * Precondition: board is not null tile the tile to be placed on the game board true if tile is placed successfully; false otherwise * Postcondition: the orientations of the other tiles on the board are not changed * Postcondition: the order of the other tiles on the board relative to each other is not changed public boolean inserttile(numbertile tile)

10 Question #4: A travel agency maintains a list of information about airline flights. Flight information includes a departure time and an arrival time. You may assume that the two times occur on the same day. These times are represented by objects of the Time class. The declaration for the Time class is shown below. It includes a method minutesuntil that returns the difference (in minutes) between the current Time object and another Time object. public class Time difference, in minutes, between this time and other; * difference is negative if other is earlier than this time public int minutesuntil(time other) /* implementation not shown For example, assume that t1 and t2 are Time objects where t1 represents 1:00 P.M. and t2 represents 2:15 P.M. The call t1.minutesuntil(t2) will return 75 and the call t2.minutesuntil(t1) will return -75. The declaration for the Flight class is shown below. It has methods to access the departure time and the arrival time of a flight. You may assume that the departure time of a flight is earlier than its arrival time. public class Flight time at which the flight departs public Time getdeparturetime() /* implementation not shown time at which the flight arrives public Time getarrivaltime() /* implementation not shown

11 A trip consists of a sequence of flights and is represented by the Trip class. The Trip class contains an ArrayList of Flight objects that are stored in chronological order. You may assume that for each flight after the first flight in the list, the departure time of the flight is later than the arrival time of the preceding flight in the list. A partial declaration of the Trip class is shown below. You will write two methods for the Trip class. public class Trip private ArrayList<Flight> flights; // stores the flights (if any) in chronological order the number of minutes from the departure of the first flight to the arrival * of the last flight if there are one or more flights in the trip; * 0, if there are no flights in the trip public int getduration() /* to be implemented in part (a) /** Precondition: the departure time for each flight is later than the arrival time of its * preceding flight the smallest number of minutes between the arrival of a flight and the departure * of the flight immediately after it, if there are two or more flights in the trip; * -1, if there are fewer than two flights in the trip public int getshortestlayover() /* to be implemented in part (b) (a) Complete method getduration below. the number of minutes from the departure of the first flight to the arrival * of the last flight if there are one or more flights in the trip; * 0, if there are no flights in the trip public int getduration()

12 (b) Write the Trip method getshortestlayover. A layover is the number of minutes from the arrival of one flight in a trip to the departure of the flight immediately after it. If there are two or more flights in the trip, the method should return the shortest layover of the trip; otherwise, it should return -1. For example, assume that the instance variable flights of a Trip object vacation contains the following flight information. The call vacation.getshortestlayover() should return 15. Complete method getshortestlayover below. /** Precondition: the departure time for each flight is later than the arrival time of its * preceding flight the smallest number of minutes between the arrival of a flight and the departure * of the flight immediately after it, if there are two or more flights in the trip; * -1, if there are fewer than two flights in the trip public int getshortestlayover()

13 Question #5: Consider a method of encoding and decoding words that is based on a master string. This master string will contain all the letters of the alphabet, some possibly more than once. An example of a master string is "sixtyzipperswerequicklypickedfromthewovenjutebag". This string and its indexes are shown below. An encoded string is defined by a list of string parts. A string part is defined by its starting index in the master string and its length. For example, the string "overeager" is encoded as the list of string parts [ (37, 3), (14, 2), (46, 2), (9, 2) ] denoting the substrings "ove", "re", "ag", and "er". String parts will be represented by the StringPart class shown below. public class StringPart start the starting position of the substring in a master string length the length of the substring in a master string public StringPart(int start, int length) /* implementation not shown the starting position of the substring in a master string public int getstart() /* implementation not shown the length of the substring in a master string public int getlength() /* implementation not shown

14 The class StringCoder provides methods to encode and decode words using a given master string. When encoding, there may be multiple matching string parts of the master string. The helper method findpart is provided to choose a string part within the master string that matches the beginning of a given string. public class StringCoder private String masterstring; master the master string for the StringCoder * Precondition: the master string contains all the letters of the alphabet public StringCoder(String master) masterstring = master; parts an ArrayList of string parts that are valid in the master string * Precondition: parts.size() > 0 the string obtained by concatenating the parts of the master string public String decodestring(arraylist<stringpart> parts) /* to be implemented in part (a) str the string to encode using the master string * Precondition: all of the characters in str appear in the master string; * str.length() > 0 a string part in the master string that matches the beginning of str. * The returned string part has length at least 1. private StringPart findpart(string str) /* implementation not shown word the string to be encoded * Precondition: all of the characters in word appear in the master string; * word.length() > 0 an ArrayList of string parts of the master string that can be combined * to create word public ArrayList<StringPart> encodestring(string word) /* to be implemented in part (b)

15 Write the StringCoder method decodestring. This method retrieves the substrings in the master string represented by each of the StringPart objects in parts, concatenates them in the order in which they appear in parts, and returns the result. Complete method decodestring below. parts an ArrayList of string parts that are valid in the master string * Precondition: parts.size() > 0 the string obtained by concatenating the parts of the master string public String decodestring(arraylist<stringpart> parts) Write the StringCoder method encodestring. A string is encoded by determining the substrings in the master string that can be combined to generate the given string. The encoding starts with a string part that matches the beginning of the word, followed by a string part that matches the beginning of the rest of the word, and so on. The string parts are returned in an array list in the order in which they appear in word. The helper method findpart must be used to choose matching string parts in the master string. Complete method encodestring below. word the string to be encoded * Precondition: all of the characters in word appear in the master string; * word.length() > 0 an ArrayList of string parts of the master string that can be combined * to create word public ArrayList<StringPart> encodestring(string word)

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 17: Heaps and Priority Queues

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 17: Heaps and Priority Queues CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims Lecture 17: Heaps and Priority Queues Stacks and Queues as Lists Stack (LIFO) implemented as list insert (i.e.

More information

SAMPLE. Mathematics. Mastering. Yvonne Kang. Selective and Scholarship Tests BOOK 1

SAMPLE. Mathematics. Mastering. Yvonne Kang. Selective and Scholarship Tests BOOK 1 BOOK 1 Mastering Mathematics Yvonne Kang Five Senses Education Pty Ltd 2/195 Prospect Highway Seven Hills 2147 New South Wales Australia Copyright Five Senses Education 2017 First Published 2017 All rights

More information

class TicTacToe: def init (self): # board is a list of 10 strings representing the board(ignore index 0) self.board = [" "]*10 self.

class TicTacToe: def init (self): # board is a list of 10 strings representing the board(ignore index 0) self.board = [ ]*10 self. The goal of this lab is to practice problem solving by implementing the Tic Tac Toe game. Tic Tac Toe is a game for two players who take turns to fill a 3 X 3 grid with either o or x. Each player alternates

More information

Problem A Rearranging a Sequence

Problem A Rearranging a Sequence Problem A Rearranging a Sequence Input: Standard Input Time Limit: seconds You are given an ordered sequence of integers, (,,,...,n). Then, a number of requests will be given. Each request specifies an

More information

COUNTING AND PROBABILITY

COUNTING AND PROBABILITY CHAPTER 9 COUNTING AND PROBABILITY Copyright Cengage Learning. All rights reserved. SECTION 9.2 Possibility Trees and the Multiplication Rule Copyright Cengage Learning. All rights reserved. Possibility

More information

c 2010 Felleisen, Proulx, et. al.

c 2010 Felleisen, Proulx, et. al. 9 Direct Access Data Structures Practice Problems Practice problems help you get started, if some of the lab and lecture material is not clear. You are not required to do these problems, but make sure

More information

PRIORITY QUEUES AND HEAPS. Lecture 19 CS2110 Spring 2014

PRIORITY QUEUES AND HEAPS. Lecture 19 CS2110 Spring 2014 1 PRIORITY QUEUES AND HEAPS Lecture 19 CS2110 Spring 2014 Readings and Homework 2 Read Chapter 2 to learn about heaps Salespeople often make matrices that show all the great features of their product that

More information

PRIORITY QUEUES AND HEAPS

PRIORITY QUEUES AND HEAPS PRIORITY QUEUES AND HEAPS Lecture 1 CS2110 Fall 2014 Reminder: A4 Collision Detection 2 Due tonight by midnight Readings and Homework 3 Read Chapter 2 A Heap Implementation to learn about heaps Exercise:

More information

CMPS 12A Introduction to Programming Programming Assignment 5 In this assignment you will write a Java program that finds all solutions to the n-queens problem, for. Begin by reading the Wikipedia article

More information

In the game of Chess a queen can move any number of spaces in any linear direction: horizontally, vertically, or along a diagonal.

In the game of Chess a queen can move any number of spaces in any linear direction: horizontally, vertically, or along a diagonal. CMPS 12A Introduction to Programming Winter 2013 Programming Assignment 5 In this assignment you will write a java program finds all solutions to the n-queens problem, for 1 n 13. Begin by reading the

More information

COCI 2008/2009 Contest #3, 13 th December 2008 TASK PET KEMIJA CROSS MATRICA BST NAJKRACI

COCI 2008/2009 Contest #3, 13 th December 2008 TASK PET KEMIJA CROSS MATRICA BST NAJKRACI TASK PET KEMIJA CROSS MATRICA BST NAJKRACI standard standard time limit second second second 0. seconds second 5 seconds memory limit MB MB MB MB MB MB points 0 0 70 0 0 0 500 Task PET In the popular show

More information

Homework Assignment #2

Homework Assignment #2 CS 540-2: Introduction to Artificial Intelligence Homework Assignment #2 Assigned: Thursday, February 15 Due: Sunday, February 25 Hand-in Instructions This homework assignment includes two written problems

More information

Philadelphia Classic 2013 Hosted by the Dining Philosophers University of Pennsylvania

Philadelphia Classic 2013 Hosted by the Dining Philosophers University of Pennsylvania Philadelphia Classic 2013 Hosted by the Dining Philosophers University of Pennsylvania Basic rules: 4 hours, 9 problems, 1 computer per team You can only use the internet for accessing the Javadocs, and

More information

INTRODUCTION TO COMPUTER SCIENCE I PROJECT 6 Sudoku! Revision 2 [2010-May-04] 1

INTRODUCTION TO COMPUTER SCIENCE I PROJECT 6 Sudoku! Revision 2 [2010-May-04] 1 INTRODUCTION TO COMPUTER SCIENCE I PROJECT 6 Sudoku! Revision 2 [2010-May-04] 1 1 The game of Sudoku Sudoku is a game that is currently quite popular and giving crossword puzzles a run for their money

More information

Problem A. Mystic Craft

Problem A. Mystic Craft Problem A Mystic Craft In the Ancient Clash of Mystic Pandas (ACM Pandas) game, the player plays the role of a Panda Knight who needs to defend Panda Land by defeating evil Panda Wizards. As the wizards

More information

Sida Zhiyezi Playing Cards

Sida Zhiyezi Playing Cards Sida Zhiyezi Playing Cards Copyright Vasey Corporation Pty Ltd Introduction Sida Zhiyezi brings the centuries old tradition of four suit card decks into the 21 st Century through several innovations. It

More information

Sponsored by IBM. 2. All programs will be re-compiled prior to testing with the judges data.

Sponsored by IBM. 2. All programs will be re-compiled prior to testing with the judges data. ACM International Collegiate Programming Contest 22 East Central Regional Contest Ashland University University of Cincinnati Western Michigan University Sheridan University November 9, 22 Sponsored by

More information

GAME MECHANICS CHINESE ZODIAC DIE If a C appears in one of the die boxes of a card, then the player using the card must roll the Chinese Zodiac die.

GAME MECHANICS CHINESE ZODIAC DIE If a C appears in one of the die boxes of a card, then the player using the card must roll the Chinese Zodiac die. Creature Feature Bunny Bits Unwrap all of the cards. Large cards with a Creature Feature Sinister Bunny on the back are shuffled into the Draw Pile. The small Zodiac Cards are shuffled into their respective

More information

1 This work was partially supported by NSF Grant No. CCR , and by the URI International Engineering Program.

1 This work was partially supported by NSF Grant No. CCR , and by the URI International Engineering Program. Combined Error Correcting and Compressing Codes Extended Summary Thomas Wenisch Peter F. Swaszek Augustus K. Uht 1 University of Rhode Island, Kingston RI Submitted to International Symposium on Information

More information

PRIORITY QUEUES AND HEAPS. Slides of Ken Birman, Cornell University

PRIORITY QUEUES AND HEAPS. Slides of Ken Birman, Cornell University PRIORITY QUEUES AND HEAPS Slides of Ken Birman, Cornell University The Bag Interface 2 A Bag: interface Bag { void insert(e obj); E extract(); //extract some element boolean isempty(); } Examples: Stack,

More information

1 Recursive Solvers. Computational Problem Solving Michael H. Goldwasser Saint Louis University Tuesday, 23 September 2014

1 Recursive Solvers. Computational Problem Solving Michael H. Goldwasser Saint Louis University Tuesday, 23 September 2014 CSCI 269 Fall 2014 Handout: Recursive Solvers Computational Problem Solving Michael H. Goldwasser Saint Louis University Tuesday, 23 September 2014 1 Recursive Solvers For today s practice, we look at

More information

Carnegie Mellon University. Invitational Programming Competition. Eight Problems

Carnegie Mellon University. Invitational Programming Competition. Eight Problems Carnegie Mellon University Invitational Programming Competition Eight Problems March, 007 You can program in C, C++, or Java; note that the judges will re-compile your programs before testing. Your programs

More information

Assignment 12 CSc 210 Fall 2017 Due December 6th, 8:00 pm MST

Assignment 12 CSc 210 Fall 2017 Due December 6th, 8:00 pm MST Assignment 12 CSc 210 Fall 2017 Due December 6th, 8:00 pm MST Introduction In this final project, we will incorporate many ideas learned from this class into one program. Using your skills for decomposing

More information

ENEE 150: Intermediate Programming Concepts for Engineers Spring 2018 Handout #7. Project #1: Checkers, Due: Feb. 19th, 11:59p.m.

ENEE 150: Intermediate Programming Concepts for Engineers Spring 2018 Handout #7. Project #1: Checkers, Due: Feb. 19th, 11:59p.m. ENEE 150: Intermediate Programming Concepts for Engineers Spring 2018 Handout #7 Project #1: Checkers, Due: Feb. 19th, 11:59p.m. In this project, you will build a program that allows two human players

More information

UCF Local Contest August 31, 2013

UCF Local Contest August 31, 2013 Circles Inside a Square filename: circle You have 8 circles of equal size and you want to pack them inside a square. You want to minimize the size of the square. The following figure illustrates the minimum

More information

1. Completing Sequences

1. Completing Sequences 1. Completing Sequences Two common types of mathematical sequences are arithmetic and geometric progressions. In an arithmetic progression, each term is the previous one plus some integer constant, e.g.,

More information

12. 6 jokes are minimal.

12. 6 jokes are minimal. Pigeonhole Principle Pigeonhole Principle: When you organize n things into k categories, one of the categories has at least n/k things in it. Proof: If each category had fewer than n/k things in it then

More information

API Specification Doc Version Date Author Description

API Specification Doc Version Date Author Description API Specification Doc Version Date Author Description 1.0 31-Aug-2012 ----- Initial draft 1. Login 1. Signup 2. Save Device Token 3. Get User Score 4. Get Seasons 5. Get All Animals 6. Get All Animaltypes

More information

CS 32 Puzzles, Games & Algorithms Fall 2013

CS 32 Puzzles, Games & Algorithms Fall 2013 CS 32 Puzzles, Games & Algorithms Fall 2013 Study Guide & Scavenger Hunt #2 November 10, 2014 These problems are chosen to help prepare you for the second midterm exam, scheduled for Friday, November 14,

More information

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6 CS100: DISCRETE STRUCTURES Lecture 8 Counting - CH6 Lecture Overview 2 6.1 The Basics of Counting: THE PRODUCT RULE THE SUM RULE THE SUBTRACTION RULE THE DIVISION RULE 6.2 The Pigeonhole Principle. 6.3

More information

WPF PUZZLE GP 2018 ROUND 1 COMPETITION BOOKLET. Host Country: Turkey. Serkan Yürekli, Salih Alan, Fatih Kamer Anda, Murat Can Tonta A B H G A B I H

WPF PUZZLE GP 2018 ROUND 1 COMPETITION BOOKLET. Host Country: Turkey. Serkan Yürekli, Salih Alan, Fatih Kamer Anda, Murat Can Tonta A B H G A B I H Host Country: urkey WPF PUZZE GP 0 COMPEON BOOKE Serkan Yürekli, Salih Alan, Fatih Kamer Anda, Murat Can onta ROUND Special Notes: Note that there is partial credit available on puzzle for a close answer.

More information

Balsall Common U3A Mahjong Rules

Balsall Common U3A Mahjong Rules A Mahjong set contains 144 tiles: Suits: Bamboo, Characters and Circles (36 x 3 = 108) Honours: Winds (East, South, West and North) (4 x 4 = 16) Dragons (White, Green and Red) (4 x 3 = 12) Flowers: Red

More information

Unhappy with the poor health of his cows, Farmer John enrolls them in an assortment of different physical fitness activities.

Unhappy with the poor health of his cows, Farmer John enrolls them in an assortment of different physical fitness activities. Problem 1: Marathon Unhappy with the poor health of his cows, Farmer John enrolls them in an assortment of different physical fitness activities. His prize cow Bessie is enrolled in a running class, where

More information

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015.

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015. Monday, February 2, 2015 Topics for today Homework #1 Encoding checkers and chess positions Constructing variable-length codes Huffman codes Homework #1 Is assigned today. Answers due by noon on Monday,

More information

WPF PUZZLE GP 2018 ROUND 2 INSTRUCTION BOOKLET. Host Country: Switzerland. Markus Roth, Roger Kohler, Esther Naef

WPF PUZZLE GP 2018 ROUND 2 INSTRUCTION BOOKLET. Host Country: Switzerland. Markus Roth, Roger Kohler, Esther Naef ROUND WPF PUZZLE GP 0 INSTRUCTION OOKLET Host Country: Switzerland Markus Roth, Roger Kohler, Esther Naef Special Notes: CH is short for Confoederatio Helvetica, the Latin name for Switzerland, and appears

More information

Spring Festival. Happy New year

Spring Festival. Happy New year Spring Festival Happy New year 小 年 除 夕 春 节 元 宵 Spring Festival is the most important festival in China. People used to call it "the Lunar New Year". It always starts between January the first and February

More information

DELIVERABLES. This assignment is worth 50 points and is due on the crashwhite.polytechnic.org server at 23:59:59 on the date given in class.

DELIVERABLES. This assignment is worth 50 points and is due on the crashwhite.polytechnic.org server at 23:59:59 on the date given in class. AP Computer Science Partner Project - VideoPoker ASSIGNMENT OVERVIEW In this assignment you ll be creating a small package of files which will allow a user to play a game of Video Poker. For this assignment

More information

AP Computer Science A Practice Test 6 - Picture and Elevens Labs

AP Computer Science A Practice Test 6 - Picture and Elevens Labs AP Computer Science A Practice Test 6 - Picture and Elevens Labs Name Date Period 1) What are the RGB values for a white pixel? R, G, B = 2) a) How many bytes does it take in the RGB color model (including

More information

COMM901 Source Coding and Compression Winter Semester 2013/2014. Midterm Exam

COMM901 Source Coding and Compression Winter Semester 2013/2014. Midterm Exam German University in Cairo - GUC Faculty of Information Engineering & Technology - IET Department of Communication Engineering Dr.-Ing. Heiko Schwarz COMM901 Source Coding and Compression Winter Semester

More information

ACM International Collegiate Programming Contest 2010

ACM International Collegiate Programming Contest 2010 International Collegiate acm Programming Contest 2010 event sponsor ACM International Collegiate Programming Contest 2010 Latin American Regional Contests October 22nd-23rd, 2010 Contest Session This problem

More information

Homework Assignment #1

Homework Assignment #1 CS 540-2: Introduction to Artificial Intelligence Homework Assignment #1 Assigned: Thursday, February 1, 2018 Due: Sunday, February 11, 2018 Hand-in Instructions: This homework assignment includes two

More information

CS 540-2: Introduction to Artificial Intelligence Homework Assignment #2. Assigned: Monday, February 6 Due: Saturday, February 18

CS 540-2: Introduction to Artificial Intelligence Homework Assignment #2. Assigned: Monday, February 6 Due: Saturday, February 18 CS 540-2: Introduction to Artificial Intelligence Homework Assignment #2 Assigned: Monday, February 6 Due: Saturday, February 18 Hand-In Instructions This assignment includes written problems and programming

More information

COS 226 Algorithms and Data Structures Fall Midterm Exam

COS 226 Algorithms and Data Structures Fall Midterm Exam COS 226 lgorithms and Data Structures Fall 2015 Midterm Exam You have 80 minutes for this exam. The exam is closed book, except that you are allowed to use one page of notes (8.5-by-11, one side, in your

More information

Transportation Timetabling

Transportation Timetabling Outline DM87 SCHEDULING, TIMETABLING AND ROUTING 1. Sports Timetabling Lecture 16 Transportation Timetabling Marco Chiarandini 2. Transportation Timetabling Tanker Scheduling Air Transport Train Timetabling

More information

CMSC 206: Data Structures Harry Potter and the Practice Final Exam AND THE CS EXAM

CMSC 206: Data Structures Harry Potter and the Practice Final Exam AND THE CS EXAM CMSC 206: Data Structures Harry Potter and the Practice Final Exam AND THE CS EXAM Many, far and wide, have read about the adventures of Harry, Ron, and Hermione. What you have read is a fabrication a

More information

Chapter 10 Error Detection and Correction 10.1

Chapter 10 Error Detection and Correction 10.1 Data communication and networking fourth Edition by Behrouz A. Forouzan Chapter 10 Error Detection and Correction 10.1 Note Data can be corrupted during transmission. Some applications require that errors

More information

Team Name: 1. Remember that a palindrome is a number (or word) that reads the same backwards and forwards. For example, 353 and 2112 are palindromes.

Team Name: 1. Remember that a palindrome is a number (or word) that reads the same backwards and forwards. For example, 353 and 2112 are palindromes. 1. Remember that a palindrome is a number (or word) that reads the same backwards and forwards. or example, 353 and 2112 are palindromes. Observe that the base 2 representation of 2015 is a palindrome.

More information

Solving the Rubik s Cube

Solving the Rubik s Cube Solving the Rubik s Cube The Math Behind the Cube: How many different combinations are possible on a 3x3 cube? There are 6 sides each with 9 squares giving 54 squares. Thus there will be 54 53 52 51 50

More information

Game components. Common components: 1 dice tower. 24 progress tokens. 40 commodity tokens 8 of each type

Game components. Common components: 1 dice tower. 24 progress tokens. 40 commodity tokens 8 of each type Follow the lead of the famous navigator and discoverer Amerigo Vespucci. New lands are waiting to be discovered and to provide a new homeland rich with valuable resources ffor its settlers. Good planning

More information

Contents Maryland High School Programming Contest 1. 1 Coin Flip 3. 2 Weakest Microbot 5. 3 Digit Product Sequences 7.

Contents Maryland High School Programming Contest 1. 1 Coin Flip 3. 2 Weakest Microbot 5. 3 Digit Product Sequences 7. 2015 Maryland High School Programming Contest 1 Contents 1 Coin Flip 3 2 Weakest Microbot 5 3 Digit Product Sequences 7 4 SignPost I 9 5 Minimum Flips 11 6 The Can t-move Game 13 7 SignPost II 15 8 Guessing

More information

A PUZZLE OF TOSSING COINS

A PUZZLE OF TOSSING COINS A PUZZLE OF TOSSING COINS UMESH P. NARENDRAN. Question A large number of people are tossing unbiased coins that have equal probability for heads and tails. Each of them tosses a coin until he/she gets

More information

BALDWIN WALLACE UNIVERSITY 2013 PROGRAMMING CONTEST

BALDWIN WALLACE UNIVERSITY 2013 PROGRAMMING CONTEST BALDWIN WALLACE UNIVERSITY 2013 PROGRAMMING CONTEST DO NOT OPEN UNTIL INSTRUCTED TO DO SO! Mystery Message Marvin the Paranoid Android needs to send an encrypted message to Arthur Den. Marvin is absurdly

More information

To use one-dimensional arrays and implement a collection class.

To use one-dimensional arrays and implement a collection class. Lab 8 Handout 10 CSCI 134: Spring, 2015 Concentration Objective To use one-dimensional arrays and implement a collection class. Your lab assignment this week is to implement the memory game Concentration.

More information

dominoes Documentation

dominoes Documentation dominoes Documentation Release 6.0.0 Alan Wagner January 13, 2017 Contents 1 Install 3 2 Usage Example 5 3 Command Line Interface 7 4 Artificial Intelligence Players 9 4.1 Players..................................................

More information

With Question/Answer Animations. Chapter 6

With Question/Answer Animations. Chapter 6 With Question/Answer Animations Chapter 6 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and

More information

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University VISUAL ALGEBRA FOR COLLEGE STUDENTS Laurie J. Burton Western Oregon University Visual Algebra for College Students Copyright 010 All rights reserved Laurie J. Burton Western Oregon University Many of the

More information

WPF PUZZLE GP 2018 ROUND 2. COMPETITION BOOKLET Host Country: Switzerland. ScHWeIZ. ScHWeiz. schweiz. SchWEIZ. SchwEiz. SchWEiZ. schweiz.

WPF PUZZLE GP 2018 ROUND 2. COMPETITION BOOKLET Host Country: Switzerland. ScHWeIZ. ScHWeiz. schweiz. SchWEIZ. SchwEiz. SchWEiZ. schweiz. WPF PUZZLE GP COMPETITION BOOKLET Host Country: Switzerland Markus Roth, Roger Kohler, Esther Naef Special Notes: CH is short for Confoederatio Helvetica, the Latin name for Switzerland, and appears in

More information

TASK FUNGHI ZMIJA TRAKTOR ZGODAN JABUKE DIVLJAK. standard input (stdio) standard output (stdout)

TASK FUNGHI ZMIJA TRAKTOR ZGODAN JABUKE DIVLJAK. standard input (stdio) standard output (stdout) 5 th round, January 7 th, 205 TASK FUNGHI ZMIJA TRAKTOR ZGODAN JABUKE DIVLJAK standard (stdio) standard (stdout) time limit second second 2 seconds second 2 seconds seconds memory limit 2 MB 2 MB 2 MB

More information

S = {(1, 1), (1, 2),, (6, 6)}

S = {(1, 1), (1, 2),, (6, 6)} Part, MULTIPLE CHOICE, 5 Points Each An experiment consists of rolling a pair of dice and observing the uppermost faces. The sample space for this experiment consists of 6 outcomes listed as pairs of numbers:

More information

2015 ACM ICPC Southeast USA Regional Programming Contest. Division 1

2015 ACM ICPC Southeast USA Regional Programming Contest. Division 1 2015 ACM ICPC Southeast USA Regional Programming Contest Division 1 Airports... 1 Checkers... 3 Coverage... 5 Gears... 6 Grid... 8 Hilbert Sort... 9 The Magical 3... 12 Racing Gems... 13 Simplicity...

More information

Wednesday, February 1, 2017

Wednesday, February 1, 2017 Wednesday, February 1, 2017 Topics for today Encoding game positions Constructing variable-length codes Huffman codes Encoding Game positions Some programs that play two-player games (e.g., tic-tac-toe,

More information

Strings, Puzzle App I

Strings, Puzzle App I Strings, Puzzle App I CSE 120 Winter 2018 Instructor: Teaching Assistants: Justin Hsia Anupam Gupta, Cheng Ni, Eugene Oh, Sam Wolfson, Sophie Tian, Teagan Horkan Going beyond Pokemon Go: preparing for

More information

November 6, Chapter 8: Probability: The Mathematics of Chance

November 6, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 6, 2013 Last Time Crystallographic notation Groups Crystallographic notation The first symbol is always a p, which indicates that the pattern

More information

Printing: You may print to the printer at any time during the test.

Printing: You may print to the printer at any time during the test. UW Madison's 2006 ACM-ICPC Individual Placement Test October 1, 12:00-5:00pm, 1350 CS Overview: This test consists of seven problems, which will be referred to by the following names (respective of order):

More information

MLAG BASIC EQUATIONS Tournament Rules

MLAG BASIC EQUATIONS Tournament Rules MLAG BASIC EQUATIONS Tournament Rules 2017-18 I. Starting a Match (Round) A. Two- or three-player matches will be played. A match is composed of one or more shakes. A shake consists of a roll of the cubes

More information

Problem 2A Consider 101 natural numbers not exceeding 200. Prove that at least one of them is divisible by another one.

Problem 2A Consider 101 natural numbers not exceeding 200. Prove that at least one of them is divisible by another one. 1. Problems from 2007 contest Problem 1A Do there exist 10 natural numbers such that none one of them is divisible by another one, and the square of any one of them is divisible by any other of the original

More information

Cardinality. Hebrew alphabet). We write S = ℵ 0 and say that S has cardinality aleph null.

Cardinality. Hebrew alphabet). We write S = ℵ 0 and say that S has cardinality aleph null. Section 2.5 1 Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted A = B, if and only if there is a one-to-one correspondence (i.e., a bijection) from A to

More information

CSE101: Algorithm Design and Analysis. Ragesh Jaiswal, CSE, UCSD

CSE101: Algorithm Design and Analysis. Ragesh Jaiswal, CSE, UCSD Longest increasing subsequence Problem Longest increasing subsequence: You are given a sequence of integers A[1], A[2],..., A[n] and you are asked to find a longest increasing subsequence of integers.

More information

Perimeter and Area: The Mysterious Connection Assessment

Perimeter and Area: The Mysterious Connection Assessment Perimeter and Area: The Mysterious Connection Assessment 1. Given the polygon below, which of the following polygons does not have the same perimeter? A. B. C. D. The Mysterious Connection Assessment Materials

More information

1. Compare the length, weight and volume of two or more objects using direct comparison or a non-standard unit.

1. Compare the length, weight and volume of two or more objects using direct comparison or a non-standard unit. Students: 1. Students use direct comparison and non-standard units to describe the measurements of objects. 1. Compare the length, weight and volume of two or more objects using direct comparison or a

More information

COS 226 Algorithms and Data Structures Fall Midterm Exam

COS 226 Algorithms and Data Structures Fall Midterm Exam COS 226 lgorithms and Data Structures Fall 2015 Midterm Exam This exam has 8 questions worth a total of 100 points. You have 80 minutes. The exam is closed book, except that you are allowed to use one

More information

Problems. High School Programming Tournament. acm. YnE. Seventh Annual University of Central Florida

Problems. High School Programming Tournament. acm. YnE. Seventh Annual University of Central Florida Seventh Annual University of Central Florida acm YnE High School Programming Tournament Problems Problem Name How Many Zeroes? Cross Words Mind Your PQs Interesting Intersections Dave's Socks It Makes

More information

November 8, Chapter 8: Probability: The Mathematics of Chance

November 8, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 8, 2013 Last Time Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Crystallographic notation The first symbol

More information

DE BRUIJN SEQUENCES WITH VARYING COMBS. Abbas Alhakim 1 Department of Mathematics, American University of Beirut, Beirut, Lebanon

DE BRUIJN SEQUENCES WITH VARYING COMBS. Abbas Alhakim 1 Department of Mathematics, American University of Beirut, Beirut, Lebanon #A1 INTEGERS 14A (2014) DE BRUIJN SEQUENCES WITH VARYING COMBS Abbas Alhakim 1 Department of Mathematics, American University of Beirut, Beirut, Lebanon aa145@aub.edu.lb Steve Butler Department of Mathematics,

More information

Universal Cycles for Permutations Theory and Applications

Universal Cycles for Permutations Theory and Applications Universal Cycles for Permutations Theory and Applications Alexander Holroyd Microsoft Research Brett Stevens Carleton University Aaron Williams Carleton University Frank Ruskey University of Victoria Combinatorial

More information

An Intuitive Approach to Groups

An Intuitive Approach to Groups Chapter An Intuitive Approach to Groups One of the major topics of this course is groups. The area of mathematics that is concerned with groups is called group theory. Loosely speaking, group theory is

More information

2. Nine points are distributed around a circle in such a way that when all ( )

2. Nine points are distributed around a circle in such a way that when all ( ) 1. How many circles in the plane contain at least three of the points (0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)? Solution: There are ( ) 9 3 = 8 three element subsets, all

More information

arxiv: v1 [math.gt] 21 Mar 2018

arxiv: v1 [math.gt] 21 Mar 2018 Space-Efficient Knot Mosaics for Prime Knots with Mosaic Number 6 arxiv:1803.08004v1 [math.gt] 21 Mar 2018 Aaron Heap and Douglas Knowles June 24, 2018 Abstract In 2008, Kauffman and Lomonaco introduce

More information

Nintendo Ten Billion Barrel

Nintendo Ten Billion Barrel Nintendo Ten Billion Barrel How to solve the puzzle first get really familiar with this notation by Lyle Semchyshyn Figure 1 is from above and Figure 2 is a cut-away view from the side. Figure 1 Figure

More information

CS 152 Computer Programming Fundamentals Lab 8: Klondike Solitaire

CS 152 Computer Programming Fundamentals Lab 8: Klondike Solitaire CS 152 Computer Programming Fundamentals Lab 8: Klondike Solitaire Brooke Chenoweth Fall 2018 1 Game Rules You are likely familiar with this solitaire card game. An implementation has been included with

More information

LESSON 20: ARTS FOR SPIRITUAL INTERVENTION To Seek Divine Assistance: Emas, Japan

LESSON 20: ARTS FOR SPIRITUAL INTERVENTION To Seek Divine Assistance: Emas, Japan LESSON 20: ARTS FOR SPIRITUAL INTERVENTION Fig..2 Votive plaque (ema). Japan. Wood, paint. W: 30 cm. Fowler Museum at UCLA. Gift of Dr. Daniel C. Holtom. X89.87.. Fowler Museum at UCLA. Intersections Curriculum

More information

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School Arduino Control of Tetrix Prizm Robotics Motors and Servos Introduction to Robotics and Engineering Marist School Motor or Servo? Motor Faster revolution but less Power Tetrix 12 Volt DC motors have a

More information

BAPC The Problem Set

BAPC The Problem Set BAPC 2012 The 2012 Benelux Algorithm Programming Contest The Problem Set A B C D E F G H I J Another Dice Game Black Out Chess Competition Digit Sum Encoded Message Fire Good Coalition Hot Dogs in Manhattan

More information

Maîtres du Temps tourbillon pocket watches -12 unique pieces each with Chinese Zodiac dial

Maîtres du Temps tourbillon pocket watches -12 unique pieces each with Chinese Zodiac dial WatchProSite News Central Maîtres du Temps tourbillon pocket watches -12 unique pieces each with Chinese Zodiac dial Mar 11, 2016,10:36 AM Maîtres du Temps continues its cultural approach to the conception

More information

NMC Sample Problems: Grade 5

NMC Sample Problems: Grade 5 NMC Sample Problems: Grade 1. 1 2 6 10 8 9 6 =? 10 4 1 8 1 20 6 2 2. What is the value of 6 4 + 2 1 2? 1 4 1 4 1 4 12 12. What is the value of 2, 46 + 1, 74, 894 expressed to the nearest thousand? 4, 000

More information

WPF PUZZLE GP 2016 ROUND 8 INSTRUCTION BOOKLET. Host Country: Russia. Andrey Bogdanov. Special Notes: No special notes for this round.

WPF PUZZLE GP 2016 ROUND 8 INSTRUCTION BOOKLET. Host Country: Russia. Andrey Bogdanov. Special Notes: No special notes for this round. WPF PUZZLE GP 01 INSTRUTION OOKLET Host ountry: Russia ndrey ogdanov Special Notes: No special notes for this round. Points, asual Section: Points, ompetitive Section: 1. Not Like the Others 1. Not Like

More information

IMPERIAL ASSAULT-CORE GAME RULES REFERENCE GUIDE

IMPERIAL ASSAULT-CORE GAME RULES REFERENCE GUIDE STOP! This Rules Reference Guide does not teach players how to play the game. Players should first read the Learn to Play booklet, then use this Rules Reference Guide as needed when playing the game. INTRODUCTION

More information

CS4700 Fall 2011: Foundations of Artificial Intelligence. Homework #2

CS4700 Fall 2011: Foundations of Artificial Intelligence. Homework #2 CS4700 Fall 2011: Foundations of Artificial Intelligence Homework #2 Due Date: Monday Oct 3 on CMS (PDF) and in class (hardcopy) Submit paper copies at the beginning of class. Please include your NetID

More information

Tile Number and Space-Efficient Knot Mosaics

Tile Number and Space-Efficient Knot Mosaics Tile Number and Space-Efficient Knot Mosaics Aaron Heap and Douglas Knowles arxiv:1702.06462v1 [math.gt] 21 Feb 2017 February 22, 2017 Abstract In this paper we introduce the concept of a space-efficient

More information

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018 Mathematical Foundations of omputer Science Lecture Outline ugust 30, 2018 ounting ounting is a part of combinatorics, an area of mathematics which is concerned with the arrangement of objects of a set

More information

Bounds for Cut-and-Paste Sorting of Permutations

Bounds for Cut-and-Paste Sorting of Permutations Bounds for Cut-and-Paste Sorting of Permutations Daniel Cranston Hal Sudborough Douglas B. West March 3, 2005 Abstract We consider the problem of determining the maximum number of moves required to sort

More information

Bachelor Project Major League Wizardry: Game Engine. Phillip Morten Barth s113404

Bachelor Project Major League Wizardry: Game Engine. Phillip Morten Barth s113404 Bachelor Project Major League Wizardry: Game Engine Phillip Morten Barth s113404 February 28, 2014 Abstract The goal of this project is to design and implement a flexible game engine based on the rules

More information

SAPO Finals 2017 Day 2 Cape Town, South Africa, 8 October standard output

SAPO Finals 2017 Day 2 Cape Town, South Africa, 8 October standard output Problem A. Cave Input file: Output file: 3 seconds 6 seconds 30 seconds 128 megabytes cave For reasons unknown, Bruce finds himself waking up in a large cave. Fortunately, he seems to have a map of the

More information

Tiling Problems. This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane

Tiling Problems. This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane Tiling Problems This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane The undecidable problems we saw at the start of our unit

More information

COCI 2008/2009 Contest #6, 7 th March 2009 TASK BUKA BAZEN NERED CUSKIJA DOSTAVA SLICICE

COCI 2008/2009 Contest #6, 7 th March 2009 TASK BUKA BAZEN NERED CUSKIJA DOSTAVA SLICICE TASK BUKA BAZEN NERED CUSKIJA DOSTAVA SLICICE standard standard time limit 1 second 1 second 1 second 1 second seconds seconds memory limit 2 MB 2 MB 2 MB 2 MB 128 MB 2 MB points 0 60 60 100 120 10 500

More information

Problem A Catch the Plane Time limit: 10 seconds

Problem A Catch the Plane Time limit: 10 seconds Problem A Catch the Plane Time limit: 10 seconds Your plane to the ICPC Finals departs in a short time, and the only way to get to the airport is by bus. Unfortunately, some of the bus drivers are considering

More information

CS1020 Sit-In Lab #03 AY2015/16 Semester 2. Eels and Escalators

CS1020 Sit-In Lab #03 AY2015/16 Semester 2. Eels and Escalators is a newly-developed board game. This revolutionary and original game is created by the famous company CPF (Children Party Federation), a company specialized in developing party games for children. They

More information

2018 Chinese Horoscopes for the Twelve Chinese Zodiac Animal Signs By Ting-Foon Chik, Chinese Astrologer and Feng Shui Master, CM BAPS

2018 Chinese Horoscopes for the Twelve Chinese Zodiac Animal Signs By Ting-Foon Chik, Chinese Astrologer and Feng Shui Master, CM BAPS 2018 Chinese Horoscopes for the Twelve Chinese Zodiac Animal Signs By Ting-Foon Chik, Chinese Astrologer and Feng Shui Master, CM BAPS 2018 is the year of the Dog in Chinese Astrology. Each of the Chinese

More information

5.4 Imperfect, Real-Time Decisions

5.4 Imperfect, Real-Time Decisions 5.4 Imperfect, Real-Time Decisions Searching through the whole (pruned) game tree is too inefficient for any realistic game Moves must be made in a reasonable amount of time One has to cut off the generation

More information

Section Marks Agents / 8. Search / 10. Games / 13. Logic / 15. Total / 46

Section Marks Agents / 8. Search / 10. Games / 13. Logic / 15. Total / 46 Name: CS 331 Midterm Spring 2017 You have 50 minutes to complete this midterm. You are only allowed to use your textbook, your notes, your assignments and solutions to those assignments during this midterm.

More information