Binary trees. Application: AVL trees and the golden ratio. The golden ratio. φ 1=1/φ 1. φ =1+

Size: px
Start display at page:

Download "Binary trees. Application: AVL trees and the golden ratio. The golden ratio. φ 1=1/φ 1. φ =1+"

Transcription

1 Application: AVL trees and the golden ratio AVL trees are used for storing information in an efficient manner. We will see exactly how in the data structures course. This slide set takes a look at how high an AVL tree of agivensizecanbe. The golden ratio Discrete Math. for Engineering,. Application slides Binary trees A binary tree is either The empty binary tree, for which I ll write Or a point (called a node) connected to two smaller binary trees (called its children) The children must not share any nodes. An empty binary tree The golden ratio is an irrational number φ = + =.68 with many interesting properties. Among them φ =/φ φ = φ turns up in many geometric figures including pentagrams and dodecahedra It is the ratio, in the limit, of successive members of the Fibonacci sequence A nonempty binary tree Another nonempty binary tree Typeset October 3, Typeset October 3,

2 The height and size of a binary tree Discrete Math. for Engineering,. Application slides AVL trees The size of a binary tree is the number of nodes it has. The height of a binary tree is number of levels of nodes it has height is 3 AVL trees are binary trees with the following restrictions. TheemptytreeisanAVLtree A nonempty binary tree is AVL if the height difference of the children is at most, and both children are AVL trees size is Note that has height and size. Clearly a binary tree of size n canhaveaheightofupto n. AVL Not AVL Not AVL When binary trees are used to store data: The amount of information stored is proportional to size of tree The time to access data is proportional to the height Typeset October 3, 3 Typeset October 3,

3 The question We wish to access large amounts of data quickly. Remember amount of information is proportional to size of tree and access time is proportional to the height of the tree. SothequestionishowhighcananAVLtreeofagiven size be? We start by asking a closely related question: HowsmallcananAVLtreeofagivenheightbe? Discrete Math. for Engineering,. Application slides How small can an AVL tree of a given height be? Let smakeatablewiththesmallestavltreeofeach height (empty trees are implied) Height Smallest tree Size 3 7 Typeset October 3, Typeset October 3, 6

4 The minsize function In the table, each tree (of height h>) has, as children, smallest trees of heights h and h So we have minsize() = minsize() = minsize(h) = minsize(h ) + minsize(h ) +, forh Note the recurrence is not homogeneous. Try a few values,,,, 7,,, 33, Compare with the Fibonacci sequence,,, 3,, 8, 3,, 3, We find minsize(h) =fib(h +) where fib() = fib() = fib(n) =fib(n ) + fib(n ), forn We can prove this by (complete induction). Typeset October 3, 7 Discrete Math. for Engineering,. Application slides Since fib is defined by a linear homogeneous recurrence relationofdegreewecansolveit fib(n) = φ n+ ( for all n N where φ )n+ φ = + Consider φ n+ ( φ )n+ for n R and n. The first term is real, the second is complex. As n gets big, the complex term becomes small. So we get minsize(h) = φ h+ 8 size 6 minsize(h) dots 3 height φ h+ line Typeset October 3, 8

5 The maximum height per given size Discrete Math. for Engineering,. Application slides So invert φ h+ Height 3 Min size 7 Let h be the height of a tree of size s. We know that for all h, h h s minsize(h) Contrapositively: For all h, s < minsize(h) h <h Size Max height Note that for s such that minsize(h ) <s minsize(h) maxheight(s) =h maxheight(s) is approximately an inverse of minsize(h) s = φ h+ (s +)=φ h+ log φ (s +)=h + log φ (s +) =h log φ log (s +)+log φ =h so maxheight(s) =. log (s +).3 For example maxheight( 6 ) = 9 maxheight( 9 ) = 3 maxheight( ) = 8 This means large amounts of data can be accessed in a small amount of time, if we store the data in AVL trees. Typeset October 3, 9 Typeset October 3,

6 Graphing maxheight 6 h s maxheight(s) dots. log (s +).3 line Typeset October 3,

CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5

CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5 CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5 This problem set the last one purely on discrete mathematics is designed as a cumulative review of the topics we ve covered so far and a proving ground

More information

MATH 200 FINAL EXAM PEYAM RYAN TABRIZIAN

MATH 200 FINAL EXAM PEYAM RYAN TABRIZIAN MATH 200 FINAL EXAM PEYAM RYAN TABRIZIAN Name: Instructions: Welcome to your Final Exam! You have 150 minutes (= 2h30) to take this exam, for a total of 100 points. Do not open the exam until you re instructed

More information

Fibonacci Numbers ANSWERS Lesson 1 of 10, work individually or in pairs

