ACCA PROGRAMMING CONTEST February 10, Problem #1 SIMPLE WORD FINDER Advanced

Size: px
Start display at page:

Download "ACCA PROGRAMMING CONTEST February 10, Problem #1 SIMPLE WORD FINDER Advanced"

Transcription

1 Problem #1 SIMPLE WORD FINDER prob1.cpp if C++ prob1.pas if Pascal This problem asks you to read in one line of data from a user. The line will be a complete sentence. Your program should then prompt the user for a single word. The user will enter the word in lower case letters. Your program must determine if the single word is found in the sentence. You must exclude all capitalization, white space and punctuation from the sentence. The user may use two special characters as wild cards in their word. A? may be used as a single character place holder. If a? is used then any character may be used in its place (except no character). A * may be used as a place holder for any number of characters, including no character. The * symbol may not be used to start or end a word. Print to the screen whether the word was found. Keep asking a user for a word until they enter 0. Do not worry about whether the result is a real word. Here are some examples: INPUT: Your program accepts a single sentence from the user. It accepts a single word until the user enters 0. OUTPUT: Your output should print to the screen whether the word was found. EXAMPLE: Enter a sentence: The cat in the hat sat on Fred s mat. Enter a word (enter 0 when done): mat Yes, mat is in the sentence. Enter a word (enter 0 when done): t?n Yes, ton is in the sentence. Yes, tin is in the sentence. Enter a word (enter 0 when done): s*t Yes, sat is in the sentence. Yes, smat is in the sentence. Enter a word (enter 0 when done): freds Yes, freds is in the sentence. Enter a word (enter 0 when done): 0

2 Problem #2 DICE COMBOS prob2.cpp if C++ prob2.pas if Pascal Your program must determine how many different ways x dice can be thrown to get the number n? Your program must allow for any short integer value of x or n. INPUT: A value for x and a value for n. OUTPUT: Show all combinations using all dice whose sum is n. EXAMPLE: Please enter the number of dice used: 3 Please enter the value for the sum: 6 Result is: (1,1,4) (1,2,3) (1,3,2) (1,4,1) (2,1,3) (2,3,1) (2,2,2) (3,2,1) (3,1,2) (4,1,1)

3 ACCA Programming Contest February 10, 2001 Problem #3 A VERY PECULIAR SEQUENCE prob3.cpp if C++ prob3.pas if Pascal Examine the following sequence of 10 numbers This sequence is generated using the following algorithm. 1. Start with any integer. (In this case the start number is 1.) 2. Each number in the sequence is formed from the previous by counting the number of like digits and placing them in order: count digit count digit count digit for all counts which are non-zero in digit order. For example, 1 consists one 1; therefore, the next number in the sequence is consists of two 1's; therefore, the next number in the sequence is consists of one 1 and one 2, therefore; the next number in the sequence is And so on. The purpose of this program is to generate the first 10 numbers in a sequence beginning with any start integer. INPUT: OUTPUT: Your program should prompt for the start integer. Your output will be the first ten terms of the sequence, each on a different line. EXAMPLE: Enter number:

4 Problem #4 MAGIC CARDS prob4.cpp if C++ prob4.pas if Pascal A set of magic cards can be used to play a fun guessing game. Assume the following cards exist. CARD 1 CARD CARD 3 CARD CARD If you ask a friend to pick any number from 1-31 and then have your friend list the cards the number appears on, you can guess the number. Let's say your friend picks 22. They tell you that the number appears on cards 2, 3, and 5. You can easily determine the number by adding up the digits on the upper left-hand side of those cards. A 2 is on card 2, a 4 is on card 3 and a 16 is on card 5. Therefore the number they picked is = 22. This game is based on the binary number system. To determine which numbers appear on each card, you need to convert each number to their binary representation. Working right to left every number that has the 0th bit turned on is found on card 1. Every number that has the 1st bit on is found on card 2. This continues for each bit. So, for example, a 13 in binary is You will find 13 on cards 1, 3 and 4. You can create any number of magic cards. INPUT: Prompt a user to enter the card they wish to display. OUTPUT: Display on the screen the card the user requested. EXAMPLE: Please enter magic card number: 4 Card number 4 is:

