Snowflake Numbers. A look at the Collatz Conjecture in a recreational manner. By Sir Charles W. Shults III

Size: px
Start display at page:

Download "Snowflake Numbers. A look at the Collatz Conjecture in a recreational manner. By Sir Charles W. Shults III"

Transcription

1 Snowflake Numbers A look at the Collatz Conjecture in a recreational manner By Sir Charles W. Shults III For many people, mathematics is something dry and of little interest. I ran across the mention of snowflake numbers 1 in a book by Douglas R. Hofstadter (Godel, Escher, Bach, 1979) and was immediately taken by the concept. The idea is simple; a set of two rules is applied to any real number and the goal is to keep applying the rules until you reach a value of 1. What is not apparent is how amazing and complex a system emerges from this little game. It includes all real numbers and always reaches 1, although it is apparently mathematically very hard to prove that this is always true. Let me outline the rules first and then I will explain what it brings into being. Let s pick any real number and if that number is even, we will divide it by two. This will become our new number. This is rule number 1. But, if the value is odd, we will multiply it by three and add one. In this case, this will be our new number. This is rule number 2. Now, at this point we must decide if we have reached our stopping pointthe value 1. If we have not, we repeat the above process and then see if we have reached 1 yet. For example, let us pick the number 7. Since it is odd, we would apply the second rule and multiply by 3, then add 1. We end up with 22. Now, we have an even number and we apply rule number 1- divide by 2 and end up with 11. As you can see, this then leads us to 34 (through rule 2) and we then use rule 1 and get 17. This explains where the name snowflake numbers come from. Just as a snowflake will rise and fall in a cloudbank, our number values will rise and fall in an unpredictable manner- sometimes to minor steps, other times to great heights. Some people have actually preferred to call these hailstone numbers but in any event the results are the same. Now, something strange happens here, and it is this: in the end, no matter what number you may pick for the process, you will eventually end up getting to 4, 2, and 1. It does not matter what number you may start with or where it may climb or fall, because in the end every number will arrive at the bottom. But what is more amazing is that no matter the course your number may take, no matter what rising and falling it may do, it appears to be mathematically impossible to prove that every number will end at 1. This is one of those amazing and intractable logical puzzles. How do we prove our belief? How do we go about even starting? Nobody has had a clue for over seventy years 2. Using computers, nearly six quintillion values have been tried 3, and every single case has ended at the bottom. Some have undergone amazing treks into very large 1 This problem is known as the Collatz Conjecture, named after Lothar Collatz defined it in A mathematician at the University of Hamburg, Gerhard Opfer, was a student of Collatz and now feels he has solved the problem. His paper is being peer reviewed presently. 3 The actual numbers tried extend up to 5.76 x 10^18 which is close to 6 billion billion. 1 of 6

2 number territory, but in the end every one has ended at 1. Why should this be true? Again, nobody knows. The Snowflake Tree Suppose we were to try something a little different with a snowflake number. Let s look at a number and see if we can create a structure that will show how the snowflake numbers are connected and then see what emerges from this operation. The first step is to reformat the two rules. Rule 1 is our divide by 2 rule and can be written as 2/n (where n refers to the number we have chosen). Rule 2 can be referred to as 3n+1 where, again, n refers to the number we have chosen. Now we can start to unravel a little of the mystery surrounding the snowflake numbers First we can see that for any number, it may be possible to get to it from one or two different paths. What I mean is simple- some numbers can be arrived at only by rule 1 or rule 2, but some numbers can be arrived at either way. For instance, if I were to have the number 7, I know that I might have gotten 7 from applying rule 1 to the number 14. But there is no number that could have reached 7 by applying rule 2. While it is true that we can apply rule 2 to the number 2 and mathematically reach 7, it is against the rules because we must have an odd number to do that. Therefore, there is one and only one path to the number 7. What about 10? Truly we could have had 20 and applied rule 1 to get 10, but we also might have had 3 and applied rule 2. If we multiply 3 by 3 and add 1, we also get 10. So 10 can be arrived at in two ways. Here we would have a branch in our tree. Let s look at how this would appear: \ / Now, what is important is this- given a specific number, you or I cannot work backwards and determine what the previous number was in all cases. Only a portion of the cases will allow me to backtrack and see what came before. This is crucial to the whole snowflake number concept. It is not deterministic in that we cannot tell for certain the history or origin of a specific number. Conversely, without this fact we could not construct a tree of numbers. But here is the heart of the matter. It appears that every single real number, no matter what its value, will appear once and only once on this tree. So we can select any starting number and graph it as a tree, and we will find that other number tree sections will graft onto it here and there, creating the tree structure and eventually (we think) encompassing all real numbers. After a few such branches and sections have been generated, you will soon find that the bits and pieces fit together in one unique manner. Of course, depending on where you start, it may take many pieces to make out the whole, but all that is needed is to follow one of the branches to its lowest value and it will then automatically show you where it fits in the tree. 2 of 6

