On Sorting an Intransitive Total Ordered Set Using Semi-Heap

Size: px
Start display at page:

Download "On Sorting an Intransitive Total Ordered Set Using Semi-Heap"

Transcription

1 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 total ordered set, a geeralizatio of regular sortig, is cosidered. This geeralized sortig is based o the fact that there exists a special liear orderig for ay itrasitive total ordered set. A ew data structure called semi-heap is proposed to costruct a optimal ( log ) sortig algorithm. Fially, we propose a cost-optimal parallel algorithm usig semi-heap. The ru time of this algorithm is () with (log ) processors uder the EREW RAM model.. Itroductio Sortig is oe of the fudametal problems i computer sciece ad may differet solutios for sortig have bee proposed [, ]. Basically, give a sequece of umbers ( ; ; :::; ) as a iput, a sortig algorithm geerates a permutatio (reorderig) ( ; ; :::; ) of the iput sequece such that :::. We cosider a geeralizatio of the sortig problem by replacig with, where is a total order without the trasitive property, i.e., it is itrasitive. That is, if i j ad j k, it is ot ecessary that i k. The total order requires that for ay two elemets i ad j, either i j or j i, but ot both (atisymmetric). The set N of elemets exhibitig itrasitive total order ca be represeted by a directed graph, where i j represets a directed edge from vertex i to vertex j.the uderlyig graph is a complete graph. This graph is also called a touramet [], represetig a touramet of players where every possible pair of players plays oe game to decide the wier (ad the loser) betwee them. Sortig o N correspods to fidig a Hamiltoia path i the touramet. This work was support i part by NSF grat CCR 99. Hell ad Rosefeld [] proved that the boud of fidig a Hamiltoia path is ( log ), the same complexity as the regular sortig. They also cosidered bouds o fidig some geeralized Hamiltoia paths. It is easy to prove that may regular sortig algorithms ca be used to fid a Hamiltoia path i a touramet, such as bubble sort, isertio sort, biary isertio sort, ad merge sort. Amog parallel sortig algorithms, eve-odd merge sort ca still be applied. However, heapsort ad quicksort caot be used. Bar-Noy ad Naor [] studied differet parallel solutios based o differet models ad the umber of processors. Theyshowedthatuderthe CRCW RAM model, the geeralized sortig problem ca be solved i (log ) usig () processors. Other fast parallel algorithms ca be foud i []. I this paper, we propose a ew data structure called semi-heap, which is a extesio of a regular heap structure. We itroduce a optimal ( log ) algorithm to determie a Hamiltoia path i a touramet based o the semi-heap structure. The, we propose a cost-optimal parallel algorithm based o the semi-heap structure that takes () i ru time usig (log ) processors i the EREW RAM model. A implemetatio of the cost-optimal parallel algorithm i the etwork model with a liear array of processors is also show.. Semi-Heap Data Structure I this sectio, we first show the existece of a Hamiltoia path i ay give touramet ad the propose the semi-heap data structure. ropositio: Cosider a set N (jnj = ) with ay two elemets i ad j, either i j or j i, but ot both. The elemets i N ca be arraged i a liear order :::, : The propositio states that a Hamiltoia path exists i ay give touramet, but ot ecessary for a Hamiltoia circle. That is, we ca always arrage players i a liear