5 Problem #5 PATHFINDER prob5.cpp if C++ prob5.pas if Pascal This program will determine the path in a maze. A path must be determined using the first cell as the starting position. The exit position may be different for each maze given. Determine the sequence of the maze from the cell numbered 1 to the exit cell. A number may not be repeated in the solution and not all numbers need to be used. INPUT: Number of cells in the maze. A line of input for each cell. This line will contain the cell position to the left, straight and right of the current cell. A 0 will be used to represent the absence of a cell. The last line of input is the number of the exit cell. For example, if the user enters for cell 2 then from position 2: going left will move you to position 5 going straight will move you to position 4 going right will move you to a dead end OUTPUT: The path from cell 1 to the exit cell. EXAMPLE: Input number of cells: 7 Enter cell to the left, straight and right of cell 1: Enter cell to the left, straight and right of cell 2: Enter cell to the left, straight and right of cell 3: Enter cell to the left, straight and right of cell 4: Enter cell to the left, straight and right of cell 5: Enter cell to the left, straight and right of cell 6: Enter cell to the left, straight and right of cell 7: Enter exiting cell: 7 The path from cell 1 to cell 7 is: Here is another example. Input number of cells: 6 Enter cell to the left, straight and right of cell 1: Enter cell to the left, straight and right of cell 2: Enter cell to the left, straight and right of cell 3: Enter cell to the left, straight and right of cell 4: Enter cell to the left, straight and right of cell 5: Enter cell to the left, straight and right of cell 6: Enter exiting cell: 5 The path from cell 1 to cell 5 is: Assume at most 15 cells.

6 ACCA Programming Contest February 10, 2001 Problem #6 REMAINING DIGITS prob6.cpp if C++ prob6.pas if Pascal The number consists of 22 digits, and was arrived at by placing the numbers from 14 to 24 one after the other. If I now remove 10 of the digits in such a way that the resulting number is the greatest possible, what are the first 5 digits of the 12 digit number that remains. Of course, the answer for this problem is: The purpose of this program is to solve this problem for any number created from two two-digit integers and the number of digits to remove. You will then output the first 5 digits of the largest number remaining after removing the digits. INPUT: OUTPUT: Your program should accept three integer values using suitable prompts such that the first two integers entered represent the first and last integers of the number and the third integer represents the number of digits to remove. Your output should appear as follows: The first 5 digits of the resulting number: XXXXX EXAMPLE: Enter first number: 14 Enter second number: 24 Enter the number of digits to remove: 10 The first 5 digits of the resulting number: 89202

PLU February 2014 Programming Contest. Novice Problems

