2.8 Global optimizations Taxonomy summarized Overview of algorithms Verification Method

Size: px
Start display at page:

Download "2.8 Global optimizations Taxonomy summarized Overview of algorithms Verification Method"

Transcription

1 Content Content Introduction Background information IOI terminology and proce Quality The grading proce Objective Methodology Overview Median Tak decription Problem decription Library Experimentation Example Contraint Notation Definition Analyi Taxonomy derived Root Elimination of non median object EE Singleton elimination EESS Single ide election EEDS Dual ide election PE Pair elimination SE Set elimination SEC Complete partitioning SEP Partial partitioning Selecting pivot for SE Repreenting a et of label Set Lit Heap D-Lit qd-lit More data tructure Data tructure uing the Med3 operation Searching in a data tructure Taxonomy not derived Counting Sweeping and teting the pivot Sweeping and partitioning the candidate over the pivot Bubble earch Standard olution

2 2.8 Global optimization Taxonomy ummarized Overview of algorithm Verification Method Method Method Method Method Grading before our verification Grading after our verification Concluion Phidia Tak decription Problem decription Input Output Contraint Example Solution Specification Recurrence equation Optimization Recurive implementation Taxonomy Computational complexity Verification Overview IOI core New tet cae Overview new tet cae core Variou note Recurrence equation Extenive cae analyi Diagonal traveral Maximum total uable area Trick Readability Trying to be afe Obolete fragment Heuritic method Gueing Backtracking Reize Timeout Efficiency Suggetion for alternative

3 3.5.1 Method M0 Anwer unknown in combination with trict grading Method M1 Tranpoed tet cae Method M2 How to generate a tet cae et Method M3 Acceptance tet Method M4 Ditribute tet cae Method M5 Sub tet cae Method M6 Unuable deired plate Method M7 Simplify the tak Concluion Concluion Literature Appendix Median appendix Reference Mathematical background Phidia appendix Appendix A Appendix B

4 1 Introduction Thi i my mater thei written for the mater degree in computing cience (informatic) at the Techniche Univeriteit Eindhoven (TUE). 1.1 Background information The International Olympiad in Informatic (IOI) i one of five International Science Olympiad and i organized every year in a different country. The IOI i a competition in the dicipline of informatic (computing cience) for enior pupil at econdary chool all over the world. In the ummer of 2005 the contet wa held in Poland with 276 contetant from 72 countrie. Although there are many ocial and cultural apect to the IOI contet we only focu to the core apect which i the algorithmic problem olving itelf. The contet take 2 day in which the contetant have to olve 6 problem. Each day there are 3 problem to be olved in a period of 5 hour. Problem are tated in a tak decription. Solving a problem require a contetant to ubmit an executable (and ince 2001 the ource code) that olve the tated problem. Although the problem are algorithmic in nature, it i alo required that contetant implement their algorithm in one of the allowed programming language; i.e. Pacal, C or C++. For that purpoe each contetant i provided with a computer and program development tool. The contetant work alone (not in a team) and are iolated from the outide world. The IOI Competition Rule [4] cover the complete Competition Procedure and Judging Procedure. They vary lightly from year to year, but ince 1994 the grading of the ubmitted program i done automatically uing a number of tet cae. Whenever efficiency play a role there are grading point for inefficient (correct) olution. 1.2 IOI terminology and proce We borrow the following terminology fro the IOI contet. Tak: Submiion: A tak i the tak decription that i handed out to the contetant on the day of the contet. Thi i alo ometime called the problem or the aignment. Thi i what i ubmitted by a contetant to the IOI committee a a olution to the given tak. Thi i alo ometime called the olution or the program. Typically the ubmiion i an executable or the ource code. Although it wa not required to ubmit the ource code for the Median tak we ued it anyway a if it wa a part of the ubmiion whenever we needed the ource code a they where collected after the contet. Grading: The grading of a ubmiion i the proce that lead to a core between 0 and 100 point indicating the quality (ee below) of the ubmiion. 4

5 1.2.1 Quality From the IOI rule, one can infer that within the IOI contet, the quality of a ubmiion i meaured by the functional correctne of the program and it time and memory efficiency. A program i functionally correct if it olve the given tak diregarding any time and memory limit. Thi mean it mut olve in principle any input cae that atifie the input pecification given in the tak decription. An efficient program tay within the tated boundarie. There are everal boundarie, e.g. memory and execution time, but program are alo limited in e.g. executing other procee or acceing econdary torage (dik). The IOI choe to ue correctne and efficiency a quality criteria. Thee criteria allow for (ome) automated teting. No other criteria are ued in the grading; e.g. readability, modularity, maintainability and robutne The grading proce Before the contet take place, the IOI committee prepare the tet cae that will be ued for grading. There i a fixed number of tet cae per tak, typically in the range from 10 to 25. All thee tet cae atify the precondition tated in the tak decription and are unknown to the contetant. Contetant program need not handle other cae. For each tak, the committee alo determine in advance the maximum amount of execution time and the maximum amount of memory that a ubmiion i allowed to ue to olve a tet cae. For every tet cae that i olved correctly the contetant get 100 / #TetCae point. The total core then i the um of the core for the tet cae olved correctly within the time and memory limit. Firt the ource i compiled (until IOI 2000, the contetant had to do thi themelve). If it fail to compile, a contetant get zero point. If it compile uccefully the grading continue. For every tet cae, the ubmiion i executed and if it olve the tet cae correctly and it doe not generate runtime error or a timeout or violate any of the other tated boundarie, it get the core for the tet cae otherwie it get zero point. (Note that at IOI 2005, thi proce wa further refined, but that wa after we conducted our reearch). The ize (complexity) of the tet cae varie to award point to ubmiion proportional to the efficiency of the ubmiion. The tet cae are elected to tet the correctne and the efficiency. The choice of the ize of a tet cae might alo be related to the programming language upported in the contet. For example, aume 2 there i a trivial algorithm with time complexity ( ) O N and an intended O( N ) algorithm. Then the upper bound on N and the time limit are et uch that the intended olution can olve the hardet cae within the limit but the trivial algorithm cannot. If the trivial algorithm (when implemented correctly) i to be rewarded with 30 point, then 6 out of 20 tet cae will ue a value for N that i mall enough to allow the trivial algorithm to olve thoe cae within the time limit of the tak. The other tet cae will then ue value of N that are ignificantly larger, to tay away from the grey croover 5

6 area, becaue implementation detail and choice of programming language hould not affect the reult. 1.3 Objective Winning a contet i for many people a challenge. It take preparation and determination to ucceed. It i the reponibility of the organization that the contet i judged fairly and rewarded correctly. A tak decription together with the competition rule define what the correctne of the algorithm i and what the required wort cae efficiency i. The ource code repreent the requeted algorithm. Proving correctne automatically i infeaible. The program i wrong when it fail a tet cae; correctne i never proven uing only a limited et of tet cae. The efficiency aeed by teting i not the abtract ( big O ) computational complexity. There i memory efficiency; i.e. the amount of memory ued to olve a tet cae. And there i time efficiency; i.e. the runtime needed to olve a tet cae. The maximum runtime and memory limit are enforced. The ue of tet cae only tet pecific cae efficiency not bet, average or wort cae efficiency. Of coure, oftware engineer know that tet cae never uffice to prove correctne, i.e. a tet cae can only be ued to how the incorrectne. Alo, tet cae cannot prove that a program fulfill the efficiency requirement, i.e. a tet cae can only be ued to how the inefficiency of a program, but not to how it wort cae, average cae, or bet cae efficiency. In view of thee limitation, it i reaonable to ak how well the grading proce of the IOI ha worked in practice. There i no previou data available to upport the quality of the IOI grading. We hall how that the effect of only uing tet cae i of great influence to the overall grading. We want to find out whether the following ituation have occurred in the IOI: A incorrect ubmiion with (cloe to) 100% core Two functionally correct ubmiion, where one algorithm ha a wort cae performance better than another algorithm but receiving a lower core. A functionally correct efficient algorithm doe not core 100% A functionally correct inefficient algorithm coring 100% 1.4 Methodology We decided to invetigate the quality of IOI grading by tudying a few IOI tak together with all ubmiion and their IOI core. We elected the Median tak from the year 2000 and the Phidia tak from We choe the Median tak becaue there exit ome literature [1], there i a rich variety of olution poible and it i a reactive tak. We chooe Phidia becaue we wanted a recent tak, and had it the bet core at IOI 2004 (from the core, it appeared to be a relatively eay tak). The Phidia tak wa not reactive. 6

7 We ae the quality of the IOI grading proce by teting and analyzing the ubmiion in variou new way. We then regraded the ubmiion ourelve and compared the reult with the grading from the IOI. A an aid to our analyi, we contructed an algorithm taxonomy for each tak. Such a taxonomy capture relationhip between algorithm, e.g. in correctne argument or in tructure. We tarted by contructing a taxonomy baed on the olution provided by the organizer. Then we claified the ubmiion with repect to thi taxonomy. Whenever the taxonomy did not yet accommodate the algorithm, we extended the taxonomy. The taxonomie try to cover mot of the ubmiion. Our goal i to cover the ubmitted olution and not necearily all poible olution. Algorithm taxonomie are ueful in their own right, becaue they provide a framework for deciding on the relative merit of the algorithm. In that way, a taxonomy can be ued to decide on intended core for (correctly implemented) algorithm. The taxonomy may alo help in claifying common error and how to rate them. For thee reaon, we have paid coniderable attention to the contruction of the taxonomie. Hopefully the concluion tated in thi report will help improve the quality of grading in the IOI contet. The preented taxonomie hould help u better undertand the ubmiion. The derivation of the taxonomie hopefully lead to a better undertanding of the complexity of building taxonomie in general. 1.5 Overview In chapter 2 the Median tak i analyzed and in chapter 3 the analyi of the Phidia tak i preented. Both chapter might be red independently although both hare a ame overall tructure. The chapter tart with a mall introduction, followed by the tak decription, followed by analyi and verification, followed by a concluion. Chapter 4 contain the overall concluion. We are aware of the mall difference in writing tyle between chapter 2 and 3. The numbering in chapter 3 i different from chapter 2. Alo we have not been conitent with emphaizing the difference between programming variable and logical variable with a different font wherever inconitent the context hould clarify what i meant. 7

8 2 Median Thi chapter deal with the IOI 2000 Median problem. The article Finding the Median under IOI Condition [1] i ued a a tarting point. The median i a reactive tak. The difference with regular tak i that the tak involve a dialog between the algorithm and it environment. The firt reactive tak wa introduced at IOI Game uch a Mater Mind fall in thi category. The input data, uch a the ecret code in Mater Mind, i indirectly available through the environment, which offer a limited et of operation. The median offer in a ame way input data that can only be acceed uing a library. The library enable the algorithm to acce the data in a very limited way. Thi will be further explained in the tak decription. In paragraph 1 the IOI 2000 Median tak decription i given. In paragraph 2 we develop ome notation to analyze the Median tak. In paragraph 3 we analyze the Median tak. In paragraph 4 we derive a taxonomy of olution for the Median tak. In paragraph 5 everal data tructure to repreent a et of label are dicued. In paragraph 6 we mention a few more olution that where not eaily decribed uing the derivation in paragraph 5. Paragraph 7 decribe how to uing tandard median finding algorithm. Paragraph 8 follow with a dicuion off ome global optimization. Paragraph 9 ummarize derived olution in a taxonomy. Paragraph 10 follow with an overview of different algorithm that can be contructed from the taxonomy. In paragraph 11 preent the verification of grading of the Median tak. Paragraph 12 end thi chapter with the concluion. 2.1 Tak decription The tak decription i taken from the IOI 2000 tak decription [2]; ome minor editing took place. It contain the problem decription, input and output pecification, additional contraint and an example. Begin of Quoted Tak Decription Problem decription A new pace experiment involve N object, labeled from 1 to N. It i known that N i odd. Each object ha a ditinct but unknown trength expreed by a natural number. For each trength Y, it hold that 1 Y N. The object with median trength i the object X uch that there are equally many object having maller trength than X a there are object having greater trength than X. You are to write a program that determine the object with median trength. Unfortunately, the only way to compare the trength i by a device that, given three ditinct object, determine the object with median trength among the three object Library You are given a library named device with three operation: 8

9 GetN, to be called once at the beginning without argument; it return the value of N. Med3, called with three ditinct object label a argument; it return the label of the object with median (middle) trength. Anwer, to be called once at the end, with one object label a argument; it report the label of object X with median trength and properly end the execution of your program. The library device produce two text file: MEDIAN.OUT and MEDIAN.LOG. The firt line of file MEDIAN.OUT contain one integer: the label of the object paed to the library in the call to Anwer. The econd line will contain one integer: the number of call to Med3 that have been performed by your program. The dialogue between your program and the library i recorded in the file MEDIAN.LOG. Intruction for Pacal programmer: Include the ue tatement given below in the ource code. ue device; Intruction for C/C++ programmer: Ue the include tatement given below in the ource code, create a project MEDIAN.PRJ and add the file MEDIAN.C (MEDIAN.CPP) and DEVICE.OBJ into thi project. #include device.h Experimentation You can experiment with the library by creating a text file DEVICE.IN. The file mut contain two line. The firt line mut contain one integer: the number of object N. The econd line mut contain the integer from 1 to N in ome order: the i-th integer i the trength of the object with label i Example DEVICE.IN The file DEVICE.IN above decribe an input with 5 object and trength a below: Label Strength Here i a correct equence of 5 library call: 1. GetN (in Pacal) or GetN() (in C/C++) return Med3(1,2,3) return Med3(3,4,1) return 4. 9

10 4. Med3(4,2,5) return Anwer(4) Contraint For the number of object N we have 5 N 1499 and N i odd. For the object label i, we have 1 i N. For the object trength Y, we have 1 Y N and all trength are ditinct. Pacal library file name: device.tpu Pacal function and procedure declaration: function GetN: integer; function Med3(x, y, z: integer): integer; procedure Anwer(m: integer); C/C++ library file name: device.h, device.obj (ue large memory model) C/C++ function header: int GetN(void); int Med3(int x, int y, int z); void Anwer(int m); No more than 7777 call of function Med3 are allowed per run. Your program mut not read or write any file. End of Quoted Tak Decription 2.2 Notation In thi ection we develop ome notation to analyze the problem Definition Thi paragraph contain an overview of the aumption and definition ued in the ret of the chapter. Aumption The number of object N N 5 N 1499 N mod 2 = 1 Definition Object label = [ 1..N ] Note: i a totally ordered et. We only need object label to identify the object. The object label themelve do not necearily have to be a total order. The only required property i: # = N. Definition Strength function The trength of an object i given by the function. : = 10

11 Note: The function i not known to the contetant. The range of (i.e. ) could be any totally orderable et e.g. or a et of tring. Aumption Strength function i injective (i.e. all trength are ditinct) ( i, j : i, j :. i =. j i = j) Note: Becaue i an injective function # #. Definition Ordering relation < on For all i, j i < j. i <. j Note: The relation < i irreflexive, antiymmetric and tranitive and trichotomou and therefore a total order. Definition Ordering relation on For all i, j i j. i. j Note: The relation i reflexive, antiymmetric, tranitive and comparable (total) and therefore a total order. Propertie Ordering relation For all i, j i j i < j i = j i < j i j i j i < j j i ( ) ( ) i j j < i 11

12 Definition Minimum partial function min : ( ) For V V ( ) min. V V i : i V : min. V i Note: min.( V W ) min.( min. V min. W ) = if V W Definition Maximum partial function max : ( ) For V V ( ) max. V V i : i V : i max. V Note: max.( V W ) max.( max. V max. W ) = if V W Definition Generalized ordering relation < on For all V, W Note: (, : : ) V < W v w v V w W v < w V < V V = < W V < < V < W max. V < min. W if V W The generalized relation < i tranitive. Definition Generalized ordering relation on For all V, W (, : : ) V W v w v V w W v w 12