Fibonacci Numbers ANSWERS Lesson 1 of 10, work individually or in pairs Lesson 1 of 10, work individually or in pairs In 1202, the mathematician Leonardo Pisano Fibonacci (pronounced fi-buh-nah-chee) published a book with the famous Fibonacci sequence in it. (A sequence is

More information

Evacuation and a Geometric Construction for Fibonacci Tableaux

Evacuation and a Geometric Construction for Fibonacci Tableaux Evacuation and a Geometric Construction for Fibonacci Tableaux Kendra Killpatrick Pepperdine University 24255 Pacific Coast Highway Malibu, CA 90263-4321 Kendra.Killpatrick@pepperdine.edu August 25, 2004

More information

PRIORITY QUEUES AND HEAPS

PRIORITY QUEUES AND HEAPS PRIORITY QUEUES AND HEAPS Lecture 1 CS2110 Fall 2014 Reminder: A4 Collision Detection 2 Due tonight by midnight Readings and Homework 3 Read Chapter 2 A Heap Implementation to learn about heaps Exercise:

More information

Second Annual University of Oregon Programming Contest, 1998

Second Annual University of Oregon Programming Contest, 1998 A Magic Magic Squares A magic square of order n is an arrangement of the n natural numbers 1,...,n in a square array such that the sums of the entries in each row, column, and each of the two diagonals

More information

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 17: Heaps and Priority Queues

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 17: Heaps and Priority Queues CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims Lecture 17: Heaps and Priority Queues Stacks and Queues as Lists Stack (LIFO) implemented as list insert (i.e.

More information

GAMES AND STRATEGY BEGINNERS 12/03/2017

GAMES AND STRATEGY BEGINNERS 12/03/2017 GAMES AND STRATEGY BEGINNERS 12/03/2017 1. TAKE AWAY GAMES Below you will find 5 different Take Away Games, each of which you may have played last year. Play each game with your partner. Find the winning

More information

MITOCW 6. AVL Trees, AVL Sort

MITOCW 6. AVL Trees, AVL Sort MITOCW 6. AVL Trees, AVL Sort The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free.

More information

Introduction to Game Theory

Introduction to Game Theory Introduction to Game Theory Part 2. Dynamic games of complete information Chapter 4. Dynamic games of complete but imperfect information Ciclo Profissional 2 o Semestre / 2011 Graduação em Ciências Econômicas

More information

5 AVL trees: deletion

5 AVL trees: deletion 5 AVL trees: deletion Definition of AVL trees Definition: A binary search tree is called AVL tree or height-balanced tree, if for each node v the height of the right subtree h(t r ) of v and the height

More information

A Note on Downup Permutations and Increasing Trees DAVID CALLAN. Department of Statistics. Medical Science Center University Ave

A Note on Downup Permutations and Increasing Trees DAVID CALLAN. Department of Statistics. Medical Science Center University Ave A Note on Downup Permutations and Increasing 0-1- Trees DAVID CALLAN Department of Statistics University of Wisconsin-Madison Medical Science Center 1300 University Ave Madison, WI 53706-153 callan@stat.wisc.edu

More information

Learning Log Title: CHAPTER 2: ARITHMETIC STRATEGIES AND AREA. Date: Lesson: Chapter 2: Arithmetic Strategies and Area

Learning Log Title: CHAPTER 2: ARITHMETIC STRATEGIES AND AREA. Date: Lesson: Chapter 2: Arithmetic Strategies and Area Chapter 2: Arithmetic Strategies and Area CHAPTER 2: ARITHMETIC STRATEGIES AND AREA Date: Lesson: Learning Log Title: Date: Lesson: Learning Log Title: Chapter 2: Arithmetic Strategies and Area Date: Lesson:

More information

PRIORITY QUEUES AND HEAPS. Lecture 19 CS2110 Spring 2014

PRIORITY QUEUES AND HEAPS. Lecture 19 CS2110 Spring 2014 1 PRIORITY QUEUES AND HEAPS Lecture 19 CS2110 Spring 2014 Readings and Homework 2 Read Chapter 2 to learn about heaps Salespeople often make matrices that show all the great features of their product that

More information

On uniquely k-determined permutations

On uniquely k-determined permutations On uniquely k-determined permutations Sergey Avgustinovich and Sergey Kitaev 16th March 2007 Abstract Motivated by a new point of view to study occurrences of consecutive patterns in permutations, we introduce

More information

Sequential games. We may play the dating game as a sequential game. In this case, one player, say Connie, makes a choice before the other.

Sequential games. We may play the dating game as a sequential game. In this case, one player, say Connie, makes a choice before the other. Sequential games Sequential games A sequential game is a game where one player chooses his action before the others choose their. We say that a game has perfect information if all players know all moves

More information

Unless stated otherwise, explain your logic and write out complete sentences. No notes, books, calculators, or other electronic devices are permitted.

Unless stated otherwise, explain your logic and write out complete sentences. No notes, books, calculators, or other electronic devices are permitted. Remarks: The final exam will be comprehensive. The questions on this practice final are roughly ordered according to when we learned about them; this will not be the case for the actual final. Certainly

More information

Number Fun December 3,

Number Fun December 3, Number Fun December 3, 2008 John L. Lehet jlehet@mathmaverick.com www.mathmaverick.com Numbers Fibonacci Numbers Digital Roots Vedic Math Original Puzzles MathMagic Tricks Predict the Sum? (PredictTheSum.xls)

More information

CSE 100: BST AVERAGE CASE AND HUFFMAN CODES

CSE 100: BST AVERAGE CASE AND HUFFMAN CODES CSE 100: BST AVERAGE CASE AND HUFFMAN CODES Recap: Average Case Analysis of successful find in a BST N nodes Expected total depth of all BSTs with N nodes Recap: Probability of having i nodes in the left

More information

DVA325 Formal Languages, Automata and Models of Computation (FABER)

DVA325 Formal Languages, Automata and Models of Computation (FABER) DVA325 Formal Languages, Automata and Models of Computation (FABER) Lecture 1 - Introduction School of Innovation, Design and Engineering Mälardalen University 11 November 2014 Abu Naser Masud FABER November

More information

Math236 Discrete Maths with Applications

Math236 Discrete Maths with Applications Math236 Discrete Maths with Applications P. Ittmann UKZN, Pietermaritzburg Semester 1, 2012 Ittmann (UKZN PMB) Math236 2012 1 / 43 The Multiplication Principle Theorem Let S be a set of k-tuples (s 1,

More information

Checkpoint Questions Due Monday, October 7 at 2:15 PM Remaining Questions Due Friday, October 11 at 2:15 PM

Checkpoint Questions Due Monday, October 7 at 2:15 PM Remaining Questions Due Friday, October 11 at 2:15 PM CS13 Handout 8 Fall 13 October 4, 13 Problem Set This second problem set is all about induction and the sheer breadth of applications it entails. By the time you're done with this problem set, you will

More information

Chapter 7: Sorting 7.1. Original

Chapter 7: Sorting 7.1. Original Chapter 7: Sorting 7.1 Original 3 1 4 1 5 9 2 6 5 after P=2 1 3 4 1 5 9 2 6 5 after P=3 1 3 4 1 5 9 2 6 5 after P=4 1 1 3 4 5 9 2 6 5 after P=5 1 1 3 4 5 9 2 6 5 after P=6 1 1 3 4 5 9 2 6 5 after P=7 1

More information

Coding for Efficiency

Coding for Efficiency Let s suppose that, over some channel, we want to transmit text containing only 4 symbols, a, b, c, and d. Further, let s suppose they have a probability of occurrence in any block of text we send as follows

More information

CSE373: Data Structure & Algorithms Lecture 23: More Sorting and Other Classes of Algorithms. Nicki Dell Spring 2014

CSE373: Data Structure & Algorithms Lecture 23: More Sorting and Other Classes of Algorithms. Nicki Dell Spring 2014 CSE373: Data Structure & Algorithms Lecture 23: More Sorting and Other Classes of Algorithms Nicki Dell Spring 2014 Admin No class on Monday Extra time for homework 5 J 2 Sorting: The Big Picture Surprising

More information

Merge Sort. Note that the recursion bottoms out when the subarray has just one element, so that it is trivially sorted.

Merge Sort. Note that the recursion bottoms out when the subarray has just one element, so that it is trivially sorted. 1 of 10 Merge Sort Merge sort is based on the divide-and-conquer paradigm. Its worst-case running time has a lower order of growth than insertion sort. Since we are dealing with subproblems, we state each

More information

Heuristics, and what to do if you don t know what to do. Carl Hultquist

Heuristics, and what to do if you don t know what to do. Carl Hultquist Heuristics, and what to do if you don t know what to do Carl Hultquist What is a heuristic? Relating to or using a problem-solving technique in which the most appropriate solution of several found by alternative

More information

Huffman Coding - A Greedy Algorithm. Slides based on Kevin Wayne / Pearson-Addison Wesley

Huffman Coding - A Greedy Algorithm. Slides based on Kevin Wayne / Pearson-Addison Wesley - A Greedy Algorithm Slides based on Kevin Wayne / Pearson-Addison Wesley Greedy Algorithms Greedy Algorithms Build up solutions in small steps Make local decisions Previous decisions are never reconsidered

More information

Solutions to Part I of Game Theory

Solutions to Part I of Game Theory Solutions to Part I of Game Theory Thomas S. Ferguson Solutions to Section I.1 1. To make your opponent take the last chip, you must leave a pile of size 1. So 1 is a P-position, and then 2, 3, and 4 are

More information

Maths lesson. Exploring sequences and the Fibonacci sequence. Learning objectives. Knowledge. Skills. Resources

Maths lesson. Exploring sequences and the Fibonacci sequence. Learning objectives. Knowledge. Skills. Resources Exploring sequences and the Fibonacci sequence Learning objectives 1. Explore the exponential sequences, leading to negative powers. 2. Discover the Fibonacci sequence and the Golden Number or Golden Ratio.

More information

Restricted Permutations Related to Fibonacci Numbers and k-generalized Fibonacci Numbers

Restricted Permutations Related to Fibonacci Numbers and k-generalized Fibonacci Numbers Restricted Permutations Related to Fibonacci Numbers and k-generalized Fibonacci Numbers arxiv:math/0109219v1 [math.co] 27 Sep 2001 Eric S. Egge Department of Mathematics Gettysburg College 300 North Washington

More information

FIBONACCI KOLAMS -- AN OVERVIEW

FIBONACCI KOLAMS -- AN OVERVIEW FIBONACCI KOLAMS -- AN OVERVIEW S. Naranan This paper is an overview of all my work on Fibonacci Kolams as of end of the year 2015 that is included in my website www.vindhiya.com/snaranan/fk/index.htm

More information

PRIORITY QUEUES AND HEAPS. Slides of Ken Birman, Cornell University

PRIORITY QUEUES AND HEAPS. Slides of Ken Birman, Cornell University PRIORITY QUEUES AND HEAPS Slides of Ken Birman, Cornell University The Bag Interface 2 A Bag: interface Bag { void insert(e obj); E extract(); //extract some element boolean isempty(); } Examples: Stack,

More information

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 Today: Introductory comments Some example problems Announcements course information sheet online (from my personal homepage: Rogaway ) first HW due Wednesday

More information

Solutions to Assignment-2 MOOC-Information Theory

Solutions to Assignment-2 MOOC-Information Theory Solutions to Assignment-2 MOOC-Information Theory 1. Which of the following is a prefix-free code? a) 01, 10, 101, 00, 11 b) 0, 11, 01 c) 01, 10, 11, 00 Solution:- The codewords of (a) are not prefix-free

More information

Some Fine Combinatorics

Some Fine Combinatorics Some Fine Combinatorics David P. Little Department of Mathematics Penn State University University Park, PA 16802 Email: dlittle@math.psu.edu August 3, 2009 Dedicated to George Andrews on the occasion

More information

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD Course Overview Graph Algorithms Algorithm Design Techniques: Greedy Algorithms Divide and Conquer Dynamic Programming Network Flows Computational Intractability Main Ideas Main idea: Break the given

More information

Game Theory and Randomized Algorithms

Game Theory and Randomized Algorithms Game Theory and Randomized Algorithms Guy Aridor Game theory is a set of tools that allow us to understand how decisionmakers interact with each other. It has practical applications in economics, international

More information

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH1301 DISCRETE MATHEMATICS. Time Allowed: 2 hours

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH1301 DISCRETE MATHEMATICS. Time Allowed: 2 hours NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 206-207 DISCRETE MATHEMATICS May 207 Time Allowed: 2 hours INSTRUCTIONS TO CANDIDATES. This examination paper contains FOUR (4) questions and comprises

More information

MAT3707. Tutorial letter 202/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/202/1/2017

MAT3707. Tutorial letter 202/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/202/1/2017 MAT3707/0//07 Tutorial letter 0//07 DISCRETE MATHEMATICS: COMBINATORICS MAT3707 Semester Department of Mathematical Sciences SOLUTIONS TO ASSIGNMENT 0 BARCODE Define tomorrow university of south africa

More information

CSS 343 Data Structures, Algorithms, and Discrete Math II. Balanced Search Trees. Yusuf Pisan

CSS 343 Data Structures, Algorithms, and Discrete Math II. Balanced Search Trees. Yusuf Pisan CSS 343 Data Structures, Algorithms, and Discrete Math II Balanced Search Trees Yusuf Pisan Height Height of a tree impacts how long it takes to find an item Balanced tree O(log n) vs Degenerate tree O(n)

More information

EXPERIMENT 1: Amplitude Shift Keying (ASK)

EXPERIMENT 1: Amplitude Shift Keying (ASK) EXPERIMENT 1: Amplitude Shift Keying (ASK) 1) OBJECTIVE Generation and demodulation of an amplitude shift keyed (ASK) signal 2) PRELIMINARY DISCUSSION In ASK, the amplitude of a carrier signal is modified