3 It is entertaining to graph a few random numbers and see the structure that emerges, and I have done this for a handful of values. Let s have a look and we can find out some surprising things pretty rapidly \ \ / \ \ \ / \ / \ / \ \ \ / \ \ / \ / \ / \ / \ \ / \ / \ / \ / / / / / / / (from 32) A portion of the snowflake number tree The Crucial Question So now, we can ask the most important question about snowflake numbers. Is it possible that somewhere, there is a number that does not reach 1? Is it possible that some value, instead of fitting on a tree, will produce a loop? And in a similar vein, is it 3 of 6

4 possible that somewhere there is a number (or set of numbers) that will produce another entire tree that does not intersect this one anywhere? You see, if there is a number that does produce a loop or does not reach 1, we could predict some of its properties. For instance, the number must have companions in this loop or alternate tree, because it cannot loop back on itself. How can we know this? Because if the number were odd, it could only get larger with the application of rule 2, and if the number were even, it could only get smaller with the application of rule 1. This implies that there must be at least three numbers in this alternate loop or tree. Think about the sequence at the end of the tree. Using rule 2 can only produce an even number. This is because odd times odd equals odd. When we add one more, it automatically is made even. We know that even numbers will be divided by two and so we can see that as a consequence, the shortest possible loop will be three numbers long. After all, dividing by two a couple of times produces a division by four, and multiplying by three and adding one can only equal that if you start with one- all other cases get closer and closer to only being three times as great, the larger the starting number happens to be. Another consequence of the snowflake tree is this: if any value on the existing tree emerges ever in a sequence, then it is undeniably a part of the tree. A separate snowflake tree that does not reach at its end would have to have only numbers that do not and cannot occur on the regular snowflake tree. So now we can derive another simple fact. That fact is that if a separate snowflake tree exists, it must have members that do not show up on the regular tree, and when we combine that with the reasoning about the loop at the end, we know that there must be at least four members of this tree or loop, if it exists at all. But wait- there seems to be an assumption here. That assumption is that the tree must end in a loop. That can be proven to be a fact and not an assumption. Let s see why. Suppose my tree terminated in a number. That number would be either odd or even. This dictates that we could then apply either rule 1 or rule 2 to this new number. The result will be that the new number will be either larger or smaller, and it will either already be on the tree or not. If it is not, then we were not at the end. If it is in fact on the tree, then we are in a loop. Again, the loop is an example, and it is the only known example. However, we can see that the rules will be true for any loop if any other loop is possible. Testing larger numbers with a computer soon becomes rather cumbersome because you will end up repeating steps at some point. The solution is to create a table and check off all numbers that you have previously encountered, and then you can check your results and know if you have been that way before. The path is clearly laid out for you that way, and you can stop checking a number the instant you come across it in your records. The fact is, after a few such tests by hand, it can become rather boring. The use of a computer is really the only way to go. The program for generating the numbers is simple enough, and you can literally have it step through every number automatically and fill in the table as you go. It is helpful to know that every number tested so far is on the tree, so you don t have to have a database of all numbers in your computer. You can test simply by asking if the result is smaller than, say, a trillion. If it is, there is no doubt that 4 of 6

5 the number is on the standard tree. And, numbers up into the quintillions have already been tested and all so far are on the tree. So any number that results in a value smaller than 5.76 quintillion is not left out and you will have to look further. But now we arrive at another interesting fact. If there is an alternate tree, its numbers will be in the quintillions or even larger. There is no getting around this fact. Some Facts about Snowflake Numbers It s amazing how much you can discover with a little logic and a calculator. Just looking over the last few paragraphs, it is possible to make many factual statements about snowflake numbers. For instance, for any given number, there will be an infinite number of paths to get to that number. Another interesting fact- if all numbers are on the snowflake tree, then absolutely every single number will eventually reach , but only half of the numbers will pass through 32 and only half of the numbers will pass through 5. That is the first point where the tree splits and any number you pick at random will show up only on one side or the other- no crossovers can occur. No number has yet been found that does not show up on the tree. Absolutely every number tested is on the tree somewhere, and if you were to create the tree, you would find each and every real number once and only once on it. Again, this is not provable logically at this time, and may never be. But the reasons for that are another entire article and are very interesting in their own rights. But consider that if there is a loop or branch not on the tree, then it would have a whole set of numbers associated with it and a part of it, that do not show up on the standard tree. There are two possible cases here, and one is that there is a set of numbers that are self-contained that form their own little tree or loop (and it will in fact have to end in a loop) or that the new tree will have an infinite number of members that reaches off into the unlimited supply of numbers and makes its own consistent base that is completely apart from the standard tree. The fact is, numbers are too numerous and too unknown to be able to say yet. But think about this fact. There are only 10 single-digit positive numbers, and only 90 twodigit positive numbers, and only nine hundred three-digit positive numbers. As a consequence, we can see that most numbers are more than two digits in length, since this set is only 900 members and there are infinitely many numbers. This draws us inevitably to the fact that most numbers have more than 8 million digits. That may sound odd, and you have never run across one of those numbers, but the fact is that most numbers are mind-bogglingly huge; we simply have no real-world experience with them and they are therefore never thought of. Another odd fact- if we count the steps from a starting number until it reaches 1, we will find that, in the first 100,000 numbers, one and only one will have a step number equal to its starting value, and that is 5. The number 5 takes 5 steps to reach 1 and terminate. Are there other numbers that have step counts that equal their values? Perhaps. One stumbling block to the exploration of snowflake numbers is the limitation on math that most personal computer software can handle. A number of people program in BASIC or some variety of C, others use Java and related languages. The real limit is what is known as the floating point or integer range of the software being used. BASIC, 5 of 6

