The Oldest Child Tree

Size: px
Start display at page:

Download "The Oldest Child Tree"

Transcription

1 The Oldest Child Tree Dennis E. Davenport Mathematics Department Howard University, Washington, DC Louis W. Shapiro Mathematics Department Howard University, Washington, DC Leon C. Woodson Department of Mathematics Morgan State University, Baltimore, MD October, 0 Abstract An ordered tree, also known as a plane tree or a planar tree, is defined recursively, as having a root and an ordered set of subtrees. An oldest child tree is an ordered tree where the rightmost edge above any vertex can either red or green. If we are considering family trees, then oldest child can be spoiled or not. In this paper we show that the number of oldest child trees gives the Large Schröder numbers. We also investigate other properties of oldest child trees, such as the average root degree and the average number of oldest children. Introduction Consider the following ordered tree. Each vertex is labeled to show the order.

2 h i e f g b c d a Figure For vertex a, {a,d} is the righmost edge, for vertex d, {d,g} is the rightmost edge, for vertex b, {b,e} is the rightmost edge, and for vertex e, {e,i} is the rightmost edge. Note that leaves have no rightmost edges, since there are no edges with leaves as vertices that are above them. An oldest child tree is an ordered tree where the rightmost edge of each vertex can be either green or red. This corresponds to a family situation where the oldest child can be either spoiled or not. The twenty two oldest child trees with 3 edges are illustrated below. (8) (4) () (4) (4) Figure Note that there are Oldest Child Trees when n = 3, since there are two choices for each rightmost edge above each vertex. Generating Function for the number of Oldest Child Trees If an edge (child) is rightmost we allow two possibilities, the child can be spoiled or not. Thus if O(z), or more briefly O, is the generating function