13 Note: V V # V 1 W V V W max. V min. W if V W The generalized relation i tranitive. Propertie Generalized ordering relation For all V, W V W V < W V W V < W V W V W = V W v, w: v V w W : w < v ( ) ( ) ( V < W ) ( v, w : v V w W : w v) Definition Median partial function med : ( ) For V # V mod 2 = 1 { } { } med. V V # i : i V : i < med. V = # i : i V : med. V < i Note: { } { } # i : i V : i < med. V = # i : i V : med. V < i = # V div 2 Property The median of et V of 3 object uing med Aume: { } b = med. V V = a, b, c V # V = 3 b = med. V { definition med # V 3} ( a < b < c) ( c < b < a) = 13

14 Note: There i a dual property for which we aume: b med. V b med. V ( b med. V ) = (( a < b < c) ( c < b < a) ) { Propertie - Ordering relation } ( b a b c) ( c b a b) Definition Median partial function Med3 : 3 For { a b c} { a b c},, #,, = 3 { a b c} Med3. a. b. c = med.,, Note: Med3... a b c i alo written a Med3 (,, ) through the library a a function call. Property The median of et V of 3 object uing Med3 Aume: { } V = a, b, c V # V = 3 b = Med3. a. b. c a b c which i the operation that i available b = Med3. a. b. c ( a < b < c) ( c < b < a) Definition For all b the on oppoite ide relation For all a, b, c Note: ( ) ( ) a b c a < b < c c < b < a a b c fale if a = b a b c fale if b = c a b c fale if a = c a b c c b a b on 14

15 a b c c b d ( a b d ) b = med.{ a, b, c} a b c if { } { } # a, b, c = 3 { } { { } } a b c # i : i a, c : i < b 0 # i : i a, c : b < i 0 For all b the on oppoite ide relation intranitive. Proof: intranitivity of on oppoite ide a b c c b d { definition} ( a < b < c c < b < a) ( c < b < d d < b < c) { ditributivity} ( a < b < c d < b < c) ( c < b < a c < b < d ) { calculu} ( a < b b < c d < b) ( c < b b < a b < d ) { calculu} ( a < b d < b) ( b < a b < d ) { calculu} ( a b d b) ( b a b d ) { ditributivity} ( b a d b) ( b d a b) { De Morgan} ( a < b < d ) ( d < b < a) { De Morgan} ( a < b < d d < b < a) { definition} ( a b d ) b i irreflexive, ymmetric and 15

16 Property A property of on oppoite ide For all a, b, c, d a b c b c d ( a < b < c c < b < a) ( b < c < d d < c < b) { ditributivity} ( a < b < c b < c < d ) ( c < b < a d < c < b) ( a < b < c < d ) ( d < c < b < a) Note: a b c b c d a b d a c d a b d b c d a b c a c d Corollary Extreme and on oppoite ide a < b c a b c b < c {, } { } b c a a b c c b, < < a = min.{ a, b, c} a b c b c d b = min.{ b, c, d} a = max.{ a, b, c} a b c b c d b = max.{ b, c, d} Proof: a = min.{ a, b, c} a b c b c d b = min.{ b, c, d} = min.{,, } { definition of min and a b c and b c d} ( < < < < ) ( < < < < ) { a b} ( < < ) ( < < < < ) { b c} ( < < ) ( < < ) { b c b d} = min.{ b, c, d} a a b c a b c b c d a b a c a b c c b a b c d d c b a b a c a b c b c d d c b < a b a c a b c b c d < < b 16

17 Proof: a = max.{ a, b, c} a b c b c d b = max.{ b, c, d} Similar to a = min.{ a, b, c} a b c b c d b = min.{ b, c, d} Definition For all b the on the ame ide relation For all a, c Note: ( ) ( ) a b c a b c b b a b c a b c true if a = b a b c true if b = c a b c true if a = c a b c c b a a b c c b d a b d b med. a, b, c a b c { } { } { } { { } } b on a b c # i : i a, c : i b = 0 # i : i a, c : b i = 0 For all b the on the ame ide relation and therefore an equivalence relation. a b c a b c Corollary ( ) b i reflexive, ymmetric and tranitive ( a b c) { definition} ( a < b < c c < b < a) { De Morgan} ( a < b < c) ( c < b < a) { De Morgan} ( b a c b) ( b c a b) { ditributivity} ( b a b c) ( a b c b) { definition} a b c 17

18 Corollary a b c b a c a c b Proof: a b c { definition} ( a < b < c) ( c < b < a) { calculu} ( ) ( ) { defintion} ( b a c a a b a c ) ( ( a c b c) ( c a c b) ) b a c a c b Corollary a b c b a c a c b ( a b a c b c) Proof: a b c { definition} ( a < b < c) ( c < b < a) { calculu a b a c b c} ( ) ( ) { defintion} ( b a c a a b a c ) ( ( a c b c) ( c a c b) ) b a c a c b Corollary a b c a b d b d c b d Proving i left to the reader. Definition For all B the generalized on oppoite ide relation For all A, C Note: ( ) ( ) A B C A < B < C C < B < A A B C fale if A = B B A B C fale if B = C B A B C fale if A = C A B C A B C true if A = C A = B C = B on 18

19 A B C true if B = A B C B < C C < B if A = B C < < A B C A B B A if A B C = A B C true if A = B C = A B C C B A A B C C B D A B D if A B C D ( ) A B C # A = # C #{ i : i A C : i < B} = #{ i : i A C : B < i} For all B the generalized on oppoite ide relation nonempty et it alo i irreflexive and intranitive. B i ymmetric. On Definition For all B the generalized on the ame ide relation For all A, C Note: ( ) ( ) A B C A B C B B A B C A B C B B ( C B B C) A B C ( A C C A) C C B on if A = B A B C if B = C A B C A B C A B B A if A = C A B C A B C C B A A B C C B D A B D if C A B C C B B C if A = A B C true if B = A B C A B B A if C = A B C true if A = C = A B C # i : i A C : i B = 0 # i : i A C : B i = 0 { } { } A B C ( A C B) ( B A C) For all B the generalized on the ame ide relation B i ymmetric but not anymore reflexive and tranitive. For C it i alo tranitive. Corollary Generalized A B C B A C A C B and B A C A C B A B A C B C A B C Proving i left to the reader. 19

20 Corollary - ( ) A B C # A = # C med. A B C = med. B We give only a draft of the proof. For all A, B, C B { i i A C i B} = { i i A C B i} # : : # : : ( ) med. A B C = med. B { i i A C i < B} = { i i A C B < i} # : : # : : { i i A C i B} = { i i A C B i} # : : # : : A B C # A = # C { i i A C i < B} = { i i A C B < i} # : : # : : Specification MEDIAN [ var m: ; m := The label of the object with median trength { m = med. } ] 2.3 Analyi In thi paragraph we analyze the Median tak. We conider an accepted ubmiion to be incorrect if the olution on ome input: doe not terminate give a, poibly non-exiting, label a anwer that i not the label of the object with median trength omehow guee the anwer, that i, the anwer wa not uniquely determined by the invoked Med3 call and their reult Violation of the upper bound on Med3 call doe not make a program incorrect. It i not efficient enough. So we ignore the upper bound for the moment. 20

21 Introduction Permutation p p : A permutation p : i introduced. Permutation p help olving the problem of finding the label of the object with median trength. Now find a permutation uch that p. N div 2 i the label of the object with median trength. ( ) Specification Median (p) A refinement of the Median pecification with permutation p [ var m: ; p: array of ; { p i a permutation of } p := a permutation of L { a random or identity permutation } i, j : i, j i j : p. i p. j } ; { ( ) permute p p. N div 2 = med. } ; { ( ) m := p.(n div 2) { m = med S. } ] S Then we have to figure out how to permute p? Calculation An equivalent pot condition for permute p.( N div 2) = med. { definition of med} ( ) ( ) { p i a permutation of } { i i i < p ( N )} = { i i p ( N ) < i} { p i a permutation of } { i i < N p i < p ( N )} = { i : 0 i < N : p. ( N div 2 ) < p. i} { antiymmetry } ( ) p { } { ( ) } p. N div 2 # i : i : i < p. N div 2 = # i : i : p. N div 2 < i # : :. div 2 # : :. div 2 # : 0 :.. div 2 # < { } { ( ) } # i : 0 i < N : p. i < p. N div 2 = # i : 0 i < N : p. N div 2 < p. i = N div 2 There are 3 way to permute p uch that p. ( N div 2) i the label of the object with median trength. 21

22 Order p uch that: ( i, j, k : 0 i < j < k < N : p. i < p. j < p. k ) Split p uch that: ( i, j, k : 0 i < j < k < N : p. k < p. j < p. i) ( i, k : 0 i < N div 2 < k < N : p. i < p. ( N div 2 ) < p. k ) Pair p uch that ( i, k : 0 i < N div 2 < k < N : p. k < p. ( N div 2 ) < p. i) ( ) ( ) p. i < p. N div 2 < p. N i 1 i : 0 i < N div 2 : p. ( N i 1 ) < p. ( N div 2 ) < p. i We rewrite thee 3 predicate in equivalent predicate. Equivalent predicate for the order p predicate: ( i : 0 i < j < k < N : p. i < p. j < p. k ) ( i : 0 i < j < k < N : p. k < p. j < p. i) { tranitivity } ( i : 0 i < j < N : p. i < p. j) < ( i : 0 i < j < N : p. j < p. i) { tranitivity } i : 0 < i < N : p. ( i 1 ) < p. i < ( ) ( i : 0 < i < N : p. i < p. ( i 1) ) 22

23 { tranitivity } ( i : 0 < i < N 1: p. ( i 1 ) < p. i < p. ( i + 1) ) < ( i : 0 < i < N 1: p. ( i + 1 ) < p. i < p. ( i 1) ) { i i 1} i :1 < i < N : p. ( i 2 ) < p. ( i 1 ) < p. i ( ) ( i :1 < i < N : p. i < p. ( i 1 ) < p. ( i 2) ) Written uing on oppoite ide notation: ( i : 0 i < j < k < N : p. i < p. j < p. k ) ( i : 0 i < j < k < N : p. k < p. j < p. i) { tranitivity } ( i : 0 i < j < k < N : p. i < p. j < p. k p. k < p. j < p. i) { definition p. i p. j p. k} ( i : 0 i < j < k < N : p. i p. j p. k ) < ( i : 0 < i < N 1: p. ( i 1 ) < p. i < p. ( i + 1) ) ( i : 0 < i < N 1: p. ( i + 1 ) < p. i < p. ( i 1) ) { tranitivity } i : 0 < i < N 1: p. ( i 1 ) < p. i < p. ( i + 1 ) p. ( i + 1 ) < p. i < p. ( i 1) { definition p. ( i 1 ) p. i p. ( i 1) } i : 0 < i < N 1: p. ( i 1 ) p. i p. ( i + 1) < ( ) + ( ) 23

24 ( i :1 < i < N : p. ( i 2 ) < p. ( i 1 ) < p. i) ( i :1 < i < N : p. i < p. ( i 1 ) < p. ( i 2) ) { tranitivity } i :1 < i < N : p. ( i 2 ) < p. ( i 1 ) < p. i p. i < p. ( i 1 ) < p. ( i 2) { definition p. ( i 2 ) p. ( i 1 ) p. i} i :1 < i < N : p. ( i 2 ) p. ( i 1 ) p. i < ( ) ( ) Equivalent predicate for the plit p predicate: ( i, k : 0 i < N div 2 < k < N : p. i < p. ( N div 2 ) < p. k ) ( i, k : 0 i < N div 2 < k < N : p. k < p. ( N div 2 ) < p. i) { tranitivity } i : 0 i < N div 2 : p. i < p. ( N div 2 ) < p. ( N i 1) < ( ) ( i : 0 i < N div 2 : p. ( N i 1 ) < p. ( N div 2 ) < p. i) Written uing on oppoite ide notation: ( i, k : 0 i < N div 2 < k < N : p. i < p. ( N div 2 ) < p. k ) ( i, k : 0 i < N div 2 < k < N : p. k < p. ( N div 2 ) < p. i) { tranitivity } p. i < p. ( N div 2 ) < p. k < i, k : 0 i < N div 2 < k < N : p. k < p. ( N div 2 ) < p. i { definition p. i p. ( N div 2 ) p. k} ( i, k : 0 i < N div 2 < k < N : p. i p. ( N div 2 ) p. k ) 24

25 Written uing on oppoite ide and on ame ide notation: ( i : 0 i < N div2 : p. i < p. ( N div 2 ) < p. ( N i 1) ) ( i : 0 i < N div2 : p. ( N i 1 ) < p. ( N div 2 ) < p. i) { } i : 0 i < N div2 : p. i p. ( N div2 ) p. ( N i 1) ( ) ( i : 0 < i < N div2 : p. ( i 1 ) p. ( N div2 ) p. i) ( i : 0 < i < N div2 : p. ( N i 1 ) p. ( N div2 ) p. ( N i) ) { } p.0 p. ( N div 2 ) p. ( N 1) ( i : 0 < i < N div2 : p. i p. ( N div2 ) p. ( N i 1) ) ( i : 0 < i < N div2 : p. ( i 1 ) p. ( N div2 ) p. i) ( i : 0 < i < N div2 : p. ( N i 1 ) p. ( N div2 ) p. ( N i) ) { } p.0 p. ( N div 2 ) p. ( N 1) ( ) ( ) p. i p. N div2 p. N i 1 i : 0 < i < N div 2 : p. ( i 1 ) p. ( N div 2 ) p. i p. ( N i 1 ) p. ( N div 2 ) p. ( N i) { } ( ) ( ) p.0 p. N div 2 p. N 1 ( ) ( ) p. i 1 p. N div 2 p. i i : 0 < i < N div 2 : p. ( N i 1 ) p. ( N div 2 ) p. ( N i) 25

26 Equivalent predicate for the pair p predicate (uing on oppoite ide notation): ( ) ( ) p. i < p. N div 2 < p. N i 1 i : 0 i < N div 2 : p. N i 1 p. N div 2 p. i ( ) < ( ) < { definition p. i p. ( N div 2 ) p. ( N i 1) } i : 0 i N div 2 : p. i p. ( N div 2 ) p. ( N i 1) ( < ) Thee 3 way are correct becaue they imply the previouly calculated equivalent pot condition of permute p which i: { ( )} ( ) { } # i : 0 i < N : p. i < p. N div 2 = # i : 0 i < N : p. N div 2 < p. i = N div2 To ee thi we write down the 3 implication. An ordered permutation: ( i : 0 < i < N : p. ( i 1 ) < p. i) ( i : 0 < i < N : p. i < p. ( i 1) ) { tranitivity } ( ) < { } { ( ) } # i : 0 i < N : p. i < p. N div 2 = # i : 0 i < N : p. N div 2 < p. i = N div 2 A plit permutation: ( i : 0 i < N div2 : p. i < p. ( N div 2 ) < p. ( N i 1) ) ( i : 0 i < N div2 : p. ( N i 1 ) < p. ( N div 2 ) < p. i) { # connection} ( ) { } { ( ) } # i : 0 i < N : p. i < p. N div 2 = # i : 0 i < N : p. N div 2 < p. i = N div2 26