6 for example, usually has a 32 bit range for its integer values. This limits the count to 2.1 billion, plus or minus. This is also true for any language that uses that 32 bit limit. This means that most people will not have the facilities to try much more than play with the lower values. However, even with no more than 110,000 or so as a starting point, the exploration will take you to over 1.5 billion as the number rises and falls. A real boon would be a language that allows you to use 64 bit notation (and even more), and some compilers now do. Personally I would recommend the Python language for new programmers as a simple to learn and use way to explore the snowflake numbers. Again, there is a limit and that is the expertise of the potential explorer of large numbers. You really need to be a programmer to reach the extremes of snowflake numbers, and few people are familiar with what it takes. So here we reach the end of this monograph, but now you have a new world to explore and play with. Have fun. 6 of 6

i W E I R D U T O P I A i

i W E I R D U T O P I A i i W E I R D U T O P I A i CHAPTER 9 1 EXPLODING DOTS CHAPTER 9 WEIRD AND WILD MACHINES All right. It is time to go wild and crazy. Here is a whole host of quirky and strange machines to ponder on, some

More information

Pick any positive integer. If the integer is even, divide it by 2. If it is odd,

Pick any positive integer. If the integer is even, divide it by 2. If it is odd, Equal Groups Multiplying and Dividing Integers Learning Goals In this lesson, you will: Multiply integers. Divide integers. Pick any positive integer. If the integer is even, divide it by 2. If it is odd,

More information

Divisibility Rules and Their Explanations

