A Parallel Branch-And-Bound Approach to the Rectangular Guillotine Strip Cutting Problem

Total Page:16

File Type:pdf, Size:1020Kb

A Parallel Branch-And-Bound Approach to the Rectangular Guillotine Strip Cutting Problem Published online ahead of print July 2, 2010 INFORMS Journal on Computing informs ® Articles in Advance, pp. 1–11 issn 1091-9856 eissn 1526-5528 doi 10.1287/ijoc.1100.0394 © 2010 INFORMS A Parallel Branch-and-Bound Approach to the Rectangular Guillotine Strip Cutting Problem Sławomir Bak,˛ Jacek Bła˙zewicz,Grzegorz Pawlak, Maciej Płaza Institute of Computing Science, Pozna´nUniversity of Technology, 60-965 Pozna´n,Poland {[email protected], [email protected], [email protected], [email protected]} Edmund K. Burke, Graham Kendall School of Computer Science, University of Nottingham, Nottingham NG8 1BB, United Kingdom {[email protected], [email protected]} his paper presents a parallel branch-and-bound method to address the two-dimensional rectangular guil- Tlotine strip cutting problem. Our paper focuses on a parallel branching schema. We present a series of computational experiments to evaluate the strength of the approach. Optimal solutions have been found for some benchmark instances that had unknown solutions until now. For many other instances, we demonstrate that the proposed approach is time effective. The efficiency of the parallel version of the algorithm is compared and the speedup, when increasing the number of processors, is clearly demonstrated with an upper bound calculated by a specialised heuristic procedure. Key words: production scheduling; cutting stock; material handling; parallel branch-and-bound method; analysis of algorithms History: Accepted by Michel Gendreau, former Area Editor for Heuristic Search and Learning; received November 2007; revised August 2008, May 2009, January 2010; accepted February 2010. Published online in Articles in Advance. version, which is made available to institutional subscribers. The file may 1. Introduction complexity of the problem is increased by different The cutting and packing family of problems affects constraints within various manufacturing industries, several different industries and motivates many areas including paper, wood, glass, and metal cutting. For of research. Research going back at least 50 years has example, paper cutting is generally concerned with led to the development of many models and math- guillotine cutting (where only vertical or horizontal ematical tools. The diversity of this type of prob- straight cuts, across the entire sheet, are allowed) of Articles in Advance lem has made it necessary to introduce a consistent rectangular items from a stock roll of fixed width, typology that was proposed by Dyckhoff (1990) and whereas applications in metal and shipbuilding are further developed by Wäscher et al. (2007). The earli- often concerned with the cutting of irregular shapes est work in this area was conducted by Gilmore and from a stock sheet (see, for example, Bła˙zewiczet al. Gomory (1961), where they solved one-dimensional 1993). Despite their industrial relevance, irregular cut- problems to optimality using linear programming. An ting problems have not been widely researched, but example of a one-dimensional problem is the divi- the area has gained popularity in recent years (see, for sion of steel bars or rods into smaller lengths for example, Bennell and Oliveira 2006). In some applica- fabrication or resale. However, only small problem tions the pieces cannot be rotated—for instance, cut- instances could be solved in reasonable time. Gilmore ting pieces from wooden boards that have to take the and Gomory (1966) characterised knapsack functions wood grain into account—but in other applications, and used them to develop more efficient methods. such as cutting pieces from steel sheets, rotation is INFORMS holds copyright to this Generalisations of these methods were also applied to often allowed. two-dimensional problems. The two-dimensional cutting stock problem is a Two-dimensional problems can be modelled as a generalisation of the one-dimensional knapsack prob- set of pieces that must be arranged on a predefined lem. In two dimensions, a large stock rectangle S of dimensions L × W and n types of smaller rectangular Copyright: not be posted on any other website, including the author’s site. Pleasestock send any questions regarding this policy to [email protected]. sheet so that each piece does not overlap with another, and of course, each piece must fit within the pieces are presented. Each smaller piece has an asso- bounds of the sheet. The main objective is to maximise ciated profit. The problem is to cut from S a set of space utilisation and therefore minimise wastage. The small rectangles so that the overall profit is maximised. 1 Bak˛ et al.: A Parallel Branch-and-Bound Approach to the Rectangular Guillotine Strip Cutting Problem 2 INFORMS Journal on Computing, Articles in Advance, pp. 1–11, © 2010 INFORMS This problem can be classified as 2/B/O/M accord- routine (called the “difference process algorithm”), ing to Dyckhoff’s typology (Dyckhoff 1990) and as which can access enclosed areas in the partial layout. a two-dimensional placement problem in Wäscher’s Every insertion of a new item in the layout creates typology (Wäscher et al. 2007). A variety of solution two empty rectangular spaces. The algorithm keeps methods, both exact and approximate, have been pre- track of the newly generated spaces, selecting the one sented and discussed over the years. Gilmore and that is closest to the bottom-left corner of the object Gomory (1966) proposed a recursive exact algorithm and that is sufficiently large for the allocation of the based on dynamic programming to solve the uncon- next rectangle. This method outperforms the algo- strained guillotine version. Wang (1983) proposed a rithms of Jakobs (1996) and Liu and Teng (1999). Dagli bottom-up approach that generates all of the feasible and Poshyanonda (1997) used a placement method cutting patterns by horizontally or vertically combin- that is based on a sliding technique combined with an ing two patterns that may be constructed from two artificial neural network. During the packing process, other patterns. Viswanathan and Bagchi (1993) used a the generated scrap areas are recorded. The neural net- bottom-up approach, together with the Gilmore and work selects the best match between the item and the Gomory procedure, to develop a best-first branch- empty areas. and-bound algorithm for the constrained version of Genetic algorithms have also been considered the problem. Hifi (1997) improved their algorithm by for guillotineable packing problems. Kröger (1995) exploiting dynamic programming properties. proposed a slicing tree representation. A guillotine Another well-studied cutting and packing problem, constraint is directly reflected by the encoding mech- proposed by Baker et al. (1980), is the strip packing anism. The rectangles are stored in the leaf nodes. problem. In strip packing, we have to pack (or cut) a The nodes are connected by the use of one of two set of small rectangular pieces of different sizes into a operators indicating a horizontal or a vertical combi- single rectangle (strip) of fixed width W . The length L nation. The tree is represented by a string over the is unlimited. The objective is to minimise the length to alphabet 1 2 3nhv, where h and v repre- sent a horizontal and vertical combination, respec- which the strip is filled. The problem has been shown tively. The string has the length of 2n − 1, where n to be NP-hard in Hochbaum and Maass (1985) and is the number of rectangles to be packed. A special Leung et al. (1990). There have been many different crossover operator was used with only subtrees with approaches for producing solutions for the strip pack- version, which is made available to institutional subscribers. The file may a certain structure able to be inherited. The size of ing problem. It should be noted that to deal with large- each subtree should include at most four rectangles. scale problems, most of these approaches are heuristic After crossover, the insertion of single rectangles that in nature (Burke et al. 2004, Hopper and Turton 2001, are missing from the complete set is carried out. Muta- Lodi et al. 2002). tion is carried out by the application of an operator, Several papers have approached the nonguillotine- randomly chosen from a set of five, to a randomly able strip packing problem with genetic algorithms selected substring. A hill-climbing strategy is applied in combination with heuristic placement routines. to improve the fitness of a recently mutated or recom- Articles in Advance In this two-stage approach, a genetic algorithm is bined string. Kröger also proposes the concept of used to determine the sequence in which items are metarectangles. Each metarectangle describes a group to be packed. A second algorithm is then utilised, of densely packed rectangles that are subsequently which decides how this sequence is allocated onto treated as one large rectangle, thus reducing the prob- the strip. One of the first researchers to implement lem complexity. Kröger empirically demonstrated that this approach is Smith (1985). Jakobs (1996) used the solution produced by the genetic algorithm was a bottom-left heuristic to hybridise an order-based superior to other approaches such as random search genetic algorithm. To reduce computational complex- or simulated annealing. ity, the heuristic does not necessarily search for the Hwang et al. (1994) proposed two methods for solv- lowest available position in the layout but preserves ing the strip packing problem. One approach is based bottom-left stability. Liu and Teng (1999) improved on a directed binary tree that combines two rectangles the bottom-left (BL) routine by using a sliding princi- into a larger one by either placing them horizontally ple and giving priority to the downward movement or vertically next to each other. The second approach is INFORMS holds copyright to this of the rectangle. Hopper and Turton (1999, 2000) also order based and applies a level-oriented packing pro- developed a BL algorithm that can access enclosed cedure, where a level is defined as a horizontal line areas in the partial layout and places the new item in drawn through the top of the tallest rectangle on the the first BL position with sufficient area.
Recommended publications
  • Graph Traversals
    Graph Traversals CS200 - Graphs 1 Tree traversal reminder Pre order A A B D G H C E F I In order B C G D H B A E C F I Post order D E F G H D B E I F C A Level order G H I A B C D E F G H I Connected Components n The connected component of a node s is the largest set of nodes reachable from s. A generic algorithm for creating connected component(s): R = {s} while ∃edge(u, v) : u ∈ R∧v ∉ R add v to R n Upon termination, R is the connected component containing s. q Breadth First Search (BFS): explore in order of distance from s. q Depth First Search (DFS): explores edges from the most recently discovered node; backtracks when reaching a dead- end. 3 Graph Traversals – Depth First Search n Depth First Search starting at u DFS(u): mark u as visited and add u to R for each edge (u,v) : if v is not marked visited : DFS(v) CS200 - Graphs 4 Depth First Search A B C D E F G H I J K L M N O P CS200 - Graphs 5 Question n What determines the order in which DFS visits nodes? n The order in which a node picks its outgoing edges CS200 - Graphs 6 DepthGraph Traversalfirst search algorithm Depth First Search (DFS) dfs(in v:Vertex) mark v as visited for (each unvisited vertex u adjacent to v) dfs(u) n Need to track visited nodes n Order of visiting nodes is not completely specified q if nodes have priority, then the order may become deterministic for (each unvisited vertex u adjacent to v in priority order) n DFS applies to both directed and undirected graphs n Which graph implementation is suitable? CS200 - Graphs 7 Iterative DFS: explicit Stack dfs(in v:Vertex) s – stack for keeping track of active vertices s.push(v) mark v as visited while (!s.isEmpty()) { if (no unvisited vertices adjacent to the vertex on top of the stack) { s.pop() //backtrack else { select unvisited vertex u adjacent to vertex on top of the stack s.push(u) mark u as visited } } CS200 - Graphs 8 Breadth First Search (BFS) n Is like level order in trees A B C D n Which is a BFS traversal starting E F G H from A? A.
    [Show full text]
  • Lecture12: Trees II Tree Traversal Preorder Traversal Preorder Traversal
    Tree Traversal • Process of visiting nodes in a tree systematically CSED233: Data Structures (2013F) . Some algorithms need to visit all nodes in a tree. Example: printing, counting nodes, etc. Lecture12: Trees II • Implementation . Can be done easily by recursion Computers”R”Us . Order of visits does matter. Bohyung Han Sales Manufacturing R&D CSE, POSTECH [email protected] US International Laptops Desktops Europe Asia Canada CSED233: Data Structures 2 by Prof. Bohyung Han, Fall 2013 Preorder Traversal Preorder Traversal • A preorder traversal of the subtree rooted at node n: . Visit node n (process the node's data). 1 . Recursively perform a preorder traversal of the left child. Recursively perform a preorder traversal of the right child. 2 7 • A preorder traversal starts at the root. public void preOrderTraversal(Node n) 3 6 8 12 { if (n == null) return; 4 5 9 System.out.print(n.value+" "); preOrderTraversal(n.left); preOrderTraversal(n.right); 10 11 } CSED233: Data Structures CSED233: Data Structures 3 by Prof. Bohyung Han, Fall 2013 4 by Prof. Bohyung Han, Fall 2013 Inorder Traversal Inorder Traversal • A preorder traversal of the subtree rooted at node n: . Recursively perform a preorder traversal of the left child. 6 . Visit node n (process the node's data). Recursively perform a preorder traversal of the right child. 4 11 • An iorder traversal starts at the root. public void inOrderTraversal(Node n) 2 5 7 12 { if (n == null) return; 1 3 9 inOrderTraversal(n.left); System.out.print(n.value+" "); inOrderTraversal(n.right); } 8 10 CSED233: Data Structures CSED233: Data Structures 5 by Prof.
    [Show full text]
  • Efficient Stackless Hierarchy Traversal on Gpus with Backtracking in Constant Time
    High Performance Graphics (2016) Ulf Assarsson and Warren Hunt (Editors) Efficient Stackless Hierarchy Traversal on GPUs with Backtracking in Constant Time Nikolaus Binder† and Alexander Keller‡ NVIDIA Corporation 1 1 1 2 3 2 3 2 3 4 5 6 7 4 5 6 7 4 5 6 7 10 11 10 11 10 11 22 23 22 23 22 23 a) b) c) 44 45 44 45 44 45 Figure 1: Backtracking from the current node with key 22 to the next node with key 3, which has been postponed most recently, by a) iterating along parent and sibling references, b) using references to uncle and grand uncle, c) using a stack, or as we propose, a perfect hash directly mapping the key for the next node to its address without using a stack. The heat maps visualize the reduction in the number of backtracking steps. Abstract The fastest acceleration schemes for ray tracing rely on traversing a bounding volume hierarchy (BVH) for efficient culling and use backtracking, which in the worst case may expose cost proportional to the depth of the hierarchy in either time or state memory. We show that the next node in such a traversal actually can be determined in constant time and state memory. In fact, our newly proposed parallel software implementation requires only a few modifications of existing traversal methods and outperforms the fastest stack-based algorithms on GPUs. In addition, it reduces memory access during traversal, making it a very attractive building block for ray tracing hardware. Categories and Subject Descriptors (according to ACM CCS): I.3.3 [Computer Graphics]: Picture/Image Generation—Ray Trac- ing 1.
    [Show full text]
  • MA/CSSE 473 Day 15
    MA/CSSE 473 Day 15 BFS Topological Sort Combinatorial Object Generation MA/CSSE 473 Day 15 • HW 6 due tomorrow, HW 7 Friday, Exam next Tuesday • HW 8 has been updated for this term. Due Oct 8 • ConvexHull implementation problem due Day 27 (Oct 21); assignment is available now – Individual assignment (I changed my mind, but I am giving you 3.5 weeks to do it) • Schedule page now has my projected dates for all remaining reading assignments and written assignments – Topics for future class days and details of assignments 9-17 still need to be updated for this term • Student Questions • DFS and BFS • Topological Sort • Combinatorial Object Generation - Intro Q1 1 Recap: Pseudocode for DFS Graph may not be connected, so we loop. Backtracking happens when this loop ends (no more unmarked neighbors) Analysis? Q2 Notes on DFS • DFS can be implemented with graphs represented as: – adjacency matrix: Θ(|V| 2) – adjacency list: Θ(| V|+|E|) • Yields two distinct ordering of vertices: – order in which vertices are first encountered (pushed onto stack) – order in which vertices become dead-ends (popped off stack) • Applications: – check connectivity, finding connected components – Is this graph acyclic? – finding articulation points, if any (advanced) – searching the state-space of problem for (optimal) solution (AI) Q3 2 Breadth-first search (BFS) • Visits graph vertices by moving across to all the neighbors of last visited vertex. Vertices closer to the start are visited early • Instead of a stack, BFS uses a queue • Level-order tree traversal is
    [Show full text]
  • Discrete Mathematics and Its Applications Seventh Edition
    Discrete Mathematics and Its Applications Seventh Edition Kenneth H. Rosen Monmouth University (and.formerly AT&T Laboratories) � onnect Learn •� Succeed" The McGraw·Hi/1 Companies ��onnect Learn a_,Succeed· DISCRETE MATHEMATICS AND ITS APPLICATIONS, SEVENTH EDITION Published by McGraw-Hill, a business unit of The McGraw-Hill Companies, Inc., 1221 Avenue of the Americas, New York, NY 10020. Copyright© 2012 by The McGraw-Hill Companies, Inc. All rights reserved. Previous editions © 2007, 2003, and 1999. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of The McGraw-Hill Companies, Inc., including, but not limited to, in any network or other electronic storage or transmission, or broadcast for distance learning. Some ancillaries, including electronic and print components, may not be available to customers outside the United States. This book is printed on acid-free paper. 1234567890DOW/DOW 10987654 321 ISBN 978-0-07-338309-5 0-07-338309-0 MHID Vice President & Editor-in- Chief: Marty Lange Editorial Director: Michael Lange Global Publisher: Raghothaman Srinivasan Executive Editor: Bill Stenquist Development Editors: LorraineK. Buczek/Rose Kernan Senior Marketing Manager: Curt Reynolds Project Manager: Robin A. Reed Buyer: Sandy Ludovissy Design Coordinator: Brenda A. Rolwes Cover painting: Jasper Johns, Between the Clock and the Bed, 1981. Oil on Canvas (72 x 126 I /4 inches) Collection of the artist. Photograph by Glenn Stiegelman. Cover Art© Jasper Johns/Licensed by VAGA, New York, NY Cover Designer: Studio Montage, St. Louis, Missouri Lead Photo Research Coordinator: Carrie K.
    [Show full text]
  • Process Optimization for Cutting Steel-Plates
    Process Optimization for Cutting Steel-Plates Markus Rothe, Michael Reyer and Rudolf Mathar Institute for Theoretical Information Technology, RWTH Aachen University, Kopernikusstraße 16, 52074 Aachen, Germany Keywords: Two-Stage Three-Dimensional Guillotine Cutting, Residual Bin-Packing Problem, Mixed Integer Program- ming Model, Reuseable Leftovers. Abstract: In this paper, we consider the two-stage three-dimensional guillotine cutting stock problem with usable left- over. There are two properties that distinguish our problem formulation from others. First, we allow the items to be rotated. Second, we consider the case in which leftover material is to be reused in subsequent production cycles. Third, we solve the problem in three dimensions. The optimization problem is formulated as a mixed integer linear program. To verify the approach, several examples show that our formulation performs well. 1 INTRODUCTION and (Gilmore and Gomory, 1961), utilize linear pro- gramming to solve cutting stock problems. P. Gilmore In many areas of industrial production large or long and Gomory investigate the one dimensional prob- pieces of material need to be cut into smaller ones. lem of cutting items from stock of several standard E.g., it needs to be decided from which reel of raw lengths. They devise the method of column gener- material a cable of a specific length will be produced. ation in their work. P. Gilmore and Gomory con- This is an example for a one-dimensional problem. tinued their work in (Gilmore and Gomory, 1965). An example for a two-dimensional problem is to cut Here, they extend their formulation to multistage cut- patterns from pieces of large leather.
    [Show full text]
  • Algorithms for 3D Guillotine Cutting Problems: Unbounded Knapsack, Cutting Stock and Strip Packing∗
    Algorithms for 3D Guillotine Cutting Problems: Unbounded Knapsack, Cutting Stock and Strip Packing∗ Thiago A. de Queiroz, Flávio K. Miyazawa, Instituto de Computação, IC, UNICAMP, 13084-971, Campinas, SP e-mail: [email protected], [email protected] Yoshiko Wakabayashi, Instituto de Matemática e Estatística, IME, USP 05508-090, São Paulo, SP e-mail: [email protected] Eduardo C. Xavier Instituto de Computação, IC, UNICAMP, 13084-971, Campinas, SP e-mail: [email protected] ABSTRACT We present algorithms for the following three-dimensional (3D) guillotine cutting problems: Un- bounded Knapsack, Cutting Stock and Strip Packing. We consider the case where the items have fixed orientation and the case where orthogonal rotations around all axes are allowed. For the Un- bounded 3D Knapsack problem, we extend the recurrence formula proposed by Beasley for the Rectangular Knapsack Problem and present a dynamic programming algorithm that uses reduced raster points. We also consider a variant of the Unbounded Knapsack problem in which the cuts must be staged. For the 3D Cutting Stock problem and its variants in which the bins have differ- ent sizes (and the cuts must be staged), we present column generation based algorithms. Modified versions of the algorithms for the 3D Cutting Stock problems with stages are then used to build algorithms for the 3D Strip Packing problem and its variants. The computational tests performed with the algorithms described in this paper indicate that they are useful to solve instances of mod- erate size. KEYWORDS. Guillotine cutting; three-dimensional cutting stock; unbounded knapsack; strip packing; column generation.
    [Show full text]
  • Trees Assignment #4
    Trees Assignment #4 Tuesday, February 16: Read Rosen and Write Essay Sections 9.6, 9.7, 9.8 -- Pages 647-672 Thursday, February 18: Read Rosen and Write Essay Section 10.1, 10.2, 10.3 -- Pages 683-722 Assignment #4 Homework Exercises Section 9.1: Problem 31 Section 9.2: Problems 18, 28 Section 9.3: Problems 30, 31 Section 9.4: Problems 54, 55 Section 9.5: Problems 10, 26, 27, 46, 54 Extra Credit Problem: See Comp 280 web page Motivation for Trees Many, Many Applications Fundamental Data Structure Neat Algorithms Simpler than Graphs Examples and Animations http://oneweb.utc.edu/~Christopher-Mawata/petersen/ Definitions Tree • Connected graph with no simple circuits. • Graph with a unique path between any two vertices. Rooted Tree • Explicit Definition -- A tree with one vertex called the root • Recursive Definition -- A single vertex r is a rooted tree with root r. -- If T1, …, Tn are rooted trees with roots r1, …, rn and r is a new vertex, then the graph with edges joining r to r1, …, rn is a rooted tree with root r. Counting Theorems Theorem 1: e = v −1 Proof: By induction on the number of vertices. (Inductive Step: Remove a leaf.) Theorem 2: # leaves ≤ mheight (m-ary trees) Proof: By induction on the height of the tree. (Inductive Step: Remove the root.) Theorem 3: height ≥ logm (#leaves) Proof: This result is just a restatement of Theorem 2. Standard Terminology Nodes Trees Ancestor Level Parent Height Child Balanced Sibling N-ary Descendent Binary Leaf -- Left Subtree / Child Internal Vertex (Node) -- Right Subtree / Child Examples
    [Show full text]
  • Traversal of Binary Trees 30 Traversal of Binary Trees 31 Traversals of Binary Trees • Is the Process of Visiting Each Node (Precisely
    Data Structures September 28 1 Hierachical structures: Trees • 2 Objectives Discuss the following topics: • Trees, Binary Trees, and Binary Search Trees • Implementing Binary Trees • Tree Traversal • Searching a Binary Search Tree • Insertion • Deletion 3 Objectives (continued) Discuss the following topics: • Heaps • Balancing a Tree • Self-Adjusting Trees 4 Trees, Binary Trees, and Binary Search Trees • A tree is a data type that consists of nodes and arcs • These trees are depicted upside down with the root at the top and the leaves (terminal nodes ) at the bottom • The root is a node that has no parent; it can have only child nodes • Leaves have no children (their children are null) 5 Trees, Binary Trees, and Binary Search Trees (continued) • Each node has to be reachable from the root through a unique sequence of arcs, called a path • The number of arcs in a path is called the length of the path • The level of a node is the length of the path from the root to the node plus 1, which is the number of nodes in the path • The height of a nonempty tree is the maximum level of a node in the tree 6 Trees, Binary Trees, and Binary Search Trees (continued) Figure 6-1 Examples of trees 7 Trees, Binary Trees, and Binary Search Trees (continued) Figure 6-2 Hierarchical structure of a university shown as a tree 8 Trees: abstract/mathematical important, great number of varieties • terminology (knoop, wortel, vader, kind) node/vertex, root, father/parent, child ) ) ) ) (non) directed (non) orderly adt adt adt adt binary trees (left ≠≠≠ right) full
    [Show full text]
  • Cmsc 132: Object-Oriented Programming Ii
    CMSC 132: OBJECT-ORIENTED PROGRAMMING II Graphs & Graph Traversal Department of Computer Science University of Maryland, College Park © Department of Computer Science UMD Graph Data Structures • Many-to-many relationship between elements • Each element has multiple predecessors • Each element has multiple successors © Department of Computer Science UMD Graph Definitions • Node • Element of graph A • State • List of adjacent/neighbor/successor nodes • Edge • Connection between two nodes • State • Endpoints of edge © Department of Computer Science UMD Graph Definitions • Directed graph • Directed edges • Undirected graph • Undirected edges © Department of Computer Science UMD Graph Definitions • Weighted graph • Weight (cost) associated with each edge © Department of Computer Science UMD Graph Definitions • Path • Sequence of nodes n1, n2, … nk • Edge exists between each pair of nodes ni , ni+1 • Example • A, B, C is a path • A, E, D is not a path © Department of Computer Science UMD Graph Definitions • Cycle • Path that ends back at starting node • Example • A, E, A • A, B, C, D, E, A • Simple path • No cycles in path • Acyclic graph • No cycles in graph • What is an example? © Department of Computer Science UMD Graph Definitions • Connected Graph • Every node in the graph is reachable from every other node in the graph • Unconnected graph • Graph that has several disjoint components Unconnected graph © Department of Computer Science UMD Graph Operations • Traversal (search) • Visit each node in graph exactly once • Usually perform computation
    [Show full text]
  • Trees and Tree Traversal Definition of a Tree
    Trees and Tree Traversal Material adapted – courtesy of Prof. Dave Matuszek at UPENN Definition of a tree A tree is a node with a value and zero or more children Depending on the needs of the program, the children may or may not be ordered A tree has a root, internal nodes, and leaves A Each node contains an element and has branches B C D E leading to other nodes (its children) F G H I J K Each node (other than the root) has a parent L M N Each node has a depth (distance from the root) 2 1 More definitions An empty tree has no nodes The descendents of a node are its children and the descendents of its children The ancestors of a node are its parent (if any) and the ancestors of its parent The subtree rooted at a node consists of the given node and all its descendents An ordered tree is one in which the order of the children is important; an unordered tree is one in which the children of a node can be thought of as a set The branching factor of a node is the number of children it has The branching factor of a tree is the average branching factor of its nodes 3 File systems File systems are almost always implemented as a tree structure The nodes in the tree are of (at least) two types: folders (or directories), and plain files A folder typically has children—subfolders and plain files A plain file is typically a leaf 4 2 Family trees It turns out that a tree is not a good way to represent a family tree Every child has two parents, a mother and a father Parents frequently remarry An “upside down” binary tree almost works
    [Show full text]
  • Contributions to the Two-Dimensional Guillotine Cutting Stock Problem
    UNIVERSIDADE FEDERAL DO CEARÁ CENTRO DE CIÊNCIAS DEPARTAMENTO DE ESTATÍSTICA E MATEMÁTICA APLICADA MESTRADO EM MODELAGEM E MÉTODOS QUANTITATIVOS RONALDO LAGE PESSOA CONTRIBUTIONS TO THE TWO-DIMENSIONAL GUILLOTINE CUTTING STOCK PROBLEM FORTALEZA 2017 RONALDO LAGE PESSOA CONTRIBUTIONS TO THE TWO-DIMENSIONAL GUILLOTINE CUTTING STOCK PROBLEM Dissertação apresentada ao Curso de Mestrado em Modelagem e Métodos Quantitativos do Departamento de Estatística e Matemática Aplicada do Centro de Ciências da Universidade Federal do Ceará, como requisito parcial à obtenção do título de mestre em Modelagem e Métodos Quantitativos. Área de Concentração: Otimização e Inteligência Computacional Orientador: Prof. Dr. Bruno de Athayde Prata Co-Orientador: Prof. Dr. Carlos Diego Rodrigues FORTALEZA 2017 RONALDO LAGE PESSOA CONTRIBUTIONS TO THE TWO-DIMENSIONAL GUILLOTINE CUTTING STOCK PROBLEM Dissertação apresentada ao Curso de Mestrado em Modelagem e Métodos Quantitativos do Departamento de Estatística e Matemática Aplicada do Centro de Ciências da Universidade Federal do Ceará, como requisito parcial à obtenção do título de mestre em Modelagem e Métodos Quantitativos. Área de Concentração: Otimização e Inteligência Computacional Aprovada em: BANCA EXAMINADORA Prof. Dr. Bruno de Athayde Prata (Orientador) Universidade Federal do Ceará (UFC) Prof. Dr. Carlos Diego Rodrigues (Co-Orientador) Universidade Federal do Ceará (UFC) Prof. Dr. Albert Einstein F. Muritiba Universidade Federal do Ceará (UFC) Prof. Dr. Reinaldo Morabito Universidade Federal de São Carlos (UFSCar) AGRADECIMENTOS Agradeço inicialmente a Deus que, por intermédio de Nossa Senhora, permitiu que o presente trabalho pudesse ser finalizado no prazo e qualidade desejada, mesmo com todas as barreiras pessoais que surgiram durante o seu desenvolvimento. A minha esposa Larissa, pela paciência, compreensão e o esforço extra nos cuidados do nosso filho, tendo ele nascido durante o desenvolvimento desta pesquisa.
    [Show full text]