More information

Generalized Game Trees

Generalized Game Trees Generalized Game Trees Richard E. Korf Computer Science Department University of California, Los Angeles Los Angeles, Ca. 90024 Abstract We consider two generalizations of the standard two-player game

More information

An Optimal Algorithm for a Strategy Game

An Optimal Algorithm for a Strategy Game International Conference on Materials Engineering and Information Technology Applications (MEITA 2015) An Optimal Algorithm for a Strategy Game Daxin Zhu 1, a and Xiaodong Wang 2,b* 1 Quanzhou Normal University,

More information

RESTRICTED PERMUTATIONS AND POLYGONS. Ghassan Firro and Toufik Mansour Department of Mathematics, University of Haifa, Haifa, Israel

RESTRICTED PERMUTATIONS AND POLYGONS. Ghassan Firro and Toufik Mansour Department of Mathematics, University of Haifa, Haifa, Israel RESTRICTED PERMUTATIONS AND POLYGONS Ghassan Firro and Toufik Mansour Department of Mathematics, University of Haifa, 905 Haifa, Israel {gferro,toufik}@mathhaifaacil abstract Several authors have examined

More information

MITOCW 7. Counting Sort, Radix Sort, Lower Bounds for Sorting

MITOCW 7. Counting Sort, Radix Sort, Lower Bounds for Sorting MITOCW 7. Counting Sort, Radix Sort, Lower Bounds for Sorting The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality

