Solution for HKOI2010 Junior Q4 By Gary Sham. Problem Description  Given 4 kinds of insects with different number and year of activity.  Find the earliest.

Slides:



Advertisements
Similar presentations
How much do you know about bugs? Challenge #2 T. Trimpe 2008
Advertisements

Add title Add a picture or a description. Question 1(True) Click to type your question here I have made this an easy True/false question true False Next.
CIS100 Test 2 Review REACH CRC © 2011 REACH CRC. All Rights Reserved.Spring 2011.
HKOI 2005 Junior Q1 Pattern Matching ( 模式匹配 ). Question Given a target value (Sum of pattern P), find a sub-block with size equal to P having sum closest.
Advanced Programming 15 Feb The “OI” Programming Process Reading the problem statement Thinking Coding + Compiling Testing + Debugging Finalizing.
REACH CRC © 2011 REACH CRC. All Rights Reserved.Fall 2011.
Senior Q2 Shy Tortoise. Sample >>> > > >>
1.1The Principle of Mathematical Induction 1.2Divisibility Chapter Summary Case Study Mathematical Induction 1.
1 Understanding Your PSAT/NMSQT ® Results. 2 Agenda Four Major Parts of Your PSAT/NMSQT Results More About Your Skills National Merit Scholarship Information.
Bowen Yu Programming Practice Midterm, 7/30/2013.
Dice HKOI 2012 Tony Wong. Hi! Tony Wong Year 4, Dual Degree Program in Technology and Management, HKUST (JA5309) BEng (Computer Engineering) & BBA (General.
Discovering Divisibility Rules.
Rules for means Rule 1: If X is a random variable and a and b are fixed numbers, then Rule 2: If X and Y are random variables, then.
Determine whether the sequence 6, 18, 54, is geometric. If it is geometric, find the common ratio. Choose the answer from the following :
f has a saddle point at (1,1) 2.f has a local minimum at.
Math – Getting Information from the Graph of a Function 1.
Describing distributions with numbers
Objectives 1.2 Describing distributions with numbers
Range, Variance, and Standard Deviation in SPSS. Get the Frequency first! Step 1. Frequency Distribution  After reviewing the data  Start with the “Analyze”
* What kind of loop would I use to complete the following: A. Output all of the prime numbers that are less than 100,000 B. Output the Fibonacci sequence.
SOLUTION Field Trip EXAMPLE 1 Writing Factors of a Number A class of 36 students is on a field trip at the aquarium. The teacher wants to break the class.
Palmdale School District Mathematics Content Standards Grade 2 NUMBER SENSE Students: 2.1 understand and use the inverse relationship between addition.
Variables and Equations Pre-Algebra. Learning Objective I can solve equations with variables.
1.8 Represent Functions as Graphs
Information about PSSA Open-ended Questions for all subjects Hollidaysburg Area Junior High School.
Who moved my cheese? Solution for HKOI2008 Junior Q4.
AP Statistics Chapter 2 Notes. Measures of Relative Standing Percentiles The percent of data that lies at or below a particular value. e.g. standardized.
HKOI2006 Analysis and Solution Junior Q3 – Sudoku HKOI Training Team
Gary Sham HKOI 2010 Greedy, Divide and Conquer. Greedy Algorithm Solve the problem by the “BEST” choice. To find the global optimal through local optimal.
Graph a function EXAMPLE 2 The table shows the average score s on the mathematics section of the Scholastic Aptitude Test (SAT) in the United States from.
Copyright ©2015 Creating Inspired Learning. A justification is not just the answer to a problem but also includes how you can prove that you have made.
HKOI 2014 Senior Pharmaceutical Company Problem Prepared by : Gary Wong.
SW318 Social Work Statistics Slide 1 Measure of Variability: Range (1) This question asks about the range, or minimum and maximum values of the variable.
1 Understanding Your PSAT/NMSQT ® Results New Dimensions High School.
Reactive and Output-Only HKOI Training Team 2006 Liu Chi Man (cx) 11 Feb 2006.
HKOI Programming HKOI Training Team (Intermediate) Alan, Tam Siu Lung Unu, Tse Chi Yung.
One Answer, No Answers, or an Infinite Number of Answers.
Challenge #3 Can you identify the orders into which insects are classified? T. Trimpe 2008
Nonparametric Statistics: ANOVA STAT E-150 Statistical Methods.
Divisibility Tests How can you tell quickly whether a number can be divided exactly by another?
HKOI 2012 (Senior) Q4 - Gene Mutation Gary Wong For any question, please ask via MSN:
Adding Two and Three Digit Numbers
Math Facts Fluency Part 1: sums to 7 Part 2: sums to 10 Part 3: sums to 20.
Currency Exchange Statistics + Suggested Solution.
Name __________________________ Write the Room Insects _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _.
Mathematical Induction Thinking Skill: Develop Confidence in Reason Warm Up: Find the k+1 term (P k+1 ) 1) 2)
Songs HKOI Problem Description Dr. Jones wants to play the lowest key possible Musical notes are represented by positive integers Increasing the.
Мир насекомых выполнила: педагог дополнительного образования Кравец А.В.
Created by: Tonya Jagoe. Measures of Central Tendency & Spread Input the data for these test scores into your calculator to find.
Descriptive Statistics Experiment Simulations Confidence Intervals Sampling Distribution Simulations Main Menu.
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
HKOI 2012 (Junior) Q4 - Penicillin Gary Wong For any question, please ask via MSN:
Recursive Definitions & Structural Induction: Selected Exercises
A QUANTITATIVE RESEARCH PROJECT -
Statistical Measures M M O D E E A D N I A R A N G E.
Understanding Spreadsheets
HKOI 2008 FINAL EVENT Q3 STORAGE BOX
CiS 260: App Dev I Chapter 4: Control Structures II.
TYPES OF SOLUTIONS OF LINEAR EQUATIONS
SPSS OUTPUT & INTERPRETATION
SPSS OUTPUT & INTERPRETATION
13.3 day 2 Higher- Order Partial Derivatives
13.3 day 2 Higher- Order Partial Derivatives
Stationary Point Notes
Objectives Identify solutions of linear equations in two variables.
X y y = x2 - 3x Solutions of y = x2 - 3x y x –1 5 –2 –3 6 y = x2-3x.
Patterns & Inductive Reasoning
Aggregate Functions.
Maximum and Minimum Points
Table 1. Descriptive Statistics
Presentation transcript:

