quality/quantity peak time/ratio
|
|
- Kory Anderson
- 5 years ago
- Views:
Transcription
1 Semi-Heap ad Its Applicatios i Touramet Rakig Jie Wu Departmet of omputer Sciece ad Egieerig Florida Atlatic Uiversity oca Rato, FL 3343 jie@cse.fau.edu September, 00
2 . Itroductio ad Motivatio. relimiaries 3. Semi-Heap 4. Geeralized Sortig Usig Semi-Heap 5. arallel Geeralized Sortig Usig Semi-Heap. Other Results 7. oclusios
3 Itroductio Two dieret worlds Hardyism Utility as a goal is iferior to elegace ad profudity. Maoism Scietic research should serve proletaria polities,..., ad be itergrated with productive labor. 3
4 Golde-ratio-based Search: Golde ratio: = p 5, = 0:::: quality/quatity peak time/ratio Questios: Why golde-ratio-based search? Golde-ratio-based search or biary-tree-based search? 4
5 Touramet: players where every possible pair of players plays oe game to decide the wier (ad the loser) betwee them. Graph represetatio: A directed graph with a complete uderlyig graph. 3 5 Hamiltoia path (also called geeralized sorted sequece): 3 5 Lower boud: ( log ) Sortig algorithms: bubble sort, biary isertio sort, merge sort We exted a heapsort algorithm usig a semi-heap ad the geeralize it to a cost-optimal parallel algorithm uder the EREW RAM model with () ru time usig (log ) processors. 5
6 Touramet Rakig roblem: geeralized sorted sequece (( log )) sorted sequece of kigs (Wu 000, cojectured to be ( )) local media order (O( )) media order (N-complete) kig: other players are beate by the kig directly or idirectly (via a third player). media order: rakig of players with a miimum umber of total upsets. geeralized sorted sequece sorted sequece of kigs local media order media order
7 relimiaries Touramet Existece of a Hamiltoia path i ay touramet: repositio: osider a set N (jnj = ) with ay two elemets i ad j, either i j or j i. Elemets i N ca be arraged i a liear order 0 0 ::: 0, 0 Assume that the prepositio holds for = k: 0 0 ::: 0 k Whe = k +, we isert the (k + )th elemet 0 k+ i frot of 0 i, where i is the smallest idex such that 0 k+ 0 i : 0 0 ::: 0 k+ 0 ::: 0 i k If such a idex i does ot exist, 0 k+ is placed as the last elemet: 0 0 ::: 0 k 0 k+ 7
8 Heap Heap is a array A that ca be viewed as a complete biary tree. The left child of A[i] is A[l(i)] = A[i] ad the right child of A[i] is A[r(i)] = A[i + ]. Heap property: For every ode i other tha the root: A[ aret(i)] A[i] i i i+ heapsize A[l[i)] A[i] A[r(i)]... A[i]... A[l(i)] A[r(i)]... *... * (a) (b)
9 Faculty Recrutig rocess: Yes/No Offer selected cadidate cadidates cadidate pool A k-roud selectio process ost fuctio: Type Radom Sorted Heap ostruct () ( log ) () Select () () () Maitai () () (log ) Overall cost: Type Radom Sorted Heap k = () () ( log ) () k =() ( ) ( log ) ( log ) k =(= log ) ( ) ( log ) () 9
10 3 Semi-Heap Deitio : = maxf ; ; 3 g if both = maxf ; ; 3 g ad 3 = maxf ; ; 3 g are false. Four possible coguratios of a triagle i a semi-heap. A[i] A[i] A[l(i)] A[r(i)] A[l(i)] A[r(i)] (a) (b) A[i] A[i] A[l(i)] A[r(i)] A[l(i)] A[r(i)] (c) (d) Deitio : A semi-heap for a give itrasitive total order is a complete biary tree. For every ode 0 i the tree, 0 = maxf 0 ;L( 0 );R( 0 )g. 0
11 ostruct a semi-heap from a radom array: SEMI-HEAIFY(A; i) costructs a semi-heap rooted at A[i], provided that biary trees rooted at A[l(i)] ad A[r(i)] are semi-heaps. (Its cost is (log ), where = heapsize.) UILD-SEMI-HEA(A) uses the procedure SEMI-HEAIFY i a bottomup maer to covert a arbitrary array A ito a semi-heap. (Its cost is ()) SEMI-HEAIFY(A; i) if A[i] = maxfa[i];a[l(i)];a[r(i)]g the d wier such that A[wier], maxfa[i];a[l(i)];a[r(i)]g 3 exchage A[i]! A[wier] 4 SEMI-HEAIFY(A; wier) UILD-SEMI-HEA(A) for i, b heapsize c dowto do SEMI-HEAIFY(A; i)
12 The descriptio of the SEMI-HEAIFY algorithm: A[i] semi-heap A[l(i)] A[r(i)] A[l(l(i)] semi-heap A[r(l(i))] semi-heap
13 Theorem : UILD-SEMI-HEA costructs a semi-heap for ay give complete biary tree. A example of usig UILD-SEMI-HEA: A: *... * A: *... * (a) (b) 3
14 4 Geeralized Sortig Usig Semi-Heap Why the traditioal heapsort caot be used? With the trasitive property, root A[] \beats" all the other \players". Whe the root is discarded, it is replaced by the last elemet A[] i the heap. The the heap is recostructed by pushig A[] dow i the heap if ecessary so that the ew root is the maximum elemet amog the remaiig oes. I a semi-heap, the followig situatio may occur: A[] \beats" all A[], A[], ad A[3]. A[] A[]... A[3]... A[] 4
15 Geeralized sortig usig semi-heap Geeralized sortig is doe through SEMI-HEA-SORT by repeatly pritig ad removig the root of the biary tree (which is iitially a semi-heap). The root is replaced by either its left child or right child through RE- LAE. The selected child is replaced by oe of its childre. The process cotiues util a leaf ode is reached ad the etry for the leaf ode is replaced by. 5
16 RELAE(A; i) repeatly replaces a ode (startig from the root) by either its leftchild or rightchild util the curret ode is a leave ode. (Its cost is bouded the height of the origial semi-heap, (log )). SEMI-HEA-SORT repeatly prits ad removes the root of the biary tree (which is iitially a semi-heap). (Its cost is ( log ).) RELAE(A; i) if (A[l(i)] = ) ^ (A[r(i)] = ) the A[i], 3 else if (A[i] A[l(i)]) ^ (A[l(i)] A[r(i)]) 4 the A[i], A[l(i)] 5 RELAE(A; l[i]) else A[i], A[r(i)] 7 RELAE(A; r[i]) SEMI-HEA-SORT(A) UILD-SEMI-HEA(A) while (A[l()] = ) _ (A[r()] = ) 3 do prit(a[]) 4 RELAE(A, ) 5 prit(a[])
17 Theorem : For ay give semi-heap, SEMI-HEA-SORT geerates a geeralized sorted sequece. Touramet represetatio: A touramet is represeted by a matrix M. M[i; j] = if i beats j (i.e., i j ). M[i; j] =0 if i is beate by j (i.e., j i ). M[i; i] =, represets a impossible situatio. M = 0 0 0, , , 0 0 0, , , , A 7
18 A step-by-step applicatio of RELAE(A; i): * *... * * * *... * (a) (b) * * * *... * * 4 5 * * * *... * (c) (d) * * 5 * * * *... * * * * * * * *... * (e) (f)
19 5 arallel Geeralized Sortig Usig Semi-Heap A cost-optimal parallel algorithm A sortig algorithm is cost-optimal if the product of ru time ad the umber of processors is ( log ). RELAE(A; ) is pipelied level to level ad this statemet is called at every other step (sice each ode is shared by two processors at adjacet level, a idle step is iserted betwee two calls). The ru time of SEMI-HEA-SORT is reduced to () with (log ) processors. This parallel algorithm rus o the REW RAM model, but ca be easily modied to the EREW RAM model without additioal cost. 9
20 From REW RAM to EREW RAM: resolve memory access coict The etwork model: a liear array of processors 0,,,... h, where h = dlog e. 0
21 Active ad passive steps: active step passive step Step k i- i i+ Step k i- i i+ At a eve step, processors 0,, 4,... take the active step ad processors, 3, 5,... take the passive step. The role of active ad passive amog these processors exchages i the ext step.
22 Theorem 3: The proposed parallel implemetatio is cost-optimal with a ru time of () usig (log ) processors. 0 at a active step (starts from step 0):. rits root A[].. If both child odes are, A[] is replaced by ad the 0 seds a termiatio sigal to ad stops. If at least oe child ode is ot, replaces A[] by oe of twochild odes, A[] ad A[3], followig the rule i RELAE. If A[] is selected, 0 seds id = toprocessor ; otherwise, id = 3 is set. I the ext step (a passive step), 0 receives (id; replacemet) from, ad the, performs the update A[id] :=replacemet.
23 i, i = 0, at a passive step: If i receives (id; replacemet) from i+, it performs the update A[id] := replacemet. If i receives sigal id = j from i,, it performs the followig activities i ext active step:. If both childre are, A[j] is replaced by ; otherwise, A[j] is replaced by either A[j] or A[j + ] based the replacemet rule.. Sed (j; A[j]) to i,. 3. If either A[j] or A[j + ] is selected to replace A[j], the correspodig id (j or j +)is set to i+, provided i is ot the last processor (i.e., i = h,); otherwise, the selected elemet is replaced by. If i receives the termiatio sigal, it forwards the termiatio sigal to the ext processor i+ (if it exists) i the ext active step, ad the, i stops. 3
24 A step-by-step illustratio: (3, ) (a) (b) (3, ) 3 3 (7, *) * * 5 * 5 * (c) (d) (, ) 4 3 (, *) * * * * 5 * * 5 * * (e) (f) 4
25 Other Results Sorted Sequece of Kigs: Quicksort i(u): a set of players that beat u. out(u): a set of players that are beate by u. i(u) u out(u) 5
26 arallel Merge: A EREW RAM model with ruig time O(log ) usig O(= log ) processors. p split p split q q first= (a) last=m first= (b) last=m p split p split q first= (c) last=m q first= cut (d) cut+ last=m
27 7 oclusios A data structure called semi-heap. A optimal solutio to the geeralized sortig problem. A cost-optimal EREW RAM algorithm with () i ru time usig (log ) processors. A implemetatio of the proposed parallel algorithm uder the etwork model usig a liear array of processors. 7
On Sorting an Intransitive Total Ordered Set Using Semi-Heap
O Sortig a Itrasitive Total Ordered Set Usig Semi-Heap Jie Wu Departmet of Computer Sciece ad Egieerig Florida Atlatic Uiversity Boca Rato, FL jie@cse.fau.edu Abstract The problem of sortig a itrasitive
More informationCIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19
CIS Data Structures ad Algorithms with Java Sprig 09 Stacks, Queues, ad Heaps Moday, February 8 / Tuesday, February 9 Stacks ad Queues Recall the stack ad queue ADTs (abstract data types from lecture.
More informationHeaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015
Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 201 Heaps 201 Goodrich ad Tamassia xkcd. http://xkcd.com/83/. Tree. Used with permissio uder
More informationChapter 24. Sorting. Objectives. 1. To study and analyze time efficiency of various sorting algorithms
Chapter 4 Sortig 1 Objectives 1. o study ad aalyze time efficiecy of various sortig algorithms 4. 4.7.. o desig, implemet, ad aalyze bubble sort 4.. 3. o desig, implemet, ad aalyze merge sort 4.3. 4. o
More informationwhy study sorting? Sorting is a classic subject in computer science. There are three reasons for studying sorting algorithms.
Chapter 5 Sortig IST311 - CIS65/506 Clevelad State Uiversity Prof. Victor Matos Adapted from: Itroductio to Java Programmig: Comprehesive Versio, Eighth Editio by Y. Daiel Liag why study sortig? Sortig
More informationLecture 5. Counting Sort / Radix Sort
Lecture 5. Coutig Sort / Radix Sort T. H. Corme, C. E. Leiserso ad R. L. Rivest Itroductio to Algorithms, 3rd Editio, MIT Press, 2009 Sugkyukwa Uiversity Hyuseug Choo choo@skku.edu Copyright 2000-2018
More informationCIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13
CIS Data Structures ad Algorithms with Java Sprig 08 Stacks ad Queues Moday, February / Tuesday, February Learig Goals Durig this lab, you will: Review stacks ad queues. Lear amortized ruig time aalysis
More informationData Structures Week #9. Sorting
Data Structures Week #9 Sortig Outlie Motivatio Types of Sortig Elemetary (O( 2 )) Sortig Techiques Other (O(*log())) Sortig Techiques 21.Aralık.2010 Boraha Tümer, Ph.D. 2 Sortig 21.Aralık.2010 Boraha
More informationData Structures and Algorithms Part 1.4
1 Data Structures ad Algorithms Part 1.4 Werer Nutt 2 DSA, Part 1: Itroductio, syllabus, orgaisatio Algorithms Recursio (priciple, trace, factorial, Fiboacci) Sortig (bubble, isertio, selectio) 3 Sortig
More informationHomework 1 Solutions MA 522 Fall 2017
Homework 1 Solutios MA 5 Fall 017 1. Cosider the searchig problem: Iput A sequece of umbers A = [a 1,..., a ] ad a value v. Output A idex i such that v = A[i] or the special value NIL if v does ot appear
More informationSorting 9/15/2009. Sorting Problem. Insertion Sort: Soundness. Insertion Sort. Insertion Sort: Running Time. Insertion Sort: Soundness
9/5/009 Algorithms Sortig 3- Sortig Sortig Problem The Sortig Problem Istace: A sequece of umbers Objective: A permutatio (reorderig) such that a ' K a' a, K,a a ', K, a' of the iput sequece The umbers
More informationSorting in Linear Time. Data Structures and Algorithms Andrei Bulatov
Sortig i Liear Time Data Structures ad Algorithms Adrei Bulatov Algorithms Sortig i Liear Time 7-2 Compariso Sorts The oly test that all the algorithms we have cosidered so far is compariso The oly iformatio
More informationCombination Labelings Of Graphs
Applied Mathematics E-Notes, (0), - c ISSN 0-0 Available free at mirror sites of http://wwwmaththuedutw/ame/ Combiatio Labeligs Of Graphs Pak Chig Li y Received February 0 Abstract Suppose G = (V; E) is
More informationCIS 121. Introduction to Trees
CIS 121 Itroductio to Trees 1 Tree ADT Tree defiitio q A tree is a set of odes which may be empty q If ot empty, the there is a distiguished ode r, called root ad zero or more o-empty subtrees T 1, T 2,
More informationCSE 2320 Notes 8: Sorting. (Last updated 10/3/18 7:16 PM) Idea: Take an unsorted (sub)array and partition into two subarrays such that.
CSE Notes 8: Sortig (Last updated //8 7:6 PM) CLRS 7.-7., 9., 8.-8. 8.A. QUICKSORT Cocepts Idea: Take a usorted (sub)array ad partitio ito two subarrays such that p q r x y z x y y z Pivot Customarily,
More informationPriority Queues. Binary Heaps
Priority Queues Biary Heaps Priority Queues Priority: some property of a object that allows it to be prioritized with respect to other objects of the same type Mi Priority Queue: homogeeous collectio of
More information6.854J / J Advanced Algorithms Fall 2008
MIT OpeCourseWare http://ocw.mit.edu 6.854J / 18.415J Advaced Algorithms Fall 2008 For iformatio about citig these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advaced Algorithms
More informationMinimum Spanning Trees
Miimum Spaig Trees Miimum Spaig Trees Spaig subgraph Subgraph of a graph G cotaiig all the vertices of G Spaig tree Spaig subgraph that is itself a (free) tree Miimum spaig tree (MST) Spaig tree of a weighted
More informationFundamental Algorithms
Techische Uiversität Müche Fakultät für Iformatik Lehrstuhl für Effiziete Algorithme Dmytro Chibisov Sadeep Sadaada Witer Semester 2007/08 Solutio Sheet 6 November 30, 2007 Fudametal Algorithms Problem
More informationDesign and Analysis of Algorithms Notes
Desig ad Aalysis of Algorithms Notes Notes by Wist Course taught by Dr. K Amer Course started: Jauary 4, 013 Course eded: December 13, 01 Curret geeratio: December 18, 013 Listigs 1 Array sum pseudocode.................................
More informationLower Bounds for Sorting
Liear Sortig Topics Covered: Lower Bouds for Sortig Coutig Sort Radix Sort Bucket Sort Lower Bouds for Sortig Compariso vs. o-compariso sortig Decisio tree model Worst case lower boud Compariso Sortig
More informationOn (K t e)-saturated Graphs
Noame mauscript No. (will be iserted by the editor O (K t e-saturated Graphs Jessica Fuller Roald J. Gould the date of receipt ad acceptace should be iserted later Abstract Give a graph H, we say a graph
More informationCOSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1
COSC 1P03 Ch 7 Recursio Itroductio to Data Structures 8.1 COSC 1P03 Recursio Recursio I Mathematics factorial Fiboacci umbers defie ifiite set with fiite defiitio I Computer Sciece sytax rules fiite defiitio,
More information15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015
15-859E: Advaced Algorithms CMU, Sprig 2015 Lecture #2: Radomized MST ad MST Verificatio Jauary 14, 2015 Lecturer: Aupam Gupta Scribe: Yu Zhao 1 Prelimiaries I this lecture we are talkig about two cotets:
More informationData Structures Week #5. Trees (Ağaçlar)
Data Structures Week #5 Trees Ağaçlar) Trees Ağaçlar) Toros Gökarı Avrupa Gökarı October 28, 2014 Boraha Tümer, Ph.D. 2 Trees Ağaçlar) October 28, 2014 Boraha Tümer, Ph.D. 3 Outlie Trees Deiitios Implemetatio
More informationDATA STRUCTURES. amortized analysis binomial heaps Fibonacci heaps union-find. Data structures. Appetizer. Appetizer
Data structures DATA STRUCTURES Static problems. Give a iput, produce a output. Ex. Sortig, FFT, edit distace, shortest paths, MST, max-flow,... amortized aalysis biomial heaps Fiboacci heaps uio-fid Dyamic
More informationCSE 417: Algorithms and Computational Complexity
Time CSE 47: Algorithms ad Computatioal Readig assigmet Read Chapter of The ALGORITHM Desig Maual Aalysis & Sortig Autum 00 Paul Beame aalysis Problem size Worst-case complexity: max # steps algorithm
More informationANN WHICH COVERS MLP AND RBF
ANN WHICH COVERS MLP AND RBF Josef Boští, Jaromír Kual Faculty of Nuclear Scieces ad Physical Egieerig, CTU i Prague Departmet of Software Egieerig Abstract Two basic types of artificial eural etwors Multi
More information2. ALGORITHM ANALYSIS
2. ALGORITHM ANALYSIS computatioal tractability survey of commo ruig times 2. ALGORITHM ANALYSIS computatioal tractability survey of commo ruig times Lecture slides by Kevi Waye Copyright 2005 Pearso-Addiso
More informationCIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)
CIS 11 Data Structures ad Algorithms with Java Fall 017 Big-Oh Notatio Tuesday, September 5 (Make-up Friday, September 8) Learig Goals Review Big-Oh ad lear big/small omega/theta otatios Practice solvig
More informationThe Magma Database file formats
The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,
More informationBig-O Analysis. Asymptotics
Big-O Aalysis 1 Defiitio: Suppose that f() ad g() are oegative fuctios of. The we say that f() is O(g()) provided that there are costats C > 0 ad N > 0 such that for all > N, f() Cg(). Big-O expresses
More informationOrder statistics. Order Statistics. Randomized divide-andconquer. Example. CS Spring 2006
406 CS 5633 -- Sprig 006 Order Statistics Carola We Slides courtesy of Charles Leiserso with small chages by Carola We CS 5633 Aalysis of Algorithms 406 Order statistics Select the ith smallest of elemets
More informationEVALUATION OF TRIGONOMETRIC FUNCTIONS
EVALUATION OF TRIGONOMETRIC FUNCTIONS Whe first exposed to trigoometric fuctios i high school studets are expected to memorize the values of the trigoometric fuctios of sie cosie taget for the special
More informationThe isoperimetric problem on the hypercube
The isoperimetric problem o the hypercube Prepared by: Steve Butler November 2, 2005 1 The isoperimetric problem We will cosider the -dimesioal hypercube Q Recall that the hypercube Q is a graph whose
More informationOnes Assignment Method for Solving Traveling Salesman Problem
Joural of mathematics ad computer sciece 0 (0), 58-65 Oes Assigmet Method for Solvig Travelig Salesma Problem Hadi Basirzadeh Departmet of Mathematics, Shahid Chamra Uiversity, Ahvaz, Ira Article history:
More informationLecture 28: Data Link Layer
Automatic Repeat Request (ARQ) 2. Go ack N ARQ Although the Stop ad Wait ARQ is very simple, you ca easily show that it has very the low efficiecy. The low efficiecy comes from the fact that the trasmittig
More information1 Graph Sparsfication
CME 305: Discrete Mathematics ad Algorithms 1 Graph Sparsficatio I this sectio we discuss the approximatio of a graph G(V, E) by a sparse graph H(V, F ) o the same vertex set. I particular, we cosider
More informationSome non-existence results on Leech trees
Some o-existece results o Leech trees László A.Székely Hua Wag Yog Zhag Uiversity of South Carolia This paper is dedicated to the memory of Domiique de Cae, who itroduced LAS to Leech trees.. Abstract
More informationUniversity of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures
Uiversity of Waterloo Departmet of Electrical ad Computer Egieerig ECE 250 Algorithms ad Data Structures Midterm Examiatio ( pages) Istructor: Douglas Harder February 7, 2004 7:30-9:00 Name (last, first)
More informationHash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Hash Tables xkcd. http://xkcd.com/221/. Radom Number. Used with permissio uder Creative
More informationComputer Science Foundation Exam. August 12, Computer Science. Section 1A. No Calculators! KEY. Solutions and Grading Criteria.
Computer Sciece Foudatio Exam August, 005 Computer Sciece Sectio A No Calculators! Name: SSN: KEY Solutios ad Gradig Criteria Score: 50 I this sectio of the exam, there are four (4) problems. You must
More informationBOOLEAN MATHEMATICS: GENERAL THEORY
CHAPTER 3 BOOLEAN MATHEMATICS: GENERAL THEORY 3.1 ISOMORPHIC PROPERTIES The ame Boolea Arithmetic was chose because it was discovered that literal Boolea Algebra could have a isomorphic umerical aspect.
More informationA graphical view of big-o notation. c*g(n) f(n) f(n) = O(g(n))
ca see that time required to search/sort grows with size of We How do space/time eeds of program grow with iput size? iput. time: cout umber of operatios as fuctio of iput Executio size operatio Assigmet:
More informationAlgorithm Design Techniques. Divide and conquer Problem
Algorithm Desig Techiques Divide ad coquer Problem Divide ad Coquer Algorithms Divide ad Coquer algorithm desig works o the priciple of dividig the give problem ito smaller sub problems which are similar
More informationElementary Educational Computer
Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified
More informationSolution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:
CS 604 Data Structures Midterm Sprig, 00 VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Istructios: Prit your ame i the space provided below. This examiatio is closed book ad closed
More informationcondition w i B i S maximum u i
ecture 10 Dyamic Programmig 10.1 Kapsack Problem November 1, 2004 ecturer: Kamal Jai Notes: Tobias Holgers We are give a set of items U = {a 1, a 2,..., a }. Each item has a weight w i Z + ad a utility
More informationNew Results on Energy of Graphs of Small Order
Global Joural of Pure ad Applied Mathematics. ISSN 0973-1768 Volume 13, Number 7 (2017), pp. 2837-2848 Research Idia Publicatios http://www.ripublicatio.com New Results o Eergy of Graphs of Small Order
More information3D Model Retrieval Method Based on Sample Prediction
20 Iteratioal Coferece o Computer Commuicatio ad Maagemet Proc.of CSIT vol.5 (20) (20) IACSIT Press, Sigapore 3D Model Retrieval Method Based o Sample Predictio Qigche Zhag, Ya Tag* School of Computer
More informationMajor CSL Write your name and entry no on every sheet of the answer script. Time 2 Hrs Max Marks 70
NOTE:. Attempt all seve questios. Major CSL 02 2. Write your ame ad etry o o every sheet of the aswer script. Time 2 Hrs Max Marks 70 Q No Q Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 Total MM 6 2 4 0 8 4 6 70 Q. Write a
More informationprerequisites: 6.046, 6.041/2, ability to do proofs Randomized algorithms: make random choices during run. Main benefits:
Itro Admiistrivia. Sigup sheet. prerequisites: 6.046, 6.041/2, ability to do proofs homework weekly (first ext week) collaboratio idepedet homeworks gradig requiremet term project books. questio: scribig?
More informationGraphs. Minimum Spanning Trees. Slides by Rose Hoberman (CMU)
Graphs Miimum Spaig Trees Slides by Rose Hoberma (CMU) Problem: Layig Telephoe Wire Cetral office 2 Wirig: Naïve Approach Cetral office Expesive! 3 Wirig: Better Approach Cetral office Miimize the total
More informationAnalysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis
Itro to Algorithm Aalysis Aalysis Metrics Slides. Table of Cotets. Aalysis Metrics 3. Exact Aalysis Rules 4. Simple Summatio 5. Summatio Formulas 6. Order of Magitude 7. Big-O otatio 8. Big-O Theorems
More informationCSE 111 Bio: Program Design I Lecture 17: software development, list methods
CSE 111 Bio: Program Desig I Lecture 17: software developmet, list methods Robert H. Sloa(CS) & Rachel Poretsky(Bio) Uiversity of Illiois, Chicago October 19, 2017 NESTED LOOPS: REVIEW Geerate times table
More informationECE4050 Data Structures and Algorithms. Lecture 6: Searching
ECE4050 Data Structures ad Algorithms Lecture 6: Searchig 1 Search Give: Distict keys k 1, k 2,, k ad collectio L of records of the form (k 1, I 1 ), (k 2, I 2 ),, (k, I ) where I j is the iformatio associated
More informationof types having a total order and a predecessor and a successor function. In the
J. Fuctioal Programmig 1 (1): 1{000, Jauary 1993 c 1993 Cambridge Uiversity Press 1 F U N C T I O N A L P E A R L S Diets for Fat Sets Marti Erwig FerUiversitat Hage, Praktische Iformatik IV 58084 Hage,
More informationSwitching Hardware. Spring 2018 CS 438 Staff, University of Illinois 1
Switchig Hardware Sprig 208 CS 438 Staff, Uiversity of Illiois Where are we? Uderstad Differet ways to move through a etwork (forwardig) Read sigs at each switch (datagram) Follow a kow path (virtual circuit)
More informationBST Sequence of Operations
Splay Trees Problems with BSTs Because the shape of a BST is determied by the order that data is iserted, we ru the risk of trees that are essetially lists 12 21 20 32 24 37 15 40 55 56 77 2 BST Sequece
More informationBig-O Analysis. Asymptotics
Big-O Aalysis 1 Defiitio: Suppose that f() ad g() are oegative fuctios of. The we say that f() is O(g()) provided that there are costats C > 0 ad N > 0 such that for all > N, f() Cg(). Big-O expresses
More informationWhat are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs
What are we goig to lear? CSC316-003 Data Structures Aalysis of Algorithms Computer Sciece North Carolia State Uiversity Need to say that some algorithms are better tha others Criteria for evaluatio Structure
More informationSymmetric Class 0 subgraphs of complete graphs
DIMACS Techical Report 0-0 November 0 Symmetric Class 0 subgraphs of complete graphs Vi de Silva Departmet of Mathematics Pomoa College Claremot, CA, USA Chaig Verbec, Jr. Becer Friedma Istitute Booth
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 19 Query Optimizatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Query optimizatio Coducted by a query optimizer i a DBMS Goal:
More informationCS200: Hash Tables. Prichard Ch CS200 - Hash Tables 1
CS200: Hash Tables Prichard Ch. 13.2 CS200 - Hash Tables 1 Table Implemetatios: average cases Search Add Remove Sorted array-based Usorted array-based Balaced Search Trees O(log ) O() O() O() O(1) O()
More informationLecture 6. Lecturer: Ronitt Rubinfeld Scribes: Chen Ziv, Eliav Buchnik, Ophir Arie, Jonathan Gradstein
068.670 Subliear Time Algorithms November, 0 Lecture 6 Lecturer: Roitt Rubifeld Scribes: Che Ziv, Eliav Buchik, Ophir Arie, Joatha Gradstei Lesso overview. Usig the oracle reductio framework for approximatig
More informationMinimum Spanning Trees
Presetatio for use with the textbook, lgorithm esig ad pplicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 0 Miimum Spaig Trees 0 Goodrich ad Tamassia Miimum Spaig Trees pplicatio: oectig a Network Suppose
More informationGreedy Algorithms. Interval Scheduling. Greedy Algorithms. Interval scheduling. Greedy Algorithms. Interval Scheduling
Greedy Algorithms Greedy Algorithms Witer Paul Beame Hard to defie exactly but ca give geeral properties Solutio is built i small steps Decisios o how to build the solutio are made to maximize some criterio
More informationRecursion. Recursion. Mathematical induction: example. Recursion. The sum of the first n odd numbers is n 2 : Informal proof: Principle:
Recursio Recursio Jordi Cortadella Departmet of Computer Sciece Priciple: Reduce a complex problem ito a simpler istace of the same problem Recursio Itroductio to Programmig Dept. CS, UPC 2 Mathematical
More informationRecursive Procedures. How can you model the relationship between consecutive terms of a sequence?
6. Recursive Procedures I Sectio 6.1, you used fuctio otatio to write a explicit formula to determie the value of ay term i a Sometimes it is easier to calculate oe term i a sequece usig the previous terms.
More informationA NOTE ON COARSE GRAINED PARALLEL INTEGER SORTING
Chater 26 A NOTE ON COARSE GRAINED PARALLEL INTEGER SORTING A. Cha ad F. Dehe School of Comuter Sciece Carleto Uiversity Ottawa, Caada K1S 5B6 æ {acha,dehe}@scs.carleto.ca Abstract Keywords: We observe
More informationArray Applications. Sorting. Want to put the contents of an array in order. Selection Sort Bubble Sort Insertion Sort. Quicksort Quickersort
Sortig Wat to put the cotets of a arra i order Selectio Sort Bubble Sort Isertio Sort Quicksort Quickersort 2 tj Bubble Sort - coceptual Sort a arra of umbers ito ascedig or descedig order Split the list
More informationMinimum Spanning Trees. Application: Connecting a Network
Miimum Spaig Tree // : Presetatio for use with the textbook, lgorithm esig ad pplicatios, by M. T. oodrich ad R. Tamassia, Wiley, Miimum Spaig Trees oodrich ad Tamassia Miimum Spaig Trees pplicatio: oectig
More informationOctahedral Graph Scaling
Octahedral Graph Scalig Peter Russell Jauary 1, 2015 Abstract There is presetly o strog iterpretatio for the otio of -vertex graph scalig. This paper presets a ew defiitio for the term i the cotext of
More informationMassachusetts Institute of Technology Lecture : Theory of Parallel Systems Feb. 25, Lecture 6: List contraction, tree contraction, and
Massachusetts Istitute of Techology Lecture.89: Theory of Parallel Systems Feb. 5, 997 Professor Charles E. Leiserso Scribe: Guag-Ie Cheg Lecture : List cotractio, tree cotractio, ad symmetry breakig Work-eciet
More informationEE260: Digital Design, Spring /16/18. n Example: m 0 (=x 1 x 2 ) is adjacent to m 1 (=x 1 x 2 ) and m 2 (=x 1 x 2 ) but NOT m 3 (=x 1 x 2 )
EE26: Digital Desig, Sprig 28 3/6/8 EE 26: Itroductio to Digital Desig Combiatioal Datapath Yao Zheg Departmet of Electrical Egieerig Uiversity of Hawaiʻi at Māoa Combiatioal Logic Blocks Multiplexer Ecoders/Decoders
More informationLecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions
U.C. Berkeley CS170 : Algorithms Midterm 1 Solutios Lecturers: Sajam Garg ad Prasad Raghavedra Feb 1, 017 Midterm 1 Solutios 1. (4 poits) For the directed graph below, fid all the strogly coected compoets
More informationLecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming
Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis
More informationPriority Queues and Heaps (Ch 5.5) Huffman Coding Trees (Ch 5.6) Binary Search Trees (Ch 5.4) Lec 5: Binary Tree. Dr. Patrick Chan
ata Structure hapter Biary Trees r. Patrick ha School of om puter Sciece ad Egieerig South hia Uiversity of Techolog y Recursio recursio is a procedure which calls itself The recursive procedure call must
More informationtop() Applications of Stacks
CS22 Algorithms ad Data Structures MW :00 am - 2: pm, MSEC 0 Istructor: Xiao Qi Lecture 6: Stacks ad Queues Aoucemets Quiz results Homework 2 is available Due o September 29 th, 2004 www.cs.mt.edu~xqicoursescs22
More informationElementary Data Structures. The Stack ADT ( 2.1.1) Applications of Stacks. Stacks, Queues, Vectors, Lists & Sequences Trees
Elemetary Data Structures Stacks, Queues, ectors, Lists & Sequeces Trees The Stack ADT ( 2..) The Stack ADT stores arbitrary objects Isertios ad deletios follow the last-i first-out scheme Thik of a sprig-loaded
More informationImproved Random Graph Isomorphism
Improved Radom Graph Isomorphism Tomek Czajka Gopal Paduraga Abstract Caoical labelig of a graph cosists of assigig a uique label to each vertex such that the labels are ivariat uder isomorphism. Such
More information. Written in factored form it is easy to see that the roots are 2, 2, i,
CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or
More informationCMPT 125 Assignment 2 Solutions
CMPT 25 Assigmet 2 Solutios Questio (20 marks total) a) Let s cosider a iteger array of size 0. (0 marks, each part is 2 marks) it a[0]; I. How would you assig a poiter, called pa, to store the address
More informationLecture 1: Introduction and Strassen s Algorithm
5-750: Graduate Algorithms Jauary 7, 08 Lecture : Itroductio ad Strasse s Algorithm Lecturer: Gary Miller Scribe: Robert Parker Itroductio Machie models I this class, we will primarily use the Radom Access
More informationAnalysis of Algorithms
Aalysis of Algorithms Ruig Time of a algorithm Ruig Time Upper Bouds Lower Bouds Examples Mathematical facts Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite
More informationCS 683: Advanced Design and Analysis of Algorithms
CS 683: Advaced Desig ad Aalysis of Algorithms Lecture 6, February 1, 2008 Lecturer: Joh Hopcroft Scribes: Shaomei Wu, Etha Feldma February 7, 2008 1 Threshold for k CNF Satisfiability I the previous lecture,
More informationCS211 Fall 2003 Prelim 2 Solutions and Grading Guide
CS11 Fall 003 Prelim Solutios ad Gradig Guide Problem 1: (a) obj = obj1; ILLEGAL because type of referece must always be a supertype of type of object (b) obj3 = obj1; ILLEGAL because type of referece
More informationOn Infinite Groups that are Isomorphic to its Proper Infinite Subgroup. Jaymar Talledo Balihon. Abstract
O Ifiite Groups that are Isomorphic to its Proper Ifiite Subgroup Jaymar Talledo Baliho Abstract Two groups are isomorphic if there exists a isomorphism betwee them Lagrage Theorem states that the order
More informationBASED ON ITERATIVE ERROR-CORRECTION
A COHPARISO OF CRYPTAALYTIC PRICIPLES BASED O ITERATIVE ERROR-CORRECTIO Miodrag J. MihaljeviC ad Jova Dj. GoliC Istitute of Applied Mathematics ad Electroics. Belgrade School of Electrical Egieerig. Uiversity
More informationMałgorzata Sterna. Mateusz Cicheński, Mateusz Jarus, Michał Miszkiewicz, Jarosław Szymczak
Małgorzata Stera Mateusz Cicheński, Mateusz Jarus, Michał Miszkiewicz, Jarosław Szymczak Istitute of Computig Sciece Pozań Uiversity of Techology Pozań - Polad Scope of the Talk Problem defiitio MP Formulatio
More informationLoad balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers *
Load balaced Parallel Prime umber Geerator with Sieve of Eratosthees o luster omputers * Soowook Hwag*, Kyusik hug**, ad Dogseug Kim* *Departmet of Electrical Egieerig Korea Uiversity Seoul, -, Rep. of
More informationCMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems
More informationName of the Student: Unit I (Logic and Proofs) 1) Truth Table: Conjunction Disjunction Conditional Biconditional
SUBJECT NAME : Discrete Mathematics SUBJECT CODE : MA 2265 MATERIAL NAME : Formula Material MATERIAL CODE : JM08ADM009 (Sca the above QR code for the direct dowload of this material) Name of the Studet:
More informationChapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3
More informationRunning Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments
Ruig Time Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects. The
More informationPseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance
Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured
More informationINTERSECTION CORDIAL LABELING OF GRAPHS
INTERSECTION CORDIAL LABELING OF GRAPHS G Meea, K Nagaraja Departmet of Mathematics, PSR Egieerig College, Sivakasi- 66 4, Virudhuagar(Dist) Tamil Nadu, INDIA meeag9@yahoocoi Departmet of Mathematics,
More informationAn Improved Shuffled Frog-Leaping Algorithm for Knapsack Problem
A Improved Shuffled Frog-Leapig Algorithm for Kapsack Problem Zhoufag Li, Ya Zhou, ad Peg Cheg School of Iformatio Sciece ad Egieerig Hea Uiversity of Techology ZhegZhou, Chia lzhf1978@126.com Abstract.
More informationCSC 220: Computer Organization Unit 11 Basic Computer Organization and Design
College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:
More informationAlpha Individual Solutions MAΘ National Convention 2013
Alpha Idividual Solutios MAΘ Natioal Covetio 0 Aswers:. D. A. C 4. D 5. C 6. B 7. A 8. C 9. D 0. B. B. A. D 4. C 5. A 6. C 7. B 8. A 9. A 0. C. E. B. D 4. C 5. A 6. D 7. B 8. C 9. D 0. B TB. 570 TB. 5
More information