Divisibility Rules and Their Explanations Divisibility Rules and Their Explanations Increase Your Number Sense These divisibility rules apply to determining the divisibility of a positive integer (1, 2, 3, ) by another positive integer or 0 (although

More information

#23: Sequences March 28, 2009

#23: Sequences March 28, 2009 #23: Sequences March 28, 2009 a mysterious rule easy peasy Suppose n is an integer, and consider this simple rule: if n is even, divide it by two; otherwise, multiply n by 3, and add one. Pretty simple,

More information

Discovering. Algebra. An Investigative Approach. Condensed Lessons for Make-up Work

Discovering. Algebra. An Investigative Approach. Condensed Lessons for Make-up Work Discovering Algebra An Investigative Approach Condensed Lessons for Make-up Work CONDENSED L E S S O N 0. The Same yet Smaller Previous In this lesson you will apply a recursive rule to create a fractal

More information

Assignment 2: Welcome to Java!

Assignment 2: Welcome to Java! CS106A Winter 2011-2012 Handout #12 January 23, 2011 Assignment 2: Welcome to Java! Based on a handout by Eric Roberts and Mehran Sahami Having helped Karel the Robot through the challenges of Assignment

More information

Order from Chaos. University of Nebraska-Lincoln Discrete Mathematics Seminar

Order from Chaos. University of Nebraska-Lincoln Discrete Mathematics Seminar Order from Chaos University of Nebraska-Lincoln Discrete Mathematics Seminar Austin Mohr Department of Mathematics Nebraska Wesleyan University February 8, 20 The (, )-Puzzle Start by drawing six dots

More information

Assignment #2: Simple Java Programs Due: 1:15pm on Friday, April 19th

Assignment #2: Simple Java Programs Due: 1:15pm on Friday, April 19th Steve Cooper Handout #13 CS 106A April 12, 2013 Assignment #2: Simple Java Programs Due: 1:15pm on Friday, April 19th Your Early Assignment Help (YEAH) hours: time: tbd, Tues., Apr. 16th in location:tbd

More information

Assignment #2: Simple Java Programs Due: 11AM PST on Monday, April 23 rd

Assignment #2: Simple Java Programs Due: 11AM PST on Monday, April 23 rd Chris Piech Assignment #2 CS 106A April 13, 2018 Assignment #2: Simple Java Programs Due: 11AM PST on Monday, April 23 rd This assignment should be done individually (not in pairs) Portions of this handouts

More information

Depiction of program declaring a variable and then assigning it a value

Depiction of program declaring a variable and then assigning it a value Programming languages I have found, the easiest first computer language to learn is VBA, the macro programming language provided with Microsoft Office. All examples below, will All modern programming languages

More information

(Refer Slide Time: 06:01)

(Refer Slide Time: 06:01) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 28 Applications of DFS Today we are going to be talking about

More information

Order from Chaos. Nebraska Wesleyan University Mathematics Circle

Order from Chaos. Nebraska Wesleyan University Mathematics Circle Order from Chaos Nebraska Wesleyan University Mathematics Circle Austin Mohr Department of Mathematics Nebraska Wesleyan University February 2, 20 The (, )-Puzzle Start by drawing six dots at the corners

More information

Assignment #2: Intro to Java Due: 11AM PST on Wednesday, July 12

Assignment #2: Intro to Java Due: 11AM PST on Wednesday, July 12 Nick Troccoli Assignment 2 CS 106A July 5, 2017 Assignment #2: Intro to Java Due: 11AM PST on Wednesday, July 12 This assignment should be done individually (not in pairs) Based on handouts by Mehran Sahami,

More information

Notes on Turing s Theorem and Computability

Notes on Turing s Theorem and Computability Notes on Turing s Theorem and Computability Walter Neumann About 60 years ago there was a revolution in mathematics and philosophy. First Gödel and then Turing showed that there are impossible problems

More information

Assignment #2: Simple Java Programs Due: 11AM PST on Monday, Jan 29 th

Assignment #2: Simple Java Programs Due: 11AM PST on Monday, Jan 29 th Chris Piech Handout #8 CS 106A Jan 19, 2018 Assignment #2: Simple Java Programs Due: 11AM PST on Monday, Jan 29 th This assignment should be done individually (not in pairs) Portions of this handouts by

More information

Math Fundamentals for Statistics (Math 52) Unit 3: Addition and Subtraction. Scott Fallstrom and Brent Pickett The How and Whys Guys.

Math Fundamentals for Statistics (Math 52) Unit 3: Addition and Subtraction. Scott Fallstrom and Brent Pickett The How and Whys Guys. Math Fundamentals for Statistics (Math 52) Unit 3: Addition and Subtraction Scott Fallstrom and Brent Pickett The How and Whys Guys Unit 3 Page 1 3.1: Place Value (Addition Preview) Our system is a base-ten,

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

Binary, Hexadecimal and Octal number system

Binary, Hexadecimal and Octal number system Binary, Hexadecimal and Octal number system Binary, hexadecimal, and octal refer to different number systems. The one that we typically use is called decimal. These number systems refer to the number of

More information

Introduction to Scientific Computing Lecture 1

Introduction to Scientific Computing Lecture 1 Introduction to Scientific Computing Lecture 1 Professor Hanno Rein Last updated: September 10, 2017 1 Number Representations In this lecture, we will cover two concept that are important to understand

More information

(Refer Slide Time: 02.06)

(Refer Slide Time: 02.06) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 27 Depth First Search (DFS) Today we are going to be talking

More information

Modular Arithmetic. is just the set of remainders we can get when we divide integers by n

Modular Arithmetic. is just the set of remainders we can get when we divide integers by n 20181004 Modular Arithmetic We are accustomed to performing arithmetic on infinite sets of numbers. But sometimes we need to perform arithmetic on a finite set, and we need it to make sense and be consistent

More information

1

1 Zeros&asymptotes Example 1 In an early version of this activity I began with a sequence of simple examples (parabolas and cubics) working gradually up to the main idea. But now I think the best strategy

More information

such a manner that we are able to understand, grasp and grapple with the problem at hand in a more organized fashion.

such a manner that we are able to understand, grasp and grapple with the problem at hand in a more organized fashion. Programming and Data Structure Dr.P.P.Chakraborty Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture 32 Conclusions Hello everybody. Today, we come to the

More information

Unit 4: Multiplication

Unit 4: Multiplication Math Fundamentals for Statistics I (Math 52) Unit 4: Multiplication By Scott Fallstrom and Brent Pickett The How and Whys Guys This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike

More information

ROUNDING ERRORS LAB 1. OBJECTIVE 2. INTRODUCTION

ROUNDING ERRORS LAB 1. OBJECTIVE 2. INTRODUCTION ROUNDING ERRORS LAB Imagine you are traveling in Italy, and you are trying to convert $27.00 into Euros. You go to the bank teller, who gives you 20.19. Your friend is with you, and she is converting $2,700.00.

More information

Lecture 1: Overview

Lecture 1: Overview 15-150 Lecture 1: Overview Lecture by Stefan Muller May 21, 2018 Welcome to 15-150! Today s lecture was an overview that showed the highlights of everything you re learning this semester, which also meant

More information

CSE Theory of Computing Fall 2017 Project 1-SAT Solving

CSE Theory of Computing Fall 2017 Project 1-SAT Solving CSE 30151 Theory of Computing Fall 2017 Project 1-SAT Solving Version 3: Sept. 21, 2017 The purpose of this project is to gain an understanding of one of the most central problems of computing: Boolean

More information

Problem Solving for Intro to Computer Science

Problem Solving for Intro to Computer Science Problem Solving for Intro to Computer Science The purpose of this document is to review some principles for problem solving that are relevant to Intro to Computer Science course. Introduction: A Sample

More information

n! = 1 * 2 * 3 * 4 * * (n-1) * n

n! = 1 * 2 * 3 * 4 * * (n-1) * n The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion Objectives By completing this lab exercise, you should learn to Recognize simple self-similar problems which are

More information

Vocabulary: Looking For Pythagoras

Vocabulary: Looking For Pythagoras Vocabulary: Looking For Pythagoras Concept Finding areas of squares and other figures by subdividing or enclosing: These strategies for finding areas were developed in Covering and Surrounding. Students

More information

Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore

Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore Lecture - 5 Elementary concepts and basic counting principles So, welcome

More information

Direct Variations DIRECT AND INVERSE VARIATIONS 19. Name

Direct Variations DIRECT AND INVERSE VARIATIONS 19. Name DIRECT AND INVERSE VARIATIONS 19 Direct Variations Name Of the many relationships that two variables can have, one category is called a direct variation. Use the description and example of direct variation

More information

Basics of Computational Geometry

Basics of Computational Geometry Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals

More information

Notebook Assignments

Notebook Assignments Notebook Assignments These six assignments are a notebook using techniques from class in the single concrete context of graph theory. This is supplemental to your usual assignments, and is designed for

More information

MITOCW watch?v=4dj1oguwtem

MITOCW watch?v=4dj1oguwtem MITOCW watch?v=4dj1oguwtem PROFESSOR: So it's time to examine uncountable sets. And that's what we're going to do in this segment. So Cantor's question was, are all sets the same size? And he gives a definitive

More information

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs.

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. Lesson 2 VARIABLES Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. WHAT ARE VARIABLES? When you input data (i.e. information) into a computer

More information

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy.

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy. Math 340 Fall 2014, Victor Matveev Binary system, round-off errors, loss of significance, and double precision accuracy. 1. Bits and the binary number system A bit is one digit in a binary representation

More information

Module 2 Congruence Arithmetic pages 39 54

Module 2 Congruence Arithmetic pages 39 54 Module 2 Congruence Arithmetic pages 9 5 Here are some excellent websites that can help you on this topic: http://mathcentral.uregina.ca/qq/database/qq.09.98/kupper1.html http://nrich.maths.org/public.viewer.php?obj_id=50

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

Lecture 3: Recursion; Structural Induction

Lecture 3: Recursion; Structural Induction 15-150 Lecture 3: Recursion; Structural Induction Lecture by Dan Licata January 24, 2012 Today, we are going to talk about one of the most important ideas in functional programming, structural recursion

More information

A point is pictured by a dot. While a dot must have some size, the point it represents has no size. Points are named by capital letters..

A point is pictured by a dot. While a dot must have some size, the point it represents has no size. Points are named by capital letters.. Chapter 1 Points, Lines & Planes s we begin any new topic, we have to familiarize ourselves with the language and notation to be successful. My guess that you might already be pretty familiar with many

More information

MITOCW watch?v=0jljzrnhwoi

MITOCW watch?v=0jljzrnhwoi MITOCW watch?v=0jljzrnhwoi 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. To

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Fall 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

2. Draw a non-isosceles triangle. Now make a template of this triangle out of cardstock or cardboard.

2. Draw a non-isosceles triangle. Now make a template of this triangle out of cardstock or cardboard. Tessellations The figure at the left shows a tiled floor. Because the floor is entirely covered by the tiles we call this arrangement a tessellation of the plane. A regular tessellation occurs when: The

More information

THE FOURTH SPATIAL DIMENSION

THE FOURTH SPATIAL DIMENSION THE FOURTH SPATIAL DIMENSION Have you seen a film, where the actor is sitting on a couch, the camera is behind him, and he puts a cigarette to his lips, puffs, expels the smoke, then the camera focuses

More information

From Craft to Science: Rules for Software Design -- Part II

From Craft to Science: Rules for Software Design -- Part II From Craft to Science: Rules for Software Design -- Part II by Koni Buhrer Software Engineering Specialist Rational Software Developing large software systems is notoriously difficult and unpredictable.

More information

Modesto City Schools. Secondary Math I. Module 1 Extra Help & Examples. Compiled by: Rubalcava, Christina

Modesto City Schools. Secondary Math I. Module 1 Extra Help & Examples. Compiled by: Rubalcava, Christina Modesto City Schools Secondary Math I Module 1 Extra Help & Examples Compiled by: Rubalcava, Christina 1.1 Ready, Set, Go! Ready Topic: Recognizing a solution to an equation. The solution to an equation

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Iteration. # a and b are now equal # a and b are no longer equal Multiple assignment

Iteration. # a and b are now equal # a and b are no longer equal Multiple assignment Iteration 6.1. Multiple assignment As you may have discovered, it is legal to make more than one assignment to the same variable. A new assignment makes an existing variable refer to a new value (and stop

More information

Chapter 3 Analyzing Normal Quantitative Data

Chapter 3 Analyzing Normal Quantitative Data Chapter 3 Analyzing Normal Quantitative Data Introduction: In chapters 1 and 2, we focused on analyzing categorical data and exploring relationships between categorical data sets. We will now be doing

More information

Search Lesson Outline

Search Lesson Outline 1. Searching Lesson Outline 2. How to Find a Value in an Array? 3. Linear Search 4. Linear Search Code 5. Linear Search Example #1 6. Linear Search Example #2 7. Linear Search Example #3 8. Linear Search

More information

Note: This activity is also available in a non-coding version, where students use existing programs to do a similar exploration

Note: This activity is also available in a non-coding version, where students use existing programs to do a similar exploration Student Activity 7 8 9 10 11 12 TI-Nspire Coding Student 120 min Note: This activity is also available in a non-coding version, where students use existing programs to do a similar exploration Introduction

More information

Algebra of Sets. Aditya Ghosh. April 6, 2018 It is recommended that while reading it, sit with a pen and a paper.

Algebra of Sets. Aditya Ghosh. April 6, 2018 It is recommended that while reading it, sit with a pen and a paper. Algebra of Sets Aditya Ghosh April 6, 2018 It is recommended that while reading it, sit with a pen and a paper. 1 The Basics This article is only about the algebra of sets, and does not deal with the foundations

More information

Chapter 7. Polygons, Circles, Stars and Stuff

Chapter 7. Polygons, Circles, Stars and Stuff Chapter 7. Polygons, Circles, Stars and Stuff Now it s time for the magic! Magic? asked Morf. What do you mean, magic? You ve never talked about Logo magic before. We ve talked about shapes, and how you

More information

CHAPTER 1: INTEGERS. Image from CHAPTER 1 CONTENTS

CHAPTER 1: INTEGERS. Image from  CHAPTER 1 CONTENTS CHAPTER 1: INTEGERS Image from www.misterteacher.com CHAPTER 1 CONTENTS 1.1 Introduction to Integers 1. Absolute Value 1. Addition of Integers 1.4 Subtraction of Integers 1.5 Multiplication and Division

More information

JMC 2015 Teacher s notes Recap table

JMC 2015 Teacher s notes Recap table JMC 2015 Teacher s notes Recap table JMC 2015 1 Number / Adding and subtracting integers Number / Negative numbers JMC 2015 2 Measuring / Time units JMC 2015 3 Number / Estimating Number / Properties of

More information

Binary Search. Roland Backhouse February 5th, 2001

Binary Search. Roland Backhouse February 5th, 2001 1 Binary Search Roland Backhouse February 5th, 2001 Outline 2 An implementation in Java of the card-searching algorithm is presented. Issues concerning the correctness of the implementation are raised

More information

(Refer Slide Time: 02:59)

(Refer Slide Time: 02:59) Numerical Methods and Programming P. B. Sunil Kumar Department of Physics Indian Institute of Technology, Madras Lecture - 7 Error propagation and stability Last class we discussed about the representation

More information

Practice Midterm Exam #2

Practice Midterm Exam #2 Eric Roberts Handout #25 CS106B January 30, 2013 Practice Midterm Exam #2 Review session: Sunday, February 3, 7:00 9:00 P.M., Hewlett 201 (next door) Midterm #1: Tuesday, February 5, 3:15 5:15 P.M., Braun

More information

Principles of Algorithm Design

Principles of Algorithm Design Principles of Algorithm Design When you are trying to design an algorithm or a data structure, it s often hard to see how to accomplish the task. The following techniques can often be useful: 1. Experiment

More information

Gateway Regional School District VERTICAL ALIGNMENT OF MATHEMATICS STANDARDS Grades 3-6

Gateway Regional School District VERTICAL ALIGNMENT OF MATHEMATICS STANDARDS Grades 3-6 NUMBER SENSE & OPERATIONS 3.N.1 Exhibit an understanding of the values of the digits in the base ten number system by reading, modeling, writing, comparing, and ordering whole numbers through 9,999. Our

More information

CS 106 Winter 2016 Craig S. Kaplan. Module 07 Recursion and fractals Topics. Recursion as an extension of hierarchical modelling Simple fractals

CS 106 Winter 2016 Craig S. Kaplan. Module 07 Recursion and fractals Topics. Recursion as an extension of hierarchical modelling Simple fractals CS 106 Winter 2016 Craig S. Kaplan Module 07 Recursion and fractals Topics Recursion as an extension of hierarchical modelling Simple fractals Readings Learning Processing, Section 13.11 Nature of Code,

More information

Lecture Notes on Binary Decision Diagrams

Lecture Notes on Binary Decision Diagrams Lecture Notes on Binary Decision Diagrams 15-122: Principles of Imperative Computation William Lovas Notes by Frank Pfenning Lecture 25 April 21, 2011 1 Introduction In this lecture we revisit the important

More information

Algorithm Design and Recursion. Search and Sort Algorithms

Algorithm Design and Recursion. Search and Sort Algorithms Algorithm Design and Recursion Search and Sort Algorithms Objectives To understand the basic techniques for analyzing the efficiency of algorithms. To know what searching is and understand the algorithms

More information

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)... Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.