More information

Facilitator Guide. Unit 2

Facilitator Guide. Unit 2 Facilitator Guide Unit 2 UNIT 02 Facilitator Guide ACTIVITIES NOTE: At many points in the activities for Mathematics Illuminated, workshop participants will be asked to explain, either verbally or in

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11 EECS 70 Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11 Counting As we saw in our discussion for uniform discrete probability, being able to count the number of elements of

More information

5. (1-25 M) How many ways can 4 women and 4 men be seated around a circular table so that no two women are seated next to each other.

5. (1-25 M) How many ways can 4 women and 4 men be seated around a circular table so that no two women are seated next to each other. A.Miller M475 Fall 2010 Homewor problems are due in class one wee from the day assigned (which is in parentheses. Please do not hand in the problems early. 1. (1-20 W A boo shelf holds 5 different English

More information

2. The lines with equations ax + 2y = c and bx - 3y = d are perpendicular. Find a b. A. -6 B C. -1 D. 1.5 E. 6

2. The lines with equations ax + 2y = c and bx - 3y = d are perpendicular. Find a b. A. -6 B C. -1 D. 1.5 E. 6 Test #2 AMATYC Student Mathematics League February/March 2014 1. A store advertises, We pay the sales tax! If sales tax is 8%, what discount to the buyer to the nearest tenth of a percent does this represent?

More information

RBT Operations. The basic algorithm for inserting a node into an RBT is:

RBT Operations. The basic algorithm for inserting a node into an RBT is: RBT Operations The basic algorithm for inserting a node into an RBT is: 1: procedure RBT INSERT(T, x) 2: BST insert(t, x) : colour[x] red 4: if parent[x] = red then 5: RBT insert fixup(t, x) 6: end if

More information

From Shared Memory to Message Passing

From Shared Memory to Message Passing From Shared Memory to Message Passing Stefan Schmid T-Labs / TU Berlin Some parts of the lecture, parts of the Skript and exercises will be based on the lectures of Prof. Roger Wattenhofer at ETH Zurich

More information

Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute. Module 6 Lecture - 37 Divide and Conquer: Counting Inversions

Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute. Module 6 Lecture - 37 Divide and Conquer: Counting Inversions Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute Module 6 Lecture - 37 Divide and Conquer: Counting Inversions Let us go back and look at Divide and Conquer again.

More information

Math Lecture 2 Inverse Functions & Logarithms

Math Lecture 2 Inverse Functions & Logarithms Math 1060 Lecture 2 Inverse Functions & Logarithms Outline Summary of last lecture Inverse Functions Domain, codomain, and range One-to-one functions Inverse functions Inverse trig functions Logarithms

More information

Balanced Trees. Balanced Trees Tree. 2-3 Tree. 2 Node. Binary search trees are not guaranteed to be balanced given random inserts and deletes

Balanced Trees. Balanced Trees Tree. 2-3 Tree. 2 Node. Binary search trees are not guaranteed to be balanced given random inserts and deletes Balanced Trees Balanced Trees 23 Tree Binary search trees are not guaranteed to be balanced given random inserts and deletes! Tree could degrade to O(n) operations Balanced search trees! Operations maintain

More information

@CRC Press. Discrete Mathematics. with Ducks. sarah-marie belcastro. let this be your watchword. serious mathematics treated with levity

@CRC Press. Discrete Mathematics. with Ducks. sarah-marie belcastro. let this be your watchword. serious mathematics treated with levity Discrete Mathematics with Ducks sarah-marie belcastro serious mathematics treated with levity let this be your watchword @CRC Press Taylor & Francis Croup Boca Raton London New York CRC Press is an imprint

More information

THE GAME CREATION OPERATOR

THE GAME CREATION OPERATOR 2/6/17 THE GAME CREATION OPERATOR Joint work with Urban Larsson and Matthieu Dufour Silvia Heubach California State University Los Angeles SoCal-Nevada Fall 2016 Section Meeting October 22, 2016 Much of

More information

Information for teachers

Information for teachers Topic Drawing line graphs Level Key Stage 3/GCSE (or any course for students aged - 6) Outcomes. Students identify what is wrong with a line graph 2. Students use a mark scheme to peer assess a line graph

More information

Design of Parallel Algorithms. Communication Algorithms

Design of Parallel Algorithms. Communication Algorithms + Design of Parallel Algorithms Communication Algorithms + Topic Overview n One-to-All Broadcast and All-to-One Reduction n All-to-All Broadcast and Reduction n All-Reduce and Prefix-Sum Operations n Scatter

More information

Math Contest Level 2 - March 17, Coastal Carolina University

Math Contest Level 2 - March 17, Coastal Carolina University Math Contest Level 2 - March 17, 2017 Coastal Carolina University 1. Which one of the following numbers is NOT prime? a) 241 b) 247 c) 251 d) 257 e) 263 2. If the sum goes on forever, what does 1 + 1 +