2 A[l[i)] i i i+ heapsize (c) (d) Figure. A directed graph with a complete uderlyig graph. A semi-heap structure as a set of overlappig triagles. order from left to right such that each player beats the oe to its right. Figure shows a directed graph with five vertices. Oe liear order is.whe is trasitive, the liear order arragemet is reduced to a regular sortig problem. Ulike the regular sortig problem, more tha oe solutio exists for the geeralized sortig problem. For example, is aother liear order for the example of Figure. Cosider three elemets ; ; i N, deote = maxf ; ; g if ad. Note that i a total order without the trasitive property, the maximum elemet may ot exist amog three elemets. For example, if,,ad, maxf ; ; g does ot exist. Next we itroduce a ew cocept of the maximum elemet based o. Defiitio : = maxf ; ; g if both = maxf ; ; g ad = maxf ; ; g are false. Note that whe i = maxf ; ; g are false for all i =; ;,every i is a maximum elemet. A semi-heap is ay array object that ca be viewed as a complete biary tree, like a regular heap. A complete biary tree of height h is a biary tree that is full dow to level h,, with level h filled i from left to right. However, the regular heap property is chaged. Let L( ) ad R( ) represet left ad right child odes of, respectively. Whe a child, say R( ), does ot exist, the relatio R( ) automatically holds. Defiitio : A semi-heap for a give itrasitive total order is a complete biary tree. For every ode i the tree, = maxf ;L( );R( )g. Whe a array A is used to represet a semi-heap, l(i) ad r(i) are used as idices of the left ad right child odes of i; they ca be computed simply by l(i) =iad r(i) = i +. Figure shows a semi-heap with elemets. A semi-heap ca be viewed as a set of overlappig triagles, with each triagle cosistig of,, Figure. Four possible cofiguratios of a triagle i a semi-heap.. Figure shows four possible cofiguratios of a triagle uder relatio. I this figure, if is true, a directed edge is draw from to. Note that = maxf;;g for all cases. I cases ad coditio = maxf;;g also holds. To simplify the presetatio, we fill i a special symbol, with a smaller value tha ay oe i the semi-heap for etries that are outside the semi-heap. That is, A[j] is true for all i iside the semi-heap ad all j outside the semi-heap. Specifically, is a elemet of the semi-heap if i heapsize. A[j] is a elemet outside the semiheap if j > heapsize.. Geeralized Sortig Usig Semi-Heap Although a semi-heap resembles a heap, the traditioal heapsort algorithm caot be directly applied to a semiheap to geerate a geeralized sorted sequece. Recall that with the trasitive property, root A[] of the heap is always the maximum elemet i the heap, i.e., the player at the root beats all the other players i the touramet. Whe we discard the root, it is replaced by the last elemet A[] i the heap, ad 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 elemets. However, i a semi-heap, we may face a situatio i which A[] beats all A[], A[], ada[], which is a impossible situatio i a regular heap. A[], the ew root, caot be selected (ad is removed from the semi-heap) i the ext roud to be placed after A[], the previously selected elemet, because A[] beats A[]. O the other had, because A[] beats A[], its left child, ad A[], its right child, A[] caot be pushed dow i the semi-heap. Therefore, a differet strategy has to be developed for semi-heap. We follow closely the otatio used i Corme, Leiserso, ad Rivest s book []. The sortig usig semiheap cosists of four modules: SEMI-HEAIFY(A; i), BUILD-SEMI-HEA(A), RELACE(A; i), ad SEMI- HEA-SORT(A). SEMI-HEAIFY(A; i) costructs a