More information

4. Write sets of directions for how to check for direct variation. How to check for direct variation by analyzing the graph :

4. Write sets of directions for how to check for direct variation. How to check for direct variation by analyzing the graph : Name Direct Variations There are many relationships that two variables can have. One of these relationships is called a direct variation. Use the description and example of direct variation to help you

More information

Complexity is around us. Part one: the chaos game

Complexity is around us. Part one: the chaos game Complexity is around us. Part one: the chaos game Dawid Lubiszewski Complex phenomena like structures or processes are intriguing scientists around the world. There are many reasons why complexity is a

More information

Topic C. Communicating the Precision of Measured Numbers

Topic C. Communicating the Precision of Measured Numbers Topic C. Communicating the Precision of Measured Numbers C. page 1 of 14 Topic C. Communicating the Precision of Measured Numbers This topic includes Section 1. Reporting measurements Section 2. Rounding

More information

Lecture Notes on Contracts

Lecture Notes on Contracts Lecture Notes on Contracts 15-122: Principles of Imperative Computation Frank Pfenning Lecture 2 August 30, 2012 1 Introduction For an overview the course goals and the mechanics and schedule of the course,

More information

Bulgarian Math Olympiads with a Challenge Twist

Bulgarian Math Olympiads with a Challenge Twist Bulgarian Math Olympiads with a Challenge Twist by Zvezdelina Stankova Berkeley Math Circle Beginners Group September 0, 03 Tasks throughout this session. Harder versions of problems from last time appear