More information

Geometry Unit 2 Review Day 1 What to expect on the test:

Geometry Unit 2 Review Day 1 What to expect on the test: Geometry Unit 2 Review Day 1 What to expect on the test: Conditional s Converse Inverse Contrapositive Bi-conditional statements Today we are going to do more work with Algebraic Proofs Counterexamples/Instances

More information

Introduction to Spring 2009 Artificial Intelligence Final Exam

Introduction to Spring 2009 Artificial Intelligence Final Exam CS 188 Introduction to Spring 2009 Artificial Intelligence Final Exam INSTRUCTIONS You have 3 hours. The exam is closed book, closed notes except a two-page crib sheet, double-sided. Please use non-programmable

More information

CRACKING THE 15 PUZZLE - PART 4: TYING EVERYTHING TOGETHER BEGINNERS 02/21/2016

CRACKING THE 15 PUZZLE - PART 4: TYING EVERYTHING TOGETHER BEGINNERS 02/21/2016 CRACKING THE 15 PUZZLE - PART 4: TYING EVERYTHING TOGETHER BEGINNERS 02/21/2016 Review Recall from last time that we proved the following theorem: Theorem 1. The sign of any transposition is 1. Using this

More information

EQUIPOPULARITY CLASSES IN THE SEPARABLE PERMUTATIONS