PLU February 2014 Programming Contest. Novice Problems PLU February 2014 Programming Contest Novice Problems I. General Notes 1. Do the problems in any order you like. 2. Problems will have either no input or will read input from standard input (stdin, cin,

More information

Math Circles 9 / 10 Contest Preparation I

Math Circles 9 / 10 Contest Preparation I Math Circles 9 / 10 Contest Preparation I Centre for Education in Mathematics and Computing CEMC www.cemc.uwaterloo.ca February 4, 2015 Agenda 1 Warm-up Problem 2 Contest Information 3 Contest Format 4

More information

n r for the number. (n r)!r!

n r for the number. (n r)!r! Throughout we use both the notations ( ) n r and C n n! r for the number (n r)!r! 1 Ten points are distributed around a circle How many triangles have all three of their vertices in this 10-element set?

More information

Roll & Make. Represent It a Different Way. Show Your Number as a Number Bond. Show Your Number on a Number Line. Show Your Number as a Strip Diagram

Roll & Make. Represent It a Different Way. Show Your Number as a Number Bond. Show Your Number on a Number Line. Show Your Number as a Strip Diagram Roll & Make My In Picture Form In Word Form In Expanded Form With Money Represent It a Different Way Make a Comparison Statement with a Greater than Your Make a Comparison Statement with a Less than Your

More information

Question Score Max Cover Total 149

Question Score Max Cover Total 149 CS170 Final Examination 16 May 20 NAME (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt): This is a closed book, closed calculator, closed computer, closed

More information

Classroom Activities Teacher s Guide

Classroom Activities Teacher s Guide The PBS KIDS wordmark and PBS KIDS Logo are registered trademarks of the Public Broadcasting Service. All rights reserved. The Arthur television series is based on the Arthur Adventure books by Marc Brown,

More information

Pre-Test Unit 7: Real Numbers KEY

Pre-Test Unit 7: Real Numbers KEY Pre-Test Unit 7: Real Numbers KEY No calculator necessary. Please do not use a calculator. Convert the following fraction to a decimal or decimal to a fraction. (5 pts; 3 pts for correct set-up/work, 2

More information

Lecture 2: Data Representation

Lecture 2: Data Representation Points Addressed in this Lecture Lecture : Data Representation Professor Peter Cheung Department of EEE, Imperial College London What do we mean by data? How can data be represented electronically? What

More information

2. Tell your partner to examine the cards, and give you the cards on which the number

2. Tell your partner to examine the cards, and give you the cards on which the number Magic Cards Instructions: 1. Ask your partner to pick a whole number between 1 and 63 (and keep it secret). 2. Tell your partner to examine the cards, and give you the cards on which the number appears.

More information

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability Preliminary Concepts, Formulas, and Terminology Meanings of Basic Arithmetic Operations in Mathematics Addition: Generally

More information

Fun Challenges Problem Solving Reasoning Deductive Thinking Convergent/Divergent Thinking Mind-Bending Challenges Critical Thinking

Fun Challenges Problem Solving Reasoning Deductive Thinking Convergent/Divergent Thinking Mind-Bending Challenges Critical Thinking Fun Challenges Problem Solving Reasoning Deductive Thinking Convergent/Divergent Thinking Mind-ending Challenges Critical Thinking Magic Shapes #1 Magic Shapes #1 Directions: Write the numbers 1 through

More information

Get Ready to WRITE! If you could write a story about anything, what would you writeeeeee about?eee

Get Ready to WRITE! If you could write a story about anything, what would you writeeeeee about?eee Get Ready to WRITE! If you could write a story about anything, what would you writeeeeee about?eee The PBS KIDS logo is a registered mark of the Public Broadcasting Service. All rights reserved. The Arthur

More information

This assignment will be due on Tuesday, September 30, 2014 at the beginning of the period.

This assignment will be due on Tuesday, September 30, 2014 at the beginning of the period. Points Distribution Read all of the directions below carefully. They will help you successfully complete the task. TOP OF BOX ( Points) BOTTOM OF BOX (20 Points) RIGHT SIDE OF BOX (15 Points) LEFT SIDE

More information

The Go Write! Pre-writing pack for level 1-2

The Go Write! Pre-writing pack for level 1-2 The Go Write! Pre-writing pack for level 1-2 Level 1-2 pre-writing organizers are appropriate for younger elementary students or upper grade students who are writing one paragraph essays. It is also appropriate

More information

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

Lesson 21: If-Then Moves with Integer Number Cards

Lesson 21: If-Then Moves with Integer Number Cards Student Outcomes Students understand that if a number sentence is true and we make any of the following changes to the number sentence, the resulting number sentence will be true: i. Adding the same number

More information

Pascal Contest (Grade 9) Wednesday, February 23, 2005

Pascal Contest (Grade 9) Wednesday, February 23, 2005 Canadian Mathematics Competition An activity of the Centre for Education in Mathematics and Computing, University of Waterloo, Waterloo, Ontario Pascal Contest (Grade 9) Wednesday, February 23, 2005 C.M.C.

More information

How Close Can You Get?

How Close Can You Get? How Close Can You Get? Group: Pairs Materials: calculator, How Close Can You Get Sheet, How Close Can You Get cards Give each pair a cut out set of the How Close Can You Get cards. Issue a How Close Can

More information

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7 CSCI 00 Foundations of Computer Science (FoCS) Solutions for Homework 7 Homework Problems. [0 POINTS] Problem.4(e)-(f) [or F7 Problem.7(e)-(f)]: In each case, count. (e) The number of orders in which a

More information

100 IDEAS FOR USING A HUNDRED SQUARE

100 IDEAS FOR USING A HUNDRED SQUARE 100 IDEAS FOR USING A HUNDRED SQUARE These ideas are in no particular order and can be adapted to any age range or ability. The objectives are for children to learn to recognise numbers, understand numbers

More information

Problem A. Worst Locations

Problem A. Worst Locations Problem A Worst Locations Two pandas A and B like each other. They have been placed in a bamboo jungle (which can be seen as a perfect binary tree graph of 2 N -1 vertices and 2 N -2 edges whose leaves

More information

Problem Set 2. Counting

Problem Set 2. Counting Problem Set 2. Counting 1. (Blitzstein: 1, Q3 Fred is planning to go out to dinner each night of a certain week, Monday through Friday, with each dinner being at one of his favorite ten restaurants. i

More information

2016 CCSC Eastern Conference Programming Competition

2016 CCSC Eastern Conference Programming Competition 2016 CCSC Eastern Conference Programming Competition October 29th, 2016 Frostburg State University, Frostburg, Maryland This page is intentionally left blank. Question 1 And Chips For a Splotvian twist

More information

Math 4610, Problems to be Worked in Class

Math 4610, Problems to be Worked in Class Math 4610, Problems to be Worked in Class Bring this handout to class always! You will need it. If you wish to use an expanded version of this handout with space to write solutions, you can download one

More information

Make Math Meaningful!

Make Math Meaningful! Make Math Meaningful! I hear, and I forget. I see, and I remember. I do, and I understand. Knowledge comes easily to those who understand. Proverbs 14:6 B-A-T Place Value Game B = Brilliant; right number

More information

Additional Practice. Name Date Class

Additional Practice. Name Date Class Additional Practice Investigation 1 1. For each of the following, use the set of clues to determine the secret number. a. Clue 1 The number has two digits. Clue 2 The number has 13 as a factor. Clue 3

More information

Objective: Solve word problems involving different combinations of coins with the same total value.

Objective: Solve word problems involving different combinations of coins with the same total value. Lesson 9 2 7 Lesson 9 Objective: Solve word problems involving different combinations of coins with Suggested Lesson Structure Fluency Practice Application Problem Concept Development Student Debrief Total

More information

Math 3012 Applied Combinatorics Lecture 2

Math 3012 Applied Combinatorics Lecture 2 August 20, 2015 Math 3012 Applied Combinatorics Lecture 2 William T. Trotter trotter@math.gatech.edu The Road Ahead Alert The next two to three lectures will be an integrated approach to material from

More information

Wigan LEA Numeracy Centre Year 5 Block 3 Assessment

Wigan LEA Numeracy Centre Year 5 Block 3 Assessment Wigan LEA Numeracy Centre Year 5 Block 3 Assessment Section A Read and Respond 5 Name: Date: Key Objectives Assessed Question Ordering positive and negative integers 1 Relate fractions to their equivalent

More information

Objective: Solve word problems involving different combinations of coins with the same total value.

Objective: Solve word problems involving different combinations of coins with the same total value. NYS COMMON CORE MATHEMATICS CURRICULUM Lesson 9 2 7 Lesson 9 Objective: Solve word problems involving different combinations of coins with the same total value. Suggested Lesson Structure Fluency Practice

More information

Final Exam, Math 6105

Final Exam, Math 6105 Final Exam, Math 6105 SWIM, June 29, 2006 Your name Throughout this test you must show your work. 1. Base 5 arithmetic (a) Construct the addition and multiplication table for the base five digits. (b)

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

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

Due Friday February 17th before noon in the TA drop box, basement, AP&M. HOMEWORK 3 : HAND IN ONLY QUESTIONS: 2, 4, 8, 11, 13, 15, 21, 24, 27

Due Friday February 17th before noon in the TA drop box, basement, AP&M. HOMEWORK 3 : HAND IN ONLY QUESTIONS: 2, 4, 8, 11, 13, 15, 21, 24, 27 Exercise Sheet 3 jacques@ucsd.edu Due Friday February 17th before noon in the TA drop box, basement, AP&M. HOMEWORK 3 : HAND IN ONLY QUESTIONS: 2, 4, 8, 11, 13, 15, 21, 24, 27 1. A six-sided die is tossed.

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

Definition 1 (Game). For us, a game will be any series of alternating moves between two players where one player must win.

Definition 1 (Game). For us, a game will be any series of alternating moves between two players where one player must win. Abstract In this Circles, we play and describe the game of Nim and some of its friends. In German, the word nimm! is an excited form of the verb to take. For example to tell someone to take it all you

More information

Hundreds Grid. MathShop: Hundreds Grid

Hundreds Grid. MathShop: Hundreds Grid Hundreds Grid MathShop: Hundreds Grid Kindergarten Suggested Activities: Kindergarten Representing Children create representations of mathematical ideas (e.g., use concrete materials; physical actions,

More information

Pre-Algebra Sponsored by the Indiana Council of Teachers of Mathematics. Indiana State Mathematics Contest

Pre-Algebra Sponsored by the Indiana Council of Teachers of Mathematics. Indiana State Mathematics Contest Pre-Algebra 2010 Sponsored by the Indiana Council of Teachers of Mathematics Indiana State Mathematics Contest This test was prepared by faculty at Indiana State University ICTM Website http://www.indianamath.org/

More information

ECE 499/599 Data Compression/Information Theory Spring 06. Dr. Thinh Nguyen. Homework 2 Due 04/27/06 at the beginning of the class

ECE 499/599 Data Compression/Information Theory Spring 06. Dr. Thinh Nguyen. Homework 2 Due 04/27/06 at the beginning of the class ECE 499/599 Data Compression/Information Theory Spring 06 Dr. Thinh Nguyen Homework 2 Due 04/27/06 at the beginning of the class Problem 2: Suppose you are given a task of compressing a Klingon text consisting

More information

GROUP ROUND INSTRUCTIONS

GROUP ROUND INSTRUCTIONS GROUP ROUND INSTRUCTIONS Your team will have 40 minutes to answer 10 questions. Each team will have the same questions. Each question is worth 6 points. However, some questions are easier than others!

More information

Canadian Math Kangaroo Contest

Canadian Math Kangaroo Contest Canadian Math Kangaroo Contest Part A: Each correct answer is worth 3 points 1. Which letter on the board is not in the word "KOALA"? (A) R (B) L (C) K (D) N (E) O 2. In a cave, there were only two seahorses,

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, 2016 CS1800 Discrete Structures Midterm Version C Instructions: 1. The exam is closed book and closed notes.

More information

COMPOSITION CRAM INSTRUCTIONS:

COMPOSITION CRAM INSTRUCTIONS: COMPOSITION CRAM INSTRUCTIONS: Make sure each student has a piece of paper and a writing utensil. Display the current vocabulary list on the board. Instruct students to write a story that includes as many

More information

ACM Collegiate Programming Contest 2016 (Hong Kong)

ACM Collegiate Programming Contest 2016 (Hong Kong) ACM Collegiate Programming Contest 2016 (Hong Kong) CO-ORGANIZERS: Venue: Cyberport, Pokfulam Time: 2016-06-18 [Sat] 1400 1800 Number of Questions: 7 (This is a blank page.) ACM-HK PC 2016 Page 2 of 16

More information

Mathematical Magic Tricks

Mathematical Magic Tricks Mathematical Magic Tricks T. Christine Stevens, American Mathematical Society Project NExT workshop, Chicago, Illinois, 7/25/17 Here are some magic tricks that I have used with students

More information

2008 ACM ICPC Southeast USA Regional Programming Contest. 25 October, 2008 PROBLEMS

2008 ACM ICPC Southeast USA Regional Programming Contest. 25 October, 2008 PROBLEMS ACM ICPC Southeast USA Regional Programming Contest 25 October, PROBLEMS A: Series / Parallel Resistor Circuits...1 B: The Heart of the Country...3 C: Lawrence of Arabia...5 D: Shoring Up the Levees...7

More information

It is important that you show your work. The total value of this test is 220 points.

It is important that you show your work. The total value of this test is 220 points. June 27, 2001 Your name It is important that you show your work. The total value of this test is 220 points. 1. (10 points) Use the Euclidean algorithm to solve the decanting problem for decanters of sizes

More information

Sheet 1: Introduction to prime numbers.

Sheet 1: Introduction to prime numbers. Option A Hand in at least one question from at least three sheets Sheet 1: Introduction to prime numbers. [provisional date for handing in: class 2.] 1. Use Sieve of Eratosthenes to find all prime numbers

More information

Lecture5: Lossless Compression Techniques

Lecture5: Lossless Compression Techniques Fixed to fixed mapping: we encoded source symbols of fixed length into fixed length code sequences Fixed to variable mapping: we encoded source symbols of fixed length into variable length code sequences

More information

Divisibility. Igor Zelenko. SEE Math, August 13-14, 2012

Divisibility. Igor Zelenko. SEE Math, August 13-14, 2012 Divisibility Igor Zelenko SEE Math, August 13-14, 2012 Before getting started Below is the list of problems and games I prepared for our activity. We will certainly solve/discuss/play only part of them

More information

Lesson 5: Understanding Subtraction of Integers and Other Rational Numbers

Lesson 5: Understanding Subtraction of Integers and Other Rational Numbers \ Lesson 5: Understanding Subtraction of Integers and Other Rational Numbers Student Outcomes Students justify the rule for subtraction: Subtracting a number is the same as adding its opposite. Students

More information

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability The study of probability is concerned with the likelihood of events occurring Like combinatorics, the origins of probability theory can be traced back to the study of gambling games Still a popular branch

More information

Maths Quiz. Make your own Mental Maths Game

Maths Quiz. Make your own Mental Maths Game Maths Quiz. Make your own Mental Maths Game 3 IS THE MAGIC NUMBER! Pick a number Any Number! No matter what number you start with, the answer will always be 3. Let s put it to the test! The River Crossing

More information

St Thomas of Canterbury Catholic Primary School Where every child is special

St Thomas of Canterbury Catholic Primary School Where every child is special Helping your child with Maths games and FUN! Helping with Maths at home can often be an issue we ve all been there, tears and frustration and your children aren t happy either! The key is to try to make

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

2008 High School Math Contest Draft #3

2008 High School Math Contest Draft #3 2008 High School Math Contest Draft #3 Elon University April, 2008 Note : In general, figures are drawn not to scale! All decimal answers should be rounded to two decimal places. 1. On average, how often

More information

! Denver, CO! Demystifying Computing with Magic, continued

! Denver, CO! Demystifying Computing with Magic, continued 2012-03-07! Denver, CO! Demystifying Computing with Magic, continued Special Session Overview Motivation The 7 magic tricks ú Real-Time 4x4 Magic Square ú Left/Right Game ú The Tricky Dice ú The Numbers

More information

Lecture 2: Sum rule, partition method, difference method, bijection method, product rules

Lecture 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 information

Eleventh Annual Ohio Wesleyan University Programming Contest April 1, 2017 Rules: 1. There are six questions to be completed in four hours. 2.

Eleventh Annual Ohio Wesleyan University Programming Contest April 1, 2017 Rules: 1. There are six questions to be completed in four hours. 2. Eleventh Annual Ohio Wesleyan University Programming Contest April 1, 217 Rules: 1. There are six questions to be completed in four hours. 2. All questions require you to read the test data from standard

More information

Multiplying and Dividing Integers

Multiplying and Dividing Integers Multiplying and Dividing Integers Some Notes on Notation You have been writing integers with raised signs to avoid confusion with the symbols for addition and subtraction. However, most computer software

More information

keyboard workshop Silent Night Bars 1-8 (Intro) Fill-in D7 / / C / / G7 / / C / / C / /

keyboard workshop Silent Night Bars 1-8 (Intro) Fill-in D7 / / C / / G7 / / C / / C / / The operating system of TYROS, PSR1/2/3000 keyboards and CVP200/300 Clavinova digital pianos have a great deal in common - so we hope this series will provide a useful workshop for owners of each of these

More information

ShillerMath Book 1 Test Answers

ShillerMath Book 1 Test Answers LESSON 1-56 REVIEW TEST #1-1 Now we will have a test to see what you have learned. This will help me understand what I need to do to make our math work more fun. You may take as much time and use whatever

More information

Unit 2: Algorithm Development. Flowcharts

Unit 2: Algorithm Development. Flowcharts Unit 2: Algorithm Development Flowcharts Vocab Quiz Unit 1 Warm Up: Get out a scratch piece of paper (I have some by the pencil sharpener if you need) 1. Draw a dot in the center of the page. 2. Starting

More information

COCI 2008/2009 Contest #2, 15 th November 2008 TASK KORNISLAV RESETO PERKET SVADA SETNJA CAVLI

COCI 2008/2009 Contest #2, 15 th November 2008 TASK KORNISLAV RESETO PERKET SVADA SETNJA CAVLI TASK KORNISLAV RESETO PERKET SVADA SETNJA CAVLI standard standard time limit second second second second second 2 seconds memory limit 32 MB 32 MB 32 MB 32 MB 32 MB 32 MB points 30 40 70 00 20 40 500 Task

More information

Module 3 Greedy Strategy

Module 3 Greedy Strategy Module 3 Greedy Strategy Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu Introduction to Greedy Technique Main

More information

2018 State Math Contest Wake Technical Community College. It was well known that each suspect told exactly one lie. Which suspect did it?

2018 State Math Contest Wake Technical Community College. It was well known that each suspect told exactly one lie. Which suspect did it? March, 018 018 State Math Contest 1. During a recent police investigation, Chief Inspector Stone was interviewing five local villains to try and identify who stole Mrs. Archer's cake from the fair. Below

More information

Year 4 optional SAT mark scheme paper A

Year 4 optional SAT mark scheme paper A Year 4 optional SAT mark scheme paper A 0 min 0 marks 1. 80 90 50 0 [0] 2. Numbers written in order as shown: 1 565 450 405 209 124 largest smallest All five numbers must be in the correct order for the

More information

CMPUT 396 Tic-Tac-Toe Game

CMPUT 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 information

2016 Canadian Computing Olympiad Day 2, Problem 1 O Canada

2016 Canadian Computing Olympiad Day 2, Problem 1 O Canada Time Limit: second 06 Canadian Computing Olympiad Day, Problem O Canada Problem Description In this problem, a grid is an N-by-N array of cells, where each cell is either red or white. Some grids are similar

More information

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics DISCUSSION #8 FRIDAY MAY 25 TH 2007 Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics 2 Homework 8 Hints and Examples 3 Section 5.4 Binomial Coefficients Binomial Theorem 4 Example: j j n n

More information

Helping your child with Maths at the end of Reception and in Year 1

Helping your child with Maths at the end of Reception and in Year 1 Shape activity At home, or when you are out, look at the surface of shapes. Ask your child what shape is this plate, this mirror, the bath mat, the tea towel, the window, the door, the red traffic light,

More information

Columbus High School Middle School Math Tournament

Columbus High School Middle School Math Tournament Columbus High School Middle School Math Tournament October 8, 2011 Individual Test Instructions - Do not open your test booklet until you are told to do so. - There are forty (40) multiple-choice questions

More information

CSE 573 Problem Set 1. Answers on 10/17/08

CSE 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 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

D1 Probability of One Event

D1 Probability of One Event D Probability of One Event Year 3/4. I have 3 bags of marbles. Bag A contains 0 marbles, Bag B contains 20 marbles and Bag C contains 30 marbles. One marble in each bag is red. a) Join up each statement

More information

13 Searching for Pattern

13 Searching for Pattern 13 Searching for Pattern 13.1 Pictorial Logic In this section we will see how to continue patterns involving simple shapes. Example Continue these patterns by drawing the next 5 shapes in each case: Solution

More information

BOOM! subtract 15. add 3. multiply by 10% round to. nearest integer. START: multiply by 2. multiply by 4. subtract 35. divide by 2

BOOM! subtract 15. add 3. multiply by 10% round to. nearest integer. START: multiply by 2. multiply by 4. subtract 35. divide by 2 GAME 3: Math skills, speed and luck come together in a fun way with Boom! Students roll a die to find out their starting number and then progress along a mathematical path where they ll practice their

More information

Math is Cool Masters

Math is Cool Masters Individual Multiple Choice Contest 1 Evaluate: ( 128)( log 243) log3 2 A) 35 B) 42 C) 12 D) 36 E) NOTA 2 What is the sum of the roots of the following function? x 2 56x + 71 = 0 A) -23 B) 14 C) 56 D) 71