More information

CS 112 Introduction to Programming

CS 112 Introduction to Programming CS 112 Introduction to Programming Java Primitive Data Types; Arithmetic Expressions Yang (Richard) Yang Computer Science Department Yale University 308A Watson, Phone: 432-6400 Email: yry@cs.yale.edu

More information

Admin. CS 112 Introduction to Programming. Recap: Java Static Methods. Recap: Decomposition Example. Recap: Static Method Example

Admin. CS 112 Introduction to Programming. Recap: Java Static Methods. Recap: Decomposition Example. Recap: Static Method Example Admin CS 112 Introduction to Programming q Programming assignment 2 to be posted tonight Java Primitive Data Types; Arithmetic Expressions Yang (Richard) Yang Computer Science Department Yale University

More information

Variables and Data Representation

Variables and Data Representation You will recall that a computer program is a set of instructions that tell a computer how to transform a given set of input into a specific output. Any program, procedural, event driven or object oriented

More information

Cardinality of Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Cardinality of Sets Fall / 15

Cardinality of Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Cardinality of Sets Fall / 15 Cardinality of Sets MAT Transition to Higher Mathematics Fall 0 MAT (Transition to Higher Math) Cardinality of Sets Fall 0 / Outline Sets with Equal Cardinality Countable and Uncountable Sets MAT (Transition

More information

Safe and Secure Software. Ada An Invitation to. Conclusion. Courtesy of. John Barnes. The GNAT Pro Company

Safe and Secure Software. Ada An Invitation to. Conclusion. Courtesy of. John Barnes. The GNAT Pro Company Safe and Secure Software An Invitation to Ada 2005 Conclusion Courtesy of The GNAT Pro Company John Barnes It is hoped that this booklet will have proved interesting. It has covered a number of aspects

More information

Paul's Online Math Notes Calculus III (Notes) / Applications of Partial Derivatives / Lagrange Multipliers Problems][Assignment Problems]

Paul's Online Math Notes Calculus III (Notes) / Applications of Partial Derivatives / Lagrange Multipliers Problems][Assignment Problems] 1 of 9 25/04/2016 13:15 Paul's Online Math Notes Calculus III (Notes) / Applications of Partial Derivatives / Lagrange Multipliers Problems][Assignment Problems] [Notes] [Practice Calculus III - Notes

More information

Topic 3: Fractions. Topic 1 Integers. Topic 2 Decimals. Topic 3 Fractions. Topic 4 Ratios. Topic 5 Percentages. Topic 6 Algebra

Topic 3: Fractions. Topic 1 Integers. Topic 2 Decimals. Topic 3 Fractions. Topic 4 Ratios. Topic 5 Percentages. Topic 6 Algebra Topic : Fractions Topic Integers Topic Decimals Topic Fractions Topic Ratios Topic Percentages Duration / weeks Content Outline PART (/ week) Introduction Converting Fractions to Decimals Converting Decimals

More information

Introduction to Programming

Introduction to Programming CHAPTER 1 Introduction to Programming Begin at the beginning, and go on till you come to the end: then stop. This method of telling a story is as good today as it was when the King of Hearts prescribed

More information

CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts)

CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts) CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts) Problem 0: Install Eclipse + CDT (or, as an alternative, Netbeans). Follow the instructions on my web site.

More information

Pre-Algebra Notes Unit One: Variables, Expressions, and Integers

Pre-Algebra Notes Unit One: Variables, Expressions, and Integers Pre-Algebra Notes Unit One: Variables, Expressions, and Integers Evaluating Algebraic Expressions Syllabus Objective: (.) The student will evaluate variable and numerical expressions using the order of

More information

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change Chapter01.fm Page 1 Monday, August 23, 2004 1:52 PM Part I The Mechanics of Change The Mechanics of Change Chapter01.fm Page 2 Monday, August 23, 2004 1:52 PM Chapter01.fm Page 3 Monday, August 23, 2004

More information

CS103 Spring 2018 Mathematical Vocabulary

CS103 Spring 2018 Mathematical Vocabulary CS103 Spring 2018 Mathematical Vocabulary You keep using that word. I do not think it means what you think it means. - Inigo Montoya, from The Princess Bride Consider the humble while loop in most programming

More information

4. Java Project Design, Input Methods

4. Java Project Design, Input Methods 4-1 4. Java Project Design, Input Methods Review and Preview You should now be fairly comfortable with creating, compiling and running simple Java projects. In this class, we continue learning new Java