EQUIPOPULARITY CLASSES IN THE SEPARABLE PERMUTATIONS EQUIPOPULARITY CLASSES IN THE SEPARABLE PERMUTATIONS Michael Albert, Cheyne Homberger, and Jay Pantone Abstract When two patterns occur equally often in a set of permutations, we say that these patterns

More information

SOME MORE DECREASE AND CONQUER ALGORITHMS

SOME MORE DECREASE AND CONQUER ALGORITHMS What questions do you have? Decrease by a constant factor Decrease by a variable amount SOME MORE DECREASE AND CONQUER ALGORITHMS Insertion Sort on Steroids SHELL'S SORT A QUICK RECAP 1 Shell's Sort We

More information

Math 122 Rough Guide to Studying for Exam 2 Spring, 2009

Math 122 Rough Guide to Studying for Exam 2 Spring, 2009 Warning: Please don t take this as the final word on how to study. First of all, everybody learns differently, second of all, I am an expert at math, not at the theory of studying, and finally, I m squeezing

More information

Topic 23 Red Black Trees

Topic 23 Red Black Trees Topic 23 "People in every direction No words exchanged No time to exchange And all the little ants are marching Red and Black antennas waving" -Ants Marching, Dave Matthew's Band "Welcome to L.A.'s Automated

More information

Subtraction games with expandable subtraction sets

Subtraction games with expandable subtraction sets with expandable subtraction sets Bao Ho Department of Mathematics and Statistics La Trobe University Monash University April 11, 2012 with expandable subtraction sets Outline The game of Nim Nim-values

More information

Module 3 Greedy Strategy

Module 3 Greedy Strategy Module 3 Greedy Strategy Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu Introduction to Greedy Technique Main

More information

6.042/18.062J Mathematics for Computer Science December 17, 2008 Tom Leighton and Marten van Dijk. Final Exam

6.042/18.062J Mathematics for Computer Science December 17, 2008 Tom Leighton and Marten van Dijk. Final Exam 6.042/18.062J Mathematics for Computer Science December 17, 2008 Tom Leighton and Marten van Dijk Final Exam Problem 1. [25 points] The Final Breakdown Suppose the 6.042 final consists of: 36 true/false

More information

Hello and welcome to today s lecture. In the last couple of lectures we have discussed about various transmission media.

Hello and welcome to today s lecture. In the last couple of lectures we have discussed about various transmission media. Data Communication Prof. Ajit Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture No # 7 Transmission of Digital Signal-I Hello and welcome to today s lecture.

More information

Logs and Exponentials Higher.notebook February 26, Daily Practice

Logs and Exponentials Higher.notebook February 26, Daily Practice Daily Practice 2.2.2015 Daily Practice 3.2.2015 Today we will be learning about exponential functions and logs. Homework due! Need to know for Unit Test 2: Expressions and Functions Adding and subtracng