More information

MAT 17: Introduction to Mathematics Final Exam Review Packet. B. Use the following definitions to write the indicated set for each exercise below:

MAT 17: Introduction to Mathematics Final Exam Review Packet. B. Use the following definitions to write the indicated set for each exercise below: MAT 17: Introduction to Mathematics Final Exam Review Packet A. Using set notation, rewrite each set definition below as the specific collection of elements described enclosed in braces. Use the following

More information

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.)

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.) The Teachers Circle Mar. 2, 22 HOW TO GAMBLE IF YOU MUST (I ll bet you $ that if you give me $, I ll give you $2.) Instructor: Paul Zeitz (zeitzp@usfca.edu) Basic Laws and Definitions of Probability If

More information

In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors?

In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors? What can we count? In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors? In how many different ways 10 books can be arranged

More information

4th Pui Ching Invitational Mathematics Competition. Final Event (Secondary 1)

4th Pui Ching Invitational Mathematics Competition. Final Event (Secondary 1) 4th Pui Ching Invitational Mathematics Competition Final Event (Secondary 1) 2 Time allowed: 2 hours Instructions to Contestants: 1. 100 This paper is divided into Section A and Section B. The total score

More information

Pi Day Mathematics Competition. Final Round 2017

Pi Day Mathematics Competition. Final Round 2017 Pi Day Mathematics Competition Final Round 2017 Question 1 Some water evaporates in the process of drying grapes to produce raisins. In a sample of grapes, initially the water was 80% by weight and after

