Parallel Solutions of the Longest Increasing Subsequence Problem Using Pipelined Optical Bus Systems
|
|
- Leo Burns
- 6 years ago
- Views:
Transcription
1 Parallel Solutions of the Longest Increasing Subsequence Problem Using Pipelined Optical Bus Systems David SEME and Sidney YOULOU LaRIA, Université de Picardie Jules Verne, CURI, 5, rue du Moulin Neuf, Amiens, France, {seme, Abstract In this paper we give parallel solutions to the problem of finding the Longest Increasing Subsequence of a given sequence of n integers. First, we show the existence of a simple dynamic programming solution. Its running time is Θ(n ) and its space requirement is Θ(n). Then, we continue by showing that it is possible to develop two parallel solutions based on optical bus system of n processors, one using Θ(n) communication cycles and the other using Θ(1) communication cycle. 1 Introduction Since the last decade, lots of articles have been written about optical interconnections, they were either dealing with architectures or with algorithms. The reason of this growing success is due to the characteristics of the optical fibre. The use of an optical bus, instead of an electrical one, allows processors to have a concurrent access to the bus and so the transfer of their data can be performed in a pipeline way. Several models using an optical bus have been proposed in the literature. The most famous are: the Linear Array with Reconfigurable Pipelined Bus System (LARPBS) [1], the Array with Reconfigurable Optical Bus (AROB) [], the Pipelined Optical Bus (POB) [3], the Linear Pipelined Bus (LPB) [4] and most recently the Restricted Linear Array with Reconfigurable Pipelined Bus (R- LARPBS) [5]. There exists many other models using optical bus that we do not list here but in [6] authors proved that some models are equivalent. In any case, the main interest of all the models remains the use of the pipelined optical bus properties. In this paper, we use them in order to solve a wellknown problem of combinatorics [7, 8], the longest increasing subsequence problem (also called LIS problem for short). This problem is very interesting and a basis to solve some other problems such as the Longest Common Subsequence (LCS) or the Longest Increasing Chain (LIC) problems. There exists some parallel solutions to the LIS problem as proposed in [9] on the CGM (Coarse Grained Multicomputers) model and in [10] on a linear systolic array. In the first section, we give a description of the model and its properties. In the second section, we define the Longest Increasing Subsequence problem. Section 4 and 5 include respectively a Θ(n) cycle communication solution and a Θ(1) communication cycle solution on a linear array with an optical bus. Section 6 is dedicated to a discussion about the two solutions presented in previous sections and we finally conclude on our perspectives in section 7. The computation model In this section, we describe the model used to perform our algorithms. As we focus on the properties of an optical bus and for very high simplicity, we present a really basic model compared to all those listed below. Our approach is as architectural than algorithmical. So, we give the important details needed to know how is this model. We consider a linear array of n processors and an unidirectional optical bus. The connection between them is made by two directional couplers, one for transmitting data from the processor on the upper segment and the other for receiving data from the bus on the lower segment as shown in figure 1. The optical bus is a waveguide on which the messages circulate between processors. Several messages can circulate on the bus at the same time in a pipelined
2 way. In order to have the same propagation delays d... transmitting segment i n 1 receiving segment Figure 1: A linear array of processors with an optical bus between consecutive processors, the length of the optical fibre between those processors is the same. This condition and the directionality of the signal propagation allow the bus to carry several messages from processors at the same time. Let a bus cycle be the end-to-end propagation delay on the bus (we omit the time to process messages). During a cycle it appears essential to avoid overlapping between messages. To ensure this, all transmissions must be synchronised and the length of a message on the bus must be lower than or equal to the length of the optical fibre between two consecutive processors, called distance d on figure 1. In other words let b be the number of bits forming a message. Consider that each bit is represented by an optical signal of width w seconds for a binary value of 1 and an absence of this signal for 0, the last condition can be seen as follow: the length of optical path between any two consecutive processors is larger than or equal to bwcg where cg is the velocity of light in the waveguide []. In our algorithms we use the technique called timedivision source-oriented multiplexing (TDSM) to route messages developed in [11]. It can be used when the receiver knows the address of the sender. This method introduces a function, wait(i,j ), which controls the time the processor i needs to wait before receiving a message from a processor j. Let τ be the time for a message to traverse the optical distance d (see figure 1), a message from j to i must go from processor j to processor 0 and then from processor 0 to processor i. So, we have wait(i,j ) = (i + j)τ. This time is relative to the beginning of a bus cycle. With this method, all basic communications are allowed (one to one, broadcasting, multicasting...). Note that the distance d must be less than or equal to bwcg in order that two messages sent by two consecutive processors cannot be overlapped. 3 The longest increasing subsequence problem Let us consider a sequence L = x 1, x,..., x n of n integers. A subsequence L of L is obtained by deleting one or more of those integers. For example: L={4, 7, 8, 5, 6, 1, 9, 11}, L ={4, 7, 1, 11} is a subsequence of L. The longest increasing subsequence (LIS) problem is to find a subsequence of maximal length in which the integers are in increasing order. In the example L ={4, 5, 6, 9, 11} is a LIS of L and we notice that L ={4, 7, 8, 9, 11} is also a LIS of L. A LIS of any sequence is not necessary unique. Formally this problem is defined as follow: Let L = x 1, x,..., x n be a sequence of n distinct integers. An increasing subsequence of length l is a sequence x f(1), x f(),..., x f(l) where i, j, 1 i < j l f(i) < f(j) and x f(i) < x f(j). A longest increasing subsequence is one of maximal length. The problem seems to not be really difficult according to its definition. That was probably what thought Dijkstra s students when he asked them just to find the length of the longest increasing subsequence in a sequence of integers in July 1978 at Marktoberdorf s school. Just a few of them had been able to solve the problem. Nowadays, this exercise remains a useful didactic example for teachers of dynamic programming. In particular, it shows how to strengthen an induction hypothesis in a very explicit way. The main difficulty of this problem lies in the formulation of this induction hypothesis. Finding the longest increasing subsequence is performed in time Θ(n log n) sequentially. In [10], Crin and al. gave a solution on a systolic array of n processors that runs in time Θ(n). The main idea is to use a list to store the intermediate solutions and proceeding by successive insertions into it. To achieve this, the first processor is considered as a master processor with a different program than the others. This systolic architecture also requires four communication links between consecutive cells. In the next section, we describe a solution on a linear array with an optical bus that overcomes this by using another approach. 4 A Θ(n) communication cycles solution 4.1 Approach description The longest increasing subsequence is a sequence of integers, algorithmically, it means that it is a list. A way to create such a list is to assume that each
3 element knows its predecessor in the list. The main idea is that each integer should find its best predecessor in the list. For any integer of the initial sequence, the best predecessor is necessarily an integer with a smaller value and as a predecessor, it is obvious that it has a smaller rank in the initial sequence. Let us consider an initial sequence L = x 0, x 1,..., x n 1 and all processors, numbered from 0 to n-1, carry a unique integer of L. We will now say best predecessor to denote the processor instead of the integer it carries. So, any processor i carrying integer x i will perform an algorithm that searches, from processor 0 to processor i-1, its best predecessor. Let us formulate, now, the criteria required for any processor j (such that j < i) to be its best predecessor. Then, the definition of our induction hypothesis is: the best predecessor of processor i, carrying x i, is the processor j containing x j the last element of the longest increasing subsequence of the sequence x 0,..., x i 1 such that x j is smaller than x i. According to this formulation, it is necessary for a processor to know the length of the increasing subsequence of its predecessors. Initially, every processor is in an increasing subsequence of length 1 (composed by itself). Recursively, a processor i will increase its associated length value l i if and only if there is a processor j < i such that l j l i (l j is the associated length value of processor j) that carries a smaller integer. The processor j becomes temporally the best predecessor of processor i and the increasing length of the increasing subsequence ending by x i (on processor i) is l j + 1. After that, processor i will repeat this operation with the values of processor j + 1, and so on. On our model, every cycle, a processor finds its best predecessor. It means that at the k th cycle (k < n 1), the processor k-1 has found its best predecessor and can send its values to all its successors to allow them to finish their computation. The values sent by processor i are its value x i and its associated length l i. As you can see on Algorithm 1, the primitive send allows a processor to write a message on the bus and the primitive get is for reading a message from it. integer : id /* id of the processor integer : pred = nil /* value of the best predecessor integer: proc pred /* id of the best predecessor integer: value /* associated value of the processor integer: value received /* value received from the bus integer: length = 1 /* length of the subsequence ended by the associated value of the processor integer: length received /* length received from the bus integer: n /* number of processors integer: i BEGIN for i 0 to id do emission phase: if ((id = i) and (id n-1)) then send(value, length) receiving phase: wait(id, i) get(value received, length received) If (value < value received and length received length) then pred value received proc pred i length length received+1 endfor END Algorithm 1: A Θ(n) communication cycles solution for the LIS problem At the end of the computation, each processor has the length of the increasing sequence ending by it and the address of its predecessor in this sequence. The length is also its rank in the list. We give now a few hints for the retrieving of the longest increasing subsequence. The last element is on the processor having the biggest length value. Note that according to what is written in the previous section, this processor is not necessarily unique. In this case, we choose arbitrarily the one with the smallest associated value. When it is done, the last processor sends a message to its predecessor to alert it, hey, you re in the longest increasing subsequence, tell it to your predecessor. 4. Time complexity The time complexity on such model is defined by the number of required cycles multiplied by the local
4 time complexity of the processors. It is obvious that the number of cycles is Θ(n). The local time complexity is constant because either the emission phase or the reception phase are performed in constant time. So, the global algorithm runs in time Θ(n). 5 A Θ(1) communication cycle solution 5.1 Approach description The previous solution is simple compared to those with the same time complexity that you may find in the literature. However, one of the main advantages of the model is that several data can circulate on the bus at the same time in a pipeline way. For this solution there is only one datum on the bus per cycle. We give here another solution that takes this remark in consideration. The same approach is used but now, instead of waiting several cycles to get the best predecessor, this operation is done in only one cycle. All processors send their data on the bus at the beginning of the cycle. The data circulate on the bus in a pipeline way. The processors can read a value on the bus, perform a computation, then read the next value and so on. But some precautions are necessary to be able to do that. A processor must have enough time to perform its computation between the reading of two consecutive values on the bus. We introduce a delay h between two consecutive messages. According to the notation in section, d bw, i.e. a message on the bus is lower than or equal to the length of optical path between two consecutive processors. Now we have d bw + h. The code of this solution is done by Algorithm. 5. Time complexity The solution retrieval remains the same. The number of cycle is Θ(1) and the receiving phase is performed in time Θ(n ), so the whole algorithms runs in times Θ(n ). The space complexity is Θ(n). 6 Discussion integer : id /* id of the processor integer : pred = nil /* value of the best predecessor integer: proc pred /* id of the best predecessor integer: value /* associated value of the processor integer: value received /* value received from the bus integer: length = 1 /* length of the subsequence ended by the associated value of the processor integer: n /* number of processors struct couple value : integer length = 1 : integer end couple : tab[0..n] integer: i, j BEGIN emission phase: send(value) receiving phase: for i 0 to id do wait(id, i) get(value received) tab[i].value value received for j 0 to i do if (tab[i] > tab [j] and tab[i].length > tab[j].length) then tab[i].length tab[j].length + 1 if (i = id) then pred tab[j].value proc pred j length tab[i].length endfor endfor END Algorithm : A Θ(1) communication cycle algorithm for the LIS problem In this section, we compare the two algorithms proposed previously. First, we notice that the Θ(1) communication cycle algorithm can be used in regard of some conditions while the Θ(n) communication cycle algorithm can always be used. Let t c be the computation time of the emission
5 phase of the algorithm 1 corresponding to an elementary operation called µ. As defined in section, d is the distance between two consecutive processors. The number of elementary operations µ in the Θ(1) communication cycle algorithm is n (n 1). This algorithm can only be used if n (n 1) t c d. Because n (n 1) t c is the time needed for a message processing and d is the time between two consecutive messages. As a message is processing in the same time of the next message sending, the time complexity of the Θ(1) communication cycle algorithm is (n 1) d. This time corresponds to the communication time of a message from processor n 1 to processor n. We call T 1 this time complexity. The minimum distance d between two consecutive processors is at least equal to bw as defined in section. When we consider this minimum distance, we have T 1 = (n 1) bw. Now we consider the Θ(n) communication cycle algorithm in the same conditions, i.e. n (n 1) t c d. The time complexity of the Θ(n) communication cycle algorithm is T n = (n 1) (n d + t c ). This corresponds to the communication time (n 1) n d added to the computation time (n 1) t c. As presented in section 4, in the Θ(n) communication cycle algorithm, each processor communicates a couple of integers. Then, the minimum distance d between two consecutive processors is at least equal to bw. When we consider this minimum distance, we have T n = (n 1) (n bw + t c ). As T 1 < T n, we can conclude that the Θ(1) communication cycle algorithm is better than the Θ(n) communication cycle algorithm for n (n 1) t c d. 7 Conclusion In this paper we gave parallel solutions of the problem of finding the Longest Increasing Subsequence of a given sequence of n integers. We first showed the existence of a simple dynamic programming solution. Its running time is Θ(n ) and its space requirement is Θ(n). Then, we continued by showing that it is possible to develop two parallel solutions based on optical bus system of n processors, one using Θ(n) communication cycles and the other using Θ(1) communication cycle. Finally, we compared the two proposed algorithms and showed that the Θ(1) communication cycle algorithm can only be used if n (n 1) t c d while the Θ(n) communication cycle algorithm can always be used. Notice that the Θ(1) communication cycle algorithm is a better pipelined solution than the Θ(n) communication cycle algorithm. It will be interesting to make some experimental results in order to know which is the best solution in practice. References [1] S. Sahmi, Models and algorithms for optical and optoelectronic parallel computers, International journal of Computer Science, vol. 1, no. 3, pp , 001. [] S. Pavel and S. G. Akl, On the power of arrays with optical pipelined bus, in Proceedings of the International Conference of Parallel and Distributed Processing Techniques and Applications, (Sunnydale, California), pp , [3] S. Q. Zeng and Y. Li, Pipelined asynchronous time-division multiplexing optical bus, Optical Engineering, vol. 36, pp , [4] Y. Pan, Order statistics on a linear array with a reconfigurable bus, Future Generation Computer Systems, vol. 11, pp , [5] Y. Pan, Computing on the restricted larpbs model, Lecture Notes in Computer Science, vol. 745, pp. 9 13, 003. [6] J. L. Trahan, A. G. Bourgeois, Y. Pan, and R. Vaidyanathan, Optimally scaling permutation routing on reconfigurable arrays with optically pipelined buses, journal of parallel an distributed computing, vol. 60, no. 9, pp , 000. [7] A. Aldous and P. Diaconis, Longest increasing subsequence: From patience sorting to the baik-deif-johansen theorem, Bulletin of the American Mathematical Society, vol. 36, pp , [8] S. Bespamyatnikh and M. Seagal, Enumerating longest increasing subsequence and patience sorting, Information Processing Letters, vol. 76. [9] T. Garcia, D. Sem, and J.-F. Myoupo, A work optimal cgm algorithm for the longest increasing subsequence problem, in International Conference on Parallel and Distributed Processing Techniques and Applications, pp , 001.
6 [10] C. Crin, C. Dufourd, and J.-F. Myoupo, An efficient parallel solution for the longest increasing subsequence problem, in Fifth International Conference on Computing and Information, pp. 0 4, [11] C. Qiao and R. Melhem, Time-division communications in multiprocessor arrays, IEEE Transactions on Computers, vol. 4, no. 5, pp , 1993.
Simulating a Pipelined Reconfigurable Mesh on a Linear Array with a Reconfigurable Pipelined Bus System
Georgia State University ScholarWorks @ Georgia State University Computer Science Theses Department of Computer Science 1-12-2006 Simulating a Pipelined Reconfigurable Mesh on a Linear Array with a Reconfigurable
More informationSorting and Selection on a Linear Array with Optical Bus System
Sorting and Selection on a Linear Array with Optical Bus System Hossam ElGindy Dept. of Elec. & Compt. Eng. Uni. of Newcastle, Australia Sanguthevar Rajasekaran Dept. of CISE Univ. of Florida Abstract
More informationSorting on Linear Arrays. Xuan Guo
Sorting on Linear Arrays Xuan Guo 1 Outline Motivation & Models Sorting algorithms on linear array Sorting by Comparison Exchange Sorting by Merging Paper Reference 2 Motivation Linear array is the simplest
More informationA Two-Level Search Strategy for Packing Unequal Circles into a Circle Container
A Two-Level Search Strategy for Packing Unequal Circles into a Circle Container Wen Qi Huang 1, Yu Li 2, Bernard Jurkowiak 2, Chu Min Li 2, and Ru Chu Xu 1 1 HuaZhong Univ. of Science and Technology Wuhan
More informationSankalchand Patel College of Engineering - Visnagar Department of Computer Engineering and Information Technology. Assignment
Class: V - CE Sankalchand Patel College of Engineering - Visnagar Department of Computer Engineering and Information Technology Sub: Design and Analysis of Algorithms Analysis of Algorithm: Assignment
More informationGroup Mutual Exclusion in Token Rings
Group Mutual Exclusion in Token Rings SÉBASTIEN CANTARELL LRI/CNRS, Université de Paris-Sud, France AJOY K. DATTA Department of Computer Science, University of Nevada Las Vegas, USA FRANCK PETIT LaRIA,
More informationCS141: Intermediate Data Structures and Algorithms Dynamic Programming
CS141: Intermediate Data Structures and Algorithms Dynamic Programming Amr Magdy Programming? In this context, programming is a tabular method Other examples: Linear programing Integer programming 2 Rod
More informationRe-configurable VLIW processor for streaming data
International Workshop NGNT 97 Re-configurable VLIW processor for streaming data V. Iossifov Studiengang Technische Informatik, FB Ingenieurwissenschaften 1, FHTW Berlin. G. Megson School of Computer Science,
More informationA more efficient algorithm for perfect sorting by reversals
A more efficient algorithm for perfect sorting by reversals Sèverine Bérard 1,2, Cedric Chauve 3,4, and Christophe Paul 5 1 Département de Mathématiques et d Informatique Appliquée, INRA, Toulouse, France.
More informationAn Efficient List-Ranking Algorithm on a Reconfigurable Mesh with Shift Switching
IJCSNS International Journal of Computer Science and Network Security, VOL.7 No.6, June 2007 209 An Efficient List-Ranking Algorithm on a Reconfigurable Mesh with Shift Switching Young-Hak Kim Kumoh National
More informationCOMP Analysis of Algorithms & Data Structures
COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Lecture 7 - Jan. 17, 2018 CLRS 7.1, 7-4, 9.1, 9.3 University of Manitoba COMP 3170 - Analysis of Algorithms & Data Structures 1 / 11 QuickSelect
More informationHow invariants help writing loops Author: Sander Kooijmans Document version: 1.0
How invariants help writing loops Author: Sander Kooijmans Document version: 1.0 Why this document? Did you ever feel frustrated because of a nasty bug in your code? Did you spend hours looking at the
More informationA New Architecture for Multihop Optical Networks
A New Architecture for Multihop Optical Networks A. Jaekel 1, S. Bandyopadhyay 1 and A. Sengupta 2 1 School of Computer Science, University of Windsor Windsor, Ontario N9B 3P4 2 Dept. of Computer Science,
More informationVerifying a Border Array in Linear Time
Verifying a Border Array in Linear Time František Franěk Weilin Lu P. J. Ryan W. F. Smyth Yu Sun Lu Yang Algorithms Research Group Department of Computing & Software McMaster University Hamilton, Ontario
More informationAn Improved Upper Bound for the Sum-free Subset Constant
1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 13 (2010), Article 10.8.3 An Improved Upper Bound for the Sum-free Subset Constant Mark Lewko Department of Mathematics University of Texas at Austin
More informationBinary search trees. Binary search trees are data structures based on binary trees that support operations on dynamic sets.
COMP3600/6466 Algorithms 2018 Lecture 12 1 Binary search trees Reading: Cormen et al, Sections 12.1 to 12.3 Binary search trees are data structures based on binary trees that support operations on dynamic
More informationEfficient validation and construction of border arrays
Efficient validation and construction of border arrays Jean-Pierre Duval Thierry Lecroq Arnaud Lefebvre LITIS, University of Rouen, France, {Jean-Pierre.Duval,Thierry.Lecroq,Arnaud.Lefebvre}@univ-rouen.fr
More informationDynamic Programming Algorithms
Based on the notes for the U of Toronto course CSC 364 Dynamic Programming Algorithms The setting is as follows. We wish to find a solution to a given problem which optimizes some quantity Q of interest;
More informationTesting Isomorphism of Strongly Regular Graphs
Spectral Graph Theory Lecture 9 Testing Isomorphism of Strongly Regular Graphs Daniel A. Spielman September 26, 2018 9.1 Introduction In the last lecture we saw how to test isomorphism of graphs in which
More informationDistributed minimum spanning tree problem
Distributed minimum spanning tree problem Juho-Kustaa Kangas 24th November 2012 Abstract Given a connected weighted undirected graph, the minimum spanning tree problem asks for a spanning subtree with
More informationMidterm solutions. n f 3 (n) = 3
Introduction to Computer Science 1, SE361 DGIST April 20, 2016 Professors Min-Soo Kim and Taesup Moon Midterm solutions Midterm solutions The midterm is a 1.5 hour exam (4:30pm 6:00pm). This is a closed
More informationMulti-Cluster Interleaving on Paths and Cycles
Multi-Cluster Interleaving on Paths and Cycles Anxiao (Andrew) Jiang, Member, IEEE, Jehoshua Bruck, Fellow, IEEE Abstract Interleaving codewords is an important method not only for combatting burst-errors,
More informationA FAST LONGEST COMMON SUBSEQUENCE ALGORITHM FOR BIOSEQUENCES ALIGNMENT
A FAST LONGEST COMMON SUBSEQUENCE ALGORITHM FOR BIOSEQUENCES ALIGNMENT Wei Liu 1,*, Lin Chen 2, 3 1 Institute of Information Science and Technology, Nanjing University of Aeronautics and Astronautics,
More informationLecture 1. 1 Notation
Lecture 1 (The material on mathematical logic is covered in the textbook starting with Chapter 5; however, for the first few lectures, I will be providing some required background topics and will not be
More informationArchitecture-Dependent Tuning of the Parameterized Communication Model for Optimal Multicasting
Architecture-Dependent Tuning of the Parameterized Communication Model for Optimal Multicasting Natawut Nupairoj and Lionel M. Ni Department of Computer Science Michigan State University East Lansing,
More informationTrees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.
Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial
More informationData Communication and Parallel Computing on Twisted Hypercubes
Data Communication and Parallel Computing on Twisted Hypercubes E. Abuelrub, Department of Computer Science, Zarqa Private University, Jordan Abstract- Massively parallel distributed-memory architectures
More informationA Theory of Parallel Computation The π-calculus
A Theory of Parallel Computation The π-calculus Background DFAs, NFAs, pushdown automata, Turing machines... All are mathematical entities that model computation. These abstract systems have concrete,
More informationSearch Trees. Undirected graph Directed graph Tree Binary search tree
Search Trees Undirected graph Directed graph Tree Binary search tree 1 Binary Search Tree Binary search key property: Let x be a node in a binary search tree. If y is a node in the left subtree of x, then
More informationCache-Oblivious Traversals of an Array s Pairs
Cache-Oblivious Traversals of an Array s Pairs Tobias Johnson May 7, 2007 Abstract Cache-obliviousness is a concept first introduced by Frigo et al. in [1]. We follow their model and develop a cache-oblivious
More informationDynamic Programming. Design and Analysis of Algorithms. Entwurf und Analyse von Algorithmen. Irene Parada. Design and Analysis of Algorithms
Entwurf und Analyse von Algorithmen Dynamic Programming Overview Introduction Example 1 When and how to apply this method Example 2 Final remarks Introduction: when recursion is inefficient Example: Calculation
More informationAXIOMS FOR THE INTEGERS
AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,
More informationProblem Set 5 Due: Friday, November 2
CS231 Algorithms Handout # 19 Prof. Lyn Turbak October 26, 2001 Wellesley College Problem Set 5 Due: Friday, November 2 Important: On Friday, Nov. 2, you will receive a take-home midterm exam that is due
More informationCSC236 Week 5. Larry Zhang
CSC236 Week 5 Larry Zhang 1 Logistics Test 1 after lecture Location : IB110 (Last names A-S), IB 150 (Last names T-Z) Length of test: 50 minutes If you do really well... 2 Recap We learned two types of
More informationData Structure and Algorithm Midterm Reference Solution TA
Data Structure and Algorithm Midterm Reference Solution TA email: dsa1@csie.ntu.edu.tw Problem 1. To prove log 2 n! = Θ(n log n), it suffices to show N N, c 1, c 2 > 0 such that c 1 n ln n ln n! c 2 n
More informationFundamental mathematical techniques reviewed: Mathematical induction Recursion. Typically taught in courses such as Calculus and Discrete Mathematics.
Fundamental mathematical techniques reviewed: Mathematical induction Recursion Typically taught in courses such as Calculus and Discrete Mathematics. Techniques introduced: Divide-and-Conquer Algorithms
More informationHow many leaves on the decision tree? There are n! leaves, because every permutation appears at least once.
Chapter 8. Sorting in Linear Time Types of Sort Algorithms The only operation that may be used to gain order information about a sequence is comparison of pairs of elements. Quick Sort -- comparison-based
More informationWe will give examples for each of the following commonly used algorithm design techniques:
Review This set of notes provides a quick review about what should have been learned in the prerequisite courses. The review is helpful to those who have come from a different background; or to those who
More informationParallel Evaluation of Hopfield Neural Networks
Parallel Evaluation of Hopfield Neural Networks Antoine Eiche, Daniel Chillet, Sebastien Pillement and Olivier Sentieys University of Rennes I / IRISA / INRIA 6 rue de Kerampont, BP 818 2232 LANNION,FRANCE
More informationPerformance of Multihop Communications Using Logical Topologies on Optical Torus Networks
Performance of Multihop Communications Using Logical Topologies on Optical Torus Networks X. Yuan, R. Melhem and R. Gupta Department of Computer Science University of Pittsburgh Pittsburgh, PA 156 fxyuan,
More informationMOST attention in the literature of network codes has
3862 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 8, AUGUST 2010 Efficient Network Code Design for Cyclic Networks Elona Erez, Member, IEEE, and Meir Feder, Fellow, IEEE Abstract This paper introduces
More information2.3.4 Optimal paths in directed acyclic graphs
.3.4 Optimal paths in directed acyclic graphs Definition: A directed graph G = (N, A) is acyclic if it contains no circuits. A directed acyclic graph is referred to as DAG. circuit Problem Given a directed
More informationSHARED MEMORY VS DISTRIBUTED MEMORY
OVERVIEW Important Processor Organizations 3 SHARED MEMORY VS DISTRIBUTED MEMORY Classical parallel algorithms were discussed using the shared memory paradigm. In shared memory parallel platform processors
More informationScheduling with Bus Access Optimization for Distributed Embedded Systems
472 IEEE TRANSACTIONS ON VERY LARGE SCALE INTEGRATION (VLSI) SYSTEMS, VOL. 8, NO. 5, OCTOBER 2000 Scheduling with Bus Access Optimization for Distributed Embedded Systems Petru Eles, Member, IEEE, Alex
More informationAn Algorithm for k-pairwise Cluster-fault-tolerant Disjoint Paths in a Burnt Pancake Graph
2015 International Conference on Computational Science and Computational Intelligence An Algorithm for k-pairwise Cluster-fault-tolerant Disjoint Paths in a Burnt Pancake Graph Masato Tokuda, Yuki Hirai,
More informationMATH Iris Loeb.
MATH 134 http://www.math.canterbury.ac.nz/math134/09/su1/c Iris Loeb I.Loeb@math.canterbury.ac.nz Office Hours: Thur 10.00-11.00, Room 703 (MSCS Building) The Limits of Formal Logic We now turn our attention
More informationUnavoidable Constraints and Collision Avoidance Techniques in Performance Evaluation of Asynchronous Transmission WDMA Protocols
1th WEA International Conference on COMMUICATIO, Heraklion, reece, July 3-5, 8 Unavoidable Constraints and Collision Avoidance Techniques in Performance Evaluation of Asynchronous Transmission WDMA Protocols
More informationStudent number: Datenstrukturen & Algorithmen page 1
Student number: Datenstrukturen & Algorithmen page 1 Problem 1. / 16 P Instructions: 1) In this problem, you have to provide solutions only. You can write them right on this sheet. 2) You may use the notation,
More informationRealizing Common Communication Patterns in Partitioned Optical Passive Stars (POPS) Networks
998 IEEE TRANSACTIONS ON COMPUTERS, VOL. 47, NO. 9, SEPTEMBER 998 Realizing Common Communication Patterns in Partitioned Optical Passive Stars (POPS) Networks Greg Gravenstreter and Rami G. Melhem, Senior
More informationOperations on Heap Tree The major operations required to be performed on a heap tree are Insertion, Deletion, and Merging.
Priority Queue, Heap and Heap Sort In this time, we will study Priority queue, heap and heap sort. Heap is a data structure, which permits one to insert elements into a set and also to find the largest
More informationParallel algorithms for generating combinatorial objects on linear processor arrays with reconfigurable bus systems*
SOdhan& Vol. 22. Part 5, October 1997, pp. 62%636. Printed ill India. Parallel algorithms for generating combinatorial objects on linear processor arrays with reconfigurable bus systems* P THANGAVEL Department
More informationAlgorithms IV. Dynamic Programming. Guoqiang Li. School of Software, Shanghai Jiao Tong University
Algorithms IV Dynamic Programming Guoqiang Li School of Software, Shanghai Jiao Tong University Dynamic Programming Shortest Paths in Dags, Revisited Shortest Paths in Dags, Revisited The special distinguishing
More informationBinary search trees 3. Binary search trees. Binary search trees 2. Reading: Cormen et al, Sections 12.1 to 12.3
Binary search trees Reading: Cormen et al, Sections 12.1 to 12.3 Binary search trees 3 Binary search trees are data structures based on binary trees that support operations on dynamic sets. Each element
More informationSTRAIGHT LINE ORTHOGONAL DRAWINGS OF COMPLETE TERNERY TREES SPUR FINAL PAPER, SUMMER July 29, 2015
STRIGHT LINE ORTHOGONL DRWINGS OF COMPLETE TERNERY TREES SPUR FINL PPER, SUMMER 2015 SR LI MENTOR: SYLVIN CRPENTIER PROJECT SUGGESTED Y LRRY GUTH July 29, 2015 bstract. In this paper we study embeddings
More informationCPSC 320: Intermediate Algorithm Design and Analysis. Tutorial: Week 3
CPSC 320: Intermediate Algorithm Design and Analysis Author: Susanne Bradley Tutorial: Week 3 At the time of this week s tutorial, we were approaching the end of our stable matching unit and about to start
More information6.001 Notes: Section 4.1
6.001 Notes: Section 4.1 Slide 4.1.1 In this lecture, we are going to take a careful look at the kinds of procedures we can build. We will first go back to look very carefully at the substitution model,
More informationAlgorithm Analysis. (Algorithm Analysis ) Data Structures and Programming Spring / 48
Algorithm Analysis (Algorithm Analysis ) Data Structures and Programming Spring 2018 1 / 48 What is an Algorithm? An algorithm is a clearly specified set of instructions to be followed to solve a problem
More informationCS 6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK
CS 6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK Page 1 UNIT I INTRODUCTION 2 marks 1. Why is the need of studying algorithms? From a practical standpoint, a standard set of algorithms from different
More informationLower Bound on Comparison-based Sorting
Lower Bound on Comparison-based Sorting Different sorting algorithms may have different time complexity, how to know whether the running time of an algorithm is best possible? We know of several sorting
More informationModels and Algorithms for Optical and Optoelectronic Parallel Computers
Models and Algorithms for Optical and Optoelectronic Parallel Computers artaj ahni Dept. of Computer and Information cience and ngineering University of Florida Gainesville, FL 32611, UA sahni@cise.ufl.edu
More informationProblem with Scanning an Infix Expression
Operator Notation Consider the infix expression (X Y) + (W U), with parentheses added to make the evaluation order perfectly obvious. This is an arithmetic expression written in standard form, called infix
More informationDynamic Programming Algorithms
CSC 364S Notes University of Toronto, Fall 2003 Dynamic Programming Algorithms The setting is as follows. We wish to find a solution to a given problem which optimizes some quantity Q of interest; for
More informationCSc 225 Algorithms and Data Structures I Case Studies
CSc 225 Algorithms and Data Structures I Case Studies Jianping Pan Fall 2007 9/12/07 CSc 225 1 Things we have so far Algorithm analysis pseudo code primitive operations worst-case scenarios Asymptotic
More informationScribe: Virginia Williams, Sam Kim (2016), Mary Wootters (2017) Date: May 22, 2017
CS6 Lecture 4 Greedy Algorithms Scribe: Virginia Williams, Sam Kim (26), Mary Wootters (27) Date: May 22, 27 Greedy Algorithms Suppose we want to solve a problem, and we re able to come up with some recursive
More informationSelection (deterministic & randomized): finding the median in linear time
Lecture 4 Selection (deterministic & randomized): finding the median in linear time 4.1 Overview Given an unsorted array, how quickly can one find the median element? Can one do it more quickly than bysorting?
More information: Parallel Algorithms Exercises, Batch 1. Exercise Day, Tuesday 18.11, 10:00. Hand-in before or at Exercise Day
184.727: Parallel Algorithms Exercises, Batch 1. Exercise Day, Tuesday 18.11, 10:00. Hand-in before or at Exercise Day Jesper Larsson Träff, Francesco Versaci Parallel Computing Group TU Wien October 16,
More informationMathematics and Symmetry: A Bridge to Understanding
Mathematics and Symmetry: A Bridge to Understanding Gail Kaplan Department of Mathematics Towson University Towson, Maryland 5, USA gkaplan@towson.edu Abstract This paper describes how to teach group theory
More informationLecture 10. Sequence alignments
Lecture 10 Sequence alignments Alignment algorithms: Overview Given a scoring system, we need to have an algorithm for finding an optimal alignment for a pair of sequences. We want to maximize the score
More informationOPTIMAL MULTI-CHANNEL ASSIGNMENTS IN VEHICULAR AD-HOC NETWORKS
Chapter 2 OPTIMAL MULTI-CHANNEL ASSIGNMENTS IN VEHICULAR AD-HOC NETWORKS Hanan Luss and Wai Chen Telcordia Technologies, Piscataway, New Jersey 08854 hluss@telcordia.com, wchen@research.telcordia.com Abstract:
More informationHOMEWORK 1: Solutions
HOMEWORK 1: Solutions October 30, 2012 Don't regard these as the unique way to solve the problems in the homework. 1 Double counting applied to permutation identities In the seminar we saw that one could
More informationLecture 5: Formation Tree and Parsing Algorithm
Discrete Mathematics (II) Spring 2012 Lecture 5: Formation Tree and Parsing Algorithm Lecturer: Yi Li 1 Overview In this lecture, we completely focus on syntax of proposition. And the term proposition
More informationVirtual Topologies for Multicasting with Multiple Originators in WDM Networks
Virtual Topologies for Multicasting with Multiple Originators in WDM Networks Ian Ferrel Adrian Mettler Edward Miller Ran Libeskind-Hadas Department of Computer Science Harvey Mudd College Claremont, California
More information1 Non greedy algorithms (which we should have covered
1 Non greedy algorithms (which we should have covered earlier) 1.1 Floyd Warshall algorithm This algorithm solves the all-pairs shortest paths problem, which is a problem where we want to find the shortest
More information1 More on the Bellman-Ford Algorithm
CS161 Lecture 12 Shortest Path and Dynamic Programming Algorithms Scribe by: Eric Huang (2015), Anthony Kim (2016), M. Wootters (2017) Date: May 15, 2017 1 More on the Bellman-Ford Algorithm We didn t
More informationNode-Disjoint Paths in Hierarchical Hypercube Networks
Node-Disjoint aths in Hierarchical Hypercube Networks Ruei-Yu Wu 1,GerardJ.Chang 2,Gen-HueyChen 1 1 National Taiwan University 2 National Taiwan University Dept. of Computer Science and Information Engineering
More informationNotes on Turing s Theorem and Computability
Notes on Turing s Theorem and Computability Walter Neumann About 60 years ago there was a revolution in mathematics and philosophy. First Gödel and then Turing showed that there are impossible problems
More informationAn Optimal Parallel Algorithm for Merging using Multiselection
An Optimal Parallel Algorithm for Merging using Multiselection Narsingh Deo Amit Jain Muralidhar Medidi Department of Computer Science, University of Central Florida, Orlando, FL 32816 Keywords: selection,
More informationExploring Multiple Paths using Link Utilization in Computer Networks
7 Exploring Multiple Paths using Link Utilization in Computer Networks 1 Shalini Aggarwal, 2 Shuchita Upadhyaya 1 Teacher Fellow, Department of Computer Science & Applications, Kurukshetra University Kurukshetra,
More informationLecture 2: Getting Started
Lecture 2: Getting Started Insertion Sort Our first algorithm is Insertion Sort Solves the sorting problem Input: A sequence of n numbers a 1, a 2,..., a n. Output: A permutation (reordering) a 1, a 2,...,
More information1 Definition of Reduction
1 Definition of Reduction Problem A is reducible, or more technically Turing reducible, to problem B, denoted A B if there a main program M to solve problem A that lacks only a procedure to solve problem
More information1 i n (p i + r n i ) (Note that by allowing i to be n, we handle the case where the rod is not cut at all.)
Dynamic programming is a problem solving method that is applicable to many different types of problems. I think it is best learned by example, so we will mostly do examples today. 1 Rod cutting Suppose
More informationOn the interconnection of message passing systems
Information Processing Letters 105 (2008) 249 254 www.elsevier.com/locate/ipl On the interconnection of message passing systems A. Álvarez a,s.arévalo b, V. Cholvi c,, A. Fernández b,e.jiménez a a Polytechnic
More informationLEARNING OF GEOMETRY SUPPORTED BY THE PROGRAM CABRI
LEARNING OF GEOMETRY SUPPORTED BY THE PROGRAM CABRI Jaroslav Seibert, Pavel Trojovský ABSTRACT Programs for computers have been developed many years with the aim to help teacher of mathematics to make
More informationCS 350 Final Algorithms and Complexity. It is recommended that you read through the exam before you begin. Answer all questions in the space provided.
It is recommended that you read through the exam before you begin. Answer all questions in the space provided. Name: Answer whether the following statements are true or false and briefly explain your answer
More informationOutline. Introduction. 2 Proof of Correctness. 3 Final Notes. Precondition P 1 : Inputs include
Outline Computer Science 331 Correctness of Algorithms Mike Jacobson Department of Computer Science University of Calgary Lectures #2-4 1 What is a? Applications 2 Recursive Algorithms 3 Final Notes Additional
More informationCS2110 Assignment 2 Lists, Induction, Recursion and Parsing, Summer
CS2110 Assignment 2 Lists, Induction, Recursion and Parsing, Summer 2008 Due Thursday July 3, 2008, 6:00PM 0 General Instructions 0.1 Purpose This assignment will help you solidify your knowledge of Java
More informationJob Re-Packing for Enhancing the Performance of Gang Scheduling
Job Re-Packing for Enhancing the Performance of Gang Scheduling B. B. Zhou 1, R. P. Brent 2, C. W. Johnson 3, and D. Walsh 3 1 Computer Sciences Laboratory, Australian National University, Canberra, ACT
More informationHashing. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong
Department of Computer Science and Engineering Chinese University of Hong Kong In this lecture, we will revisit the dictionary search problem, where we want to locate an integer v in a set of size n or
More informationState-Optimal Snap-Stabilizing PIF In Tree Networks
State-Optimal Snap-Stabilizing PIF In Tree Networks (Extended Abstract) Alain Bui, 1 Ajoy K. Datta, 2 Franck Petit, 1 Vincent Villain 1 1 LaRIA, Université de Picardie Jules Verne, France 2 Department
More informationLecture 7: Primitive Recursion is Turing Computable. Michael Beeson
Lecture 7: Primitive Recursion is Turing Computable Michael Beeson Closure under composition Let f and g be Turing computable. Let h(x) = f(g(x)). Then h is Turing computable. Similarly if h(x) = f(g 1
More informationMergeSort, Recurrences, Asymptotic Analysis Scribe: Michael P. Kim Date: September 28, 2016 Edited by Ofir Geri
CS161, Lecture 2 MergeSort, Recurrences, Asymptotic Analysis Scribe: Michael P. Kim Date: September 28, 2016 Edited by Ofir Geri 1 Introduction Today, we will introduce a fundamental algorithm design paradigm,
More informationNumber Systems Using and Converting Between Decimal, Binary, Octal and Hexadecimal Number Systems
Number Systems Using and Converting Between Decimal, Binary, Octal and Hexadecimal Number Systems In everyday life, we humans most often count using decimal or base-10 numbers. In computer science, it
More informationDATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND ALGORITHMS For COMPUTER SCIENCE DATA STRUCTURES &. ALGORITHMS SYLLABUS Programming and Data Structures: Programming in C. Recursion. Arrays, stacks, queues, linked lists, trees, binary
More informationComputer Science 236 Fall Nov. 11, 2010
Computer Science 26 Fall Nov 11, 2010 St George Campus University of Toronto Assignment Due Date: 2nd December, 2010 1 (10 marks) Assume that you are given a file of arbitrary length that contains student
More informationLecture 9 March 4, 2010
6.851: Advanced Data Structures Spring 010 Dr. André Schulz Lecture 9 March 4, 010 1 Overview Last lecture we defined the Least Common Ancestor (LCA) and Range Min Query (RMQ) problems. Recall that an
More informationDigital Halftoning Algorithm Based o Space-Filling Curve
JAIST Reposi https://dspace.j Title Digital Halftoning Algorithm Based o Space-Filling Curve Author(s)ASANO, Tetsuo Citation IEICE TRANSACTIONS on Fundamentals o Electronics, Communications and Comp Sciences,
More informationCS2 Algorithms and Data Structures Note 1
CS2 Algorithms and Data Structures Note 1 Analysing Algorithms This thread of the course is concerned with the design and analysis of good algorithms and data structures. Intuitively speaking, an algorithm
More informationVERTEX MAPS FOR TREES: ALGEBRA AND PERIODS OF PERIODIC ORBITS. Chris Bernhardt
VERTEX MAPS FOR TREES: ALGEBRA AND PERIODS OF PERIODIC ORBITS CHRIS BERNHARDT Abstract. Let T be a tree with n vertices. Let f : T T be continuous and suppose that the n vertices form a periodic orbit
More informationMATH10001 Mathematical Workshop. Graphs, Trees and Algorithms Part 2. Trees. From Trees to Prüfer Codes
MATH10001 Mathematical Workshop Graphs, Trees and Algorithms Part 2 Trees Recall that a simple graph is one without loops or multiple edges. We are interested in a special type of simple graph: A tree
More informationContents. Preface xvii Acknowledgments. CHAPTER 1 Introduction to Parallel Computing 1. CHAPTER 2 Parallel Programming Platforms 11
Preface xvii Acknowledgments xix CHAPTER 1 Introduction to Parallel Computing 1 1.1 Motivating Parallelism 2 1.1.1 The Computational Power Argument from Transistors to FLOPS 2 1.1.2 The Memory/Disk Speed
More information