More information

Directed Towers of Hanoi

Directed Towers of Hanoi Richard Anstee, UBC, Vancouver January 10, 2019 Introduction The original Towers of Hanoi problem considers a problem 3 pegs and with n different sized discs that fit on the pegs. A legal move is to move

More information

GCSE Maths Revision Factors and Multiples

GCSE Maths Revision Factors and Multiples GCSE Maths Revision Factors and Multiples Adam Mlynarczyk www.mathstutor4you.com 1 Factors and Multiples Key Facts: Factors of a number divide into it exactly. Multiples of a number can be divided by it

More information

and problem sheet 7

and problem sheet 7 1-18 and 15-151 problem sheet 7 Solutions to the following five exercises and optional bonus problem are to be submitted through gradescope by 11:30PM on Friday nd November 018. Problem 1 Let A N + and

More information

CS 473G: Combinatorial Algorithms, Fall 2005 Homework 0. I understand the Homework Instructions and FAQ.

CS 473G: Combinatorial Algorithms, Fall 2005 Homework 0. I understand the Homework Instructions and FAQ. CS 473G: Combinatorial lgorithms, Fall 2005 Homework 0 Due Thursday, September 1, 2005, at the beginning of class (12:30pm CDT) Name: Net ID: lias: I understand the Homework Instructions and FQ. Neatly

More information

Splay tree concept Splaying operation: double-rotations Splay insertion Splay search Splay deletion Running time of splay tree operations

Splay tree concept Splaying operation: double-rotations Splay insertion Splay search Splay deletion Running time of splay tree operations 4.5 Splay trees Splay tree concept Splaying operation: double-rotations Splay insertion Splay search Splay deletion Running time of splay tree operations 43 Splay trees splay tree is a balanced ST built

More information

DIFFERENT SEQUENCES. Learning Outcomes and Assessment Standards T 2 T 3

DIFFERENT SEQUENCES. Learning Outcomes and Assessment Standards T 2 T 3 Lesson 21 DIFFERENT SEQUENCES Learning Outcomes and Assessment Standards Learning Outcome 1: Number and number relationships Assessment Standard Investigate number patterns including but not limited to

More information

132-avoiding Two-stack Sortable Permutations, Fibonacci Numbers, and Pell Numbers

132-avoiding Two-stack Sortable Permutations, Fibonacci Numbers, and Pell Numbers 132-avoiding Two-stack Sortable Permutations, Fibonacci Numbers, and Pell Numbers arxiv:math/0205206v1 [math.co] 19 May 2002 Eric S. Egge Department of Mathematics Gettysburg College Gettysburg, PA 17325

More information

Binary Search Tree (Part 2 The AVL-tree)