27 A pair permutation: ( ) ( ) p. i < p. N div2 < p. N i 1 i : 0 i < N div 2 : p. ( N i 1 ) < p. ( N div 2 ) < p. i { # connection} { ( )} ( ) { } # i : 0 i < N : p. i < p. N div 2 = # i : 0 i < N : p. N div 2 < p. i = N div2 Next follow a little ummary (uing the on oppoite ide relation) of the 3 way to p. N div 2 i the label of the object with median trength. permute p uch that ( ) Order p uch that Split p uch that Pair p uch that ( i : 0 i < j < k < N : p. i p. j p. k ) ( i, k : 0 i < N div2 < k < N : p. i p. ( N div 2 ) p. k ) ( i : 0 i < N div2 : p. i p. ( N div2 ) p. ( N i 1) ) There are ( 1)! p. N div 2 a the label of the object with median trength. Thee permutation are called validated. N permutation of p that have ( ) Thee 3 way identify 4 collection of poible permutation of p. ordered p plit p paired p validated p Where ordered i a pecial kind of plit and plit i a pecial kind of paired and paired i a pecial kind of validated. ordered p plit p plit p paired p paired p validated p 27

28 The ize of the 4 collection depend on the number of label N. The ordered collection contain only 2 poible permutation. ( ) 2 The plit collection contain ( ) 2 N div 2! poible permutation. ( ) 2 N div 2 The paired collection contain 2 ( div 2 )! The validated collection contain ( N 1 )! poible permutation. N poible permutation. The input collection from which one item (permutation) i taken a input to the program conit of! N poible permutation. Example The 4 collection for N = 3 Aume: { } V = a, b, c V # V = 3 b = medv The input collection conit of N! = 3! = 6 permutation: {( a, b, c),( a, c, b),( b, a, c),( b, c, a),( c, a, b),( c, b, a )} All other collection contain 2 poible permutation: { a < b < c, c < b < a} Example The 4 collection for N = 5 Aume: { } V = a, b, c, d, e V # V = 5 c = medv The input collection conit of N! = 5! = 120 permutation: {( a, b, c, d, e),...,( e, d, c, b, a )} The ordered collection contain 2 permutation: a < b < c < d < e, e < d < c < b < a The plit collection contain 5 1 2! = permutation: a < b < c < d < e, a < b < c < e < d, b a c d e, b a c e d, < < < < < < < < d < e < c < a < b, d < e < c < b < a, e < d < c < a < b, e < d < c < b < a 28

29 The paired collection contain ! = permutation: a < b < c < d < e, a < b < c < e < d, a < d < c < b < e, a < e < c < b < d, b < a < c < d < e, b < a < c < e < d, b < d < c < a < e, b < e < c < a < d, d < a < c < e < b, d < b < c < e < a, d < e < c < a < b, d < e < c < b < a, e < a < c < d < b, e < b < c < d < a, e < d < c < a < b, e < d < c < b < a The validated collection contain ( 5 1 )! = 24 permutation: a < b < c < d < e, a < b < c < e < d, a < d < c < b < e, a < d < c < e < b, a < e < c < b < d, a < e < c < d < b, b < a < c < d < e, b < a < c < e < d, b < d < c < a < e, b < d < c < e < a, b < e < c < a < d, b < e < c < d < a, d < a < c < b < e, d < a < c < e < b, d < b < c < a < e, d < b < c < e < a, d < e < c < a < b, d < e < c < b < a, e < a < c < b < d, e < a < c < d < b, e < b < c < a < d, e < b < c < d < a, e < d < c < a < b, e < d < c < b < a It i eay i.e. O( N ) to verify uing Med3 if one of the predicate ordered, plit, paired or validated hold. Note that finding the median i poible in O( N ) [5 p.94]. Once the median i known generating a plit p become linear alo and therefore alo generating a O N log N. pair p. Sorting i known to be ( ( )) Suppoe verification of a given permutation i required. Permutation may be verified by one of the following program. R ordered p [ var i, j: integer; b: boolean; i := 2 j := N while not (i = j) do if Med3(p[i 2], p[i 1], p[i]) = p[i 1] then i := i + 1 ele j := i { R ( i = N ) } ] 29

30 R plit p [ var i, j: integer; i := 0 j := N div 2 if Med3(p[0], p[j], p[n 1]) = p[j] then i := i + 1 ele j := i while not (i = j) do if not (Med3(p[i - 1], p[j], p[i]) = p[j]) and not (Med3(p[N i - 1], p[j], p[n i]) = p[j]) then { p[i - 1] p[j] p[i] p[n i - 1] p[j] p[n i] } i := i + 1 ele j := i { R ( i = N div 2 ) } ] R pair p [ var i, j: integer; i := 0 j := N div 2 while not (i = j) do if Med3(p[i], p[j], p[n i 1]) = p[j] then i := i + 1 ele j := i { R (i = N div 2) } ] R validated p [ var V, W: et of ; v, w: ; V, W :=, { m } v : W V, W := V { v }, W { v } while not (W = ) do begin w : W W := W {w} if not (Med3(v, m, w) = m) then { v m w } 30

31 ] end V := V { w } { R ( #V = # div 2 ) } 2.4 Taxonomy derived In thi paragraph we derive a taxonomy of olution for the Median tak. Every taxonomy tart from a common tarting point. A common in mathematic thi i called the root of the tree. Our tarting point i given by the IOI 2000 Median tak decription. Summarized the tak decription i: find the label of the object with median trength and clearly we have to find thi label in the given et of label. The complement/dual verion of thi tak decription i: eliminate the label of the object with non median trength from the given et of label. We tart at the root of all algorithm that eliminate non median object and build the taxonomy where each node (or leaf) contain an abtract algorithm. Every algorithm i more pecific than it parent. Firt we introduce two additional definition: Definition For all b the pair over b with relation For all A, C b on ( : i a bijection : ( : : ( )) ) Ab C A C = f f A C a a A a b f a Set A pair over b with et C if and only if A C = and there exit a bijection f between et A and C uch that for all a A a b f a. Note that for empty et A and C thi hold. Alo: Ab C Cb A Ab C b = med A { b} C Ab C # A = # C ( ) we have ( ) The next definition i a generalization of the previou definition. 31

32 Definition For all b the relation ~ b ~ on For all A, C ( { } ) A ~ b ~ C P, Q : P A Q C : P b Q A P b C Q Some propertie: A ~ b ~ C C ~ b ~ A A ~ b ~ C Q : Q C : Ab Q b C Q if # A # C ( { } ) A ~ m ~ C A C = A ~ m ~ C # A N div 2 A{ b} C A ~ b ~ C Ab C A ~ b ~ C A ~ b ~ C # A = # C Ab C We ue thi complement/dual decription a the root of the taxonomy and label the root with Elimination of non median object Root Elimination of non median object The root of the taxonomy i an algorithm that find the median by elimination of non median object. The label of the object with median trength i alway referred to by a ghot variable m, i.e. m = med.. The root algorithm i baed on 3 et A, B and C for which there are 4 invariant: Invariant 1: # A + # B + # C = N where N = # Invariant 2: A B C = Invariant 3: m B Invariant 4: A ~ m ~ C From invariant 1 and 2 we have the corollary: A B = A C = B C = The variant function: # B 1 The root algorithm i given by: 32

33 var A, B, C, X, Y: et of L; A, B, C :=, {1,..., N}, { Elimination } while not (#B = 1) do begin X, Y : X, Y B X Y A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } The aignment of et X and Y i feaible becaue: A ~ m ~ C {# B 1 ( b : b B : A { b} ~ m ~ C A ~ m ~ C { b} )} ( X, Y : X, Y B X Y : A X ~ m ~ C Y ) > Progre i made becaue X Y All invariant are maintained (correctne): Invariant 1 Trivial Invariant 2 Trivial Invariant 3 ( ) { m B A X ~ m ~ C Y m X Y} m B X Y true Invariant 4 Aignment of et X and Y doe not invalidate invariant 4. The aignment A, C := A X, C Y hould not invalidate invariant 4 and becaue we do not know m we have to find ome condition from which we may conclude A X ~ m ~ C Y. 33

34 There are two cae 1. A = P C = Q 2. ( A = P C = Q) 1. A = P C = Q A X ~ m ~ C Y { definition ~ m ~ } ( P, Q : P ( A X ) Q ( C Y ) : PmQ ( A X ) P{ m} ( C Y ) Q) { P A Q C} X{ m} Y Am C = = 2. ( A = P C = Q) A X ~ m ~ C Y { definition ~ m ~ } ( P, Q : P ( A X ) Q ( C Y ) : PmQ ( A X ) P{ m} ( C Y ) Q) { P ( A X ) and Q ( C Y ) for which Pm Q } ( A X ) P{ m} ( C Y ) Q { calculu} N + 1 M : M # M + # C : ( A X ) P M C Q 2 N + 1 M : M # M + # A : A P M ( C Y ) Q 2 34

35 { A B C} = N + 1 M : M A B C # M + # C : ( A X ) P M C Q 2 N + 1 M : M A B C # M + # A : A P M ( C Y ) Q 2 X M firt quantor A M C M Y M econd quantor N + 1 M : M B X # M + # C : ( A X ) P M C Q 2 N + 1 M : M B Y # M + # A : A P M ( C Y ) Q 2 We call thi the root condition. We ditinguih three poibilitie to aign et X and Y and remove them from B uch that A X ~ m ~ C Y : Remove one ingleton X or Y Remove two ingleton X and Y Remove two et X and Y EE Singleton elimination We remove one ingleton at a time from et B thi mean that ( X Y ) # = 1 Becaue # A = N div 2 X = and # C = N div 2 Y = the algorithm i: var A, B, C, X, Y: et of L; A, B, C :=, {1,..., N}, { Eliminiation } while not (#B = 1) do begin if #A = N div 2 then X, Y :, Y B #Y = 1 A ~ m ~ C Y ele if #C = N div 2 then X, Y : X B #X = 1 A X ~ m ~ C, ele X, Y : X, Y B #(X Y) = 1 A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } 35

36 There are now two poibilitie to elect an X or Y uch that A X ~ m ~ C Y : Single ide election i.e. chooe alway X or alway Y Dual ide election i.e. chooe X or Y EESS Single ide election We remove one element on a fixed ide of the median m. Without lo of generality we prefer thi to be et X where poible. The algorithm then i: var A, B, C, X, Y: et of L; A, B, C :=, {1,..., N}, { Elimination } while not (#B = 1) do begin if #A = N div 2 then X, Y :, Y B #Y = 1 A ~ m ~ C Y ele X, Y : X B #X = 1 A X ~ m ~ C, A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } Note: # A = N div 2 i table o we move thi part to potproceing a i hown below. var A, B, C, X, Y: et of L; A, B, C :=, {1,..., N}, { Elimination } while not ((#B = 1 or (#A = N div 2)) do begin X, Y : X B #X = 1 A X ~ m ~ C, A, B, C := A X, B (X Y), C Y end; { Potproceing } while not (#B = 1) do begin X, Y :, Y B #Y = 1 A ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } During elimination, topology tell u that C = ; therefore we ue the root condition with P = Q = to find an appropriate condition from which we conclude A X ~ m ~ C Y. 36

37 The root condition then i: N + 1 M : M B X # M : A X M 2 During potproceing we (alo) ue the root condition with P = Q = to find an appropriate condition from which we conclude A X ~ m ~ C Y. The root condition then i: N + 1 M : M B Y # M + # A : A M C Y 2 Example In general we need a tructure S that give u et M, X and Y. We define a tructure S on N + 1 # M + # A if X = et B to be a orted lit M uch that and a et of unorted 2 # M + # C if Y = element containing et B without the orted element. Before we tart the elimination we N 1 have to do ome preproceing to initialize S uch that + = # M. During the 2 initialization # A = 0 and # C = 0. The algorithm then i: var A, B, C, M, X, Y: et of L; A, B, C :=, {1,..., N}, { Preproceing } M : M B #M = (N + 1) / 2 { Elimination } while not (#A = N div 2) do begin X, Y : X B #X = 1 A X ~ m ~ C, A, B, C := A X, B (X Y), C Y end; { Potproceing } while not (#B = 1) do begin X, Y :, Y B #Y = 1 A ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } Thi reduce to a more detailed verion a i hown below. 37

38 var a, b, c: integer; S[0..a): A; S[a..b): B orted part; S[b..c): C; S[c..N): B unorted part; a, b, c := 0, 0, 0 { Preproceing } b := 2; while not (b a = (N + 1) div 2) do begin inert S[c] into S[a..b) b, c := b + 1, c + 1 end; { Elimination } while not (a = N div 2) do begin inert S[c] into S[a..b) b, c := b + 1, c + 1 { X, M, Y = S[a], S[a + 1..b), } a := a + 1 { A, B, C := A X, B (X Y), C Y } end; {? c = N : b a = (N + 1) / 2 and a = (N 1) / 2 b = N c = N } { Potproceing } while not (b a = 1) do begin { X, M, Y =, S[p..q 1), S[q - 1] } Dec(b) { A, B, C := A X, B (X Y), C Y } end; { m = S[a..b) } EEDS Dual ide election We remove one element not fixed to a ide of the median m. The algorithm then i: var A, B, C, X, Y: et of L; A, B, C :=, {1,..., N}, { Elimination } while not (#B = 1) do begin if #A = N div 2 then X, Y :=, Y B #Y = 1 A ~ m ~ C Y ele if #C = N div 2 then X, Y : X B #X = 1 A X ~ m ~ C, ele X, Y : X, Y B #(X Y) = 1 A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } 38

39 Note: # A = N div 2 # C = N div 2 i table o we move thi part to potproceing a i hown below. var A, B, C, X, Y: et of L; A, B, C :=, {1,..., N}, { Elimination } while not ((#B = 1) or (#A = N div 2) or (#C = N div 2)) do begin X, Y : X, Y B #(X Y) = 1 A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { Potproceing } while not (#B = 1) do begin if #A = N div 2 then X, Y :, Y B #Y = 1 A ~ m ~ C Y ele { #C = N div 2 } X, Y : X B #X = 1 A X ~ m ~ C, A, B, C := A X, B (X Y), C Y end { m B #B = 1 B = { m } } During elimination we ue the root condition with P = Q = to find an appropriate condition from which we conclude A X ~ m ~ C Y. Thi mean that if a ingleton et Z i removed from et B it ha to be known whether Z i X or Z i Y. The root condition then i: N + 1 M : M B X # M + # C : A X M C 2 N + 1 M : M B Y # M + # A : A M C Y 2 During potproceing we (alo) ue the root condition with P = Q = to find an appropriate condition from which we conclude A X ~ m ~ C Y 39

40 The root condition then i: N + 1 M : M B X # M + # C : A X M C 2 N + 1 M : M B Y # M + # A : A M C Y 2 During potproceing if N 1 # A = thi reduce to: 2 N + 1 M : M B Y # M + # A : A M C Y 2 During potproceing if N 1 # C = thi reduce to: 2 N + 1 M : M B X # M + # C : A X M C 2 Example In general we need a tructure S that give u et M, X and Y. We define a tructure S on N + 1 # M + # A if X = et B to be a orted lit M uch that and a et of unorted 2 # M + # C if Y = element containing et B without the orted element. Before we tart the elimination we N 1 have to do ome preproceing to initialize S uch that + = # M during the 2 initialization # A = 0 and # C = 0. The algorithm then i: var A, B, C, M, X, Y: et of L; A, B, C :=, {1,..., N}, { Preproceing } M : M B #M = (N + 1) / 2 { Elimination } while not ((#A = N div 2) or (#C = N div 2)) do begin X, Y : X, Y B #(X Y) = 1 A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { Potproceing } 40

41 while not (#B = 1) do begin if #A = N div 2 then X, Y :, Y B #Y = 1 A ~ m ~ C Y ele { #C = N div 2 } X, Y : X B #X = 1 A X ~ m ~ C, A, B, C := A X, B (X Y), C Y end { m B #B = 1 B = { m } } Thi reduce to a more detailed verion a i hown below. var a, b, c: integer; S[0..a): A; S[a..b): B orted part; S[b..c): C; S[c..N): B unorted part; a, b, c := 0, 0, 0 { Preproceing } b := 2; while not (b a = (N + 1) div 2) do begin inert S[c] into S[a..b) b, c := b + 1, c + 1 end; { Elimination } while not ((a = N div 2) or (c b = N div 2)) do begin if Min(#A, #C) + #M = (N + 1) / 2 then begin inert S[c] into S[a..b) b, c := b + 1, c + 1 end chooe { X, M, Y = S[a], S[a + 1..b), } a := a + 1 { A, B, C := A X, B (X Y), C Y } or { X, M, Y =, S[a..b - 1), S[b 1] } b := b 1 { A, B, C := A X, B (X Y), C Y } end; {? c = N :... } { Potproceing } while not (b a = 1) do begin if #A = N div 2 then { X, M, Y =, S[a..b 1), S[b 1] } b := b 1 { A, B, C := A X, B (X Y), C Y } ele { #C = N div 2 then } { X, M, Y = S[a], S[a + 1, b), } a := a + 1 { A, B, C := A X, B (X Y), C Y } end; { m = S[a..b) } 41

42 2.4.5 PE Pair elimination The two ingleton form a pair; that i why it thi i called PE to ditinguih it from SE, the et elimination dicued later. We remove two ingleton X and Y uch that { } # Y = 1. The algorithm then i: var A, B, C, X, Y: et of L; A X ~ m ~ C Y and # X = 1 and A, B, C :=, {1,..., N}, { Elimination } while not (#B = 1) do begin X, Y : X, Y B #X = 1 #Y = 1 A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } During elimination topology tell u that # A = # C therefore we ue the root condition with P = A Q = C to find an appropriate condition from which we conclude A X ~ m ~ C Y. The root condition then i: X{ m} Y For which i we calculate { } { calculu} X m Y N 1 # A + # C M : M # M + : X M Y 2 2 = { A B C} 42

43 N 1 # A + # C M : M A B C # M + : X M Y 2 2 N # B A M C M X M Y M # A = # C = 2 N 1 N # B M : M B ( X Y ) # M + : X M Y 2 2 { calculu} # B 1 M : M B ( X Y ) # M : X M Y 2 Example In general we need a tructure S that give u et M, X and Y. We define a tructure S on et B to be a orted lit M uch that # B 1 # M and a et of unorted element 2 containing et B without the orted element. Before we tart the elimination we have to N + 1 N 1 do ome preproceing to initialize S uch that # M = (actually # M = note 2 2 that there i already one element inide et M that i either X or Y then one i inerted during elimination and 2 are removed). The algorithm then i: var A, B, C, M, X, Y: et of L; A, B, C :=, {1,..., N}, { Preproceing } M : M B #M = (N + 1) / 2 { Elimination } while not (#B = 1) do begin X, Y : X, Y B #X = 1 #Y = 1 A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } Thi reduce to a more detailed verion a i hown below. var a, b, c: integer; S[0..a): A; S[a..b): B orted; S[b..c): C; S[c..N): B unorted; 43

44 a, b, c := 0, 0, 0 { Preproceing } b := 2; while not (b a = (N + 1) div 2) do begin inert S[c] into S[a..b) b, c := b + 1, c + 1 end; { Elimination } while not (b - a = 1) do begin inert S[c] into S[a..b) b, c := b + 1, c + 1 { X, M, Y := S[a], S[a + 1..b - 1), S[b 1] } a, b := a + 1, b 1 { A, B, C := A X, B (X Y), C Y } end; {? c = N : topology } { m = S[a..b) } SE Set elimination We remove two et X and Y uch that { } The algorithm then i: var A, B, C, X, Y: et of L; A X ~ m ~ C Y. A, B, C :=, {1,..., N}, { Eliminiation } while not (#B = 1) do begin X, Y : X, Y B X Y A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y end; { m B #B = 1 B = { m } } During elimination we ue the root condition with a et P and Q from a previou tate for which we know that Pm Q to find an appropriate condition from which we conclude A X ~ m ~ C Y. 44

45 The root condition then i: { } X m Y if A = P C = Q N + 1 M : M B X # M + # C : ( A X ) P M C Q 2 ele N + 1 M : M B Y # M + # A : A P M ( C Y ) Q 2 For which we calculate: { } { calculu (note that in thi cae # A # C) } X m Y = N 1 # A + # C M : M # M + : X M Y 2 2 = { A B C} N 1 # A + # C M : M A B C # M + : X M Y 2 2 N # B A M C M X M Y M # A = # C = 2 N 1 N # B M : M B ( X Y ) # M + : X M Y 2 2 calculu { } # B 1 M : M B ( X Y ) # M : X M Y 2 The root condition for et elimination i: # B 1 M : M B ( X Y ) # M : X M Y if A = P C = Q 2 N + 1 M : M B X # M + # C : ( A X ) P M C Q 2 ele N + 1 M : M B Y # M + # A : A P M ( C Y ) Q 2 45

46 Of coure we can alway take P = Q = but we can do better by electing a larger et P and Q. Thi i poible if during the elimination omehow et A and C have the ame ize. We then have to remember et A and C and take thi a et P and Q. The algorithm then i: var A, B, C, P, Q, X, Y: et of L; A, B, C, P, Q :=, {1,..., N},,, { Eliminiation } while not (#B = 1) do begin X, Y : X, Y B X Y A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y if #A = #C then P, Q := A, C end; { m B #B = 1 B = { m } } Example In general we need a tructure S that give u et M, X and Y. We define a tructure S on et B to be a partition M uch that if A = P C = Q then # B 1 # M and if not then 2 N + 1 N + 1 # M + # A # M + # C and a et of unpartitioned element containing et 2 2 B without the partitioned element. The algorithm then i: var A, B, C, M, P, Q, X, Y: et of L; A, B, C, P, Q :=, {1,..., N},,, { Elimination } while not (#B = 1) do begin { Partition et B uch that X Y } X, Y : X, Y B X Y A X ~ m ~ C Y A, B, C := A X, B (X Y), C Y if #A = #C then P, Q := A, C end; { m B #B = 1 B = { m } } Thi reduce to a more detailed verion a i hown below. var a, b, c, p, q, x, y: integer; S[0..p): P; S[p..a): A; { i.e. A without P }; 46

47 S[a..b): B partitioned part; S[b..q): C; { i.e. C without Q }; S[q..c): Q; S[c..N): B unpartitioned part; a, b, c, p, q, x, y := 0, 0, 0, 0, 0, 0, 0 { Elimination } while not ((b - a = 1) and (c = N)) do begin { Partition et B uch that X Y } X, Y : X, Y B X Y A X ~ m ~ C Y { X, M, Y, B unpartitioned = S[a..x), S[x..y), S[y..b), S[c..N) } a, b := x, y { A, B, C := A X, B (X Y), C Y } if #A = #C then P, Q := A, C end; { m = S[a..b) } Thi i rewritten moving the unpartitioned part cloer to the partitioned egment a i hown below. var a, b, c, p, q, x, y: integer; S[0..p): P; S[p..a): A; { i.e. A without P }; S[a..x): X; S[x..b): Partioned part; S[b..y); Unpartioned part; S[y..c): Y; S[c..q): C; { i.e. C without Q }; S[q..N): Q; a, b, c, p, q, x, y := 0, 0, N, 0, N, 0, N; { Elimination } while not (c - a = 1) do begin { Partition et B uch that X Y } X, Y : X, Y B X Y A X ~ m ~ C Y { X, M, B unpartioned, Y := S[a..x), S[x..b), S[b..y) S[y..c) } a, c := x, y { A, B, C := A X, B (X Y), C Y } if #A = #C then P, Q := A, C end; { m = S[a..c) } There are now two poibilitie: Completely partition et B Partially partition of et B SEC Complete partitioning Completely partition et B 47

48 The algorithm then i: var a, b, c, p, q, x, y: integer; S[0..p): P; S[p..a): A; { i.e. A without P }; S[a..x): X; S[x..b): Partioned; S[b..y); Unpartioned; S[y..c): Y; S[c..q): C; ( i.e. C without Q }; S[q..N): Q; a, b, c, p, q, x, y := 0, 0, N, 0, N, 0, N; { Elimination } while not (c - a = 1) do begin { Partition et B } X, Y : X, Y B X Y A X ~ m ~ C Y { X, M, B unpartioned, Y := S[a..x), S[x..b), S[b..y) S[y..c) } a, b, c := x, x, y { A, B, C := A X, B (X Y), C Y } if #A = #C then P, Q := A, C end; { m = S[a..c) } Example The example from SE reduce to SEC, a more detailed verion, a i hown below. var a, b, c, p, q, x, y: integer; S[0..p): P; S[p..a): A; { i.e. A without P }; S[a..x): X; S[x..b): Partioned; S[b..y); Unpartioned; S[y..c): Y; S[c..q): C; { i.e. C without Q }; S[q..N): Q; a, b, c, p, q, x, y := 0, 0, N, 0, N, 0, N; { Elimination } while not (c - a = 1) do begin { Partition et B } h0, b, h1 := a, a + 1, c 1 if not (#A = #C) then { A C } if a = 0 then { C } if not (Med3(S[h0], S[h1], S[q 1]) = S[h1]) then Swap(S[h0], S[h1]) ele { A ) 48

49 if not (Med3(S[p], S[h0], S[h1]) = S[h0]) then Swap(S[h0], S[h1]) { S[a..h0)[h0][h b)[h1][h c) } while not (b = h1) do begin cae Med3(h0, h1, b) of h0: S[h0..b] := S[b][h0..b); h0, b := h0 + 1, b + 1; h1: S[b..h1] := S(b..h1][b]; h1 := h1-1 b: b := b + 1; end end if N div 2 < h0 then y := h0; ele if N div 2 = h0 then x := h0; y := h0 + 1; ele if N div 2 < h1 then x := h0 + 1; y := h1; ele if N div 2 = k then x := h1; y := h1 + 1; ele { k < N div 2 } then x := h1 + 1; { S[a..x) S[x..y) [y..c) } { S[a..x) m [y..c) } { X, M, Y := S[a..x), S[x..y), S[y..c) } { A X ~ m ~ C X } X, Y : X, Y B X Y A X ~ m ~ C Y a, b, c := x, x, y { A, B, C := A X, B (X Y), C Y } if #A = #C then P, Q := A, C end; { m = S[a..c) } SEP Partial partitioning Partially partition et B Here we drop the if #A = #C then P, Q := A, C for clarity. Note that SEC might be een a the bet cae of SEP var a, b, c, x, y: integer; S[0..a): A; S[a..x): X; S[x..b): Partioned { M }; S[b..y); Unpartioned { B X M Y }; S[y..c): Y; S[c..N): C; a, b, c, x, y := 0, 0, N, 0, N; { Elimination } while not (c - a = 1) do begin 49

50 { Partition et B } { X, M, B X M Y, Y := S[a..x), S[x..b), S[b..y), S[y..c) } X, Y : X, Y B X Y A X ~ m ~ C Y a, b, c := x, x, y { A, B, C := A X, B (X Y), C Y } end; { m = S[a..c) } Example The example from SE reduce to SEP, a more detailed verion, a i hown below. Here we need ome minor preproceing to get the two extreme. var a, b, c, x, y: integer; S[0..a): A; S[a..x): X; S[x..b): Partioned { M }; S[b..y); Unpartioned { B X M Y }; S[y..c): Y; S[c..N): Q; { Preproceing } h0 := 0 h1 := 1 for i := 2 to N - 1 do cae Med3(S[h0], S[h1], S[i]) of 0: h0 := i; 1: h1 := i; 2: ; end; if not (h0 < h1) then Swap(h0, h1); PuhOutide(, 0, h0, h1, N); a, b, c, x, y := 1, 2, N - 1, 1, N - 1; { Elimination } while not (c - a = 1) do begin { Partition et B } h0, b, h1 := a, a + 1, c 1 if not (Med3(S[0], S[h0], S[h1]) = S[h0]) then Swap(S[h0], S[h1]) { S[a..h0)[h0][h b)[h1][h c) } while not ( (b = h1) or (N div 2 < h0) or (h1 < N div 2) or ((h0 + (h1 b) < N div 2) and (N div 2 < h1 (h1 b))) ) do begin cae Med3(h0, h1, b) of 50

51 h0: S[h0..b] := S[b][h0..b); h0, b := h0 + 1, b + 1; h1: S[b..h1] := S(b..h1][b]; h1 := h1-1 b: b := b + 1; end end if N div 2 < h0 then S[h0..h1), h0 := S[b..h1)[h0..b), h0 + (h1 b); y := h0; ele if N div 2 = h0 then x := h0; y := h0 + 1; ele if N div 2 < h1 then x := h0 + 1; y := h1; ele if N div 2 = h1 then x := h1; y := h1 + 1; ele { h1 < N div 2 } then S[b..h1], h1 := S[h1][b..h1), b x := h1 + 1; { S[a..x) m [y..c) } { X, M, Y := S[a..x), S[x..y), S[y..c) } { A X ~ m ~ C X } X, Y : X, Y B X Y A X ~ m ~ C Y a, b, c := x, x, y { A, B, C := A X, B (X Y), C Y } end; { m = S[a..c) } Selecting pivot for SE Set elimination require u to elect two pivot to perform a partitioning of label. One might conider different method to elect the pivot labeled hi and hj uch that hi < hj e.g.: Straddled pivot i.e. on a egment [i..j) ue hi = i and hj = j 1 Firt pivot i.e. on a egment [i..j) ue hi = i and hj = i + 1 Proportional pivot i.e. on a egment [i..j) ue hi = (2 i + (j 1)) div 3 and hj = (i + 2 j) div 3 Random pivot i.e. on a egment [i..j) ue hi = i + Random(j i) and hj = i + Random(j i) Note: 0 Random(x) < x Although there eem to be ome kind of performance difference the wort cae, average cae and bet cae performance i alway the ame. To enure the average cae performance one hould ue random pivot. However ometime proportional pivot are preferred. 51

52 2.5 Repreenting a et of label The algorithm in the taxonomy are baed on operation that are applied to et of label. The operation that are applied to the et are upported by different data tructure. We hall dicu everal data tructure that are ueful for the different algorithm. We require a data tructure with the following operation: Build (N element) Inert (1 element) RemoveTop ReplaceTop RemoveBottom ReplaceBottom Here top and bottom refer to the extreme object becaue the notion of minimum and maximum object are interchangeable we prefer the notion of a top and bottom. Thee operation are upport by a (double ended) priority queue which might be implemented by a heap, a orted lit or jut a et. Each different implementation ha different performance characteritic. Note: in thi paragraph N i not the number of label in the Median tak but the number of label that have to be tored in the data tructure i.e. the ize of the et Set The et i a data tructure implemented uing an array uch that it only repreent the i, j : i j :. i. j here i j mean i and j are indice label without any tructure: ( ) in the array uch that i different from j, i j i j The et ha characteritic a given in the table below. Build Inert RemoveTop ReplaceTop RemoveBottom ReplaceBottom O(1) O(1) O(N) O(N) O(N) O(N) 52

53 An Hae diagram of a et data tructure i given below Lit The lit i a data tructure implemented uing an array uch that it i either an acending lit (i.e. minimum i firt index and maximum i lat index) or a decending lit (i.e. maximum i firt index and minimum i lat index): i, j : i j :. i <. j i, j : i j :. j <. i here i j mean i and j are indice in ( ) ( ) the array uch that i precede j, i j i = j 1 The lit ha characteritic a given in the table below. Build Inert RemoveTop ReplaceTop RemoveBottom ReplaceBottom O(N Log(N)) O(Log(N)) O(1) O(Log(N)) O(1) O(Log(N)) 53

54 A Hae diagram of a lit data tructure i given below Heap The heap i a data tructure implemented uing an array uch that it i either a minimum heap (i.e. minimum on top) or a maximum heap (i.e. maximum on top): i, j : i j :. i <. j i, j : i j :. j <. i here i j mean i and j are indice in ( ) ( ) the array uch that i i the parent of j. For a binary heap we have: i j i = ( j ) The heap ha characteritic a given in the table below. 1 div2 Build Inert RemoveTop ReplaceTop RemoveBottom ReplaceBottom O(N) O(Log(N)) O(Log(N)) O(Log(N)) O(N) O(N) A heap might be d-heap where d i the number of children then ( ) i j i = j 1 divd. A lit might alo be recognized a a linear d-heap (d = 1) but then performance degrade. Uually a binary heap (d = 2) i ued although performance of a ternary heap (d = 3) i lightly better [6]. 54

55 A Hae diagram of a heap data tructure i given below D-Lit The 2D-lit i a lit of (ub) lit. All ub lit are dijoint. A lit might alo be recognized a a 2D-lit where the ub lit contain only one item. Thi tructure i more advanced than jut a lit and i not eaily implemented uing an array. See the article [1] for further detail on implementation. A Hae diagram of a 2D-lit data tructure i given below

56 2.5.5 qd-lit The qd-lit i a lit of (q 1)D-lit. Thi i a generalization of the 2D-lit. All (q 1)Dlit are dijoint. Thi tructure i even more advanced than the 2D-lit. A Hae diagram of a qd-lit (q = 3) data tructure i given below More data tructure There are many more different data tructure poible that repreent a et, uch a: Priority queue: Binomial heap Fibonacci heap qd-heap (a heap of (q 1)D-heap where 1D-heap i jut a heap) Double ended priority queue: Min-Max heap Interval heap Deap Twin heap Data tructure uing the Med3 operation The mentioned implementation characteritic are general characteritic baed on a binary comparator, but improvement exit due to the ternary nature of the Med3 operation. The operation of the data tructure might be implemented uing the Med3 function directly to improve performance, although for ome of them thi eem rather complicated. Therefore a comparator function Smaller i introduced (a explained later) 56

57 that ue the extreme object to compare two label. However the inert operation of the lit data tructure i eay to be implemented uing a linear earch O(N), a binary earch O(Log 2 (N)) or ternary earch O(Log 3 (N)). Here the ternary earch i an improvement over the tandard binary earch. The tandard binary earch give rie to the O(N Log(N)) performance of the Inert operation for the lit data tructure. Another optimization by uing the Med3 operation directly i available for the et data tructure. That i we are able to remove both extreme the Top and Bottom in O(N) Searching in a data tructure If we want to replace or inert an element we need to earch for the poition where we have to put the new element. Perhap there exit ome optimal earch function for the heap and 2D-lit verion of the data tructure but we only invetigate the lit data tructure. There are 3 method of earching that have different performance: Linear Binary Ternary O(N) O(Log 2 (N)) O(Log 3 (N)) A linear earch in a lit data tructure for a poition might either tart at the top or the bottom of the lit. A ReplaceTop that ue a linear earch that tart at the top i on average better then a linear earch that tart at the bottom, though wort cae performance of both cae are the ame. The article [1] doe not recognize thi being ued for the method which i in [1] called half lit linear inertion ort (LISH). A generalization of thi idea i that an algorithm ue information about already deleted label. There are ome (unfortunately incorrect) ubmiion of the Median tak that applied thi idea. Normally the earch for a poition aume that all poition have equal probability, but the information about already deleted label change thee poibilitie and make it poible to reduce the number of Med3 call even further. We did not invetigate thi in depth, but a imulation for ternary earch howed that average cae efficiency wa improved although wort cae performance degraded. A counterexample that how wort cae performance will degrade for ternary earch i eay; alway continue the earch in the part that contain the mot label. 2.6 Taxonomy not derived We dicovered ome method to olve the Median tak that are not eaily decribed uing the derived taxonomy. We mention them in thi paragraph and add them directly Counting If we count the number of time an object i the median of 3 object, then we know that the median of all object i a unique and determinable number of time the median of 3 57

58 object. We ue a code imilar to the code fragment below. We ue a body the tatement Inc(Count[Med3(a, b, c)]) and we have alway a b a c b c for a := 1 to N do for b := 1 to N do for c := 1 to N do Body(a, b, c); for m := 1 to N do if Count[m] = 6 * (N div 2) * (N div 2) then Anwer(m); Code fragment 2-1 All triple Thi method of finding the median i not dicued in article [1]. Note that we might top counting if we are ure that all three label in the body tatement cannot be incremented enough to become the median. Without thi optimization we have wort cae performance. Thee counting method could be claified a pair elimination of non median object. Counting then i preproceing. Name Count[m] = Loop Invariant Number of Med3 N Call Triple N 1 N 3 N + 2 N N ( N 1) ( N 2) Triple2a 2 N 1 b < c N ( N 1) ( N 2) Triple2b 2 N 1 a < b N ( N 1) ( N 2) Triple3 2 N 1 a < b b < c N ( N 1) ( N 2) Triple4a ( N 1) 2 a = 1 a < b ( N 1) ( N 2) 89 N 1 2 a = 1 a b a < b Triple4b 2 N 1 N 1 a = 1 a < b b < c ( N 1) ( N 2) a = 1 a b a < b Table 2-1 Counting Sweeping and teting the pivot Another poibility which alo ue a counting technique i to tet whether a label i the median. Thi teting i done by weeping over c and counting the anwer. We ue a code 58

59 imilar to the code fragment below. We ue a body the tatement Inc(Count[Med3(a, b, c)]) and we have alway a b a c b c. for a := 1 to N do for b := 1 to N do Count[a] := 0; Count[b] := 0; for c := 1 to N do Body(a, b, c); if Count[a] = N div 2 then Anwer(a); if Count[b] = N div 2 then Anwer(b); Code fragment 2-2 Sweeping and teting the pivot Thee teting method could be claified a et elimination method: repetitively tet whether a label i m and then if we know m we elect the correponding et X and Y. Name Count[m] = Loop Invariant Number of Med3 N Call (wort cae) Triple5 N 1 Topology a = 1 ( N 1) ( N 2) 89 2 Triple6 2 N 1 b < c N ( N 1) ( N 2) Triple7 N 1 b = N + 1 a ( N 1) ( N 2) Table 2-2 Sweeping Additional explanation to table above: Triple5: Triple6: Triple7: Tet if label 1 (one) or b i median Tet if label a i median Tet if label a or b i median Sweeping and partitioning the candidate over the pivot If we look at Triple7 we notice that there i information lot. Every weep alo partition the label and tell u which are till valid candidate for m and which are not. The next pair we chooe a a and b in Triple7 hould only be a pair of valid candidate. Thee partitioning method could be claified a et elimination method. Additionally if we change a and b during the weep uch that we maximize the ize of one of the 3 partition and keep the other 2 empty we detect an a and b that are not median before the weep complete. If we maximize the middle partition then a and b are a pair and it look like a pair elimination cheme but it only i a pecial cae of et elimination where the et are forming a pair. 59

60 2.6.4 Bubble earch Thi paragraph i called Bubble earch a the method decribed below reemble very much the bubble ort algorithm. The method ue a code imilar to the fragment below. The code eventually terminate with m at p[n div 2]. i := 0; Count := 0; while not (Count = N div 2) do begin cae Med3(p[i], p[n div 2], p[n i - 1]) of p[i]: Swap(p[i], p[n div 2]); Count := 1; p[n div 2]: Count := Count + 1; p[n i 1]: Swap(p[N div 2], p[n i - 1]); Count := 1 end; i := (i + 1) mod (N div 2) end; Anwer(p[N div 2]) Code fragment 2-3 Bubble earch Thi code fragment repeatedly wap an element with element p[ N div 2]. Code mut terminate a the pair ( p[ i], p[ N i 1] ) can only become wider i.e. Ab Strengthp [ N i 1] Strengthp [ i] increae with at leat one for every ( ) wap. Eventually thi mut end a there i only a finite number of label of finite trength. Simulation howed that for a cyclic weep over i thi method ha O( N N ) average cae complexity (which i different from the bubble ort average cae complexity) and 2 the wort cae complexity i O( N ). Thi method could be claified a a et elimination method: repetitively tet whether a label i m and then if we know m we elect the correponding et X and Y. 2.7 Standard olution We might olve the problem of finding the median by reverting to any of the tandard median finding algorithm baed on binary comparion. For thi to work we only need to reproduce the relational operator (i.e.,, <, > and = ). We hall only reproduce the < operator here a the other are derivate of it. With the given Med3 operation we are able to find the extreme object but it i impoible to determine which i the tronger or weaker of the two object. If we have an extreme object we ue it to create the < operator. However becaue of the impoibility to determine the tronger from the weaker, we might elect one and jut aume it i the weaker and ue it to create the < operator. Then if we elected the wrong one, we have only have created the > operator which i not a problem for finding the median a it only invert the order of the label. Therefore we create a maller function that return lmin < lmax i < j which only 60

61 return whether or not the order of i and j i equal to the order of the extreme lmin and lmax. Note that lmin < lmax once ued cannot be changed i.e. we have to keep the aumed order fixed during execution. The GetExtrema procedure given below get the two extrema of a[i..j): procedure GetExtreme(a: array of integer; i, j: integer; var x, y: integer } { pre: i + 2 j } { pot: (for all k : i k < j a[k] y a[k] x : x a[k] y ) } var k: integer; begin x := a[i]; y := a[i + 1]; k := i + 2; while not (k = j) do begin cae Med3(x, y, a[k]) of x: x := a[k]; y: y := a[k]; a[k]: ; end inc(k); end; end; Once the extreme are known, we are able to compare two element i and j with the maller function given below uing the two extreme lmin and lmax which are found calling GetExtreme(a, 0, N, lmin, lmax), where a i an array of all the label. Finding the extreme require initially N 2 call of Med3. A we cannot ditinguih between the real minimum and the real maximum we chooe lmin to be our leat trong element. (Note that lmax i not really neceary for implementing the maller function). function Smaller(i, j: integer): boolean; { Global declared and initialized: lmin and lmax } { pre: not (i = j) } { ret: lmin < lmax i < j } begin Smaller := Med3(lmin, i, j) = i; end; A generalization of the maller function exit uing jut two label. We chooe two ditinct label lmin and lmax and define that lmin to be the leat of the two label. Thi generalization i uing two Med3 call and i outperformed by the above fragment after N 2 call. 61

62 function Smaller(i, j: integer): boolean; { Global declared and initialized: lmin and lmax pre: not (i = j) ret: lmin < lmax i < j } begin Smaller := not ((Med3(lmin, lmax, i) = lmin) = (Med3(lmin, i, j) = i)) end; 2.8 Global optimization We can alway randomize input to enure average cae complexity. Thi might perhap be forbidden in future IOI contet although ome determinitic (every time the ame) crambling of the input hall probably alway be poible. One obviou method i to remember previou made Med3 call. Thi i very intereting for data tructure that often call Med3 with the ame parameter. But then a general optimization i to keep track of all Med3 call and the tranitive cloure of all thee call. Then for every new call to Med3 we firt check the tranitive cloure to ee if we do not already know the anwer. There are all kind of method (data tructure) to keep track of (part of) thi tranitive cloure, e.g. a orted lit or a heap keep track of ome of the Med3 call and part of the tranitive cloure. Of coure we are not aked to ort a lit or build a heap, all we want i the median. Thi extra information (tored in the data tructure) ha an overhead in Med3 call. We hould therefore ue a data tructure for which the overhead i not too big uch that it help u find the median in the end cheaper. Of coure we could keep track of the entire tranitive cloure, but then we would till have to make a deciion on which are the next label to be ued in the next Med3 call. Thi i eay in orting, a we chooe ternary pivot for the inertion ort for example. To do a chooe the bet pivot on the entire tranitive cloure i not eay. Firt we need to know how to define the bet choice. The bet choice on firt thought eem to be the one that maximize the ize of the tranitive cloure (defined by the number of Med3 call for which the anwer i known) but thi entire tranitive cloure i not what we are intereted in. It i going to give u the mot information, but in the in the end we are not intereted in thi information. So thi information get omehow outdated during the proce. So we have to find a weight function that take thi outdated information into account alo. The zoom lit inertion ort (ee paragraph 2.10) i for example one that clearly how outdated information; i.e. outdated information are the label that get removed from the orted lit. Alo the partitioning algorithm how outdated information. If we find the bet weight function poible, we will end up with omething that i the bet median finding algorithm poible. Thi i known to be a linear algorithm. Although there are linear algorithm available, it i not currently known what the bet linear algorithm i. Alo the linear algorithm available are in practice (average cae) eaily outperformed by expected linear time algorithm uch a the ternary partitioning find olution. 2.9 Taxonomy ummarized Firt the taxonomy i hown for the derived olution preented in ection 2.4. And then the taxonomy i augmented tarting at No Root with the olution that did not originate from Root. 62

63 Root - Elimination of non median object EE Singleton elimination o EESS Single ide election o EEDS Dual ide election PE Pair elimination SE Set elimination o SEC Complete partitioning o SEP Partial partitioning No Root Counting Sweeping o Teting the pivot o Partitioning the candidate Bubble earch 2.10 Overview of algorithm Although we are quite intereted in the taxonomy for the different repreentation of a et, it i not of our concern here. The et repreentation are only needed to diverify the taxonomy. Every derived olution i able to ue any of the repreentation of a et leading to a manifold of poible program. We hall give an overview of only named olution in article [1]. Additionally new name for new olution are introduced. Name in article Derived olution Data tructure ued for repreentation of et M OPE Onion Peeling Elimination LISF Linear Inertion Sort uing Full Lit LISH Linear Inertion Sort uing Half lit LISZ Linear Inertion Sort uing Zoom lit Note PE Set Too many element in et M. EESS / EEDS / PE / SEC EESS PE Lit with linear earch Lit with linear earch Lit with linear earch Too many element in et M 63

64 BISF Binary Inertion Sort uing Full lit BISH Binary Inertion Sort uing Half lit BISZ Binary Inertion Sort uing Zoom lit TISF Ternary Inertion Sort uing Full lit TISH Ternary Inertion Sort uing Half lit TISZ Ternary Inertion Sort uing Zoom lit TPFS Ternary Partitioning Find uing Straddled pivot TPFF Ternary Partitioning Find uing Firt pivot TPFP Ternary Partitioning Find uing Proportional pivot TPFR Ternary Partitioning Find uing Random pivot EESS / EEDS / PE / SEC EESS EEDS EESS / EEDS / PE / SEC EESS EEDS SEC SEC SEC SEC Lit with binary earch Lit with binary earch Lit with binary earch Lit with ternary earch Lit with ternary earch Lit with ternary earch Too many element in et M Too many element in et M 64

65 2LHH 2D-Lit implementation of Half-Heap algorithm QLHH qd-lit implementation of Half-Heap algorithm EESS EESS Table 2-3 Overview of Algorihm 2D-Lit qd-lit The full lit olution are not optimal : they do too much preproceing and becaue of that, it can be claified a either EESS, EEDS, PE or SEC. A lit of all label might very eaily be reduced uing pair elimination or et elimination, which then have only wort cae complexity of O(1). Thi i omething which i not eaily decribed by our N 1 taxonomy. We need a lit of at leat element to make ure the root condition 2 hold, but we jut take all element. So preproceing might be reduced. Although it eem logical to have only jut enough preproceing a in the LISZ, it i not evident whether in general reducing preproceing to a minimum doe improve overall performance. Additional algorithm(): OPEH Like OPE thi i PE but it i initialized with exactly (N + 1) div 2 element. Then repeatedly a new element i added and the extreme are removed. Eventually thi reduce the et to one element, i.e. the median. While the complexity of the OPE 2 ( N )( ) The complexity of OPEH i: 1 N + 1 N 1 algorithm i 2 N = 249 within the budget of 7777 Med3 call. 8, it work up to 2.11 Verification In total we have applied five method for verification of the grading of the ubmiion. The verification of the grading i baed on (not necearily automatic) re-grading of the ubmiion ourelve. The method peak about teting a ubmiion intead of verification of the grading of a ubmiion Method 0 Firt we made an inpection of the program. We filtered out any obviouly uele program. Thi i done by firt checking if a ubmiion contain an executable. Secondly program that did not behave properly were filtered out. Program that do not behave properly include program that e.g.: 65

66 do not acce the input device do not give an anwer take too many ytem reource (timeout, memory) produce error like diviion by zero write to dik take too many call to Med3 have a corrupted log file Then we have developed three automatic method to verify ubmiion. And another method to find counterexample for flawed olution Method 1 Firt we generate a tet cae. Thi tet cae hould not be too large (we ued N 11), becaue all N! permutation are verified. Then the ubmitted program i ued to olve the cae. The MEDIAN.LOG containing all Med3 call and the anwer then i ued to verify the ubmitted olution in the following verification proce. The verification proce determine all permutation of the tet cae that are conitent with the reult of the Med3 call logged in MEDIAN.LOG. All thee conitent permutation hould have the ame median label a the original tet cae. If thi median label differ from the median label in the original tet cae then the ubmitted program i flawed. A an example conider the following (incorrect) program: Anwer(Med3(1, 2, 3)) A tet cae with N = 5 i 1, 3, 5, 2, 4. The contetant only call Med3(1, 2, 3) and anwer 2. Thi i correct a label 2 ha trength 3. Then we ue the conitent permutated input 1, 2, 4, 3, 5. The contetant would have aked again Med3(1, 2, 3) and anwer again 2. Thi i incorrect a label 2 ha trength Method 2 Thi method i the ucceor of method 1 and ha been developed after method 1 wa ued. It i an improvement of method 1 and work for bigger N (we ued N 177). The decription of thi method require the notion of a dual et a follow. Definition Dual et Given a et S of label pair the dual et T i a et of label pair uch that: ( i, j : ( i, j) : ( i, j) S ( j, i) T ) 66

67 The decription of thi method require alo the notion of a conitent et. Definition Conitent et A conitent et of label pair i a et that doe not contain both ( i, j ) and (, ) Note: the interection of a conitent et with it dual et i empty For thi method we firt generate a tet cae and let the ubmitted olution olve it. Then uing the MEDIAN.LOG file we verify the ubmitted olution. The verification proce derive all poible label that might be the median given thi log file. A correct olution would only have one poible label a median left. Deriving all poible label that might be the median i decribed next. We maintain a partition of the et of all label pair into conitent ubet. The partition i cloed under taking the dual, i.e. the dual of every et in the partition i alo in the partition. We tart with a the et of all ingleton. Every ingleton i unique and contain 2 i, j. There are initially exactly i, j then a pair ( ) j i. N ingleton (pair). If a et contain ( ) for thi et i < j hold. There i a et for which i < i hold but thi i not important right now. Every Med3 call might be written a: Med3(a, b, c) = b thi mean that either a < b b < c or c < b b < a hold. Every time a Med3 call with Med3(a, b, c) = b i, b, c. We alo made we merge the et that contain ( a b ) with the et that contain ( ) merge the et that contain ( b, a ) with the et that contain (, ) c b which i the dual et. If for any a, b and c we know that ( a, b ) and ( b, c) are in the ame et then ( a, c ) ha to be in that ame et alo. So we have to merge the et that contain ( a, c ) with the et that contain ( a, b ) and ( b, c ). Thi i called taking the tranitive cloure. Now we dicard all ingleton et. We end up with x tranitive cloed et of label pair. Thee x et include the dual et (o x i an even number). If we take either a et or the / 2 dual et then there are 2 x / 2 1 combination poible. We generate all 2 x combination / 2 1 (and forget about all 2 x dual combination) and for every conitent combination (ee thi combination a one big et) the label that are poibly the median are aggregated. A label i poibly the median if it i not for ure not the median. And it i for ure not the median if it ha more than N div 2 object that are tronger or weaker. Thi i countable becaue we know exactly which label are tronger and weaker in the conitent combination. At the end if we aggregated more than one label the program i flawed. Method 2 i a generalization of method 1. Although we do not give a proof, method 2 detect all flawed olution detected with method 1. 67

68 Method 3 Claification baed on the ource code of the ubmitted olution take a lot of time and i not alway eay. Method 3 i a tool that help u to claify the ubmitted olution. The tool analye the log file to generate three different picture. To claify the olution we compare the picture with olution that are known to be correct. In each picture, every horizontal line repreent a call to Med3(a, b, c) with reult d. The firt call to Med3 i drawn on the topmot line and every following call on the next line down. In the left-hand ide picture, the column of a pixel correpond with the trength of the label a, b and c in the Med3 call. In the middle picture, the poition correpond with the label a, b and c of the Med3 call. The right-hand ide picture diplay the difference in the trength of the label a, b, and c with the trength of the reult d of the Med3 call (the centre i d, zero difference). Summarized, the picture diplay: Strength(a), Strength(b), Strength(c) a, b, c Strength(a) Strength(d), Strength(b) Strength(d), Strength(c) Strength(d) We hall give a few example and explain the picture. If the middle creen look crambled thi i becaue the ubmitted olution firt randomize the input to enure an average cae performance. Thi can be decrambled uing the fact that a eriou olution uually take one label at a time. So if we take the label in the order of appearance in the MEDIAN.LOG file the crambled picture can be retored. For example the input i 1, 2, 3, 4, 5 and crambled thi i 3, 4, 1, 2, 5. The program call Med3(3, 4, 1), Med3(3, 1, 2) and Med3(4, 2, 5) then we know the crambled verion wa 3, 4, 1, 2, 5 o we take the invere to decramble. See for example RUS-03 tet cae 5 the crambled and decrambled verion a diplayed below. Figure 1 Scrambled and decrambled (RUS-03) 68

69 The OPE algorithm generate the following creen. The left-hand ide picture how elimination of extreme, the middle picture how the weeping over the element in earch for the extreme. Figure 2 OPE The OPEH algorithm generate the following creen. The left-hand ide picture how elimination of extreme, the middle picture how the weeping over the element in earch for the extreme. Figure 3 OPEH The LISF algorithm generate the following creen. The left-hand ide picture how the linear earch for the inertion poition, the middle picture how taking a new element. 69

70 The parabolic hape how that it take more Med3 call for every new element to be inerted. Figure 4 LISF The BISH algorithm generate the following creen. The left-hand ide picture how the binary earch for the inertion poition in a half lit, the middle picture how taking a new element. Figure 5 BISH 70

71 The TISZ algorithm generate the following creen. The left-hand ide picture how the ternary earch for the inertion poition in a zoom lit, the middle picture how taking a new element. Figure 6 TISZ The PE - ternary inertion ort algorithm that look almot the ame but ue the optimized pivot election a decribed in ection i diplayed below. Figure 7 PE uing advanced pivot 71

72 The TPFP algorithm generate the following creen. The left-hand ide picture how partitioning of the trength, the middle picture how weeping over the element partitioning the object. Figure 8 TPFP The Bubble earch algorithm generate the following creen. Figure 9 Bubble Search There are many picture. We have a picture for every log file (i.e. every tet cae). 72

73 Method 4 If a program i flawed we would like to have a counterexample. Method 4 provide a tool that earche for uch an input. It generate a number of random input data. A ubmitted olution then i ued to olve the generated data. If the ubmitted olution give a wrong anwer the counterexample i diplayed Grading before our verification All the ubmitted olution have been evaluated againt 10 tet cae by the IOI Hot Scientific Committee. For every correct anwer within the contraint a contetant earn 10 point. In total there are 274 contetant, of which only 226 made an attempt to olve the problem. There are 17 contetant that did not ubmit an executable leaving u with 209 ource ubmiion. We hall ue 209 a the total number of ubmiion. The frequency ditribution of the core baed on the IOI tet cae i: Score #Contetant Table 2-4 Frequency ditribution baed on IOI tet cae (before verification) Grading after our verification We firt filtered out 34 contetant that had bad ubmiion a decribed by method 0. We then generated a tet cae and ued method 1 to filter out 64 flawed ubmiion. Then again we generated a econd tet cae and filtered out 6 more flawed ubmiion leaving u with 105 ubmiion. The firt tet cae we ued i: 2, 8, 3, 5, 10, 11, 6, 9, 1, 4, 7 The econd tet cae we ued i: 5, 6, 9, 10, 11, 8, 3, 2, 4, 1, 7 Then we did a thorough verification. We applied method 2 with cae 2 to every ubmiion. Inpected upiciou code manually and ometime ued method 2 with another auxiliary tet cae. For the manual inpection we ued method 3 and method 4. Uing thi we found the 17 more flawed ubmiion and we are left with 88 (uppoedly) correct ubmiion. We aign to all flawed ubmiion a zero core. The uppoedly correct ubmiion get the core that they got from the IOI grading proce. Thi lead to the following core ditribution: Score #Contetant Table 2-5 Frequency ditribution after verficition. 73

74 Then we ued method 3 and a manual inpection to find out exactly what the uppoedly correct olution did and claified the 88 ubmiion a given below. There remain however one cla label TISX that doe not olve the problem correctly and even core 100 point. Thi will be addreed later. Algorithm cla Number of olution that urvived all filter. 2LHH 2 BISF 17 BISZ 3 BPFP 2 BPFR 3 BUBBLE 2 BUBBLER 1 LISF 1 OPE 4 QSORT 3 TISF 14 TISX (i a flawed olution) 7 TISZ 3 TPFF 2 TPFR 13 TRIPLES 11 Total 88 Table 2-6 Median tak ubmion algorithm ditribution. Note: 1 of the 2LHH ubmiion i not from a contetant and i tored omehow in the data from contetant TKM-01 and might be dicarded. Our tatitic did not deal with thi contamination. The total core of TKM-01 i only 280. The TISX cla i a ternary inertion ort cla that trie to improve election of pivot a decribed in paragraph Of coure we cannot be ure whether or not the contetant knew about thi optimization. They probably did not and implemented the TISZ algorithm wrong. Thi wa dicovered uing method 3 a the left-hand ide graphic looked trange a diplayed below. We invetigated thi and found that thi olution i flawed. There are 7 ubmiion in thi cla of which 6 core 100 point and 1 core 70 point. 74

75 Figure 10 A flawed olution coring 100 point (CHN2-04) Now the final core ditribution i: Score #Contetant Table 2-7 Frequency ditribution baed after (final) verification The total core from the IOI 2000 committee i The total core from u i Thi i 32% lower. The average core drop from 31 to 21. To give a more qualitative judgment about the change in the grading we will ue the number of inverion. Firt the definition of inverion i given below. Definition Inverion Given a permutation p the number of inverion i (# i, j : i > j : p. i < p. j) If we rank the 209 contetant baed only on the median core and count the number of inverion between the IOI median core and our median core then there are 4471 inverion. Thi i 21% a there are maximum ( ) / 2 = inverion. If we replace the IOI median core with our median core and count the number of inverion in the ranking of the total core the ranking of the 274 contetant contain 9825 inverion. Thi i 26% a there are maximum ( ) / 2 = inverion poible. We alo have ome change in the medal lit: 3 gold medal winner would get a ilver medal 3 ilver medal winner would get a gold medal 75

Problem Set 8 Solutions

Problem Set 8 Solutions Deign and Analyi of Algorithm April 29, 2015 Maachuett Intitute of Technology 6.046J/18.410J Prof. Erik Demaine, Srini Devada, and Nancy Lynch Problem Set 8 Solution Problem Set 8 Solution Thi problem

More information

Social Studies 201 Notes for November 14, 2003

Social Studies 201 Notes for November 14, 2003 1 Social Studie 201 Note for November 14, 2003 Etimation of a mean, mall ample ize Section 8.4, p. 501. When a reearcher ha only a mall ample ize available, the central limit theorem doe not apply to the

More information

Preemptive scheduling on a small number of hierarchical machines

Preemptive scheduling on a small number of hierarchical machines Available online at www.ciencedirect.com Information and Computation 06 (008) 60 619 www.elevier.com/locate/ic Preemptive cheduling on a mall number of hierarchical machine György Dóa a, Leah Eptein b,

More information

Social Studies 201 Notes for March 18, 2005

Social Studies 201 Notes for March 18, 2005 1 Social Studie 201 Note for March 18, 2005 Etimation of a mean, mall ample ize Section 8.4, p. 501. When a reearcher ha only a mall ample ize available, the central limit theorem doe not apply to the

More information

Dimensional Analysis A Tool for Guiding Mathematical Calculations

Dimensional Analysis A Tool for Guiding Mathematical Calculations Dimenional Analyi A Tool for Guiding Mathematical Calculation Dougla A. Kerr Iue 1 February 6, 2010 ABSTRACT AND INTRODUCTION In converting quantitie from one unit to another, we may know the applicable

More information

7.2 INVERSE TRANSFORMS AND TRANSFORMS OF DERIVATIVES 281

7.2 INVERSE TRANSFORMS AND TRANSFORMS OF DERIVATIVES 281 72 INVERSE TRANSFORMS AND TRANSFORMS OF DERIVATIVES 28 and i 2 Show how Euler formula (page 33) can then be ued to deduce the reult a ( a) 2 b 2 {e at co bt} {e at in bt} b ( a) 2 b 2 5 Under what condition

More information

Clustering Methods without Given Number of Clusters

Clustering Methods without Given Number of Clusters Clutering Method without Given Number of Cluter Peng Xu, Fei Liu Introduction A we now, mean method i a very effective algorithm of clutering. It mot powerful feature i the calability and implicity. However,

More information

Lecture 8: Period Finding: Simon s Problem over Z N

Lecture 8: Period Finding: Simon s Problem over Z N Quantum Computation (CMU 8-859BB, Fall 205) Lecture 8: Period Finding: Simon Problem over Z October 5, 205 Lecturer: John Wright Scribe: icola Rech Problem A mentioned previouly, period finding i a rephraing

More information

μ + = σ = D 4 σ = D 3 σ = σ = All units in parts (a) and (b) are in V. (1) x chart: Center = μ = 0.75 UCL =

μ + = σ = D 4 σ = D 3 σ = σ = All units in parts (a) and (b) are in V. (1) x chart: Center = μ = 0.75 UCL = Our online Tutor are available 4*7 to provide Help with Proce control ytem Homework/Aignment or a long term Graduate/Undergraduate Proce control ytem Project. Our Tutor being experienced and proficient

More information

arxiv: v1 [math.mg] 25 Aug 2011

arxiv: v1 [math.mg] 25 Aug 2011 ABSORBING ANGLES, STEINER MINIMAL TREES, AND ANTIPODALITY HORST MARTINI, KONRAD J. SWANEPOEL, AND P. OLOFF DE WET arxiv:08.5046v [math.mg] 25 Aug 20 Abtract. We give a new proof that a tar {op i : i =,...,

More information

Bayesian Learning, Randomness and Logic. Marc Snir

Bayesian Learning, Randomness and Logic. Marc Snir Bayeian Learning, Randomne and Logic Marc Snir Background! 25 year old work, far from my current reearch! why preent now?! Becaue it wa done when I wa Eli tudent! Becaue it i about the foundation of epitemology!

More information

Lecture 21. The Lovasz splitting-off lemma Topics in Combinatorial Optimization April 29th, 2004

Lecture 21. The Lovasz splitting-off lemma Topics in Combinatorial Optimization April 29th, 2004 18.997 Topic in Combinatorial Optimization April 29th, 2004 Lecture 21 Lecturer: Michel X. Goeman Scribe: Mohammad Mahdian 1 The Lovaz plitting-off lemma Lovaz plitting-off lemma tate the following. Theorem

More information

Alternate Dispersion Measures in Replicated Factorial Experiments

Alternate Dispersion Measures in Replicated Factorial Experiments Alternate Diperion Meaure in Replicated Factorial Experiment Neal A. Mackertich The Raytheon Company, Sudbury MA 02421 Jame C. Benneyan Northeatern Univerity, Boton MA 02115 Peter D. Krau The Raytheon

More information

Lecture 9: Shor s Algorithm

Lecture 9: Shor s Algorithm Quantum Computation (CMU 8-859BB, Fall 05) Lecture 9: Shor Algorithm October 7, 05 Lecturer: Ryan O Donnell Scribe: Sidhanth Mohanty Overview Let u recall the period finding problem that wa et up a a function

More information

Optimization model in Input output analysis and computable general. equilibrium by using multiple criteria non-linear programming.

Optimization model in Input output analysis and computable general. equilibrium by using multiple criteria non-linear programming. Optimization model in Input output analyi and computable general equilibrium by uing multiple criteria non-linear programming Jing He * Intitute of ytem cience, cademy of Mathematic and ytem cience Chinee

More information

Control Systems Analysis and Design by the Root-Locus Method

Control Systems Analysis and Design by the Root-Locus Method 6 Control Sytem Analyi and Deign by the Root-Locu Method 6 1 INTRODUCTION The baic characteritic of the tranient repone of a cloed-loop ytem i cloely related to the location of the cloed-loop pole. If

More information

Suggestions - Problem Set (a) Show the discriminant condition (1) takes the form. ln ln, # # R R

Suggestions - Problem Set (a) Show the discriminant condition (1) takes the form. ln ln, # # R R Suggetion - Problem Set 3 4.2 (a) Show the dicriminant condition (1) take the form x D Ð.. Ñ. D.. D. ln ln, a deired. We then replace the quantitie. 3ß D3 by their etimate to get the proper form for thi

More information

arxiv: v2 [math.nt] 30 Apr 2015

arxiv: v2 [math.nt] 30 Apr 2015 A THEOREM FOR DISTINCT ZEROS OF L-FUNCTIONS École Normale Supérieure arxiv:54.6556v [math.nt] 3 Apr 5 943 Cachan November 9, 7 Abtract In thi paper, we etablih a imple criterion for two L-function L and

More information

Bogoliubov Transformation in Classical Mechanics

Bogoliubov Transformation in Classical Mechanics Bogoliubov Tranformation in Claical Mechanic Canonical Tranformation Suppoe we have a et of complex canonical variable, {a j }, and would like to conider another et of variable, {b }, b b ({a j }). How

More information

Pythagorean Triple Updated 08--5 Drlnoordzij@leennoordzijnl wwwleennoordzijme Content A Roadmap for generating Pythagorean Triple Pythagorean Triple 3 Dicuion Concluion 5 A Roadmap for generating Pythagorean

More information

Theoretical Computer Science. Optimal algorithms for online scheduling with bounded rearrangement at the end

Theoretical Computer Science. Optimal algorithms for online scheduling with bounded rearrangement at the end Theoretical Computer Science 4 (0) 669 678 Content lit available at SciVere ScienceDirect Theoretical Computer Science journal homepage: www.elevier.com/locate/tc Optimal algorithm for online cheduling

More information

List coloring hypergraphs

List coloring hypergraphs Lit coloring hypergraph Penny Haxell Jacque Vertraete Department of Combinatoric and Optimization Univerity of Waterloo Waterloo, Ontario, Canada pehaxell@uwaterloo.ca Department of Mathematic Univerity

More information

Suggested Answers To Exercises. estimates variability in a sampling distribution of random means. About 68% of means fall

Suggested Answers To Exercises. estimates variability in a sampling distribution of random means. About 68% of means fall Beyond Significance Teting ( nd Edition), Rex B. Kline Suggeted Anwer To Exercie Chapter. The tatitic meaure variability among core at the cae level. In a normal ditribution, about 68% of the core fall

More information

Unavoidable Cycles in Polynomial-Based Time-Invariant LDPC Convolutional Codes

Unavoidable Cycles in Polynomial-Based Time-Invariant LDPC Convolutional Codes European Wirele, April 7-9,, Vienna, Autria ISBN 978--87-4-9 VE VERLAG GMBH Unavoidable Cycle in Polynomial-Baed Time-Invariant LPC Convolutional Code Hua Zhou and Norbert Goertz Intitute of Telecommunication

More information

THE SPLITTING SUBSPACE CONJECTURE

THE SPLITTING SUBSPACE CONJECTURE THE SPLITTING SUBSPAE ONJETURE ERI HEN AND DENNIS TSENG Abtract We anwer a uetion by Niederreiter concerning the enumeration of a cla of ubpace of finite dimenional vector pace over finite field by proving

More information

66 Lecture 3 Random Search Tree i unique. Lemma 3. Let X and Y be totally ordered et, and let be a function aigning a ditinct riority in Y to each ele

66 Lecture 3 Random Search Tree i unique. Lemma 3. Let X and Y be totally ordered et, and let be a function aigning a ditinct riority in Y to each ele Lecture 3 Random Search Tree In thi lecture we will decribe a very imle robabilitic data tructure that allow inert, delete, and memberhi tet (among other oeration) in exected logarithmic time. Thee reult

More information

Chapter 4. The Laplace Transform Method

Chapter 4. The Laplace Transform Method Chapter 4. The Laplace Tranform Method The Laplace Tranform i a tranformation, meaning that it change a function into a new function. Actually, it i a linear tranformation, becaue it convert a linear combination

More information

Optimal Coordination of Samples in Business Surveys

Optimal Coordination of Samples in Business Surveys Paper preented at the ICES-III, June 8-, 007, Montreal, Quebec, Canada Optimal Coordination of Sample in Buine Survey enka Mach, Ioana Şchiopu-Kratina, Philip T Rei, Jean-Marc Fillion Statitic Canada New

More information

STOCHASTIC GENERALIZED TRANSPORTATION PROBLEM WITH DISCRETE DISTRIBUTION OF DEMAND

STOCHASTIC GENERALIZED TRANSPORTATION PROBLEM WITH DISCRETE DISTRIBUTION OF DEMAND OPERATIONS RESEARCH AND DECISIONS No. 4 203 DOI: 0.5277/ord30402 Marcin ANHOLCER STOCHASTIC GENERALIZED TRANSPORTATION PROBLEM WITH DISCRETE DISTRIBUTION OF DEMAND The generalized tranportation problem

More information

UNIT 15 RELIABILITY EVALUATION OF k-out-of-n AND STANDBY SYSTEMS

UNIT 15 RELIABILITY EVALUATION OF k-out-of-n AND STANDBY SYSTEMS UNIT 1 RELIABILITY EVALUATION OF k-out-of-n AND STANDBY SYSTEMS Structure 1.1 Introduction Objective 1.2 Redundancy 1.3 Reliability of k-out-of-n Sytem 1.4 Reliability of Standby Sytem 1. Summary 1.6 Solution/Anwer

More information

Nonlinear Single-Particle Dynamics in High Energy Accelerators

Nonlinear Single-Particle Dynamics in High Energy Accelerators Nonlinear Single-Particle Dynamic in High Energy Accelerator Part 6: Canonical Perturbation Theory Nonlinear Single-Particle Dynamic in High Energy Accelerator Thi coure conit of eight lecture: 1. Introduction

More information

into a discrete time function. Recall that the table of Laplace/z-transforms is constructed by (i) selecting to get

into a discrete time function. Recall that the table of Laplace/z-transforms is constructed by (i) selecting to get Lecture 25 Introduction to Some Matlab c2d Code in Relation to Sampled Sytem here are many way to convert a continuou time function, { h( t) ; t [0, )} into a dicrete time function { h ( k) ; k {0,,, }}

More information

PhysicsAndMathsTutor.com

PhysicsAndMathsTutor.com 1. A teacher wihe to tet whether playing background muic enable tudent to complete a tak more quickly. The ame tak wa completed by 15 tudent, divided at random into two group. The firt group had background

More information

Evolutionary Algorithms Based Fixed Order Robust Controller Design and Robustness Performance Analysis

Evolutionary Algorithms Based Fixed Order Robust Controller Design and Robustness Performance Analysis Proceeding of 01 4th International Conference on Machine Learning and Computing IPCSIT vol. 5 (01) (01) IACSIT Pre, Singapore Evolutionary Algorithm Baed Fixed Order Robut Controller Deign and Robutne

More information

ON THE APPROXIMATION ERROR IN HIGH DIMENSIONAL MODEL REPRESENTATION. Xiaoqun Wang

ON THE APPROXIMATION ERROR IN HIGH DIMENSIONAL MODEL REPRESENTATION. Xiaoqun Wang Proceeding of the 2008 Winter Simulation Conference S. J. Maon, R. R. Hill, L. Mönch, O. Roe, T. Jefferon, J. W. Fowler ed. ON THE APPROXIMATION ERROR IN HIGH DIMENSIONAL MODEL REPRESENTATION Xiaoqun Wang

More information

ME2142/ME2142E Feedback Control Systems

ME2142/ME2142E Feedback Control Systems Root Locu Analyi Root Locu Analyi Conider the cloed-loop ytem R + E - G C B H The tranient repone, and tability, of the cloed-loop ytem i determined by the value of the root of the characteritic equation

More information

New bounds for Morse clusters

New bounds for Morse clusters New bound for More cluter Tamá Vinkó Advanced Concept Team, European Space Agency, ESTEC Keplerlaan 1, 2201 AZ Noordwijk, The Netherland Tama.Vinko@ea.int and Arnold Neumaier Fakultät für Mathematik, Univerität

More information

Lecture 4 Topic 3: General linear models (GLMs), the fundamentals of the analysis of variance (ANOVA), and completely randomized designs (CRDs)

Lecture 4 Topic 3: General linear models (GLMs), the fundamentals of the analysis of variance (ANOVA), and completely randomized designs (CRDs) Lecture 4 Topic 3: General linear model (GLM), the fundamental of the analyi of variance (ANOVA), and completely randomized deign (CRD) The general linear model One population: An obervation i explained

More information

APPLICATION OF THE SINGLE IMPACT MICROINDENTATION FOR NON- DESTRUCTIVE TESTING OF THE FRACTURE TOUGHNESS OF NONMETALLIC AND POLYMERIC MATERIALS

APPLICATION OF THE SINGLE IMPACT MICROINDENTATION FOR NON- DESTRUCTIVE TESTING OF THE FRACTURE TOUGHNESS OF NONMETALLIC AND POLYMERIC MATERIALS APPLICATION OF THE SINGLE IMPACT MICROINDENTATION FOR NON- DESTRUCTIVE TESTING OF THE FRACTURE TOUGHNESS OF NONMETALLIC AND POLYMERIC MATERIALS REN A. P. INSTITUTE OF APPLIED PHYSICS OF THE NATIONAL ACADEMY

More information

COHOMOLOGY AS A LOCAL-TO-GLOBAL BRIDGE

COHOMOLOGY AS A LOCAL-TO-GLOBAL BRIDGE COHOMOLOGY AS A LOCAL-TO-GLOBAL BRIDGE LIVIU I. NICOLAESCU ABSTRACT. I dicu low dimenional incarnation of cohomology and illutrate how baic cohomological principle lead to a proof of Sperner lemma. CONTENTS.

More information

IEOR 3106: Fall 2013, Professor Whitt Topics for Discussion: Tuesday, November 19 Alternating Renewal Processes and The Renewal Equation

IEOR 3106: Fall 2013, Professor Whitt Topics for Discussion: Tuesday, November 19 Alternating Renewal Processes and The Renewal Equation IEOR 316: Fall 213, Profeor Whitt Topic for Dicuion: Tueday, November 19 Alternating Renewal Procee and The Renewal Equation 1 Alternating Renewal Procee An alternating renewal proce alternate between

More information

Electronic Theses and Dissertations

Electronic Theses and Dissertations Eat Tenneee State Univerity Digital Common @ Eat Tenneee State Univerity Electronic Thee and Diertation Student Work 5-208 Vector Partition Jennifer French Eat Tenneee State Univerity Follow thi and additional

More information

Convex Hulls of Curves Sam Burton

Convex Hulls of Curves Sam Burton Convex Hull of Curve Sam Burton 1 Introduction Thi paper will primarily be concerned with determining the face of convex hull of curve of the form C = {(t, t a, t b ) t [ 1, 1]}, a < b N in R 3. We hall

More information

A BATCH-ARRIVAL QUEUE WITH MULTIPLE SERVERS AND FUZZY PARAMETERS: PARAMETRIC PROGRAMMING APPROACH

A BATCH-ARRIVAL QUEUE WITH MULTIPLE SERVERS AND FUZZY PARAMETERS: PARAMETRIC PROGRAMMING APPROACH Mathematical and Computational Application Vol. 11 No. pp. 181-191 006. Aociation for Scientific Reearch A BATCH-ARRIVA QEE WITH MTIPE SERVERS AND FZZY PARAMETERS: PARAMETRIC PROGRAMMING APPROACH Jau-Chuan

More information

Aggregating value ranges: preference elicitation and truthfulness

Aggregating value ranges: preference elicitation and truthfulness DOI 10.1007/10458-009-9118-5 Aggregating value range: preference elicitation and truthfulne Joeph Farfel Vincent Conitzer The Author() 009 Abtract We tudy the cae where agent have preference over range

More information

Chapter Landscape of an Optimization Problem. Local Search. Coping With NP-Hardness. Gradient Descent: Vertex Cover

Chapter Landscape of an Optimization Problem. Local Search. Coping With NP-Hardness. Gradient Descent: Vertex Cover Coping With NP-Hardne Chapter 12 Local Search Q Suppoe I need to olve an NP-hard problem What hould I do? A Theory ay you're unlikely to find poly-time algorithm Mut acrifice one of three deired feature

More information

NCAAPMT Calculus Challenge Challenge #3 Due: October 26, 2011

NCAAPMT Calculus Challenge Challenge #3 Due: October 26, 2011 NCAAPMT Calculu Challenge 011 01 Challenge #3 Due: October 6, 011 A Model of Traffic Flow Everyone ha at ome time been on a multi-lane highway and encountered road contruction that required the traffic

More information

S_LOOP: SINGLE-LOOP FEEDBACK CONTROL SYSTEM ANALYSIS

S_LOOP: SINGLE-LOOP FEEDBACK CONTROL SYSTEM ANALYSIS S_LOOP: SINGLE-LOOP FEEDBACK CONTROL SYSTEM ANALYSIS by Michelle Gretzinger, Daniel Zyngier and Thoma Marlin INTRODUCTION One of the challenge to the engineer learning proce control i relating theoretical

More information

MATEMATIK Datum: Tid: eftermiddag. A.Heintz Telefonvakt: Anders Martinsson Tel.:

MATEMATIK Datum: Tid: eftermiddag. A.Heintz Telefonvakt: Anders Martinsson Tel.: MATEMATIK Datum: 20-08-25 Tid: eftermiddag GU, Chalmer Hjälpmedel: inga A.Heintz Telefonvakt: Ander Martinon Tel.: 073-07926. Löningar till tenta i ODE och matematik modellering, MMG5, MVE6. Define what

More information

On the Isomorphism of Fractional Factorial Designs 1

On the Isomorphism of Fractional Factorial Designs 1 journal of complexity 17, 8697 (2001) doi:10.1006jcom.2000.0569, available online at http:www.idealibrary.com on On the Iomorphim of Fractional Factorial Deign 1 Chang-Xing Ma Department of Statitic, Nankai

More information

Codes Correcting Two Deletions

Codes Correcting Two Deletions 1 Code Correcting Two Deletion Ryan Gabry and Frederic Sala Spawar Sytem Center Univerity of California, Lo Angele ryan.gabry@navy.mil fredala@ucla.edu Abtract In thi work, we invetigate the problem of

More information

Optimizing Cost-sensitive Trust-negotiation Protocols

Optimizing Cost-sensitive Trust-negotiation Protocols Optimizing Cot-enitive Trut-negotiation Protocol Weifeng Chen, Lori Clarke, Jim Kuroe, Don Towley Department of Computer Science Univerity of Maachuett, Amhert {chenwf, clarke, kuroe, towley}@c.uma.edu

More information

LINEAR ALGEBRA METHOD IN COMBINATORICS. Theorem 1.1 (Oddtown theorem). In a town of n citizens, no more than n clubs can be formed under the rules

LINEAR ALGEBRA METHOD IN COMBINATORICS. Theorem 1.1 (Oddtown theorem). In a town of n citizens, no more than n clubs can be formed under the rules LINEAR ALGEBRA METHOD IN COMBINATORICS 1 Warming-up example Theorem 11 (Oddtown theorem) In a town of n citizen, no more tha club can be formed under the rule each club have an odd number of member each

More information

Automatic Control Systems. Part III: Root Locus Technique

Automatic Control Systems. Part III: Root Locus Technique www.pdhcenter.com PDH Coure E40 www.pdhonline.org Automatic Control Sytem Part III: Root Locu Technique By Shih-Min Hu, Ph.D., P.E. Page of 30 www.pdhcenter.com PDH Coure E40 www.pdhonline.org VI. Root

More information

March 18, 2014 Academic Year 2013/14

March 18, 2014 Academic Year 2013/14 POLITONG - SHANGHAI BASIC AUTOMATIC CONTROL Exam grade March 8, 4 Academic Year 3/4 NAME (Pinyin/Italian)... STUDENT ID Ue only thee page (including the back) for anwer. Do not ue additional heet. Ue of

More information

Physics 741 Graduate Quantum Mechanics 1 Solutions to Final Exam, Fall 2014

Physics 741 Graduate Quantum Mechanics 1 Solutions to Final Exam, Fall 2014 Phyic 7 Graduate Quantum Mechanic Solution to inal Eam all 0 Each quetion i worth 5 point with point for each part marked eparately Some poibly ueful formula appear at the end of the tet In four dimenion

More information

Source slideplayer.com/fundamentals of Analytical Chemistry, F.J. Holler, S.R.Crouch. Chapter 6: Random Errors in Chemical Analysis

Source slideplayer.com/fundamentals of Analytical Chemistry, F.J. Holler, S.R.Crouch. Chapter 6: Random Errors in Chemical Analysis Source lideplayer.com/fundamental of Analytical Chemitry, F.J. Holler, S.R.Crouch Chapter 6: Random Error in Chemical Analyi Random error are preent in every meaurement no matter how careful the experimenter.

More information

Lecture 15 - Current. A Puzzle... Advanced Section: Image Charge for Spheres. Image Charge for a Grounded Spherical Shell

Lecture 15 - Current. A Puzzle... Advanced Section: Image Charge for Spheres. Image Charge for a Grounded Spherical Shell Lecture 15 - Current Puzzle... Suppoe an infinite grounded conducting plane lie at z = 0. charge q i located at a height h above the conducting plane. Show in three different way that the potential below

More information

Comparing Means: t-tests for Two Independent Samples

Comparing Means: t-tests for Two Independent Samples Comparing ean: t-tet for Two Independent Sample Independent-eaure Deign t-tet for Two Independent Sample Allow reearcher to evaluate the mean difference between two population uing data from two eparate

More information

One Class of Splitting Iterative Schemes

One Class of Splitting Iterative Schemes One Cla of Splitting Iterative Scheme v Ciegi and V. Pakalnytė Vilniu Gedimina Technical Univerity Saulėtekio al. 11, 2054, Vilniu, Lithuania rc@fm.vtu.lt Abtract. Thi paper deal with the tability analyi

More information

CHAPTER 8 OBSERVER BASED REDUCED ORDER CONTROLLER DESIGN FOR LARGE SCALE LINEAR DISCRETE-TIME CONTROL SYSTEMS

CHAPTER 8 OBSERVER BASED REDUCED ORDER CONTROLLER DESIGN FOR LARGE SCALE LINEAR DISCRETE-TIME CONTROL SYSTEMS CHAPTER 8 OBSERVER BASED REDUCED ORDER CONTROLLER DESIGN FOR LARGE SCALE LINEAR DISCRETE-TIME CONTROL SYSTEMS 8.1 INTRODUCTION 8.2 REDUCED ORDER MODEL DESIGN FOR LINEAR DISCRETE-TIME CONTROL SYSTEMS 8.3

More information

SOME RESULTS ON INFINITE POWER TOWERS

SOME RESULTS ON INFINITE POWER TOWERS NNTDM 16 2010) 3, 18-24 SOME RESULTS ON INFINITE POWER TOWERS Mladen Vailev - Miana 5, V. Hugo Str., Sofia 1124, Bulgaria E-mail:miana@abv.bg Abtract To my friend Kratyu Gumnerov In the paper the infinite

More information

CS 170: Midterm Exam II University of California at Berkeley Department of Electrical Engineering and Computer Sciences Computer Science Division

CS 170: Midterm Exam II University of California at Berkeley Department of Electrical Engineering and Computer Sciences Computer Science Division 1 1 April 000 Demmel / Shewchuk CS 170: Midterm Exam II Univerity of California at Berkeley Department of Electrical Engineering and Computer Science Computer Science Diviion hi i a cloed book, cloed calculator,

More information

Avoiding Forbidden Submatrices by Row Deletions

Avoiding Forbidden Submatrices by Row Deletions Avoiding Forbidden Submatrice by Row Deletion Sebatian Wernicke, Jochen Alber, Jen Gramm, Jiong Guo, and Rolf Niedermeier Wilhelm-Schickard-Intitut für Informatik, niverität Tübingen, Sand 13, D-72076

More information

The machines in the exercise work as follows:

The machines in the exercise work as follows: Tik-79.148 Spring 2001 Introduction to Theoretical Computer Science Tutorial 9 Solution to Demontration Exercie 4. Contructing a complex Turing machine can be very laboriou. With the help of machine chema

More information

CHAPTER 6. Estimation

CHAPTER 6. Estimation CHAPTER 6 Etimation Definition. Statitical inference i the procedure by which we reach a concluion about a population on the bai of information contained in a ample drawn from that population. Definition.

More information

5. Fuzzy Optimization

5. Fuzzy Optimization 5. Fuzzy Optimization 1. Fuzzine: An Introduction 135 1.1. Fuzzy Memberhip Function 135 1.2. Memberhip Function Operation 136 2. Optimization in Fuzzy Environment 136 3. Fuzzy Set for Water Allocation

More information

Gain and Phase Margins Based Delay Dependent Stability Analysis of Two- Area LFC System with Communication Delays

Gain and Phase Margins Based Delay Dependent Stability Analysis of Two- Area LFC System with Communication Delays Gain and Phae Margin Baed Delay Dependent Stability Analyi of Two- Area LFC Sytem with Communication Delay Şahin Sönmez and Saffet Ayaun Department of Electrical Engineering, Niğde Ömer Halidemir Univerity,

More information

SIMPLE LINEAR REGRESSION

SIMPLE LINEAR REGRESSION SIMPLE LINEAR REGRESSION In linear regreion, we conider the frequency ditribution of one variable (Y) at each of everal level of a econd variable (). Y i known a the dependent variable. The variable for

More information

Multicolor Sunflowers

Multicolor Sunflowers Multicolor Sunflower Dhruv Mubayi Lujia Wang October 19, 2017 Abtract A unflower i a collection of ditinct et uch that the interection of any two of them i the ame a the common interection C of all of

More information

Vector-Space Methods and Kirchhoff Graphs for Reaction Networks

Vector-Space Methods and Kirchhoff Graphs for Reaction Networks Vector-Space Method and Kirchhoff Graph for Reaction Network Joeph D. Fehribach Fuel Cell Center WPI Mathematical Science and Chemical Engineering 00 Intitute Rd. Worceter, MA 0609-2247 Thi article preent

More information

Predicting the Performance of Teams of Bounded Rational Decision-makers Using a Markov Chain Model

Predicting the Performance of Teams of Bounded Rational Decision-makers Using a Markov Chain Model The InTITuTe for ytem reearch Ir TechnIcal report 2013-14 Predicting the Performance of Team of Bounded Rational Deciion-maer Uing a Marov Chain Model Jeffrey Herrmann Ir develop, applie and teache advanced

More information

Moment of Inertia of an Equilateral Triangle with Pivot at one Vertex

Moment of Inertia of an Equilateral Triangle with Pivot at one Vertex oment of nertia of an Equilateral Triangle with Pivot at one Vertex There are two wa (at leat) to derive the expreion f an equilateral triangle that i rotated about one vertex, and ll how ou both here.

More information

Overflow from last lecture: Ewald construction and Brillouin zones Structure factor

Overflow from last lecture: Ewald construction and Brillouin zones Structure factor Lecture 5: Overflow from lat lecture: Ewald contruction and Brillouin zone Structure factor Review Conider direct lattice defined by vector R = u 1 a 1 + u 2 a 2 + u 3 a 3 where u 1, u 2, u 3 are integer

More information

Unified Correlation between SPT-N and Shear Wave Velocity for all Soil Types

Unified Correlation between SPT-N and Shear Wave Velocity for all Soil Types 6 th International Conference on Earthquake Geotechnical Engineering 1-4 ovember 15 Chritchurch, ew Zealand Unified Correlation between SPT- and Shear Wave Velocity for all Soil Type C.-C. Tai 1 and T.

More information

TRANSITION PROBABILITY MATRIX OF BRIDGE MEMBERS DAMAGE RATING

TRANSITION PROBABILITY MATRIX OF BRIDGE MEMBERS DAMAGE RATING TRANSITION PROBABILITY MATRIX OF BRIDGE MEMBERS DAMAGE RATING Hirohi Sato and Ryoji Hagiwara 2 Abtract Bridge member damage characteritic were tudied uing the inpection record. Damage can be claified into

More information

MODELING OF A SYSTEM WITH HYBRID DYNAMICS

MODELING OF A SYSTEM WITH HYBRID DYNAMICS 4 Acta Electrotechnica et Informatica, Vol., No., 0, 4 9, DOI: 0.478/v098-0-000- MODELING OF A SYSTEM WITH HYBRID DYNAMICS Vratilav HLADKÝ, Ľuboš POPOVIČ, Ján SARNOVSKÝ Department of Cybernetic and Artificial

More information

(b) Is the game below solvable by iterated strict dominance? Does it have a unique Nash equilibrium?

(b) Is the game below solvable by iterated strict dominance? Does it have a unique Nash equilibrium? 14.1 Final Exam Anwer all quetion. You have 3 hour in which to complete the exam. 1. (60 Minute 40 Point) Anwer each of the following ubquetion briefly. Pleae how your calculation and provide rough explanation

More information

Standard Guide for Conducting Ruggedness Tests 1

Standard Guide for Conducting Ruggedness Tests 1 Deignation: E 69 89 (Reapproved 996) Standard Guide for Conducting Ruggedne Tet AMERICA SOCIETY FOR TESTIG AD MATERIALS 00 Barr Harbor Dr., Wet Conhohocken, PA 948 Reprinted from the Annual Book of ASTM

More information

1. The F-test for Equality of Two Variances

1. The F-test for Equality of Two Variances . The F-tet for Equality of Two Variance Previouly we've learned how to tet whether two population mean are equal, uing data from two independent ample. We can alo tet whether two population variance are

More information

Massachusetts Institute of Technology Dynamics and Control II

Massachusetts Institute of Technology Dynamics and Control II I E Maachuett Intitute of Technology Department of Mechanical Engineering 2.004 Dynamic and Control II Laboratory Seion 5: Elimination of Steady-State Error Uing Integral Control Action 1 Laboratory Objective:

More information

( ) ( Statistical Equivalence Testing

( ) ( Statistical Equivalence Testing ( Downloaded via 148.51.3.83 on November 1, 018 at 13:8: (UTC). See http://pub.ac.org/haringguideline for option on how to legitimately hare publihed article. 0 BEYOND Gielle B. Limentani Moira C. Ringo

More information

A Bluffer s Guide to... Sphericity

A Bluffer s Guide to... Sphericity A Bluffer Guide to Sphericity Andy Field Univerity of Suex The ue of repeated meaure, where the ame ubject are teted under a number of condition, ha numerou practical and tatitical benefit. For one thing

More information

Reliability Analysis of Embedded System with Different Modes of Failure Emphasizing Reboot Delay

Reliability Analysis of Embedded System with Different Modes of Failure Emphasizing Reboot Delay International Journal of Applied Science and Engineering 3., 4: 449-47 Reliability Analyi of Embedded Sytem with Different Mode of Failure Emphaizing Reboot Delay Deepak Kumar* and S. B. Singh Department

More information

Advanced D-Partitioning Analysis and its Comparison with the Kharitonov s Theorem Assessment

Advanced D-Partitioning Analysis and its Comparison with the Kharitonov s Theorem Assessment Journal of Multidiciplinary Engineering Science and Technology (JMEST) ISSN: 59- Vol. Iue, January - 5 Advanced D-Partitioning Analyi and it Comparion with the haritonov Theorem Aement amen M. Yanev Profeor,

More information

Math Skills. Scientific Notation. Uncertainty in Measurements. Appendix A5 SKILLS HANDBOOK

Math Skills. Scientific Notation. Uncertainty in Measurements. Appendix A5 SKILLS HANDBOOK ppendix 5 Scientific Notation It i difficult to work with very large or very mall number when they are written in common decimal notation. Uually it i poible to accommodate uch number by changing the SI

More information

Settling the Complexity of 2-Player Nash-Equilibrium

Settling the Complexity of 2-Player Nash-Equilibrium Electronic Colloquium on Computational Complexity, Report No. 140 (2005) Settling the Complexity of 2-Player Nah-Equilibrium Xi Chen Department of Computer Science Tinghua Univerity Beijing, P.R.China

More information

Online Appendix for Managerial Attention and Worker Performance by Marina Halac and Andrea Prat

Online Appendix for Managerial Attention and Worker Performance by Marina Halac and Andrea Prat Online Appendix for Managerial Attention and Worker Performance by Marina Halac and Andrea Prat Thi Online Appendix contain the proof of our reult for the undicounted limit dicued in Section 2 of the paper,

More information

Stochastic Perishable Inventory Control in a Service Facility System Maintaining Inventory for Service: Semi Markov Decision Problem

Stochastic Perishable Inventory Control in a Service Facility System Maintaining Inventory for Service: Semi Markov Decision Problem Stochatic Perihable Inventory Control in a Service Facility Sytem Maintaining Inventory for Service: Semi Markov Deciion Problem R.Mugeh 1,S.Krihnakumar 2, and C.Elango 3 1 mugehrengawamy@gmail.com 2 krihmathew@gmail.com

More information

List Coloring Graphs

List Coloring Graphs Lit Coloring Graph February 6, 004 LIST COLORINGS AND CHOICE NUMBER Thomaen Long Grotzch girth 5 verion Thomaen Long Let G be a connected planar graph of girth at leat 5. Let A be a et of vertice in G

More information

White Rose Research Online URL for this paper: Version: Accepted Version

White Rose Research Online URL for this paper:   Version: Accepted Version Thi i a repoitory copy of Identification of nonlinear ytem with non-peritent excitation uing an iterative forward orthogonal leat quare regreion algorithm. White Roe Reearch Online URL for thi paper: http://eprint.whiteroe.ac.uk/107314/

More information

Lecture 17: Analytic Functions and Integrals (See Chapter 14 in Boas)

Lecture 17: Analytic Functions and Integrals (See Chapter 14 in Boas) Lecture 7: Analytic Function and Integral (See Chapter 4 in Boa) Thi i a good point to take a brief detour and expand on our previou dicuion of complex variable and complex function of complex variable.

More information

A CATEGORICAL CONSTRUCTION OF MINIMAL MODEL

A CATEGORICAL CONSTRUCTION OF MINIMAL MODEL A ATEGORIAL ONSTRUTION OF MINIMAL MODEL A. Behera, S. B. houdhury M. Routaray Department of Mathematic National Intitute of Technology ROURKELA - 769008 (India) abehera@nitrkl.ac.in 512ma6009@nitrkl.ac.in

More information

A Constraint Propagation Algorithm for Determining the Stability Margin. The paper addresses the stability margin assessment for linear systems

A Constraint Propagation Algorithm for Determining the Stability Margin. The paper addresses the stability margin assessment for linear systems A Contraint Propagation Algorithm for Determining the Stability Margin of Linear Parameter Circuit and Sytem Lubomir Kolev and Simona Filipova-Petrakieva Abtract The paper addree the tability margin aement

More information

In presenting the dissertation as a partial fulfillment of the requirements for an advanced degree from the Georgia Institute of Technology, I agree

In presenting the dissertation as a partial fulfillment of the requirements for an advanced degree from the Georgia Institute of Technology, I agree In preenting the diertation a a partial fulfillment of the requirement for an advanced degree from the Georgia Intitute of Technology, I agree that the Library of the Intitute hall make it available for

More information

4.6 Principal trajectories in terms of amplitude and phase function

4.6 Principal trajectories in terms of amplitude and phase function 4.6 Principal trajectorie in term of amplitude and phae function We denote with C() and S() the coinelike and inelike trajectorie relative to the tart point = : C( ) = S( ) = C( ) = S( ) = Both can be

More information

CHAPTER 10 CHEMICAL BONDING II: MOLECULAR GEOMETRY AND HYBRIDIZATION OF ATOMIC ORBITALS

CHAPTER 10 CHEMICAL BONDING II: MOLECULAR GEOMETRY AND HYBRIDIZATION OF ATOMIC ORBITALS APTER 10 EMIAL BNDING II: MLEULAR GEMETRY AND YBRIDIZATIN ATMI RBITALS 10.7 (a) The Lewi tructure of P 3 i hown below. Since in the VSEPR method the number of bonding pair and lone pair of electron around

More information

Assignment for Mathematics for Economists Fall 2016

Assignment for Mathematics for Economists Fall 2016 Due date: Mon. Nov. 1. Reading: CSZ, Ch. 5, Ch. 8.1 Aignment for Mathematic for Economit Fall 016 We now turn to finihing our coverage of concavity/convexity. There are two part: Jenen inequality for concave/convex

More information

The Hassenpflug Matrix Tensor Notation

The Hassenpflug Matrix Tensor Notation The Haenpflug Matrix Tenor Notation D.N.J. El Dept of Mech Mechatron Eng Univ of Stellenboch, South Africa e-mail: dnjel@un.ac.za 2009/09/01 Abtract Thi i a ample document to illutrate the typeetting of

More information

Interval Deletion is Fixed-Parameter Tractable

Interval Deletion is Fixed-Parameter Tractable 0 Interval Deletion i Fixed-Parameter Tractable YIXIN CAO and DÁNIEL MARX, Hungarian Academy of Science (MTA SZTAKI) We tudy the minimum interval deletion problem, which ak for the removal of a et of at

More information