Computer Science We use computers, but the focus is on applied problem solving. One of my favorite videos talks about computer sciencecomputer science.

Slides:



Advertisements
Similar presentations
Finding Gold In The Forest …A Connection Between Fractal Trees, Topology, and The Golden Ratio.
Advertisements

Biography ( ) Fibonacci is a short for the Latin "filius Bonacci" which means "the son of Bonacci" but his full name was Leonardo of Pisa, or Leonardo.
Data Display: Tables and Graphs
AE1APS Algorithmic Problem Solving John Drake
Chapter 5 Number Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Recursion Lecture 18: Nov 18.
Original Question: How fast rabbits can rabbits breed in ideal circumstances? Suppose a newly-born pair of.
Recursion in Python. Recursion Problems in every area of life can be defined recursively, that is, they can be described in terms of themselves. An English.
TEKS 8.6 (A,B) & 8.7 (A,D) This slide is meant to be a title page for the whole presentation and not an actual slide. 8.6 (A) Generate similar shapes using.
Feeling at Home With Geometry by: Angelique Curtis and Brittany Brooks This is a house on Tompkins Street in Cortland, NY.
Shapes and the Coordinate System TEKS 8.6 (A,B) & 8.7 (A,D)
Lecture 3, Tuesday, Aug. 29. Chapter 2: Single species growth models, continued 2.1. Linear difference equations, Fibonacci number and golden ratio. Required.
Longfield Primary School
Chapter 2 Recursion: The Mirrors. © 2005 Pearson Addison-Wesley. All rights reserved2-2 Recursive Solutions Recursion is an extremely powerful problem-
TR1413: Discrete Mathematics For Computer Science Lecture 1: Mathematical System.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
13.2: Arithmetic and Geometric Sequences Recursive Definitions.
FIBONACCI NUMBERS 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, ,
S L E O A V S L I M P E R P R O B E L M
Advanced Counting Techniques
Maths in Nature By Keith Ball.
What is Critical Thinking?
Data Structures Using C++ 2E Chapter 6 Recursion.
Sequences defined recursively
Patterns 9/1 and 9/6. What is a pattern? A set of shapes or numbers that are repeated in a predictable way Understanding patterns is a basic skill for.
SECTION 5-5 The Fibonacci Sequence and the Golden Ratio Slide
The Mathematical Formula of Life
Data Structures Using C++ 2E Chapter 6 Recursion.
Department of Computer Science Data Structures Using C++ 2E Chapter 6: Recursion Learn about recursive Definitions Algorithms Functions Explore the base.
Chapter 2 Recursion: The Mirrors. © 2005 Pearson Addison-Wesley. All rights reserved2-2 Recursive Solutions Recursion is an extremely powerful problem-
Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013 Recursion: The Mirrors Chapter 2.
Are You Perfect? Writing Prompt: What do you consider perfect?
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
The Golden Ratio and Fibonacci Numbers in Nature
Fall Week 3 CSCI-141 Scott C. Johnson.  Say we want to draw the following figure ◦ How would we go about doing this?
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
Infinities 6 Iteration Number, Algebra and Geometry.
Differentiated Instruction in the Primary Mathematics Classroom J. Silva.
Do Now Complete 3, 2, 1 3 things you learned about linear functions 2 things you would like to know more about 1 thing you still have a questions about.
CSC 221: Recursion. Recursion: Definition Function that solves a problem by relying on itself to compute the correct solution for a smaller version of.
Transformation in Geometry Transformation A transformation changes the position or size of a shape on a coordinate plane.
Fractals What do we mean by dimension? Consider what happens when you divide a line segment in two on a figure. How many smaller versions do you get? Consider.
INTRODUCTION TO THE GOLDEN MEAN … and the Fibonacci Sequence.
Generating Functions and Counting Trees. Today’s Plan 1.Generating functions for basic sequences 2.Operations on generating functions 3.Counting 4.Solve.
Fibonacci Sequences and the Golden Ratio Carl Wozniak Northern Michigan University.
Math for Smart Kids Book 1: Multiplication & Division By Mor Harchol-Balter, Ph.D. Copyright March 2003.
Chapter 2 Recursion: The Mirrors. © 2005 Pearson Addison-Wesley. All rights reserved2-2 Recursive Solutions Recursion is an extremely powerful problem-solving.
Geometric Shapes Tangram Activities The University of Texas at Dallas.
By Steven Cornell.  Was created by Leonardo Pisano Bogollo.  It show’s the growth of an idealized rabbit population.
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
A Different Solution  alternatively we can use the following algorithm: 1. if n == 0 done, otherwise I. print the string once II. print the string (n.
7. RECURSIONS Rocky K. C. Chang October 12, 2015.
Recursion in Java The answer to life’s greatest mysteries are on the last slide.
Recursive Sequences Terry Anderson. What is a Recursive Sequence? A sequence that follows a pattern involving previous terms  To generate new terms,
Dynamic Programming. What is Dynamic Programming  A method for solving complex problems by breaking them down into simpler sub problems. It is applicable.
 2012 Pearson Education, Inc. Slide Chapter 5 Number Theory.
The Law of Averages. What does the law of average say? We know that, from the definition of probability, in the long run the frequency of some event will.
Securing number facts, relationships and calculating.
Jeopardy Topic 1Topic Q 1Q 6Q 11Q 16Q 21 Q 2Q 7Q 12Q 17Q 22 Q 3Q 8Q 13Q 18Q 23 Q 4Q 9Q 14Q 19Q 24 Q 5Q 10Q 15Q 20Q 25.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Mathematical Connections.
Iterative Mathematics
Chapter 5 Number Theory 2012 Pearson Education, Inc.
Chapter 19: Symmetry and Patterns Lesson Plan
Computer Science We use computers, but the focus is on applied problem solving. One of my favorite videos talks about computer science 6/3/14.
Creativity in Algorithms
The Golden Ratio and Fibonacci Numbers in Nature
Fractals What do we mean by dimension? Consider what happens when you divide a line segment in two on a figure. How many smaller versions do you get?
Section/Lesson: Fractions
Presentation transcript:

Computer Science We use computers, but the focus is on applied problem solving. One of my favorite videos talks about computer sciencecomputer science 6/3/14

Sign up to be a mentor. $300 stipend

In English, if you were asked to give a definition of a fern, the following would be frowned upon: fern: a flowerless plant that has feathery or leafy fronds in the shape of a fern In computer science, we love the self-definition! 6/3/14

Self Similarity In Nature Ever noticed that within a fern's leaf or in a snowflake, the same branching pattern occurs at different spatial scales? These same self-similar patterns exist in mathematics and in many powerful computer science algorithms.

Some of you have seen self definition in mathematics: a i represents the i th element of a sequence. a 1 = 3 a n = 2 a n–1 + 1 What sequence does it generate? In mathematics and computer science, we call self-definition recursion. 6/3/14

This is a little more complicated self-definition: a 1 = 1 a 2 = 1 a n = a n–1 + a n–2 for n > 2 6/3/14

Finding the self-definition takes some practice. See if you can arrange the shapes you have been given into a bigger figure of the same shape – self-similar. Here is one example. Notice that the two smaller triangles form a bigger triangle of the same shape. 6/3/14

Were you able to make the similar shapes? 6/3/14

Self Similarity In Nature Many mathematical principles are based on ideals, and apply to an abstract, perfect world. This perfect world of mathematics is reflected in the imperfect physical world, such as in the approximate symmetry of a face divided by an axis along the nose. More symmetrical faces are generally regarded as more aesthetically pleasing. Symmetry- Bilateral

Self Similarity In Nature Five axes of symmetry are traced on the petals of this flower, from each dark purple line on the petal to an imaginary line bisecting the angle between the opposing purple lines. The lines also trace the shape of a star. Symmetry- Radial

Self Similarity In Nature Many natural objects, such as frost on the branches of a tree, show the relationship where similarity holds at smaller and smaller scales. This fractal nature mimics mathematical fractal shapes where form is repeated at every scale. Fractals, such as the famous Mandelbrot set, cannot be represented by classical geometry Fractals

Self Similarity In Nature Rabbits, rabbits, rabbits. Leonardo Fibonacci was a well-travelled Italian who introduced the concept of zero and the Hindu-Arabic numeral system to Europe in 1200AD. He also described the Fibonacci sequence of numbers using an idealized breeding population of rabbits. Each rabbit pair produces another pair every month, taking one month first to mature, and giving the sequence 0,1,1,2,3,5,8,13,... Each number in the sequence is the sum of the previous two. Fibonacci Sequence

Self Similarity In Nature If you construct a series of squares with lengths equal to the Fibonacci numbers (1,1,2,3,5, etc) and trace a line through the diagonals of each square, it forms a Fibonacci spiral. Many examples of the Fibonacci spiral can be seen in nature, including in the chambers of a nautilus shell. Fibonacci Spiral The Fibonacci sequence represented mathematically fib(1)=1 fib(2)=1 fib(n)=fib(n-1)+fib(n-2)

Self Similarity In Nature Fibonacci Spiral

Another recursive algorithm ffgdgfdddddddfsfsdfsdfsfdsdfsddddddddddd 6/3/14

Algorithms (steps for solving a problem) are sometimes self-similar Consider this problem: After graduation, you are asked to design a system for breaking a chocolate bar into small chunks. How many steps are required to break an m × n sized bar of chocolate into 1 × 1 pieces? You can break an existing piece of chocolate horizontally or vertically. You cannot break two or more pieces at once (so no cutting through stacks). 6/3/14 Notice how the problem is self similar. If the problem is called “break(m,n)” define the problem for me recursively.

How many breaks does it take for a bar with m rows and n columns? What is the optimal way to break it? Let’s use the think-pair-share technique. Come up with your own solutions, compare with a neighbor, and then share with the group. 6/3/14

Consider the following famous problem in computer science: The knapsack problem You have the following length of board 51, 50, 42, 32, 30, 22, 21, 20, 11, 10, 8 You want to select the segments so that you have a total length of exactly /3/14

What pieces do you select? How do you define the problem? In computer science, the language Python, defines a function as something that takes parameters and returns a value. 6/3/14

Suppose you had a friend who would solve any smaller problems for you, as long as they were of the same format. What would you have her do? # WRITE THE CODE TO determine if there is a solution (returns true or false) def solve_puzzle(gap, blocks): #returns True --> problem solvable, or False --> not solvable #gap is how much you have to fill #blocks is the lengths you can use 6/3/14

Suppose you had a friend who would solve any smaller problems for you, as long as they were of the same format. What would you have her do? # WRITE THE CODE TO determine if there is a solution (returns true or false) def solve_puzzle(gap, blocks): #returns True --> problem solvable, or False --> not solvable if gap == 0: #easy, no gap to fill return True if gap < 0: #over filled the gap return False if len(blocks) == 0: #run out of blocks return False ignore_block = solve_puzzle(gap, rest_of(blocks)) #dont use use_block = solve_puzzle(gap - first_of(blocks), rest_of(blocks)) #put in gap return use_block or ignore_block 6/3/14

For those that have never coded studio.code.org/s/artist For those that have coded before studio.code.org/p/artist If you have coded before: 6/3/14

The boxes There are three boxes. One is labeled "APPLES" another is labeled "ORANGES". The last one is labeled "APPLES AND ORANGES". You know that EVERY BOX is labeled incorrectly. You may ask me to pick one fruit from ONLY one box which you choose. How can you label the boxes correctly? 6/3/14

Flipping Coins There are twenty coins sitting on the table, ten are currently heads and tens are currently tails. You are sitting at the table with a blindfold and gloves on. You are able to feel where the coins are, but are unable to see or feel if they heads or tails. You must create two sets of coins. Each set must have the same number of heads and tails as the other group. You can only move or flip the coins, you are unable to determine their current state. How do you create two even groups of coins with the same number of heads and tails in each group? 6/3/14

Towers of Hanoi – another recursive problem 6/3/14