team competition in mathematics and informatics “ugāle”- finding new task types mārtiņš...
TRANSCRIPT
Team Competition in Mathematics and Informatics “Ugāle”- Finding New Task Types
Mārtiņš OpmanisInstitute of Mathematics and Computer Science of University of Latvia
IOI Conference 10.08.2009
Basic facts about competition
• National annual competition since 1996• Team competition (up to three contestants
and one computer)• Two rounds (on-line semifinal and final for
best teams in Ugāle)• 5 to 5.5 hours• Winner team gets a trophy and cake
• Idea by teacher of informatics and physics of Ugāle secondary school Aivars Žogla
Tasks (format)• Short answer format – number, set of numbers,
filled table, text string (on paper) or text file.Main idea – to avoid long proofs, etc. To minimize subjective factor and allow to check all solutions in limited amount of time (approx two hours).
• Not-too-long problem descriptions • 8-10 for semifinals, 10 for final• Every task is worth 100 points• Usually have subtasks ( usually 20/30/50 points)
Solvable with help of computer IOI (LIO) tasks
Solvable by humans
IMO (LMO) tasks
WPC tasksSUDOKU
“Ugāle”tasks
ACM tasks
Construction of tasks must start from somewhere…
Solvable with help of computer IOI (LIO) tasks
Solvable by humans
IMO (LMO) tasks
WPC tasksSUDOKU
ACM tasks
Don’t loose basic things, like: “find all solutions and prove that there are no other”
Cryptarythms
KSIM2004 *KSIM*----------------- ********* ********* ******** ********* ********* ****IR***----------------- ***NOTIKUMS***
2PN N2P ----- NPNP PPP N2N ----- NN2NP
“ N” - odd,“ P” - even
Combinatorics
Direction of reading can be changed no more than twice.
How much times you can read “ APRICOT” in the given table?The same task if there are 7 (in picture), 36, 711 and 1492 different letters.
Number theorynppp ...21
1p 21pp 321 ppp 121 ... nppp
Let’s name an n-digit prime
as a Ugāle’s prime if and only if all prefixes of this number
, also are primes.
For example, 71 and 311 are Ugāle primes (because 71, 7, 311, 31 and 3 are primes), but 27, 43 and 307 – are not (27, 4 and 30 are not primes). Find one, as large as possible a Ugāle’s prime!
, , … ,
Score for tasks like this are calculated relatively to the best achieved or the best known result.
LogicAnswer three questions below by “yes” or
“no” so that all the answers do not contradict each other:
1.Are the answers to Questions 2 and 3 equivalent?
2.Is “no” the answer to Queston 1?3.Is it true that there are two consecutive
questions with the same answer?
GeometryRegular hexagon. Midpoints and vertices are connected. Calculate the gray area.
Answer is one number (non-integer!)
Geometry
„The intersection of two triangles is hexagon with inner angles (in this order): 87, 141, 105, 137, 104 and 146.
Calculate the angles of these triangles!”
104
87146
141
137 105
Where is the trick?
You must find all solutions!
Sad result: All teams in this round get for this task just 25 points.
Geometry (construction)„Let’s say that a convex pentagon is „elegant” if the following conditions are satisfied:• it can be inscribed in circle,• the length of all sides and radius of the circumscribed circle
can be expressed in whole centimetres,• all sides and radius of the circumscribed circle are of different
length. Let’s say that a convex pentagon is ”partly elegant” if only the first two conditions are satisfied. Your task is to construct either an elegant (100 points) or partly elegant (30 points) pentagon.”
Answer consists of six integers. Easy to check correctness of the answer.
Geometry in the nature
Find the distance (in ropes)between lampposts without destruction of school building
I am from the XX century (thePAST) …
• It is not obvious what types of puzzles and games are known to youth
• Are they playing table games? What games?• Do they play chess? Know basic rules?• Do they know what is pentamino?
Draw all 12 pieces in short amount of time?• Do they know rules of SUDOKU?
REVERSE SUDOKU
9 6 7 5 2 8 3 4 1
8 5 3 4 9 1 7 2 6
1 2 4 6 3 7 8 9 5
6 9 5 1 4 3 2 8 7
2 3 8 7 6 9 1 5 4
4 7 1 2 8 5 9 6 3
7 1 2 9 5 4 6 3 8
5 8 6 3 1 2 4 7 9
3 4 9 8 7 6 5 1 2
Create SUDOKU puzzle with less as possible filled cells so that it will have unique given solution.If solution will not be unique or differs from the given, you will get no points.
Dominoes
• Are chosen as simple and well-known model to build different tasks
• Ordinary set of 28 pieces
• All pieces must be placed in the given field
• If two pieces share common edge, number of points in the corresponding halves must be the same
• Sum of points in the rows marked by arrows must be the same
• It is enough to find one solution
Fill a rectangle consisting of 8×7 squares with the numbers from 0 to 6 (in each square there must be one number) so that this rectangle can be covered by pieces of one set of dominoes (every square is covered by half of one dominoe, all squares are covered) in as many ways as possible.
Best known result is arrangement with 793648 different coverages (found eight years after competition by former IOI gold medalist Jānis Sermuliņš).
Represent integers by dominoes from one set
1 2 0 5and ask to create number(s) with particular properties
Solvable with help of computer IOI (LIO) tasks
Solvable by humans
IMO (LMO) tasks
WPC tasksSUDOKU
ACM tasks
Find something interesting in programming beyond usual tasks
Algorythm analysis
In the file SORT.PAS an algorithm is given that sorts the elements of number array A[0..n–1] from position low till position high in non- decreasing order. By taking low = 0 and high = n – 1, the entire array will be sorted.
Your task is to find an array containing each of the numbers from 1 to 20 exactly once, for which sorting by calling procedure sort(A,0,19), uses the maximum number of array element comparison operations (these rows are marked by {*}) For example, sorting the array A={3,4,1,2,5}, uses 7 comparison operations.
Different programming task(last task in this presentation)
Write a program in Pascal, C or BASIC, which• outputs on the monitor the number 1998 only once;• if the program code is modified by replacing one
symbol by another in such a way that program still compiles and executes, it still only once outputs the number 1998.
How to check correctness of the solution?
Wrong solutionvar aa:integer;Beginaa:=1998;if aa=1998 then writeln(aa) else writeln(1998);End.
var aa:integer;Beginaa:=1998;
if aa=1998 then writeln($a) else writeln(1998);End.
10
Wrong solutionvar aa:integer;Beginaa:=1998;if aa=1998 then writeln(aa) else writeln(1998);End.
var aa:integer;Beginaa:=1998;
if aa=1998 then writeln(aa) else;writeln(1998);End.
19981998