3 A[l(l(i)] semi-heap A[r(l(i))] semi-heap semi-heap Figure. The costructio of a semi-heap usig SEMI-HEAIFY. semi-heap rooted at, provided that biary trees rooted at ad are semi-heaps (see Figure ). The cost of SEMI-HEAIFY is the height of ode, measured by the umber of edges o the logest simple dowward path from the ode to a leaf. That is, the cost of SEMI-HEAIFY is (log ), where = heapsize. BUILD-SEMI-HEA uses the procedure SEMI-HEAIFY i a bottom-up maer to covert a arbitrary array A ito a semi-heap. The cost of BUILD-SEMI-HEA is (), which is the same cost of buildig a regular 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 leftchild or rightchild through RELACE. The selected child is replaced by oe of its child odes. The process cotiues util reachig oe of the leaf odes ad the etry for that leaf ode is replaced by, i.e., that leaf ode is removed from the tree. A ew tree derived is o loger a semi-heap; however, each overlappig triagle i the tree still meets the maximum elemet requiremet i Defiitio. The cost of RELACE is the height of the curret tree, which is bouded by the height of the origial semi-heap, (log ). Therefore, the cost of SEMI-HEA- SORT is ( log ). Without loss of geerality, we assume that. SEMI-HEAIFY(A; i) if = maxf;;g the fid wier such that A[wier], maxf;;g exchage! A[wier] SEMI-HEAIFY(A; wier) BUILD-SEMI-HEA(A) for i,b heapsize c dowto do SEMI-HEAIFY(A; i) RELACE(A; i) if ( = ) ^ ( = ) the, else if ( ) ^ ( ) the, RELACE(A; l[i]) else, RELACE(A; r[i]) SEMI-HEA-SORT(A) BUILD-SEMI-HEA(A) while (A[l()] = ) _ (A[r()] = ) do prit(a[]) RELACE(A, ) prit(a[]) Theorem : BUILD-SEMI-HEA costructs a semi-heap for ay give complete biary tree. roof: The procedure BUILD-SEMI-HEA goes through odes that have at least oe child ode ad rus SEMI- HEAIFY o these odes. The order i which these odes are processed guaratees that the subtrees rooted at child odes of are semi-heap before SEMI-HEAIFY rus at. Whe SEMI-HEAIFY is called at, if is the maximum elemet amog,, ad based o, the biary treerooted at is automatically a semiheap. Otherwise ad without loss of geerality, oe of the child odes, say, is the wier amog three, i.e., beats both ad. I this case, is swapped with, which esures that ode ad its child odes satisfy the semi-heap property. However, ode ow has the origial ad thus the subtree rooted at may violate the semi-heap property. Therefore, SEMI-HEAIFY must be called recursively o that subtree. A ew problem (that does ot appear i the origial heap structure) is how to esure that the resultat root,after applyig SEMI-HEAIFY at, will ot violate the semi-heap property amog,, ad. I a regular heap, is the maximum elemet i the tree rooted at, the heap property amog,, ad automatically holds. I a semi-heap, we eed to prove that the ewly selected root (other tha the origial value ), which is either A[l(l(i))] or A[r(l(i))] i the origial tree, caot beat both (the origial )ad. I fact, we prove that (the origial ) always beats the ewly selected (the origial A[l(l(i))] or A[r(l(i))]). We cosider the followig two cases i the origial tree with a semi-heap rooted at (see Figure ): If beats both A[l(l(i))] ad A[r(l(i))]. The problem is solved, because i the resultat tree, ode becomes ad either A[l(l(i))] or A[r(l(i))] becomes. If beats oly oe child ode, the without loss of geerality, we assume that (which is

4 A:... A:... Figure. A example tree: the iitial cofiguratio, the semi-heap cofiguratio, after applyig BUILD-SEMI-HEA (c) (d) ow ) beats A[l(l(i))], A[l(l(i))] beats A[r(l(i))], ad A[r(l(i))] beats. To select a wier amog the origial (ow ), A[l(l(i))], A[r(l(i))], other tha, A[l(l(i))] is the oly choice (sice A[r(l(i))] has lost to A[l(l(i))]). Cosequetly, A[l(l(i))] becomes the ewly selected root of the left subtree of, based o the assumptio, (the origial ) beats (the origial A[l(l(i))]) i the resultat tree. Cosider a complete biary tree with eight vertices, i.e., heapsize =. The iitial cofiguratio of array A is,,,,,,,ad. The touramet is represeted by a matrix M give below, where M [i; j] = if i beats j (i.e., i j )adm[i; j] =if i is beate by j (i.e., j i ). M [i; i] =, represets a impossible situatio. Note that M [i; j] =ifad olyif M [j; i] =. M = C A Figure shows the iitial cofiguratio of this complete biary tree i array A, where the correspodig tree structure is represeted by a set of overlappig triagles. Three edges amog three vertices i each triagle represet touramet results betwee three pairs of players i the triagle. That is, a edge directed from i to j exists if M [i; j] = i matrix M. Relatioships betwee two vertices from differet triagles are ot show i the figure. Figure shows the resultat semi-heap after applyig BUILD-SEMI-HEA. A[j] is filled with for j. Actually, itis sufficietto defiethe size ofa to be heapsize.... (e)... Figure. A step-by-step applicatio of RELACE(A; i) i the example of Figure. A step-by-step applicatio of RELACE(A; ) to the example of Figure is show i Figure, where the selected (prited) elemets are placed beside the root i a left-toright order. I this example, the fial output sequece is. Oce all elemets are prited, all etries i array A are filled with. The correctess of this result ca be easily verified through the give matrix M. Note that although the RELACE process destroys the semi-heap structure (sice the resultat tree is o loger a complete biary tree), each overlappig triagle i the correspodig biary tree still maitais oe of the four possible cofiguratios of a semi-heap as show i Figure. Therefore, it always geerates a geeralized sorted sequece for ay give semi-heap. Theorem : For ay give semi-heap, SEMI-HEA-SORT geerates a geeralized sorted sequece. roof: It suffices to show that RELACE always replaces the curret root by a elemet beate by the root. I additio, each overlappig triagle i the biary tree is still oe of the four possible cofiguratios of a triagle i a semi-heap, i.e., the root of each triagle is the maximum elemet based o i the triagle. Based o the defiitio of RELACE, the curret root is replaced by for cases ad (c) ad by for cases ad (d) of (f)

5 Figure. The replacig elemet, say, is itself replaced by a elemet i the triagle rooted at. This process cotiues iteratively dow the semi-heap. I additio, the ew root beats both of its child odes (if ay). This property esures whe a child ode is missig (i.e., the correspodig triagle cotais oly two odes), ca still be replaced by aother child ode without causig ay problem. Therefore, the root of each triagle is still the maximum elemet based o i the triagle.. arallel Geeralized Sortig Usig Semi- Heap We itroduce i this sectio a cost-optimal parallel sortig algorithm usig semi-heap i the EREW RAM model. A sortig algorithm is cost-optimal if the product of ru time ad the umber of processors is ( log ), the boud for sequetial solutios. Specifically, the pipelie techique is used to reduce the ru time of the sequetial algorithm from ( log ) to () usig (log ) processors with differet processors hadlig activities of differet levels of the heap. Because procedure BUILD-SEMI-HEA(A) takes oly (), o speed up is ecessary for this part. rocedure SEMI-HEA-SORT ca be improved by assigig oe processor to each level of the biary tree, which iitially is a semi-heap. RELACE(A; ) is pipelied level to level ad this procedure is called at every other step, because each ode is shared by two processors at adjacet levels, a passive step is iserted betwee two calls. The ru time of SEMI-HEA-SORT is reduced to () usig (log ) processors. This parallel algorithm rus o the CREW RAM model, sice two adjacet processors may access (read) vertices i two overlappig triagles of the tree. However, simultaeous accesses ca be avoided by creatig a copy of each vertex that appears i two overlappig triagles. The ehaced versio rus o the EREW RAM model. We use the etwork model to illustrate the parallel algorithm. The etwork model [] ca be viewed as a graph where each ode represets a processor, ad each directed edge ( i ; j ) represets a two-way commuicatio lik betwee processors i ad j. It is easy to covert the algorithm back to the EREW RAM model by replacig sed ad receive commads i the etwork model by read ad write commads i the EREW RAM model. Shared elemets are duplicated ad stored i local memory of adjacet processors. rocessors are coected as a liear array, where each processor commuicates with up to two adjacet processors. The level of each ode i the semi-heap is its distace to the root. Clearly, h = dlog( +)e is the maximum level ad is called the depth of the semi-heap. A liear array of h processors are used which are labeled as ; ; :::; h,. rocessor i has a copy of elemets i levels i ad i +of the semi-heap. I geeral, i is assiged with i triagles (i.e., i cosecutive elemets i array A). I the proposed parallel algorithm, each processor alterates betwee a active step ad a passive step. rocessors with eve ID s take active steps i eve steps, while with odd ID s take active steps i odd steps. That is, at a eve step, processors,,,... take the active step ad processors,,... take the passive step. The role of active ad passive amog these processors exchages i the ext step, which is a odd step. Active ad passive steps iclude the followig activities: At a active step, each processor performs local update ad seds relevat messages to two adjacet processors (if they exist). At a passive step, each processor receives messages from two adjacet processors (if they exist) ad saves them. I the implemetatio usig the etwork model, processor iitiates the sortig process ad the rest i s are activated i sequece. rocessor also geerates a termiatio sigal which is passed dow the liear array of processors oce the job is completed. To make our algorithm more geeral, some activities are ot ordered withi a step. at a active step (starts from step ):. rits root A[].. If both child odes are, A[] is replaced by, ad the, seds a termiatio sigal to ad stops. If at least oe child ode is ot, replaces A[] by oe of two child odes, A[] or A[], followig the rule i RELACE. If A[] is selected, seds id =to processor ; otherwise, id =is set. I the ext step (a passive step), receives (id; replacemet) from, ad the, performs the update A[id] :=replacemet. i, i>, i a passive step: If i receives (id; replacemet) from i+, it performs the update A[id] :=replacemet. If i receives sigal id = i from i,, it performs the followig activities i ext active step:. If both child odes are, is replaced by ; otherwise, is replaced by either or A[i +]based the replacemet rule.. Sed (i; ) to i,.. If either or A[i +]is selected to replace, the correspodig id (i or i +) is set to i+, provided i is ot the last processor (i.e., i = h, ); otherwise, the selected elemet is replaced by.

6 If i receives the termiatio sigal from i,, itforwards the termiatio sigal to the ext processor i+ (if it exists) i the ext active step, ad the, i stops. (, ) Note that i the above algorithm, although each processor is assiged a differet umber of triagles, its workload stays the same: each processor operates o at most two triagles i a passive step ad at most oe triagle i a active step. Whe a child ode exceeds the boudary of the semi-heap, it has a default value of ad o replacemet is eeded. The step-by-step illustratio of the above algorithm is show i Figure for the first three steps of Figure, where the semi-heap is represeted as a tree structure without showig the detail orietatio of each triagle. I this example, each step of Figure correspods to two steps i Figure. Replacemet activities are show usig dashed lies. Theorem : The proposed parallel implemetatio is costoptimal with a ru time of () usig (log ) processors. roof: It is clear that (log ) processors are used. Also, oe elemet is selected (prited) i every other step ad all elemets are prited i steps, ad hece, the ru time is (). Becausetheproductofrutime adtheumberof processors used matches the lower boud ( log ) for a sequetial algorithm, the proposed parallel implemetatio is cost-optimal. The proposed implemetatio ca be exteded without havig to idetify the last processor. This extesio ca be doe by addig oe extra processor h which hadles the last level of the semi-heap (this last level is also duplicated). Clearly, each child ode of ay elemet i the last level is a. Therefore, o other processor will be activated by h. Also, each processor ca termiate itself without usig a termiatio sigal origiated from. i termiates itself oce all i elemets (that it cotrols) become ; however, the bookkeepig process is more complicated tha the oe i the origial desig.. Coclusios We have proposed a data structure called semi-heap which is a geeralizatio of the traditioal heap structure. The semi-heap structure is used to solve a geeralized sortig problem. We have show that the geeralized sortig problem ca be solved optimally usig semi-heap. The solutio ca be easily exteded to a cost-optimal EREW RAM algorithm with () i ru time usig (log ) processors. A implemetatio of this parallel algorithm uder the etwork model is show, where processors are coected as a liear array. We are curretly studyig the problem of geeralized mergig, where the relatio betwee elemets does ot have the trasitive property. The result of this study will be reported i a separate paper [9]. (, ) (, ) (c) (e) (, ) (, ) (d) Figure. A step-by-step illustratio of the first three steps of Figure. Refereces [] A. Bar-Noy ad J. Naor. Sortig, miimal feedback sets, ad Hamilto paths i touramets. SIAM Joural of Discrete Mathematics., (), Feb. 99, -. [] J. A. Body ad U.S.R. Murthy. Graph Theory ad Applicatios. The Macmilla ress. 9. [] T. H. Corme, C. E. Leiserso, ad R. L. Rivest. Itroductio to Algorithms. The MIT ress. 99. []. Hell ad M. Rosefeld. The complexity of fidig geeralized paths i touramets. Joural of Algorithms. 9,, -9. [] J. JaJa. A Itroductio to arallel Algorithms. Addiso-Wesley ublishig Compay. 99. [] D. Kuth. The Art of Computer rogrammig, Vol, Sortig ad Searchig. Addiso-Wesley ublishig Compay, secod editio. 99. [] D. Soroker. Fast parallel algorithms for fidig Hamilto paths ad cycles i a touramet. Joural of Algorithms. 9, -. [] J. Wu. Distributed Systems Desig. The CRC ress [9] J. Wu ad S. Olariu. O optimal merge of two itrasitive sequeces. i preparatio. (f)

quality/quantity peak time/ratio

quality/quantity peak time/ratio 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 . Itroductio ad Motivatio. relimiaries

More information

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

Heaps. 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 information

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

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

New Results on Energy of Graphs of Small Order

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

Chapter 24. Sorting. Objectives. 1. To study and analyze time efficiency of various sorting algorithms

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

Lecture 5. Counting Sort / Radix Sort

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

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

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

Lower Bounds for Sorting

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

Data Structures Week #9. Sorting

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

On (K t e)-saturated Graphs

On (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 information

Homework 1 Solutions MA 522 Fall 2017

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

Combination Labelings Of Graphs

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

Ones Assignment Method for Solving Traveling Salesman Problem

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

Sorting in Linear Time. Data Structures and Algorithms Andrei Bulatov

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

CIS 121. Introduction to Trees

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

Elementary Educational Computer

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

why study sorting? Sorting is a classic subject in computer science. There are three reasons for studying sorting algorithms.

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

Sorting 9/15/2009. Sorting Problem. Insertion Sort: Soundness. Insertion Sort. Insertion Sort: Running Time. Insertion Sort: Soundness

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

INTERSECTION CORDIAL LABELING OF GRAPHS

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

. Written in factored form it is easy to see that the roots are 2, 2, i,

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

Counting Regions in the Plane and More 1

Counting Regions in the Plane and More 1 Coutig Regios i the Plae ad More 1 by Zvezdelia Stakova Berkeley Math Circle Itermediate I Group September 016 1. Overarchig Problem Problem 1 Regios i a Circle. The vertices of a polygos are arraged o

More information

6.854J / J Advanced Algorithms Fall 2008

6.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 information

BOOLEAN MATHEMATICS: GENERAL THEORY

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

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

A study on Interior Domination in Graphs

A study on Interior Domination in Graphs IOSR Joural of Mathematics (IOSR-JM) e-issn: 2278-5728, p-issn: 219-765X. Volume 12, Issue 2 Ver. VI (Mar. - Apr. 2016), PP 55-59 www.iosrjourals.org A study o Iterior Domiatio i Graphs A. Ato Kisley 1,

More information

Data Structures and Algorithms Part 1.4

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

COSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1

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

The isoperimetric problem on the hypercube

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

Graphs. Minimum Spanning Trees. Slides by Rose Hoberman (CMU)

Graphs. 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 information

Lecture 28: Data Link Layer

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

MAXIMUM MATCHINGS IN COMPLETE MULTIPARTITE GRAPHS

MAXIMUM MATCHINGS IN COMPLETE MULTIPARTITE GRAPHS Fura Uiversity Electroic Joural of Udergraduate Matheatics Volue 00, 1996 6-16 MAXIMUM MATCHINGS IN COMPLETE MULTIPARTITE GRAPHS DAVID SITTON Abstract. How ay edges ca there be i a axiu atchig i a coplete

More information

condition w i B i S maximum u i

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

The Magma Database file formats

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

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)

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

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

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

Design and Analysis of Algorithms Notes

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

n n B. How many subsets of C are there of cardinality n. We are selecting elements for such a

n n B. How many subsets of C are there of cardinality n. We are selecting elements for such a 4. [10] Usig a combiatorial argumet, prove that for 1: = 0 = Let A ad B be disjoit sets of cardiality each ad C = A B. How may subsets of C are there of cardiality. We are selectig elemets for such a subset

More information

Computer Science Foundation Exam. August 12, Computer Science. Section 1A. No Calculators! KEY. Solutions and Grading Criteria.

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

An Efficient Algorithm for Graph Bisection of Triangularizations

An Efficient Algorithm for Graph Bisection of Triangularizations A Efficiet Algorithm for Graph Bisectio of Triagularizatios Gerold Jäger Departmet of Computer Sciece Washigto Uiversity Campus Box 1045 Oe Brookigs Drive St. Louis, Missouri 63130-4899, USA jaegerg@cse.wustl.edu

More information

On Nonblocking Folded-Clos Networks in Computer Communication Environments

On Nonblocking Folded-Clos Networks in Computer Communication Environments O Noblockig Folded-Clos Networks i Computer Commuicatio Eviromets Xi Yua Departmet of Computer Sciece, Florida State Uiversity, Tallahassee, FL 3306 xyua@cs.fsu.edu Abstract Folded-Clos etworks, also referred

More information

Lecture 6. Lecturer: Ronitt Rubinfeld Scribes: Chen Ziv, Eliav Buchnik, Ophir Arie, Jonathan Gradstein

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

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method A ew Morphological 3D Shape Decompositio: Grayscale Iterframe Iterpolatio Method D.. Vizireau Politehica Uiversity Bucharest, Romaia ae@comm.pub.ro R. M. Udrea Politehica Uiversity Bucharest, Romaia mihea@comm.pub.ro

More information

Greedy Algorithms. Interval Scheduling. Greedy Algorithms. Interval scheduling. Greedy Algorithms. Interval Scheduling

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

Minimum Spanning Trees

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

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures

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

Thompson s Group F (p + 1) is not Minimally Almost Convex

Thompson s Group F (p + 1) is not Minimally Almost Convex Thompso s Group F (p + ) is ot Miimally Almost Covex Claire Wladis Thompso s Group F (p + ). A Descriptio of F (p + ) Thompso s group F (p + ) ca be defied as the group of piecewiseliear orietatio-preservig

More information

Recursive Procedures. How can you model the relationship between consecutive terms of a sequence?

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

Some non-existence results on Leech trees

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

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

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

c-dominating Sets for Families of Graphs

c-dominating Sets for Families of Graphs c-domiatig Sets for Families of Graphs Kelsie Syder Mathematics Uiversity of Mary Washigto April 6, 011 1 Abstract The topic of domiatio i graphs has a rich history, begiig with chess ethusiasts i the

More information

Improved Random Graph Isomorphism

Improved 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

CHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs

CHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs CHAPTER IV: GRAPH THEORY Sectio : Itroductio to Graphs Sice this class is called Number-Theoretic ad Discrete Structures, it would be a crime to oly focus o umber theory regardless how woderful those topics

More information

An Efficient Algorithm for Graph Bisection of Triangularizations

An Efficient Algorithm for Graph Bisection of Triangularizations Applied Mathematical Scieces, Vol. 1, 2007, o. 25, 1203-1215 A Efficiet Algorithm for Graph Bisectio of Triagularizatios Gerold Jäger Departmet of Computer Sciece Washigto Uiversity Campus Box 1045, Oe

More information

Counting the Number of Minimum Roman Dominating Functions of a Graph

Counting the Number of Minimum Roman Dominating Functions of a Graph Coutig the Number of Miimum Roma Domiatig Fuctios of a Graph SHI ZHENG ad KOH KHEE MENG, Natioal Uiversity of Sigapore We provide two algorithms coutig the umber of miimum Roma domiatig fuctios of a graph

More information

Priority Queues. Binary Heaps

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

Big-O Analysis. Asymptotics

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

A NOTE ON COARSE GRAINED PARALLEL INTEGER SORTING

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

1 Graph Sparsfication

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

A Comparative Study of Positive and Negative Factorials

A Comparative Study of Positive and Negative Factorials A Comparative Study of Positive ad Negative Factorials A. M. Ibrahim, A. E. Ezugwu, M. Isa Departmet of Mathematics, Ahmadu Bello Uiversity, Zaria Abstract. This paper preset a comparative study of the

More information

Properties and Embeddings of Interconnection Networks Based on the Hexcube

Properties and Embeddings of Interconnection Networks Based on the Hexcube JOURNAL OF INFORMATION PROPERTIES SCIENCE AND AND ENGINEERING EMBEDDINGS OF 16, THE 81-95 HEXCUBE (2000) 81 Short Paper Properties ad Embeddigs of Itercoectio Networks Based o the Hexcube JUNG-SING JWO,

More information

Major CSL Write your name and entry no on every sheet of the answer script. Time 2 Hrs Max Marks 70

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

Exact Minimum Lower Bound Algorithm for Traveling Salesman Problem

Exact Minimum Lower Bound Algorithm for Traveling Salesman Problem Exact Miimum Lower Boud Algorithm for Travelig Salesma Problem Mohamed Eleiche GeoTiba Systems mohamed.eleiche@gmail.com Abstract The miimum-travel-cost algorithm is a dyamic programmig algorithm to compute

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to

More information

Minimum Spanning Trees

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

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

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

Fast Fourier Transform (FFT) Algorithms

Fast Fourier Transform (FFT) Algorithms Fast Fourier Trasform FFT Algorithms Relatio to the z-trasform elsewhere, ozero, z x z X x [ ] 2 ~ elsewhere,, ~ e j x X x x π j e z z X X π 2 ~ The DFS X represets evely spaced samples of the z- trasform

More information

Computational Geometry

Computational Geometry Computatioal Geometry Chapter 4 Liear programmig Duality Smallest eclosig disk O the Ageda Liear Programmig Slides courtesy of Craig Gotsma 4. 4. Liear Programmig - Example Defie: (amout amout cosumed

More information

Fundamental Algorithms

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

Symmetric Class 0 subgraphs of complete graphs

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

Lecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions

Lecturers: 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 information

Minimum Spanning Trees. Application: Connecting a Network

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

An Improved Shuffled Frog-Leaping Algorithm for Knapsack Problem

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

On Infinite Groups that are Isomorphic to its Proper Infinite Subgroup. Jaymar Talledo Balihon. Abstract

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

IMP: Superposer Integrated Morphometrics Package Superposition Tool

IMP: Superposer Integrated Morphometrics Package Superposition Tool IMP: Superposer Itegrated Morphometrics Package Superpositio Tool Programmig by: David Lieber ( 03) Caisius College 200 Mai St. Buffalo, NY 4208 Cocept by: H. David Sheets, Dept. of Physics, Caisius College

More information

Accuracy Improvement in Camera Calibration

Accuracy Improvement in Camera Calibration Accuracy Improvemet i Camera Calibratio FaJie L Qi Zag ad Reihard Klette CITR, Computer Sciece Departmet The Uiversity of Aucklad Tamaki Campus, Aucklad, New Zealad fli006, qza001@ec.aucklad.ac.z r.klette@aucklad.ac.z

More information

Perhaps the method will give that for every e > U f() > p - 3/+e There is o o-trivial upper boud for f() ad ot eve f() < Z - e. seems to be kow, where

Perhaps the method will give that for every e > U f() > p - 3/+e There is o o-trivial upper boud for f() ad ot eve f() < Z - e. seems to be kow, where ON MAXIMUM CHORDAL SUBGRAPH * Paul Erdos Mathematical Istitute of the Hugaria Academy of Scieces ad Reu Laskar Clemso Uiversity 1. Let G() deote a udirected graph, with vertices ad V(G) deote the vertex

More information

CS 683: Advanced Design and Analysis of Algorithms

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

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

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

Alpha Individual Solutions MAΘ National Convention 2013

Alpha 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

Name of the Student: Unit I (Logic and Proofs) 1) Truth Table: Conjunction Disjunction Conditional Biconditional

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

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4

More information

Computers and Scientific Thinking

Computers and Scientific Thinking Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput

More information

Parallel Polygon Approximation Algorithm Targeted at Reconfigurable Multi-Ring Hardware

Parallel Polygon Approximation Algorithm Targeted at Reconfigurable Multi-Ring Hardware Parallel Polygo Approximatio Algorithm Targeted at Recofigurable Multi-Rig Hardware M. Arif Wai* ad Hamid R. Arabia** *Califoria State Uiversity Bakersfield, Califoria, USA **Uiversity of Georgia, Georgia,

More information

CSE 417: Algorithms and Computational Complexity

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

Load balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers *

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

Hash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.

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

ANN WHICH COVERS MLP AND RBF

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

Big-O Analysis. Asymptotics

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

Recursion. Recursion. Mathematical induction: example. Recursion. The sum of the first n odd numbers is n 2 : Informal proof: Principle:

Recursion. 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 information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 22 Database Recovery Techiques Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Recovery algorithms Recovery cocepts Write-ahead

More information

Security of Bluetooth: An overview of Bluetooth Security

Security of Bluetooth: An overview of Bluetooth Security Versio 2 Security of Bluetooth: A overview of Bluetooth Security Marjaaa Träskbäck Departmet of Electrical ad Commuicatios Egieerig mtraskba@cc.hut.fi 52655H ABSTRACT The purpose of this paper is to give

More information

Graphs. Shortest Path and Topological Sort

Graphs. Shortest Path and Topological Sort Graphs Shortest Path ad Topological Sort Example Relatioal Networks School Friedship Network (from Moody 2001) Yeast Metabolic Network (from https://www.d.edu/~etworks/cell/) Terrorist Network (by Valdis

More information

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation Improvemet of the Orthogoal Code Covolutio Capabilities Usig FPGA Implemetatio Naima Kaabouch, Member, IEEE, Apara Dhirde, Member, IEEE, Saleh Faruque, Member, IEEE Departmet of Electrical Egieerig, Uiversity

More information

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation 6-0-0 Kowledge Trasformatio from Task Scearios to View-based Desig Diagrams Nima Dezhkam Kamra Sartipi {dezhka, sartipi}@mcmaster.ca Departmet of Computig ad Software McMaster Uiversity CANADA SEKE 08

More information

EVALUATION OF TRIGONOMETRIC FUNCTIONS

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

Matrix Partitions of Split Graphs

Matrix Partitions of Split Graphs Matrix Partitios of Split Graphs Tomás Feder, Pavol Hell, Ore Shklarsky Abstract arxiv:1306.1967v2 [cs.dm] 20 Ju 2013 Matrix partitio problems geeralize a umber of atural graph partitio problems, ad have

More information

Using the Keyboard. Using the Wireless Keyboard. > Using the Keyboard

Using the Keyboard. Using the Wireless Keyboard. > Using the Keyboard 1 A wireless keyboard is supplied with your computer. The wireless keyboard uses a stadard key arragemet with additioal keys that perform specific fuctios. Usig the Wireless Keyboard Two AA alkalie batteries

More information

Mathematical Stat I: solutions of homework 1

Mathematical Stat I: solutions of homework 1 Mathematical Stat I: solutios of homework Name: Studet Id N:. Suppose we tur over cards simultaeously from two well shuffled decks of ordiary playig cards. We say we obtai a exact match o a particular

More information

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8 BAAN IVc/BaaERP A publicatio of: Baa Developmet B.V. P.O.Box 143 3770 AC Bareveld The Netherlads Prited i the Netherlads Baa Developmet B.V. 1999. All rights reserved. The iformatio i this documet is subject

More information

A Note on Chromatic Transversal Weak Domination in Graphs

A Note on Chromatic Transversal Weak Domination in Graphs Iteratioal Joural of Mathematics Treds ad Techology Volume 17 Number 2 Ja 2015 A Note o Chromatic Trasversal Weak Domiatio i Graphs S Balamuruga 1, P Selvalakshmi 2 ad A Arivalaga 1 Assistat Professor,

More information