Binary Search Tree (Part 2 The AVL-tree) Yufei Tao ITEE University of Queensland We ave already learned a static version of te BST. In tis lecture, we will make te structure dynamic, namely, allowing it to support updates (i.e., insertions and

More information

arxiv: v1 [cs.dm] 13 Feb 2015

arxiv: v1 [cs.dm] 13 Feb 2015 BUILDING NIM arxiv:1502.04068v1 [cs.dm] 13 Feb 2015 Eric Duchêne 1 Université Lyon 1, LIRIS, UMR5205, F-69622, France eric.duchene@univ-lyon1.fr Matthieu Dufour Dept. of Mathematics, Université du Québec

More information

CSE 100: RED-BLACK TREES

CSE 100: RED-BLACK TREES 1 CSE 100: RED-BLACK TREES 2 Red-Black Trees 1 70 10 20 60 8 6 80 90 40 1. Nodes are either red or black 2. Root is always black 3. If a node is red, all it s children must be black 4. For every node X,

More information

Section 7.2 Logarithmic Functions

Section 7.2 Logarithmic Functions Math 150 c Lynch 1 of 6 Section 7.2 Logarithmic Functions Definition. Let a be any positive number not equal to 1. The logarithm of x to the base a is y if and only if a y = x. The number y is denoted

More information

Comm. 502: Communication Theory. Lecture 6. - Introduction to Source Coding

Comm. 502: Communication Theory. Lecture 6. - Introduction to Source Coding Comm. 50: Communication Theory Lecture 6 - Introduction to Source Coding Digital Communication Systems Source of Information User of Information Source Encoder Source Decoder Channel Encoder Channel Decoder

More information

2004 Denison Spring Programming Contest 1

2004 Denison Spring Programming Contest 1 24 Denison Spring Programming Contest 1 Problem : 4 Square It s been known for over 2 years that every positive integer can be written in the form x 2 + y 2 + z 2 + w 2, for x,y,z,w non-negative integers.

More information

((( ))) CS 19: Discrete Mathematics. Please feel free to ask questions! Getting into the mood. Pancakes With A Problem!

((( ))) CS 19: Discrete Mathematics. Please feel free to ask questions! Getting into the mood. Pancakes With A Problem! CS : Discrete Mathematics Professor Amit Chakrabarti Please feel free to ask questions! ((( ))) Teaching Assistants Chien-Chung Huang David Blinn http://www.cs cs.dartmouth.edu/~cs Getting into the mood

More information

Preface for Instructors and Other Teachers 1 About This Book... xvii

Preface for Instructors and Other Teachers 1 About This Book... xvii Preface for Instructors and Other Teachers xvii 1 About This Book.... xvii 2 How tousethis Book...................... xx 2.1 A Start on Discovery-Based Learning..... xxi 2.2 Details of Conducting Group

More information

PHYSICS 330 LAB Operational Amplifier Frequency Response

PHYSICS 330 LAB Operational Amplifier Frequency Response PHYSICS 330 LAB Operational Amplifier Frequency Response Objectives: To measure and plot the frequency response of an operational amplifier circuit. History: Operational amplifiers are among the most widely

More information

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA Graphs of Tilings Patrick Callahan, University of California Office of the President, Oakland, CA Phyllis Chinn, Department of Mathematics Humboldt State University, Arcata, CA Silvia Heubach, Department

More information

Pattern Avoidance in Unimodal and V-unimodal Permutations

Pattern Avoidance in Unimodal and V-unimodal Permutations Pattern Avoidance in Unimodal and V-unimodal Permutations Dido Salazar-Torres May 16, 2009 Abstract A characterization of unimodal, [321]-avoiding permutations and an enumeration shall be given.there is

More information

SURDS, SPIRALS, DYNAMIC GEOMETRY AND CAS

SURDS, SPIRALS, DYNAMIC GEOMETRY AND CAS SURDS, SPIRALS, DYNAMIC GEOMETRY AND CAS Kaye Stacey and Elizabeth Price University of Melbourne and Canterbury Girls Secondary College This paper aims to enrich the teaching of surds. We use explorations

More information

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = = Math 115 Discrete Math Final Exam December 13, 2000 Your name It is important that you show your work. 1. Use the Euclidean algorithm to solve the decanting problem for decanters of sizes 199 and 98. In

More information

CONTENTS GRAPH THEORY

CONTENTS GRAPH THEORY CONTENTS i GRAPH THEORY GRAPH THEORY By Udit Agarwal M.Sc. (Maths), M.C.A. Sr. Lecturer, Rakshpal Bahadur Management Institute, Bareilly Umeshpal Singh (MCA) Director, Rotary Institute of Management and

More information

Guest Lecture, October

Guest Lecture, October Math 640: EXPERIMENTAL MATHEMATICS Fall 2016 (Rutgers University) Guest Lecture, October 3 2016 Neil J. A. Sloane Mathematics Department, Rutgers and The OEIS Foundation Outline 1. Quick overview of OEIS

More information

Semester 2 F i n a l Project Create a Math Board Game Due: May 11 th and 13 th

Semester 2 F i n a l Project Create a Math Board Game Due: May 11 th and 13 th Semester 2 F i n a l Project Create a Math Board Game Due: May 11 th and 13 th May 1, 2015 Dear students and families, As my final project, students are creating a math board game that supports the content

More information

#A13 INTEGERS 15 (2015) THE LOCATION OF THE FIRST ASCENT IN A 123-AVOIDING PERMUTATION

#A13 INTEGERS 15 (2015) THE LOCATION OF THE FIRST ASCENT IN A 123-AVOIDING PERMUTATION #A13 INTEGERS 15 (2015) THE LOCATION OF THE FIRST ASCENT IN A 123-AVOIDING PERMUTATION Samuel Connolly Department of Mathematics, Brown University, Providence, Rhode Island Zachary Gabor Department of

More information

You could identify a point on the graph of a function as (x,y) or (x, f(x)). You may have only one function value for each x number.

You could identify a point on the graph of a function as (x,y) or (x, f(x)). You may have only one function value for each x number. Function Before we review exponential and logarithmic functions, let's review the definition of a function and the graph of a function. A function is just a rule. The rule links one number to a second

More information

Common Core Math Tutorial and Practice

Common Core Math Tutorial and Practice Common Core Math Tutorial and Practice TABLE OF CONTENTS Chapter One Number and Numerical Operations Number Sense...4 Ratios, Proportions, and Percents...12 Comparing and Ordering...19 Equivalent Numbers,

More information

Lesson 1. Unit 4. Golden Ratio. Ratio

Lesson 1. Unit 4. Golden Ratio. Ratio Lesson 1 Ratio Golden Ratio The golden ratio is a special ratio that is found in nature. In a nautilus shell it is found in the spiral. The spiral forms squares as shown. The rectangle formed reflects

More information

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS DANIEL BACZKOWSKI, OLAOLU FASORANTI, AND CARRIE E. FINCH Abstract. In this paper, we show that there are infinitely many Sierpiński numbers in the sequence of

More information