More information

Pascal Contest (Grade 9)

Pascal Contest (Grade 9) Canadian Mathematics Competition n activity of The Centre for Education in Mathematics and Computing, University of Waterloo, Waterloo, Ontario Pascal Contest (Grade 9) Wednesday, February 19, 2003 C.M.C.

More information

JIGSAW ACTIVITY, TASK # Make sure your answer in written in the correct order. Highest powers of x should come first, down to the lowest powers.

JIGSAW ACTIVITY, TASK # Make sure your answer in written in the correct order. Highest powers of x should come first, down to the lowest powers. JIGSAW ACTIVITY, TASK #1 Your job is to multiply and find all the terms in ( 1) Recall that this means ( + 1)( + 1)( + 1)( + 1) Start by multiplying: ( + 1)( + 1) x x x x. x. + 4 x x. Write your answer

More information

One Centimeter Grid Paper

One Centimeter Grid Paper One Centimeter Grid Paper Representations of Place Value This task will include a quick write to brainstorm the tools that can be used to represent place value Directions: Identify the tools that students

More information

American Mathematics Competitions. Practice 8 AMC 8

American Mathematics Competitions. Practice 8 AMC 8 American Mathematics Competitions Practice 8 AMC 8 (American Mathematics Contest 8) INSTRUCTIONS 1. DO NOT OPEN THIS BOOKLET UNTIL YOUR PROCTOR TELLS YOU.. This is a twenty-five question multiple choice