More information

Algebra (Linear Expressions & Equations)

Algebra (Linear Expressions & Equations) ACT Mathematics Fundamentals 1 with facts, examples, problems, and solutions Algebra (Linear Expressions & Equations) One might say that the two main goals of algebra are to 1) model real world situations

More information

3.1 Constructions with sets

3.1 Constructions with sets 3 Interlude on sets Sets and functions are ubiquitous in mathematics. You might have the impression that they are most strongly connected with the pure end of the subject, but this is an illusion: think

More information

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 20 Priority Queues Today we are going to look at the priority

More information

GAP CLOSING. Grade 9. Facilitator s Guide

GAP CLOSING. Grade 9. Facilitator s Guide GAP CLOSING Grade 9 Facilitator s Guide Topic 3 Integers Diagnostic...5 Administer the diagnostic...5 Using diagnostic results to personalize interventions solutions... 5 Using Intervention Materials...8

More information

Mathematics Background

Mathematics Background Finding Area and Distance Students work in this Unit develops a fundamentally important relationship connecting geometry and algebra: the Pythagorean Theorem. The presentation of ideas in the Unit reflects

More information

Graph Theory Part Two

Graph Theory Part Two Graph Theory Part Two Recap from Last Time A graph is a mathematical structure for representing relationships. Nodes A graph consists of a set of nodes (or vertices) connected by edges (or arcs) A graph

More information

The Game of Criss-Cross

The Game of Criss-Cross Chapter 5 The Game of Criss-Cross Euler Characteristic ( ) Overview. The regions on a map and the faces of a cube both illustrate a very natural sort of situation: they are each examples of regions that

More information

An Interesting Way to Combine Numbers

An Interesting Way to Combine Numbers An Interesting Way to Combine Numbers Joshua Zucker and Tom Davis October 12, 2016 Abstract This exercise can be used for middle school students and older. The original problem seems almost impossibly

More information

Learning from Math Library Testng for C Marcel Beemster Solid Sands

Learning from Math Library Testng for C Marcel Beemster Solid Sands Learning from Math Library Testng for C Marcel Beemster Solid Sands Introduction In the process of improving SuperTest, I recently dived into its math library testing. Turns out there were some interesting

More information

Graph Structure Over Time

Graph Structure Over Time Graph Structure Over Time Observing how time alters the structure of the IEEE data set Priti Kumar Computer Science Rensselaer Polytechnic Institute Troy, NY Kumarp3@rpi.edu Abstract This paper examines

More information

Properties and Definitions

Properties and Definitions Section 0.1 Contents: Operations Defined Multiplication as an Abbreviation Visualizing Multiplication Commutative Properties Parentheses Associative Properties Identities Zero Product Answers to Exercises

More information

Math 7 Notes - Unit 4 Pattern & Functions

Math 7 Notes - Unit 4 Pattern & Functions Math 7 Notes - Unit 4 Pattern & Functions Syllabus Objective: (3.2) The student will create tables, charts, and graphs to extend a pattern in order to describe a linear rule, including integer values.

More information

What we still don t know about addition and multiplication

What we still don t know about addition and multiplication What we still don t know about addition and multiplication Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA Michigan State University, October 11, 2016 You would think that all of the issues

More information

4 Algorithms. Definition of an Algorithm

4 Algorithms. Definition of an Algorithm 4 Algorithms Definition of an Algorithm An algorithm is the abstract version of a computer program. In essence a computer program is the codification of an algorithm, and every algorithm can be coded as

More information

The eighth scene in a series of articles on elementary mathematics. written by Eugene Maier designed and illustrated by Tyson Smith. equals me.

The eighth scene in a series of articles on elementary mathematics. written by Eugene Maier designed and illustrated by Tyson Smith. equals me. me. multiplied by me. equals me. The eighth scene in a series of articles on elementary mathematics. written by Eugene Maier designed and illustrated by Tyson Smith The array model, with edge pieces used

More information

UNINFORMED SEARCH. Announcements Reading Section 3.4, especially 3.4.1, 3.4.2, 3.4.3, 3.4.5

UNINFORMED SEARCH. Announcements Reading Section 3.4, especially 3.4.1, 3.4.2, 3.4.3, 3.4.5 UNINFORMED SEARCH Announcements Reading Section 3.4, especially 3.4.1, 3.4.2, 3.4.3, 3.4.5 Robbie has no idea where room X is, and may have little choice but to try going down this corridor and that. On

More information