3 counting Oldest Child Trees, then O(z) = + zo(z) + z O (z) + z 3 O 3 (z) +... O(z) = + zo(z)( + zo(z) + z O (z) + z 3 O 3 (z) +... = + zo(z) zo(z) = + zo(z) zo(z) The quadratic formula gives us O(z) = z 6z + z z = + z + 6z + z z z which is the generating function for the Large Schröder numbers. We next describe a bijection between the Oldest Child Trees and Schröder paths. Given any Oldest Child Tree, T we proceed as follows. Let R be a point on the left of T (R is on the opposite side of the oldest children). For each edge e, pick a point P(e) on e. If e is an oldest child, we use o instead. Using the points P(e) and R we create a new tree with R as the root. In the new tree, T, RP(e) is an edge iff the line segment RP(e) intersects T only at the point P(e). Given P(e ) and P(e ), then P(e )P(e ) is an edge, if P(e )P(e ) intersects T at no other point and P(e ) is on a branch that is either the at the same level or higher than the branch that contains P(e ). Finally all paths terminate at an oldest child. We now use the well-known preorder traversal algorithm, (or the worm crawling around the tree, see []), to generate a Schröder path. Note that each P(o) point corresponds to a peak in the Schröder path. If the oldest child is spoiled, we use the peak. And if the child is not spoiled (level headed) we use a level step. The following example illustrates our process. Example: Consider the following Oldest Child Tree T. Let R be a point to the left of T. (R) Figure 3 3

4 We next pick a point on each edge. Note that for each generation, the rightmost edge is the oldest child. (R) Figure 4 We now draw edges from R to the new points on T that it can see and the remaining edges to get T. The bold lines are the edges of T (R) Figure 5 From here we get the following ordered tree T with R as the root. Note that each leaf corresponds to an oldest child from T. (R) Figure 6 T, is an ordered tree with bicolored leaves. These trees are mentioned in [4] Exercise 6.39.c. and []. 4

5 Using the preorder traversal algorithm, with U denoting up and D down, we get the following UUDDUDUUUUDDUDDD. This corresponds to the Schröder path given below. Figure 7 Each peak of the path relates to an oldest child. There are two choices for oldest children, spoiled or not. If the child is not spolied, then we have a level step; if the oldest child is spoiled, then we have a peak. For example, suppose that only the rightmost oldest child is not spoiled. Then we get the following Schröder path. Figure 8 We now give the generating function for the number of oldest children. The A-numbers refer to Sloane s OEIS,[3]. Let V be the generating function counting ordered trees with a marked vertex and L the generating function counting such trees with a marked leaf. Then the generating function for the number of oldest children is V L. We note that V = (zo) = ( ΣO n z n+) = Σ(n + )On z n since any tree with n edges has n + vertices. Also note that 5

6 O = + z(o + O ) = z zo and Recall that Starting with O z V (z) = d(zo(z)) dz = O + O = O + z do dz = O + zo O = ( z zo) We have Thus O = ( z zo) ( + O + zo ) = O ( + O + zo ) O = O ( + O) = O O + O zo zo = O O z V = O + zo L = O + O O zo = V/O zo = + O zo = + z + 8z + 38x 3 + 9z z z , A364 Hence, for the generating function for the total number of oldest children we get ( V L = LO L = L(O ) = (O ) + O ) zo ( ) O zo = (O ) zo = z + 0z + 50z z z z , A070 Referring to the 5 trees in figure going from left to right we have 8 3, 4,, 4, and 4 oldest children, for a total of 50. 6

7 3 Average Root Degree Recall that O(z) = + zo(z) + z O (z) + z 3 O 3 (z) +... Let u be the sequence,,,,... Then u(z) = + z + z + z 3 + z = + z z. Let T denote the total root degree. Then T = zou (zo) = zo ( zo) = z + 8z + 34z 3 + 5z z z Again referring to the 5 trees in figure going from left to right we have 8, 4, 3, 4, and 4 root degrees, for a total of 34. Let N be the generating function for O trees where the edge at the root is not spoiled. Then Recall that So that O z N = O +. O = + z ( O + O ). = O + O = O (O + ). When considering vertices of height one for O trees, there are two possible cases. The vertex at height is on the left most branch. In this case we get zon. The vertex at height is not on the left most branch. In this case we get zon(o ). Hence the generating function counting such vertices is zon + zon(o ) = zo O + (O + ) = z ( ) O (O + ) z = O zo z z 7

8 So, for n Thus [z n ] O zo z z = O n+ O n (O n+ O n ) ( 3 + ) = + O n We next consider the leaf-vertex ratio. Let V = Σv n, L = Σl n, and D = = Σd 6z+z nz n. The generating function D counts Delannoy paths from (0, 0) to (n, n). These are paths using steps E = (, 0), N = (0, ), and D = (, ). Then Thus Note that Hence l n = (d n + d n ) and v n = 3 d n d n l n v n = (d n + d n ) 3 d n d = n d n d n 3 + l n 3 + v n 3(3 + ) = d n d n 3 dn d n 0.93 We can now show quickly that V L counts Delannoy paths that do not start with a (, ) step. This follows from v n l n = References ( 3 d n ) d n (d n + d n ) = d n d n. [] M. Gardner, Time Travel and Other Mathematical Bewilderments, W.H. Freeman and Co.,

9 [] L.W. Shapiro, R.A. Sulanke, Bijections for the Schröder numbers, Math. Mag. 73n(000) [3] Sloane s Online Encyclopedia of Integer Sequences, [4] R.P. Stanley, Enumerative combinatorics, Vol., Cambridge University Press, Cambridge, 999 9

The Boundary of Ordered Trees

The Boundary of Ordered Trees 2 3 47 6 23 Journal of Integer Sequences, Vol. 8 (205), Article 5.5.8 The Boundary of Ordered Trees Dennis E. Davenport and Louis W. Shapiro Mathematics Department Howard University Washington, DC 20059

More information

RECURSIVE BIJECTIONS FOR CATALAN OBJECTS.

RECURSIVE BIJECTIONS FOR CATALAN OBJECTS. RECURSIVE BIJECTIONS FOR CATALAN OBJECTS. STEFAN FORCEY, MOHAMMADMEHDI KAFASHAN, MEHDI MALEKI, AND MICHAEL STRAYER Abstract. In this note we introduce several instructive examples of bijections found between

More information

Recursive Bijections for Catalan Objects

Recursive Bijections for Catalan Objects 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 16 (2013), Article 13.5.3 Recursive Bijections for Catalan Objects Stefan Forcey Department of Mathematics The University of Akron Akron, OH 44325-4002

More information

Parity reversing involutions on plane trees and 2-Motzkin paths

Parity reversing involutions on plane trees and 2-Motzkin paths European Journal of Combinatorics 27 (2006) 283 289 www.elsevier.com/locate/ejc Parity reversing involutions on plane trees and 2-Motzkin paths William Y.C. Chen a,,louisw.shapiro b,laural.m. Yang a a

More information

CSCI-401 Examlet #5. Name: Class: Date: True/False Indicate whether the sentence or statement is true or false.

CSCI-401 Examlet #5. Name: Class: Date: True/False Indicate whether the sentence or statement is true or false. Name: Class: Date: CSCI-401 Examlet #5 True/False Indicate whether the sentence or statement is true or false. 1. The root node of the standard binary tree can be drawn anywhere in the tree diagram. 2.

More information

A bijection between ordered trees and 2-Motzkin paths and its many consequences

A bijection between ordered trees and 2-Motzkin paths and its many consequences Discrete Mathematics 256 (2002) 655 670 www.elsevier.com/locate/disc A bijection between ordered trees and 2-Motzkin paths and its many consequences Emeric Deutsch a;, Louis W. Shapiro b a Department of

More information

Math 8803/4803, Spring 2008: Discrete Mathematical Biology

Math 8803/4803, Spring 2008: Discrete Mathematical Biology Math 8803/4803, Spring 2008: Discrete Mathematical Biology Prof. Christine Heitsch School of Mathematics Georgia Institute of Technology Lecture 11 February 1, 2008 and give one secondary structure for

More information

#A14 INTEGERS 15A (2015) ON SUBSETS OF ORDERED TREES ENUMERATED BY A SUBSEQUENCE OF FIBONACCI NUMBERS

#A14 INTEGERS 15A (2015) ON SUBSETS OF ORDERED TREES ENUMERATED BY A SUBSEQUENCE OF FIBONACCI NUMBERS #A4 INTEGERS 5A (205) ON SUBSETS OF ORDERED TREES ENUMERATED BY A SUBSEQUENCE OF FIBONACCI NUMBERS Melkamu Zeleke Department of Mathematics, William Paterson University, Wayne, New Jersey Mahendra Jani

More information

Noncrossing Trees and Noncrossing Graphs

Noncrossing Trees and Noncrossing Graphs Noncrossing Trees and Noncrossing Graphs William Y. C. Chen and Sherry H. F. Yan 2 Center for Combinatorics, LPMC, Nanai University, 30007 Tianjin, P.R. China chen@nanai.edu.cn, 2 huifangyan@eyou.com Mathematics

More information

#A55 INTEGERS 10 (2010), A LEFT WEIGHTED CATALAN EXTENSION 1

#A55 INTEGERS 10 (2010), A LEFT WEIGHTED CATALAN EXTENSION 1 #A55 INTEGERS 10 (2010), 771-792 A LEFT WEIGHTED CATALAN EXTENSION 1 Paul R. F. Schumacher Department of Mathematics, Texas A&M University at Qatar, Doha, Qatar paul.schumacher@qatar.tamu.edu Received:

More information

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology Trees : Part Section. () (2) Preorder, Postorder and Levelorder Traversals Definition: A tree is a connected graph with no cycles Consequences: Between any two vertices, there is exactly one unique path

More information

STAIRCASE TILINGS AND LATTICE PATHS

STAIRCASE TILINGS AND LATTICE PATHS STAIRCASE TILINGS AND LATTICE PATHS Silvia Heubach Department of Mathematics, California State University Los Angeles 55 State University Drive, Los Angeles, CA 9-84 USA sheubac@calstatela.edu Toufik Mansour

More information

DAVID CALLAN. Department of Statistics W. Dayton St. August 9, Abstract

DAVID CALLAN. Department of Statistics W. Dayton St. August 9, Abstract A Combinatorial Interpretation for a Super-Catalan Recurrence DAVID CAAN Department of Statistics University of Wisconsin-Madison 1210 W. Dayton St Madison, WI 53706-1693 callan@stat.wisc.edu August 9,

More information

Section 5.5. Left subtree The left subtree of a vertex V on a binary tree is the graph formed by the left child L of V, the descendents

Section 5.5. Left subtree The left subtree of a vertex V on a binary tree is the graph formed by the left child L of V, the descendents Section 5.5 Binary Tree A binary tree is a rooted tree in which each vertex has at most two children and each child is designated as being a left child or a right child. Thus, in a binary tree, each vertex

More information

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees Chapter 11 Copyright McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. Chapter Summary Introduction to Trees Applications

More information

Algorithms. Deleting from Red-Black Trees B-Trees

Algorithms. Deleting from Red-Black Trees B-Trees Algorithms Deleting from Red-Black Trees B-Trees Recall the rules for BST deletion 1. If vertex to be deleted is a leaf, just delete it. 2. If vertex to be deleted has just one child, replace it with that

More information

Binary Heaps in Dynamic Arrays

Binary Heaps in Dynamic Arrays Yufei Tao ITEE University of Queensland We have already learned that the binary heap serves as an efficient implementation of a priority queue. Our previous discussion was based on pointers (for getting

More information

March 20/2003 Jayakanth Srinivasan,

March 20/2003 Jayakanth Srinivasan, Definition : A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Definition : In a multigraph G = (V, E) two or

More information

CSC148 Week 6. Larry Zhang

CSC148 Week 6. Larry Zhang CSC148 Week 6 Larry Zhang 1 Announcements Test 1 coverage: trees (topic of today and Wednesday) are not covered Assignment 1 slides posted on the course website. 2 Data Structures 3 Data Structures A data

More information

Trees. Q: Why study trees? A: Many advance ADTs are implemented using tree-based data structures.

Trees. Q: Why study trees? A: Many advance ADTs are implemented using tree-based data structures. Trees Q: Why study trees? : Many advance DTs are implemented using tree-based data structures. Recursive Definition of (Rooted) Tree: Let T be a set with n 0 elements. (i) If n = 0, T is an empty tree,

More information

Recursively Defined Functions

Recursively Defined Functions Section 5.3 Recursively Defined Functions Definition: A recursive or inductive definition of a function consists of two steps. BASIS STEP: Specify the value of the function at zero. RECURSIVE STEP: Give

More information

Cpt S 122 Data Structures. Data Structures Trees

Cpt S 122 Data Structures. Data Structures Trees Cpt S 122 Data Structures Data Structures Trees Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Motivation Trees are one of the most important and extensively

More information

arxiv: v2 [math.co] 28 Feb 2013

arxiv: v2 [math.co] 28 Feb 2013 RECURSIVE BIJECTIONS FOR CATALAN OBJECTS. STEFAN FORCEY, MOHAMMADMEHDI KAFASHAN, MEHDI MALEKI, AND MICHAEL STRAYER arxiv:1212.1188v2 [math.co] 28 Feb 2013 Abstract. In this note we introduce several instructive

More information

The 2 n 1 factor for multi-dimensional lattice paths with diagonal steps

The 2 n 1 factor for multi-dimensional lattice paths with diagonal steps Séminaire Lotharingien de Combinatoire 51 (2004), Article B51c The 2 n 1 factor for multi-dimensional lattice paths with diagonal steps E. Duchi and R. A. Sulanke Abstract In Z d, let D(n) denote the set

More information

Proper Partitions of a Polygon and k-catalan Numbers

Proper Partitions of a Polygon and k-catalan Numbers Proper Partitions of a Polygon and k-catalan Numbers Bruce E. Sagan Department of Mathematics Michigan State University East Lansing, MI 48824-1027 USA sagan@math.msu.edu July 13, 2005 Abstract Let P be

More information

Hamilton paths & circuits. Gray codes. Hamilton Circuits. Planar Graphs. Hamilton circuits. 10 Nov 2015

Hamilton paths & circuits. Gray codes. Hamilton Circuits. Planar Graphs. Hamilton circuits. 10 Nov 2015 Hamilton paths & circuits Def. A path in a multigraph is a Hamilton path if it visits each vertex exactly once. Def. A circuit that is a Hamilton path is called a Hamilton circuit. Hamilton circuits Constructing

More information

Pattern Avoidance in Ternary Trees

Pattern Avoidance in Ternary Trees 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 15 (2012), Article 12.1.5 Pattern Avoidance in Ternary Trees Nathan Gabriel 1 Department of Mathematics Rice University Houston, TX 77251, USA Katherine

More information

Binary Trees. Examples:

Binary Trees. Examples: Binary Trees A tree is a data structure that is made of nodes and pointers, much like a linked list. The difference between them lies in how they are organized: In a linked list each node is connected

More information

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

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

Classification of Extremal Curves with 6 Double Points and of Tree-like Curves with 6 Double Points and I! 5

Classification of Extremal Curves with 6 Double Points and of Tree-like Curves with 6 Double Points and I! 5 Classification of Extremal Curves with 6 Double Points and of Tree-like Curves with 6 Double Points and I! 5 Tim Ritter Bethel College Mishawaka, IN timritter@juno.com Advisor: Juha Pohjanpelto Oregon

More information

Fast algorithm for generating ascending compositions

Fast algorithm for generating ascending compositions manuscript No. (will be inserted by the editor) Fast algorithm for generating ascending compositions Mircea Merca Received: date / Accepted: date Abstract In this paper we give a fast algorithm to generate

More information

Trees. A tree is a directed graph with the property

Trees. A tree is a directed graph with the property 2: Trees Trees A tree is a directed graph with the property There is one node (the root) from which all other nodes can be reached by exactly one path. Seen lots of examples. Parse Trees Decision Trees

More information

Constructions of hamiltonian graphs with bounded degree and diameter O(log n)

Constructions of hamiltonian graphs with bounded degree and diameter O(log n) Constructions of hamiltonian graphs with bounded degree and diameter O(log n) Aleksandar Ilić Faculty of Sciences and Mathematics, University of Niš, Serbia e-mail: aleksandari@gmail.com Dragan Stevanović

More information

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w Chapter 7 Trees 7.1 Introduction A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w Tree Terminology Parent Ancestor Child Descendant Siblings

More information

Recursion and Structural Induction

Recursion and Structural Induction Recursion and Structural Induction Mukulika Ghosh Fall 2018 Based on slides by Dr. Hyunyoung Lee Recursively Defined Functions Recursively Defined Functions Suppose we have a function with the set of non-negative

More information

Searching in Graphs (cut points)

Searching in Graphs (cut points) 0 November, 0 Breath First Search (BFS) in Graphs In BFS algorithm we visit the verices level by level. The BFS algorithm creates a tree with root s. Once a node v is discovered by BFS algorithm we put

More information

CSE 21 Mathematics for Algorithm and System Analysis

CSE 21 Mathematics for Algorithm and System Analysis CSE 21 Mathematics for Algorithm and System Analysis Unit 4: Basic Concepts in Graph Theory Section 3: Trees 1 Review : Decision Tree (DT-Section 1) Root of the decision tree on the left: 1 Leaves of the

More information

Multi-Way Search Tree

Multi-Way Search Tree Multi-Way Search Tree A multi-way search tree is an ordered tree such that Each internal node has at least two and at most d children and stores d -1 data items (k i, D i ) Rule: Number of children = 1

More information

Notes on Binary Dumbbell Trees

Notes on Binary Dumbbell Trees Notes on Binary Dumbbell Trees Michiel Smid March 23, 2012 Abstract Dumbbell trees were introduced in [1]. A detailed description of non-binary dumbbell trees appears in Chapter 11 of [3]. These notes

More information

Computational Optimization ISE 407. Lecture 16. Dr. Ted Ralphs

Computational Optimization ISE 407. Lecture 16. Dr. Ted Ralphs Computational Optimization ISE 407 Lecture 16 Dr. Ted Ralphs ISE 407 Lecture 16 1 References for Today s Lecture Required reading Sections 6.5-6.7 References CLRS Chapter 22 R. Sedgewick, Algorithms in

More information

Introduction to Computers and Programming. Concept Question

Introduction to Computers and Programming. Concept Question Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 7 April 2 2004 Concept Question G1(V1,E1) A graph G(V, where E) is V1 a finite = {}, nonempty E1 = {} set of G2(V2,E2) vertices and

More information

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree.

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree. The Lecture Contains: Index structure Binary search tree (BST) B-tree B+-tree Order file:///c /Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture13/13_1.htm[6/14/2012

More information

Binary Trees, Binary Search Trees

Binary Trees, Binary Search Trees Binary Trees, Binary Search Trees Trees Linear access time of linked lists is prohibitive Does there exist any simple data structure for which the running time of most operations (search, insert, delete)

More information

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS DR. ANDREW SCHWARTZ, PH.D. 10.1 Graphs and Graph Models (1) A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes)

More information

arxiv: v2 [math.co] 25 May 2016

arxiv: v2 [math.co] 25 May 2016 arxiv:1605.06638v2 [math.co] 25 May 2016 A note on a conjecture of Gyárfás Ryan R. Martin Abstract This note proves that, given one member, T, of a particular family of radius-three trees, every radius-two,

More information

Analysis of Algorithms

Analysis of Algorithms Algorithm An algorithm is a procedure or formula for solving a problem, based on conducting a sequence of specified actions. A computer program can be viewed as an elaborate algorithm. In mathematics and

More information

Data Structures - Binary Trees and Operations on Binary Trees

Data Structures - Binary Trees and Operations on Binary Trees ata Structures - inary Trees and Operations on inary Trees MS 275 anko drovic (UI) MS 275 October 15, 2018 1 / 25 inary Trees binary tree is a finite set of elements. It can be empty partitioned into three

More information

CS 171: Introduction to Computer Science II. Binary Search Trees

CS 171: Introduction to Computer Science II. Binary Search Trees CS 171: Introduction to Computer Science II Binary Search Trees Binary Search Trees Symbol table applications BST definitions and terminologies Search and insert Traversal Ordered operations Delete Symbol

More information

Optimal Region for Binary Search Tree, Rotation and Polytope

Optimal Region for Binary Search Tree, Rotation and Polytope Optimal Region for Binary Search Tree, Rotation and Polytope Kensuke Onishi Mamoru Hoshi 2 Department of Mathematical Sciences, School of Science Tokai University, 7 Kitakaname, Hiratsuka, Kanagawa, 259-292,

More information

STRAIGHT LINE ORTHOGONAL DRAWINGS OF COMPLETE TERNERY TREES SPUR FINAL PAPER, SUMMER July 29, 2015

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

Chapter Summary. Introduction to Trees Applications of Trees Tree Traversal Spanning Trees Minimum Spanning Trees

Chapter Summary. Introduction to Trees Applications of Trees Tree Traversal Spanning Trees Minimum Spanning Trees Trees Chapter 11 Chapter Summary Introduction to Trees Applications of Trees Tree Traversal Spanning Trees Minimum Spanning Trees Introduction to Trees Section 11.1 Section Summary Introduction to Trees

More information

Chapter 20: Binary Trees

Chapter 20: Binary Trees Chapter 20: Binary Trees 20.1 Definition and Application of Binary Trees Definition and Application of Binary Trees Binary tree: a nonlinear linked list in which each node may point to 0, 1, or two other

More information

Trees. Truong Tuan Anh CSE-HCMUT

Trees. Truong Tuan Anh CSE-HCMUT Trees Truong Tuan Anh CSE-HCMUT Outline Basic concepts Trees Trees A tree consists of a finite set of elements, called nodes, and a finite set of directed lines, called branches, that connect the nodes

More information

Why Do We Need Trees?

Why Do We Need Trees? CSE 373 Lecture 6: Trees Today s agenda: Trees: Definition and terminology Traversing trees Binary search trees Inserting into and deleting from trees Covered in Chapter 4 of the text Why Do We Need Trees?

More information

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree Chapter 4 Trees 2 Introduction for large input, even access time may be prohibitive we need data structures that exhibit running times closer to O(log N) binary search tree 3 Terminology recursive definition

More information

TREES. Trees - Introduction

TREES. Trees - Introduction TREES Chapter 6 Trees - Introduction All previous data organizations we've studied are linear each element can have only one predecessor and successor Accessing all elements in a linear sequence is O(n)

More information

Basic Properties The Definition of Catalan Numbers

Basic Properties The Definition of Catalan Numbers 1 Basic Properties 1.1. The Definition of Catalan Numbers There are many equivalent ways to define Catalan numbers. In fact, the main focus of this monograph is the myriad combinatorial interpretations

More information

Math 15 - Spring Homework 5.2 Solutions

Math 15 - Spring Homework 5.2 Solutions Math 15 - Spring 2017 - Homework 5.2 Solutions 1. (5.2 # 14 (not assigned)) Use Prim s algorithm to construct a minimal spanning tree for the following network. Draw the minimal tree and compute its total

More information

Algorithms. AVL Tree

Algorithms. AVL Tree Algorithms AVL Tree Balanced binary tree The disadvantage of a binary search tree is that its height can be as large as N-1 This means that the time needed to perform insertion and deletion and many other

More information

Backtracking. Chapter 5

Backtracking. Chapter 5 1 Backtracking Chapter 5 2 Objectives Describe the backtrack programming technique Determine when the backtracking technique is an appropriate approach to solving a problem Define a state space tree for

More information

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G. MAD 3105 Spring 2006 Solutions for Review for Test 2 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ

More information

Data Structure Lecture#10: Binary Trees (Chapter 5) U Kang Seoul National University

Data Structure Lecture#10: Binary Trees (Chapter 5) U Kang Seoul National University Data Structure Lecture#10: Binary Trees (Chapter 5) U Kang Seoul National University U Kang (2016) 1 In This Lecture The concept of binary tree, its terms, and its operations Full binary tree theorem Idea

More information

Associate Professor Dr. Raed Ibraheem Hamed

Associate Professor Dr. Raed Ibraheem Hamed Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Computer Science Department 2015 2016 Department of Computer Science _ UHD 1 What this Lecture

More information

It is important that you show your work. There are 134 points available on this test.

It is important that you show your work. There are 134 points available on this test. Math 1165 Discrete Math Test April 4, 001 Your name It is important that you show your work There are 134 points available on this test 1 (10 points) Show how to tile the punctured chess boards below with

More information

Figure 4.1: The evolution of a rooted tree.

Figure 4.1: The evolution of a rooted tree. 106 CHAPTER 4. INDUCTION, RECURSION AND RECURRENCES 4.6 Rooted Trees 4.6.1 The idea of a rooted tree We talked about how a tree diagram helps us visualize merge sort or other divide and conquer algorithms.

More information

COMP : Trees. COMP20012 Trees 219

COMP : Trees. COMP20012 Trees 219 COMP20012 3: Trees COMP20012 Trees 219 Trees Seen lots of examples. Parse Trees Decision Trees Search Trees Family Trees Hierarchical Structures Management Directories COMP20012 Trees 220 Trees have natural

More information

where each number (after the first two 1 s) is the sum of the previous two numbers.

where each number (after the first two 1 s) is the sum of the previous two numbers. Fibonacci Numbers The Fibonacci numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987,... where each number (after the first two 1 s) is the sum of the previous

More information

Binary Trees

Binary Trees Binary Trees 4-7-2005 Opening Discussion What did we talk about last class? Do you have any code to show? Do you have any questions about the assignment? What is a Tree? You are all familiar with what

More information

Computer Science 210 Data Structures Siena College Fall Topic Notes: Trees

Computer Science 210 Data Structures Siena College Fall Topic Notes: Trees Computer Science 0 Data Structures Siena College Fall 08 Topic Notes: Trees We ve spent a lot of time looking at a variety of structures where there is a natural linear ordering of the elements in arrays,

More information

BSP Trees. Chapter Introduction. 8.2 Overview

BSP Trees. Chapter Introduction. 8.2 Overview Chapter 8 BSP Trees 8.1 Introduction In this document, we assume that the objects we are dealing with are represented by polygons. In fact, the algorithms we develop actually assume the polygons are triangles,

More information

On Integer Sequences Derived from Balanced k-ary trees

On Integer Sequences Derived from Balanced k-ary trees On Integer Sequences Derived from Balanced k-ary trees SUNG-HYUK CHA Pace University Department of Computer Science 1 Pace Plaza, New York, NY, 10038 USA scha@pace.edu Abstract: This article investigates

More information

Sequences from Centered Hexagons of Integers

Sequences from Centered Hexagons of Integers International Mathematical Forum, 4, 009, no. 39, 1949-1954 Sequences from Centered Hexagons of Integers T. Aaron Gulliver Department of Electrical and Computer Engineering University of Victoria, P.O.

More information

Programming II (CS300)

Programming II (CS300) 1 Programming II (CS300) Chapter 12: Heaps and Priority Queues MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Heaps and Priority Queues 2 Priority Queues Heaps Priority Queue 3 QueueADT Objects are added and

More information

6c Lecture 3 & 4: April 8 & 10, 2014

6c Lecture 3 & 4: April 8 & 10, 2014 6c Lecture 3 & 4: April 8 & 10, 2014 3.1 Graphs and trees We begin by recalling some basic definitions from graph theory. Definition 3.1. A (undirected, simple) graph consists of a set of vertices V and

More information

Journal of Integer Sequences, Vol. 6 (2003), Article

Journal of Integer Sequences, Vol. 6 (2003), Article 1 2 3 7 6 23 11 Journal of Integer Sequences, Vol. 6 (2003), Article 03.1.5 OBJECTS COUNTED BY THE CENTRAL DELANNOY NUMBERS ROBERT A. SULANKE Abstract. The central Delannoy numbers, (d n ) n 0 = 1, 3,

More information

Chapter 10: Trees. A tree is a connected simple undirected graph with no simple circuits.

Chapter 10: Trees. A tree is a connected simple undirected graph with no simple circuits. Chapter 10: Trees A tree is a connected simple undirected graph with no simple circuits. Properties: o There is a unique simple path between any 2 of its vertices. o No loops. o No multiple edges. Example

More information

A graph is a set of objects (called vertices or nodes) and edges between pairs of nodes.

A graph is a set of objects (called vertices or nodes) and edges between pairs of nodes. Section 1.4: raphs and Trees graph is a set of objects (called vertices or nodes) and edges between pairs of nodes. Eq Co Ve Br S Pe Bo Pa U Ch Vertices = {Ve,, S,, Br, Co, Eq, Pe, Bo,Pa, Ch,, U} Edges

More information

Orthogonal Range Search and its Relatives

Orthogonal Range Search and its Relatives Orthogonal Range Search and its Relatives Coordinate-wise dominance and minima Definition: dominates Say that point (x,y) dominates (x', y') if x

More information

Advanced Java Concepts Unit 5: Trees. Notes and Exercises

Advanced Java Concepts Unit 5: Trees. Notes and Exercises Advanced Java Concepts Unit 5: Trees. Notes and Exercises A Tree is a data structure like the figure shown below. We don t usually care about unordered trees but that s where we ll start. Later we will

More information

Binary Decision Diagrams

Binary Decision Diagrams Logic and roof Hilary 2016 James Worrell Binary Decision Diagrams A propositional formula is determined up to logical equivalence by its truth table. If the formula has n variables then its truth table

More information

CSE 230 Intermediate Programming in C and C++ Binary Tree

CSE 230 Intermediate Programming in C and C++ Binary Tree CSE 230 Intermediate Programming in C and C++ Binary Tree Fall 2017 Stony Brook University Instructor: Shebuti Rayana shebuti.rayana@stonybrook.edu Introduction to Tree Tree is a non-linear data structure

More information

Chapter-6 Backtracking

Chapter-6 Backtracking Chapter-6 Backtracking 6.1 Background Suppose, if you have to make a series of decisions, among various choices, where you don t have enough information to know what to choose. Each decision leads to a

More information

Organizing Spatial Data

Organizing Spatial Data Organizing Spatial Data Spatial data records include a sense of location as an attribute. Typically location is represented by coordinate data (in 2D or 3D). 1 If we are to search spatial data using the

More information

Chapter Summary. Recursively defined Functions. Recursively defined sets and Structures Structural Induction

Chapter Summary. Recursively defined Functions. Recursively defined sets and Structures Structural Induction Section 5.3 1 Chapter Summary Recursively defined Functions. Recursively defined sets and Structures Structural Induction 5.3 Recursive definitions and structural induction A recursively defined picture

More information

CMSC th Lecture: Graph Theory: Trees.

CMSC th Lecture: Graph Theory: Trees. CMSC 27100 26th Lecture: Graph Theory: Trees. Lecturer: Janos Simon December 2, 2018 1 Trees Definition 1. A tree is an acyclic connected graph. Trees have many nice properties. Theorem 2. The following

More information

CS 206 Introduction to Computer Science II

CS 206 Introduction to Computer Science II CS 206 Introduction to Computer Science II 04 / 26 / 2017 Instructor: Michael Eckmann Today s Topics Questions? Comments? Balanced Binary Search trees AVL trees Michael Eckmann - Skidmore College - CS

More information

Friday Four Square! 4:15PM, Outside Gates

Friday Four Square! 4:15PM, Outside Gates Binary Search Trees Friday Four Square! 4:15PM, Outside Gates Implementing Set On Monday and Wednesday, we saw how to implement the Map and Lexicon, respectively. Let's now turn our attention to the Set.

More information

An AVL tree with N nodes is an excellent data. The Big-Oh analysis shows that most operations finish within O(log N) time

An AVL tree with N nodes is an excellent data. The Big-Oh analysis shows that most operations finish within O(log N) time B + -TREES MOTIVATION An AVL tree with N nodes is an excellent data structure for searching, indexing, etc. The Big-Oh analysis shows that most operations finish within O(log N) time The theoretical conclusion

More information

Trees. Tree Structure Binary Tree Tree Traversals

Trees. Tree Structure Binary Tree Tree Traversals Trees Tree Structure Binary Tree Tree Traversals The Tree Structure Consists of nodes and edges that organize data in a hierarchical fashion. nodes store the data elements. edges connect the nodes. The

More information

CH. 8 PRIORITY QUEUES AND HEAPS

CH. 8 PRIORITY QUEUES AND HEAPS CH. 8 PRIORITY QUEUES AND HEAPS ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN C++, GOODRICH, TAMASSIA AND MOUNT (WILEY 2004) AND SLIDES FROM NANCY

More information

Topic 18 Binary Trees "A tree may grow a thousand feet tall, but its leaves will return to its roots." -Chinese Proverb

Topic 18 Binary Trees A tree may grow a thousand feet tall, but its leaves will return to its roots. -Chinese Proverb Topic 18 "A tree may grow a thousand feet tall, but its leaves will return to its roots." -Chinese Proverb Definitions A tree is an abstract data type one entry point, the root Each node is either a leaf

More information

UNIT III TREES. A tree is a non-linear data structure that is used to represents hierarchical relationships between individual data items.

UNIT III TREES. A tree is a non-linear data structure that is used to represents hierarchical relationships between individual data items. UNIT III TREES A tree is a non-linear data structure that is used to represents hierarchical relationships between individual data items. Tree: A tree is a finite set of one or more nodes such that, there

More information

CSCI2100B Data Structures Trees

CSCI2100B Data Structures Trees CSCI2100B Data Structures Trees Irwin King king@cse.cuhk.edu.hk http://www.cse.cuhk.edu.hk/~king Department of Computer Science & Engineering The Chinese University of Hong Kong Introduction General Tree

More information

Polygon Dissections and Marked Dyck Paths

Polygon Dissections and Marked Dyck Paths Polygon Dissections and Marked Dyck Paths DAVID CALLAN Department of Statistics University of Wisconsin-Madison Medical Science Center 00 University Ave Madison, WI 5706-5 callan@statwiscedu February 5,

More information

Recitation 9. Prelim Review

Recitation 9. Prelim Review Recitation 9 Prelim Review 1 Heaps 2 Review: Binary heap min heap 1 2 99 4 3 PriorityQueue Maintains max or min of collection (no duplicates) Follows heap order invariant at every level Always balanced!

More information

Garbage Collection: recycling unused memory

Garbage Collection: recycling unused memory Outline backtracking garbage collection trees binary search trees tree traversal binary search tree algorithms: add, remove, traverse binary node class 1 Backtracking finding a path through a maze is an

More information

These notes present some properties of chordal graphs, a set of undirected graphs that are important for undirected graphical models.

These notes present some properties of chordal graphs, a set of undirected graphs that are important for undirected graphical models. Undirected Graphical Models: Chordal Graphs, Decomposable Graphs, Junction Trees, and Factorizations Peter Bartlett. October 2003. These notes present some properties of chordal graphs, a set of undirected

More information

CS 231 Data Structures and Algorithms Fall Recursion and Binary Trees Lecture 21 October 24, Prof. Zadia Codabux

CS 231 Data Structures and Algorithms Fall Recursion and Binary Trees Lecture 21 October 24, Prof. Zadia Codabux CS 231 Data Structures and Algorithms Fall 2018 Recursion and Binary Trees Lecture 21 October 24, 2018 Prof. Zadia Codabux 1 Agenda ArrayQueue.java Recursion Binary Tree Terminologies Traversal 2 Administrative

More information

9/29/2016. Chapter 4 Trees. Introduction. Terminology. Terminology. Terminology. Terminology

9/29/2016. Chapter 4 Trees. Introduction. Terminology. Terminology. Terminology. Terminology Introduction Chapter 4 Trees for large input, even linear access time may be prohibitive we need data structures that exhibit average running times closer to O(log N) binary search tree 2 Terminology recursive

More information

Binary trees having a given number of nodes with 0, 1, and 2 children.

Binary trees having a given number of nodes with 0, 1, and 2 children. Binary trees having a given number of nodes with 0, 1, and 2 children. Günter Rote 13. August 1997 Zusammenfassung We give three combinatorial proofs for the number of binary trees having a given number

More information