More information

10.13 Sample A.G.E. program

10.13 Sample A.G.E. program The chord angle is the angle that is measured counter clockwise as positive from the beginning to the end points. 10.13 Sample A.G.E. program Consider this profile made up of 9 lines and arcs Notice what

More information

Probability. March 06, J. Boulton MDM 4U1. P(A) = n(a) n(s) Introductory Probability

Probability. March 06, J. Boulton MDM 4U1. P(A) = n(a) n(s) Introductory Probability Most people think they understand odds and probability. Do you? Decision 1: Pick a card Decision 2: Switch or don't Outcomes: Make a tree diagram Do you think you understand probability? Probability Write

More information

Discrete Structures for Computer Science

Discrete Structures for Computer Science Discrete Structures for Computer Science William Garrison bill@cs.pitt.edu 6311 Sennott Square Lecture #23: Discrete Probability Based on materials developed by Dr. Adam Lee The study of probability is

More information

Objective: the student will gain speed and accuracy in letter recognition.

Objective: the student will gain speed and accuracy in letter recognition. ALPHABET ARC Objective: the student will gain speed and accuracy in letter recognition. Materials: Alphabet arc (enlarge 200 percent and attach to 12 x 18 construction paper). 12 x18 construction paper

More information

b. How would you model your equation on a number line to show your answer?

