CS431 homework 2. 8 June Question 1 (page 54, problem 2.3). Is lg n = O(n)? Is lg n = Ω(n)? Is lg n = Θ(n)?
|
|
- Henry Young
- 6 years ago
- Views:
Transcription
1 CS1 homework June 011 Question 1 (page, problem.). Is lg n = O(n)? Is lg n = Ω(n)? Is lg n = Θ(n)? Answer. Recall the definition of big-o: for all functions f and g, f(n) = O(g(n)) if there exist constants c and N such that for all n > N, f(n) c g(n). For big-omega, replace the with in the above definition. A function f(n) is big-theta of g(n) if f(n) = O(g(n)) and f(n) = Ω(g(n)). If we choose c = 1 and N = 0, then we immediately see that for all n > 0, lg n = 1 n. Therefore lg n = O(n). Since n < n for all n 1, it follows that lg n < lg n = n for all n 1. Even with a constant multiplicative factor on the left-hand side of the inequality, there is a great enough n such that the inequality will be true. This means that lg n Ω(n). Since lg n is not Ω(n), it is not Θ(n). Question. Assume you have a DNA base sequence P of n bases and are given a sequence S of m bases. The problem is to find the place in S where P first occurs, if there is one. 1. Describe a simple exhaustive search algorithms to solve this problem.. Assume and P = TCGATG S = TCGACTCGAATTGCCTCGATGGATCCATATCG. How many comparisons does your algorithm take before it finds where P occurs?. Assume P does not occur in S. How many comparisons does your algorithm take before it discovers this? Answer. 1. On input P = p 1 p p m and S = s 1 s s n the naïve exhaustive search algorithm is as follows: for i = 1 up to n m + 1 1
2 for j = 1 up to m if s i+j p j, break out of this inner loop, and continue to the next iteration of the outer loop if the inner loop terminates, output i if the outer loop terminates, then P does not exist in S. Each number in the following sum is the total number of comparisons when starting at position 1, position, and so on, in the string S: This sum equals.. In the worst case this algorithm performs m comparisons at n m + 1 positions in the string S. Therefore the running time of this algorithm if the string P does not exist in the string S is O(m(n m + 1)). Question (page 1, problem.10). A rook stands on the upper left square of a chessboard. Two players take turns moving the rook either horizontally to the right or vertically downward (as many squares as they want). The player who can place the rook on the lower right square of the chessboard wins. Who will win? Describe the winning strategy. Answer. Recall the analysis of the game we saw in class in which two players took turns moving a king from the upper left corner of the chess board to the bottom right corner. We will start analyzing from the bottom right corner and note that if player one were to start at any position on the bottom row or the right-most column, he or she could certainly win by simply moving the rook to the bottom right corner. See Figure 1a. We also notice that from position g, player one must lose, since he or she will move either down one or right one, allowing player two to move to the final position. See Figure 1b. Now from any position in column g above g, and from any position in row to the right of g, player one can force player two to lose by moving directly to position g. See Figure 1c. At position f, player one must lose, because moving either right or down by one or two allows player two to win. See Figure 1d. This pattern continues all the way back up towards the top left position. See Figure 1e. This means that if both players play optimally, player one will lose if he or she starts with the rook initially in the top left position. Therefore player two will win. The winning strategy for player two follows. On the first turn, player one must move the rook either right along the top row or down along the left-most column. Regardless of where player one moves the rook, player two should move the rook to the diagonal (where all the s are). This forces player one to a losing position for the next turn. Repeat this strategy after each move by player one, and player two will always win.
3 Figure 1: Analyzing the rook problem described in Question. (a) Player one can win from the bottom row or the right-most column. (b) Player one must lose from position g. W W W W W W W W W W W W W W (c) Player one can force player two to lose by moving directly to g. (d) Player one loses at f because any move allows player two to win. WW WW WW WWWWWW W WW WW WW WW WWWWWW W (e) The complete analysis of losing and winning starting positions for player one. W WWWWWW WW WWWWW WWW WWWW WWWW WWW WWWWW WW WWWWWW W
4 Question (page 1, problem.1). Two players play the following game with two sequences of length n and m nucleotides. At every turn a player must delete two nucleotides from one sequence (either the first or the second) and one nucleotide from the other. The player who cannot move loses. Who will win? Describe the winning strategy for each n and m. Answer. et the string of length m be called u and the string of length n be called v. Notice that either m or n (or both) may be zero, representing an empty string. We can view this game as a two player game on a chessboard of m + 1 rows and n + 1 columns in which there is a knight in the top left corner, similar to the game described in Question. The only valid moves for the knight in this game are two moves right and one move down, or two moves down and one move right. The two players take turns moving the knight, and the one who cannot make a move loses. Why is this the correct notion for the original game described in this question? Every move to the right represents a deletion of a letter from v, and every move down represents a deletion of a letter from u. Notice that placing the knight in the right-most column means that n characters have been deleted from v, so it is the empty string at this point. Similarly, placing the knight in the bottom column means that m characters have been deleted from u, so it is the empty string at this point. The board is of size (m + 1) (n + 1) to accomodate the possibility that either u or v is the empty string. As before, we start by examining the bottom right region of the board, where any position along the bottom row or the right-most column is a losing position. In addition, no move can be made from g, so it is also a losing position. See Figure a (which shows the game on an board, so m = n = ). Player one can force player two into a losing position from most of the positions outside these extreme positions, though. See Figure b. The analysis continues until we get the pattern seen in Figure c. The pattern would continue outward for a board of arbitrary size. Now we just need to determine under what conditions (that is, board sizes) player one will win or lose if the knight starts in the top right corner. It will be a little bit simpler to determine under what conditions player one will lose than to determine under what conditions player one will win. If m + 1 represents the number of rows and n + 1 represents the number of columns, then the following positions contain s: m = 0 and n 0, m = and n, m = and n,... n = 0 and m 0, n = and m, n = and m,... Expressed more concisely, m = n = 1, m = n =, m = n =,... m = k and n k for some k N (1) n = k and m k for some k N () m = n = k + 1 for some k N ()
5 Figure : Analyzing the knight problem described in Question for an board. (a) The bottom row and the right-most column are losing positions in the knight game. (b) Player one can force player two into a losing position from the next layer out. WW WW WW WWWWWW (c) The complete analysis of winning and losing starting positions for player one. WW WW WW WW WWWW WW WWW WW WW WWWWWW
6 (Here, N is the set of natural numbers including 0, {0, 1,,...}.) Therefore, if a board with m+1 rows and n +1 columns meets any of these three conditions, player one will lose. Under the complementary set of conditions, player one will win. Translating this back to the original problem, if the strings are of length m and n respectively, then player one will lose if m and n meet any of these conditions. The winning strategy is to move the knight onto one of these strips of losing positions, in order to force the next player to be in a losing position. Question. Describe how RNA works to carry information DNA and helps in making cell proteins. In particular, 1. What are the different forms of RNA and how is their structure different?. What are the different functions of the different forms of RNA?. What do ribosomes do and where are they located? Note: Don t write a book on this, just a page or so will do. This process is discussed on pages of the text but you may need a bit more research than that here. Answer. There are several different forms of ribonucleic acid (RNA). The main three significant types of RNA in humans (to know about for a bioinformatics class) are messenger RNA (mrna), ribosomal RNA (rrna), and transfer RNA (trna). Messenger RNA is a transcription of a portion of DNA which codes for a protein. In the nucleus, a molecule called RNA polymerase forms strands of mrna which are complementary to corresponding portions of DNA. The mrna is a molecular sequence of nucleotides, and each triple of nucleotides (called a codon ) codes for an amino acid, according to a fixed translation table. The translation table has size =, since there are four possible nucleotide bases (A, G, C, and T). Ribosomal RNA makes up the ribosome, an organelle which exists in the cytoplasm outside of the nucleus of the cell, which synthesizes proteins coded by mrna. The ribosome is more of a static collection of rrna and proteins which can be likened to a factory. The mrna is the template along which the ribosome moves, and as the ribosome reads each codon, it appends the amino acid delivered by the appropriate transfer RNA to a growing chain of amino acids called a polypeptide chain which will eventually become part of a protein. Each transfer RNA has an anticodon component, which matches a codon, and a site which binds to the amino acid to which the matching codon corresponds. There is at least one trna in the cell for each codon. When the ribosome reads a codon, it also allows a corresponding trna molecule to bind, and subsequently helps move the amino acid from the trna to the growing polypeptide chain created using previous trna molecules corresponding to prior codons read from mrna.
7 Table 1: One possible dynamic programming table for computing the longest common subsequence of GAGTACA and GCTAGGA. G A G T A C A G C T A 1 G 1 G 1 A 1 Question. Use the CS method in section. of the textbook to find the longest common subsequence of the two sequences v = GAGTACA and w = GCTAGGA. Answer. See Table 1 for one possible dynamic programming table, filled from the top left corner outward using the algorithm shown in the textbook, given the two strings GAGTACA and GCTAGGA. Once the table is filled in, we follow the path from the bottom right corner back to the top left corner (shown in bold) to get the alignment of the two strings. This results in the alignment G--AGTA-A GCTAG--CA giving the longest common subsequence GAGA of length four.
Fun and Games on a Chess Board
Fun and Games on a Chess Board Olga Radko November 19, 2017 I Names of squares on the chess board Color the following squares on the chessboard below: c3, c4, c5, c6, d5, e4, f3, f4, f5, f6 What letter
More information1, 2,, 10. Example game. Pieces and Board: This game is played on a 1 by 10 board. The initial position is an empty board.
,,, 0 Pieces and Board: This game is played on a by 0 board. The initial position is an empty board. To Move: Players alternate placing either one or two pieces on the leftmost open squares. In this game,
More informationDELUXE 3 IN 1 GAME SET
Chess, Checkers and Backgammon August 2012 UPC Code 7-19265-51276-9 HOW TO PLAY CHESS Chess Includes: 16 Dark Chess Pieces 16 Light Chess Pieces Board Start Up Chess is a game played by two players. One
More informationFun and Games on a Chess Board II
Fun and Games on a Chess Board II Early Elementary January 27, 2014 Last week we counted the number of squares of size 2 2 on a chessboard. Today, lets start by counting the number of squares of size 3
More informationBMT 2018 Combinatorics Test Solutions March 18, 2018
. Bob has 3 different fountain pens and different ink colors. How many ways can he fill his fountain pens with ink if he can only put one ink in each pen? Answer: 0 Solution: He has options to fill his
More informationSecond Annual University of Oregon Programming Contest, 1998
A Magic Magic Squares A magic square of order n is an arrangement of the n natural numbers 1,...,n in a square array such that the sums of the entries in each row, column, and each of the two diagonals
More informationA1 Problem Statement Unit Pricing
A1 Problem Statement Unit Pricing Given up to 10 items (weight in ounces and cost in dollars) determine which one by order (e.g. third) is the cheapest item in terms of cost per ounce. Also output the
More informationSenior Math Circles February 10, 2010 Game Theory II
1 University of Waterloo Faculty of Mathematics Centre for Education in Mathematics and Computing Senior Math Circles February 10, 2010 Game Theory II Take-Away Games Last Wednesday, you looked at take-away
More informationThe game of Paco Ŝako
The game of Paco Ŝako Created to be an expression of peace, friendship and collaboration, Paco Ŝako is a new and dynamic chess game, with a mindful touch, and a mind-blowing gameplay. Two players sitting
More informationMovement of the pieces
Movement of the pieces Rook The rook moves in a straight line, horizontally or vertically. The rook may not jump over other pieces, that is: all squares between the square where the rook starts its move
More informationAfter learning the Rules, What should beginners learn next?
After learning the Rules, What should beginners learn next? Chess Puzzling Presentation Nancy Randolph Capital Conference June 21, 2016 Name Introduction to Chess Test 1. How many squares does a chess
More informationHomework 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 informationLearning objective Various Methods for finding initial solution to a transportation problem
Unit 1 Lesson 15: Methods of finding initial solution for a transportation problem. Learning objective Various Methods for finding initial solution to a transportation problem 1. North west corner method
More informationYourTurnMyTurn.com: chess rules. Jan Willem Schoonhoven Copyright 2018 YourTurnMyTurn.com
YourTurnMyTurn.com: chess rules Jan Willem Schoonhoven Copyright 2018 YourTurnMyTurn.com Inhoud Chess rules...1 The object of chess...1 The board...1 Moves...1 Captures...1 Movement of the different pieces...2
More informationCS/COE 1501
CS/COE 1501 www.cs.pitt.edu/~lipschultz/cs1501/ Brute-force Search Brute-force (or exhaustive) search Find the solution to a problem by considering all potential solutions and selecting the correct one
More informationData Structure Analysis
Data Structure Analysis Introduction The objective of this ACW was to investigate the efficiency and performance of alternative data structures. These data structures are required to be created and developed
More informationIn 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 informationWhich Rectangular Chessboards Have a Bishop s Tour?
Which Rectangular Chessboards Have a Bishop s Tour? Gabriela R. Sanchis and Nicole Hundley Department of Mathematical Sciences Elizabethtown College Elizabethtown, PA 17022 November 27, 2004 1 Introduction
More informationRefining Probability Motifs for the Discovery of Existing Patterns of DNA Bachelor Project
Refining Probability Motifs for the Discovery of Existing Patterns of DNA Bachelor Project Susan Laraghy 0584622, Leiden University Supervisors: Hendrik-Jan Hoogeboom and Walter Kosters (LIACS), Kai Ye
More informationFigure 1: The Game of Fifteen
1 FIFTEEN One player has five pennies, the other five dimes. Players alternately cover a number from 1 to 9. You win by covering three numbers somewhere whose sum is 15 (see Figure 1). 1 2 3 4 5 7 8 9
More informationCell Management. Solitaire Puzzle for the piecepack game system Mark Goadrich 2005 Version 1.0
Overview Cell Management Solitaire Puzzle for the piecepack game system Mark Goadrich 2005 Version 1.0 Aliens have abducted two each of six species from Earth. All are currently held captive on a spaceship
More informationLectures: Feb 27 + Mar 1 + Mar 3, 2017
CS420+500: Advanced Algorithm Design and Analysis Lectures: Feb 27 + Mar 1 + Mar 3, 2017 Prof. Will Evans Scribe: Adrian She In this lecture we: Summarized how linear programs can be used to model zero-sum
More informationOCTAGON 5 IN 1 GAME SET
OCTAGON 5 IN 1 GAME SET CHESS, CHECKERS, BACKGAMMON, DOMINOES AND POKER DICE Replacement Parts Order direct at or call our Customer Service department at (800) 225-7593 8 am to 4:30 pm Central Standard
More informationCSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game.
CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25 Homework #1 ( Due: Oct 10 ) Figure 1: The laser game. Task 1. [ 60 Points ] Laser Game Consider the following game played on an n n board,
More informationIf a word starts with a vowel, add yay on to the end of the word, e.g. engineering becomes engineeringyay
ENGR 102-213 - Socolofsky Engineering Lab I - Computation Lab Assignment #07b Working with Array-Like Data Date : due 10/15/2018 at 12:40 p.m. Return your solution (one per group) as outlined in the activities
More informationFinal Practice Problems: Dynamic Programming and Max Flow Problems (I) Dynamic Programming Practice Problems
Final Practice Problems: Dynamic Programming and Max Flow Problems (I) Dynamic Programming Practice Problems To prepare for the final first of all study carefully all examples of Dynamic Programming which
More informationCS61B Lecture #22. Today: Backtracking searches, game trees (DSIJ, Section 6.5) Last modified: Mon Oct 17 20:55: CS61B: Lecture #22 1
CS61B Lecture #22 Today: Backtracking searches, game trees (DSIJ, Section 6.5) Last modified: Mon Oct 17 20:55:07 2016 CS61B: Lecture #22 1 Searching by Generate and Test We vebeenconsideringtheproblemofsearchingasetofdatastored
More informationProblem A. Jumbled Compass
Problem A. Jumbled Compass file: 1 second Jonas is developing the JUxtaPhone and is tasked with animating the compass needle. The API is simple: the compass needle is currently in some direction (between
More informationCMPS 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 informationCSE 21 Practice Final Exam Winter 2016
CSE 21 Practice Final Exam Winter 2016 1. Sorting and Searching. Give the number of comparisons that will be performed by each sorting algorithm if the input list of length n happens to be of the form
More informationIf a pawn is still on its original square, it can move two squares or one square ahead. Pawn Movement
Chess Basics Pawn Review If a pawn is still on its original square, it can move two squares or one square ahead. Pawn Movement If any piece is in the square in front of the pawn, then it can t move forward
More informationStructured Programming Using Procedural Languages INSS Spring 2018
Structured Programming Using Procedural Languages INSS 225.101 - Spring 2018 Project #3 (Individual) For your third project, you are going to write a program like what you did for Project 2. You are going
More informationLecture 1, CS 2050, Intro Discrete Math for Computer Science
Lecture 1, 08--11 CS 050, Intro Discrete Math for Computer Science S n = 1++ 3+... +n =? Note: Recall that for the above sum we can also use the notation S n = n i. We will use a direct argument, in this
More informationCanadian Mathematics Competition An activity of The Centre for Education in Mathematics and Computing, University of Waterloo, Waterloo, Ontario
Canadian Mathematics Competition An activity of The Centre for Education in Mathematics and Computing, University of Waterloo, Waterloo, Ontario Canadian Computing Competition for the Awards Tuesday, March
More informationProblem F. Chessboard Coloring
Problem F Chessboard Coloring You have a chessboard with N rows and N columns. You want to color each of the cells with exactly N colors (colors are numbered from 0 to N 1). A coloring is valid if and
More informationLecture 20: Combinatorial Search (1997) Steven Skiena. skiena
Lecture 20: Combinatorial Search (1997) Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Give an O(n lg k)-time algorithm
More informationarxiv: v1 [math.co] 24 Nov 2018
The Problem of Pawns arxiv:1811.09606v1 [math.co] 24 Nov 2018 Tricia Muldoon Brown Georgia Southern University Abstract Using a bijective proof, we show the number of ways to arrange a maximum number of
More informationEight Queens Puzzle Solution Using MATLAB EE2013 Project
Eight Queens Puzzle Solution Using MATLAB EE2013 Project Matric No: U066584J January 20, 2010 1 Introduction Figure 1: One of the Solution for Eight Queens Puzzle The eight queens puzzle is the problem
More informationUKPA Presents. March 12 13, 2011 INSTRUCTION BOOKLET.
UKPA Presents March 12 13, 2011 INSTRUCTION BOOKLET This contest deals with Sudoku and its variants. The Puzzle types are: No. Puzzle Points 1 ChessDoku 20 2 PanDigital Difference 25 3 Sequence Sudoku
More informationSudoku goes Classic. Gaming equipment and the common DOMINARI - rule. for 2 players from the age of 8 up
Sudoku goes Classic for 2 players from the age of 8 up Gaming equipment and the common DOMINARI - rule Board Sudoku goes classic is played on a square board of 6x6 fields. 4 connected fields of the same
More informationMonte Carlo tree search techniques in the game of Kriegspiel
Monte Carlo tree search techniques in the game of Kriegspiel Paolo Ciancarini and Gian Piero Favini University of Bologna, Italy 22 IJCAI, Pasadena, July 2009 Agenda Kriegspiel as a partial information
More informationI.M.O. Winter Training Camp 2008: Invariants and Monovariants
I.M.. Winter Training Camp 2008: Invariants and Monovariants n math contests, you will often find yourself trying to analyze a process of some sort. For example, consider the following two problems. Sample
More informationChess Handbook: Course One
Chess Handbook: Course One 2012 Vision Academy All Rights Reserved No Reproduction Without Permission WELCOME! Welcome to The Vision Academy! We are pleased to help you learn Chess, one of the world s
More informationa b c d e f g h i j k l m n
Shoebox, page 1 In his book Chess Variants & Games, A. V. Murali suggests playing chess on the exterior surface of a cube. This playing surface has intriguing properties: We can think of it as three interlocked
More informationSUDOKU1 Challenge 2013 TWINS MADNESS
Sudoku1 by Nkh Sudoku1 Challenge 2013 Page 1 SUDOKU1 Challenge 2013 TWINS MADNESS Author : JM Nakache The First Sudoku1 Challenge is based on Variants type from various SUDOKU Championships. The most difficult
More informationCYTOSIS: A CELL BIOLOGY GAME A worker placement game inside a human cell for 2-5 players
RULEBOOK CYTOSIS: A CELL BIOLOGY GAME A worker placement game inside a human cell for 2-5 players GAME SUMMARY Cytosis is a worker placement game that takes place inside a human cell. Players start out
More informationBramble Patch. windhamfabrics.com Designed by Diane Nagle Featuring by FREE PROJECT
windhamfabrics.com 11.01.17 Designed by Diane Nagle Featuring by size: 51 x 51 FREE PROJECT this is a digital representation of the quilt top, fabric may vary. please note: before making your project,
More informationCSE373: Data Structure & Algorithms Lecture 23: More Sorting and Other Classes of Algorithms. Nicki Dell Spring 2014
CSE373: Data Structure & Algorithms Lecture 23: More Sorting and Other Classes of Algorithms Nicki Dell Spring 2014 Admin No class on Monday Extra time for homework 5 J 2 Sorting: The Big Picture Surprising
More information12. 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 informationFigure 1: A Checker-Stacks Position
1 1 CHECKER-STACKS This game is played with several stacks of black and red checkers. You can choose any initial configuration you like. See Figure 1 for example (red checkers are drawn as white). Figure
More information3. Transportation Problem (Part 2)
3. Transportation Problem (Part 2) 3.6 Test IBFS for optimal solution or Examining the Initial Basic Feasible Solution for Non- Degeneracy. 3.7 Transportation Algorithm for Minimization Problem (MODI Method)
More informationN-Queens Problem. Latin Squares Duncan Prince, Tamara Gomez February
N-ueens Problem Latin Squares Duncan Prince, Tamara Gomez February 19 2015 Author: Duncan Prince The N-ueens Problem The N-ueens problem originates from a question relating to chess, The 8-ueens problem
More informationarxiv: v2 [cs.ai] 15 Jul 2016
SIMPLIFIED BOARDGAMES JAKUB KOWALSKI, JAKUB SUTOWICZ, AND MAREK SZYKUŁA arxiv:1606.02645v2 [cs.ai] 15 Jul 2016 Abstract. We formalize Simplified Boardgames language, which describes a subclass of arbitrary
More informationThe Pieces Lesson. In your chess set there are six different types of piece.
In your chess set there are six different types of piece. In this lesson you'll learn their names and where they go at the start of the game. If you happen to have a chess set there it will help you to
More informationSec.on Summary. The Product Rule The Sum Rule The Subtraction Rule (Principle of Inclusion- Exclusion)
Chapter 6 1 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and Combinations 2 Section 6.1 3
More informationa b c d e f g h 1 a b c d e f g h C A B B A C C X X C C X X C C A B B A C Diagram 1-2 Square names
Chapter Rules and notation Diagram - shows the standard notation for Othello. The columns are labeled a through h from left to right, and the rows are labeled through from top to bottom. In this book,
More informationMathematics of Magic Squares and Sudoku
Mathematics of Magic Squares and Sudoku Introduction This article explains How to create large magic squares (large number of rows and columns and large dimensions) How to convert a four dimensional magic
More informationThe patterns considered here are black and white and represented by a rectangular grid of cells. Here is a typical pattern: [Redundant]
Pattern Tours The patterns considered here are black and white and represented by a rectangular grid of cells. Here is a typical pattern: [Redundant] A sequence of cell locations is called a path. A path
More informationAlgorithms and Data Structures CS 372. The Sorting Problem. Insertion Sort - Summary. Merge Sort. Input: Output:
Algorithms and Data Structures CS Merge Sort (Based on slides by M. Nicolescu) The Sorting Problem Input: A sequence of n numbers a, a,..., a n Output: A permutation (reordering) a, a,..., a n of the input
More informationChesServe Test Plan. ChesServe CS 451 Allan Caffee Charles Conroy Kyle Golrick Christopher Gore David Kerkeslager
ChesServe Test Plan ChesServe CS 451 Allan Caffee Charles Conroy Kyle Golrick Christopher Gore David Kerkeslager Date Reason For Change Version Thursday August 21 th Initial Version 1.0 Thursday August
More informationFoundations of AI. 5. Board Games. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard and Luc De Raedt SA-1
Foundations of AI 5. Board Games Search Strategies for Games, Games with Chance, State of the Art Wolfram Burgard and Luc De Raedt SA-1 Contents Board Games Minimax Search Alpha-Beta Search Games with
More informationBorder & Setting Instructions Finished Quilt in Three Sizes
Border & Setting Instructions Finished Quilt in Three Sizes Throw 60 x72 (30 men) Double/Queen 84 x92 (60 men) King 108 x112 (100 men) It is finished. John 19:30 I hope you have enjoyed this reflection
More informationIN THIS ISSUE. Cave vs. Pentagroups
3 IN THIS ISSUE 1. 2. 3. 4. 5. 6. Cave vs. Pentagroups Brokeback loop Easy as skyscrapers Breaking the loop L-oop Triple loop Octave Total rising Dead end cells Pentamino in half Giant tents Cave vs. Pentagroups
More informationYGB #2: Aren t You a Square?
YGB #2: Aren t You a Square? Problem Statement How can one mathematically determine the total number of squares on a chessboard? Counting them is certainly subject to error, so is it possible to know if
More informationLecture 2: Sum rule, partition method, difference method, bijection method, product rules
Lecture 2: Sum rule, partition method, difference method, bijection method, product rules References: Relevant parts of chapter 15 of the Math for CS book. Discrete Structures II (Summer 2018) Rutgers
More informationBoulder Chess. [0] Object of Game A. The Object of the Game is to fill the opposing Royal Chambers with Boulders. [1] The Board and the Pieces
Boulder Chess [0] Object of Game A. The Object of the Game is to fill the opposing Royal Chambers with Boulders [1] The Board and the Pieces A. The Board is 8 squares wide by 16 squares depth. It is divided
More informationComputer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville
Computer Science and Software Engineering University of Wisconsin - Platteville 4. Game Play CS 3030 Lecture Notes Yan Shi UW-Platteville Read: Textbook Chapter 6 What kind of games? 2-player games Zero-sum
More informationMonday, 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 informationCMPUT 396 Tic-Tac-Toe Game
CMPUT 396 Tic-Tac-Toe Game Recall minimax: - For a game tree, we find the root minimax from leaf values - With minimax we can always determine the score and can use a bottom-up approach Why use minimax?
More informationDNA Mapping and Brute Force Algorithms
DNA Mapping and Brute Force Algorithms Outline 1. Restriction Enzymes 2. Gel Electrophoresis 3. Partial Digest Problem 4. Brute Force Algorithm for Partial Digest Problem 5. Branch and Bound Algorithm
More informationAdversary Search. Ref: Chapter 5
Adversary Search Ref: Chapter 5 1 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans is possible. Many games can be modeled very easily, although
More informationTile 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 informationIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms Peter G. Anderson, Computer Science Department Rochester Institute of Technology, Rochester, New York anderson@cs.rit.edu http://www.cs.rit.edu/ February 2004 pg. 1 Abstract
More informationIntroduction to Spring 2009 Artificial Intelligence Final Exam
CS 188 Introduction to Spring 2009 Artificial Intelligence Final Exam INSTRUCTIONS You have 3 hours. The exam is closed book, closed notes except a two-page crib sheet, double-sided. Please use non-programmable
More informationPennies vs Paperclips
Pennies vs Paperclips Today we will take part in a daring game, a clash of copper and steel. Today we play the game: pennies versus paperclips. Battle begins on a 2k by 2m (where k and m are natural numbers)
More informationhorizontal all rights reserved JoRae knittingparadise.com
Chevron Corner to Corner (almost) This pattern resembles the diagonal box stitch however, it is done in a Chevron pattern, and not diagonally. Once the foundation blocks are formed, the pattern stitches
More informationNotes - Please wash, dry & iron your fabric before beginning. - Sew all seams with an accurate 1/4 seam allowance. CUTTING INSTRUCTIONS
Notes - Please wash, dry & iron your fabric before beginning. - Sew all seams with an accurate 1/4 seam allowance. CUTTING INSTRUCTIONS Indicates fabric pattern is directional on strips Fabric A: Horizontal
More informationSTAJSIC, DAVORIN, M.A. Combinatorial Game Theory (2010) Directed by Dr. Clifford Smyth. pp.40
STAJSIC, DAVORIN, M.A. Combinatorial Game Theory (2010) Directed by Dr. Clifford Smyth. pp.40 Given a combinatorial game, can we determine if there exists a strategy for a player to win the game, and can
More informationSelected Game Examples
Games in the Classroom ~Examples~ Genevieve Orr Willamette University Salem, Oregon gorr@willamette.edu Sciences in Colleges Northwestern Region Selected Game Examples Craps - dice War - cards Mancala
More informationTwo Parity Puzzles Related to Generalized Space-Filling Peano Curve Constructions and Some Beautiful Silk Scarves
Two Parity Puzzles Related to Generalized Space-Filling Peano Curve Constructions and Some Beautiful Silk Scarves http://www.dmck.us Here is a simple puzzle, related not just to the dawn of modern mathematics
More informationStrawberries and busy bees make The Jungs latest collection a delight to sew with this season! This quilt finishes at 66" x 66".
Strawberries and busy bees make The Jungs latest collection a delight to sew with this season! This quilt finishes at 66" x 66". 1 Charm Pack {Bumble Berries by The Jungs} 1 Jelly Roll {Bumble Berries
More informationLESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE
LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE The inclusion-exclusion principle (also known as the sieve principle) is an extended version of the rule of the sum. It states that, for two (finite) sets, A
More informationPARTICIPANT Guide. Unit 2
PARTICIPANT Guide Unit 2 UNIT 02 participant Guide ACTIVITIES NOTE: At many points in the activities for Mathematics Illuminated, workshop participants will be asked to explain, either verbally or in
More informationSolutions of problems for grade R5
International Mathematical Olympiad Formula of Unity / The Third Millennium Year 016/017. Round Solutions of problems for grade R5 1. Paul is drawing points on a sheet of squared paper, at intersections
More informationThe Mathematica Journal A Generator of Rook Polynomials
The Mathematica Journal A Generator of Rook Polynomials Daniel C. Fielder A list adaptation of an inclusion-exclusion method for calculating the rook polynomials of arbitrary finite chessboards is discussed
More informationBroken Hearts Mending Quilt Inspired by Marie Bostwick s A SINGLE THREAD READ THROUGH ALL THE INSTRUCTIONS BEFORE CUTTING AND SEWING.
Broken Hearts Mending Quilt Inspired by Marie Bostwick s A SINGLE THREAD READ THROUGH ALL THE INSTRUCTIONS BEFORE CUTTING AND SEWING. Fabric Requirements Yardage Cut each fabric as follows: 6 pink fabrics
More informationCSE 573 Problem Set 1. Answers on 10/17/08
CSE 573 Problem Set. Answers on 0/7/08 Please work on this problem set individually. (Subsequent problem sets may allow group discussion. If any problem doesn t contain enough information for you to answer
More informationPRIMES STEP Plays Games
PRIMES STEP Plays Games arxiv:1707.07201v1 [math.co] 22 Jul 2017 Pratik Alladi Neel Bhalla Tanya Khovanova Nathan Sheffield Eddie Song William Sun Andrew The Alan Wang Naor Wiesel Kevin Zhang Kevin Zhao
More informationSolution Algorithm to the Sam Loyd (n 2 1) Puzzle
Solution Algorithm to the Sam Loyd (n 2 1) Puzzle Kyle A. Bishop Dustin L. Madsen December 15, 2009 Introduction The Sam Loyd puzzle was a 4 4 grid invented in the 1870 s with numbers 0 through 15 on each
More informationAlgorithmique appliquée Projet UNO
Algorithmique appliquée Projet UNO Paul Dorbec, Cyril Gavoille The aim of this project is to encode a program as efficient as possible to find the best sequence of cards that can be played by a single
More information3. If you can t make the sum with your cards, you must draw one card. 4. Players take turns rolling and discarding cards.
1 to 10 Purpose: The object of the game is to get rid of all your cards. One player gets all the red cards, the other gets all the black cards. Players: 2-4 players Materials: 2 dice, a deck of cards,
More informationB1 Problem Statement Unit Pricing
B1 Problem Statement Unit Pricing Determine the best buy (the lowest per unit cost) between two items. The inputs will be the weight in ounces and the cost in dollars. Display whether the first or the
More informationGame, Set, and Match Carl W. Lee September 2016
Game, Set, and Match Carl W. Lee September 2016 Note: Some of the text below comes from Martin Gardner s articles in Scientific American and some from Mathematical Circles by Fomin, Genkin, and Itenberg.
More informationPerry High School. 2 nd Semester!
2 nd Semester! Monday: Admin Review / Chess Tuesday: Admin Review / Chess Wednesday: The Code, Part 1, with worksheet Thursday: The Code, Part 2, with worksheet Friday: Chess, Chapter 5 Assignments Next
More informationUMBC 671 Midterm Exam 19 October 2009
Name: 0 1 2 3 4 5 6 total 0 20 25 30 30 25 20 150 UMBC 671 Midterm Exam 19 October 2009 Write all of your answers on this exam, which is closed book and consists of six problems, summing to 160 points.
More informationUnit. The double attack. Types of double attack. With which pieces? Notes and observations
Unit The double attack Types of double attack With which pieces? Notes and observations Think Colour in the drawing with the colours of your choice. These types of drawings are called mandalas. They are
More informationNested Mini Right Triangle Instructions
Nested Mini Right Triangle Instructions The Nested Mini Right Triangle is a multiple sized tool. This tool will make right triangles in the following sizes: 1, 2, 3, and 4 This tool was designed to create
More informationInside Outside Circles Outside Circles Inside. Regions Circles Inside Regions Outside Regions. Outside Inside Regions Circles Inside Outside
START Inside Outside Circles Outside Circles Inside Regions Circles Inside Regions Outside Regions Outside Inside Regions Circles Inside Outside Circles Regions Outside Inside Regions Circles FINISH Each
More informationChess for Math Curriculum
Chess for Math Curriculum Frank Ho Teacher at Ho Math and Chess Learning Center www.mathandchess.com Background A myriad education research papers have concluded that chess benefits children in many areas
More informationIrish Collegiate Programming Contest Problem Set
Irish Collegiate Programming Contest 2011 Problem Set University College Cork ACM Student Chapter March 26, 2011 Contents Instructions 2 Rules........................................... 2 Testing and Scoring....................................
More information