Solution for HKOI2010 Junior Q4 By Gary Sham

Problem Description  Given 4 kinds of insects with different number and year of activity.  Find the earliest year that can observe most insects.  Bees = 2001, 2003, 2005 etc.  Cicadae = 2002, 2005, 2008 etc.  Beetles = 2001, 2002, 2005, 2006 etc.  Butterflies = 2001, 2003, 2006, 2010 etc.  E.g. { }, answer =  2017 is the earliest year that can see all insects.

Statistic  #Attempts 46  #Maximum 100  #Maximum 5  #Mean (Attempted) 25.3  #Minimum 0  #Std Dev (Attempted) 32.5

Question  How to know which kind of insects will appear that year?  Mathematics  Or simulation and array.  Another question : When to stop??

Observation  There are only 16 states of activity of insects.  Save the result of all states?  Do all states must appear at some time?  The total number of insects must be the sum of them.  If yes......

Solution1 year = 2010, Max = 0 While (true) do sum = 0 if (BEE && Cicadae && Beetles && Butterflies) sum+=BEE+Cicadae+Beetles+Butterflies; if (sum>max) output, break; Time Complexity: ??? Expected score: 50

In fact……  NO!  The problem is Butterflies.  Butterflies and Cicadae will not appear at the same time.  Prove by Mathematics.

Full Solution  For each state, there are only one answer: YEAR and HOW TO ADD THE NUMBER will not change.  Hardcode  We have to consider whether we choose Butterflies or Cicadae.  Maximum  2021  Time Complexity: O(1)  Expected Score: 100

Skills  Observation  Mathematics  Hardcode

END