b. How would you model your equation on a number line to show your answer? Exercise 1: Real-World Introduction to Integer Addition Answer the questions below. a. Suppose you received $10 from your grandmother for your birthday. You spent $4 on snacks. Using addition, how would

More information

A1 Problem Statement Unit Pricing

A1 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 information

Chapter 5 Backtracking. The Backtracking Technique The n-queens Problem The Sum-of-Subsets Problem Graph Coloring The 0-1 Knapsack Problem

Chapter 5 Backtracking. The Backtracking Technique The n-queens Problem The Sum-of-Subsets Problem Graph Coloring The 0-1 Knapsack Problem Chapter 5 Backtracking The Backtracking Technique The n-queens Problem The Sum-of-Subsets Problem Graph Coloring The 0-1 Knapsack Problem Backtracking maze puzzle following every path in maze until a dead

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

A C E. Answers Investigation 1. Applications. b. No; 6 18 = b. n = 12 c. n = 12 d. n = 20 e. n = 3

A C E. Answers Investigation 1. Applications. b. No; 6 18 = b. n = 12 c. n = 12 d. n = 20 e. n = 3 Answers Applications 1. a. Divide 24 by 12 to see if you get a whole number. Since 12 2 = 24 or 24 12 = 2, 12 is a factor b. Divide 291 by 7 to see if the answer is a whole number. Since 291 7 = 41.571429,

More information

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Objectives In this chapter, you will learn about The binary numbering system Boolean logic and gates Building computer circuits

More information

CSC/MTH 231 Discrete Structures II Spring, Homework 5

CSC/MTH 231 Discrete Structures II Spring, Homework 5 CSC/MTH 231 Discrete Structures II Spring, 2010 Homework 5 Name 1. A six sided die D (with sides numbered 1, 2, 3, 4, 5, 6) is thrown once. a. What is the probability that a 3 is thrown? b. What is the

More information

Binary Continued! November 27, 2013

Binary Continued! November 27, 2013 Binary Tree: 1 Binary Continued! November 27, 2013 1. Label the vertices of the bottom row of your Binary Tree with the numbers 0 through 7 (going from left to right). (You may put numbers inside of the

More information

Classwork Example 1: Exploring Subtraction with the Integer Game

Classwork Example 1: Exploring Subtraction with the Integer Game 7.2.5 Lesson Date Understanding Subtraction of Integers Student Objectives I can justify the rule for subtraction: Subtracting a number is the same as adding its opposite. I can relate the rule for subtraction

More information