Computer programming IV. Algorithms.

Slides:



Advertisements
Similar presentations
Creating A Quiz In Powerpoint This is a very quick and easy way to create an interactive powerpoint. All you need are: Your Questions A Correct Slide A.
Advertisements

Md. Ahsan Arif, Assistant Professor, Dept. of CSE, AUB
Algorithm Design Techniques
Creating Books Using PowerPoint Photo Album to teach 2 nd Nine Week Kindergarten TEKS.
Teaching Sight Words To Your Child…. Remember, before you begin…. Make 2 copies of the words on index cards.
Recursion Genome 559: Introduction to Statistical and Computational Genomics Elhanan Borenstein.
Information Location- My House and any library A.R level- 6.7 A.R Points Author - J.K.Rowling.
Harry Potter Genetics. 1. Ron Weasley has red hair. What is his genotype? bb.
Harry Potter and the Recessive Allele
By teacher Silvino Sieben 3ª Série EM.  Active voice and passive voice  Form of the passive  By + agent  With modal verbs.
Made by Kiprina Nastya 11 Б.  First of all it's a good opportunity to become a professional wizard.  Also, we can get lots of professional skills by.
For Monday Read 10.3 Homework: –Chapter 10, exercise 10.
Sorting and selection – Part 2 Prof. Noah Snavely CS1114
Harry Potter and the Chamber of Secrets by J.K. Rowling Presenter: Green Lin Number:
General Computer Science for Engineers CISC 106 James Atlas Computer and Information Sciences 10/23/2009.
Harry Potter And the Philosopher’s Stone By J. K. Rowling Harry potter thinks he is an ordinary boy-until he is rescued by a beetle-eyed giant of a man,
CSCI 105 – Computer Fluency, Spring 2015
Backtracking.
Unit 1. Sorting and Divide and Conquer. Lecture 1 Introduction to Algorithm and Sorting.
Harry Potter and the Half Blood Prince Author Book 6 GO Harry!
F453 Computing Searches. Binary Trees Not this kind of tree!
Harry Potter Characters! By Stella Apostolides.. Harry Potter. Harry Potter is a brave student in Hogwarts and is in Gryffindor house. He is an only child.
Fundamentals of Algorithms MCS - 2 Lecture # 7
Hogwarts Introduction:
Algorithm Paradigms High Level Approach To solving a Class of Problems.
I wanna share some magic with you! Hi! My name’s Harry Potter. I’m 15 years old and I go to Hogwarts School, a boarding school for witches and wizards.
Gary Sham HKOI 2010 Greedy, Divide and Conquer. Greedy Algorithm Solve the problem by the “BEST” choice. To find the global optimal through local optimal.
Harry Potter’s parents were killed when he was 1. Voldemort killed them. When Voldemort tried to kill Harry, all of his powers disappeared. Harry became.
The Sorting Hat Webquest NextNext NextNext. Introduction Today you will be embarking on a quest to help the Sorting Hat from Harry Potter! He is having.
Odd one out....
COMP 1001: Introduction to Computers for Arts and Social Sciences Sorting Algorithms Wednesday, June 1, 2011.
EYFS Maths at Arden Primary School
Harry Potter Settings By: Jessica, & Breanne. Muggle World Dursley’s house Zoo King’s Cross Station.
Solving Linear Equations Substitution. Find the common solution for the system y = 3x + 1 y = x + 5 There are 4 steps to this process Step 1:Substitute.
Welcome to A B C For Sundance Parents. A lways ask your child what went well at school today! B oast about the good things your child tells you! C elebrate.
Can you put these children’s TV shows in date order - earliest to latest?
Sorting Lower Bounds n Beating Them. Recap Divide and Conquer –Know how to break a problem into smaller problems, such that –Given a solution to the smaller.
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
Data Structures and Algorithms Lists, Stacks, Queues, and Graphs Sorting and searching algorithms.
The Hero’s Journey & Harry Potter and the Sorcerer’s Stone
Understand Problem Solving Tools to Design Programming Solutions
Back to school - Making a fresh start
IOI/ACM ICPC Training 4 June 2005.
Computer programming II. Algorithms.
Genetic Traits in Harry Potter
Data Structures and Algorithms
Exam Hints.
Understand Problem Solving Tools to Design Programming Solutions
HARRY POTTER OBSERVATION QUIZ The Sorting Hat
The Broom The glasses The Wand The owl.
Ahh! Can’t We Just Watch The Movie? HEREDITY.
Introduction to Computer Science - Alice
Computer programming III. Algorithms.
“Human Sorting” It’s a “Problem Solving” game:
Computational Thinking for KS3
Pattern Recognition & Machine Learning
Big problem  small steps
The first number is posted telling what random number was selected, I did this for testing purposes, in the real thing it would not be there. Since the.
Start The Sorting Hat.
Harry Potter and Personality!
CS 1114: Sorting and selection (part two)
Harry Potter and the Recessive Allele
Harry Potter and the Recessive Allele
Divide & Conquer Sorting
Last Class We Covered Recursion Stacks Parts of a recursive function:
Harry Potter and the Recessive Allele
Harry Potter and the Recessive Allele
“Human Sorting” It’s a “Problem Solving” game:
Facial Hair.
Sorting and selection Prof. Noah Snavely CS1114
Presentation transcript:

Computer programming IV. Algorithms

Recap: What is computer programming? Telling computers to solve a problem Solve problem and come up with solution (algorithm) Break down the problem into step by step solution Write the solution in a programming language (coding)

Computer Programming repetition Algorithm for going to school in the morning sequencing conditional logic https://www.tynker.com/blog/articles/ideas-and-tips/how-to-explain-algorithms-to-kids/

Algorithms: Decision tree Pattern recognition Divide and conquer

Algorithm: Decision Trees (Harry Potter's sorting hat) Person Hair Length Teacher? Brave things Likes Muggles? Medieval wizards? House Harry short no 20 yes Gryffindor Draco long 4 Slytherin Ron 15 Snape 16 Hermione 25 Pansy 17 McGonagall Ginny 18 Millicent 6 Merlin 50 Blaise 8 ??? Salazar 30 https://www.women.cs.cmu.edu/Who/Photos/Spring2017_DecisionTrees/

Algorithm: Decision Trees ? ? >= 15 brave things < 15 brave things Train: 7 of 10 correct (70% correct) Slytherin Test: 1 of 2 correct (50% correct) Gryffindor https://upload.wikimedia.org/ http://harrypotter.wikia.com

Algorithm: Decision Trees ? ? Likes Muggles Doesn’t like Muggles Non Medieval Wizards Medieval Wizards Slytherin Test: 2 of 2 correct (100% correct) Gryffindor Slytherin

Algorithm: Decision Trees Guess a number between 0 and 3: X > 1? X > 0? X > 2? X = 0 X = 1 X = 2 X = 3 no yes

Coding: Decision Trees Guess a number between 0 and 3: If X > 1 then: If X > 2 then: X = 3 Else: X = 2 If X > 0 then: X = 1 X = 0 X > 1? X > 0? X > 2? X = 0 X = 1 X = 2 X = 3 no yes

Algorithm: Pattern Recognition Rock-Paper-Scissors: Human VS Computer The computer guesses what we are going to do next based on the patterns of our previous throws http://www.nytimes.com/interactive/science/rock-paper-scissors.html

Algorithm: Pattern Recognition bakaji bavwa bamona bana The women saw the children

Algorithm: Pattern Recognition The child: muana The children: bana The woman: mukaji The women: bakaji The man: muluma The men: baluma The lion: ntambwe The lions: bantambwe The small lions: tubantambwe The small lion: kantambwe Saw: mumona/bamona/tumona/kamona

Algorithm: Sorting We sort things all the time! Packing, moving, ... How can we teach computers how to sort things?

Algorithm: Selection sort While there is still some heights to be sorted: Select the shortest from the set and put it to one side 45

Algorithm: Divide &Conquer Quick Sort While the group has more than 1 object Pick one object at random, put objects shorter than it on its left and objects taller than it on its right Repeat this same procedure on the left and right groups

Algorithm: Quick Sort 9

Algorithm: Quick Sort 9

Algorithm: Quick Sort 16

Algorithm: Quick Sort 16

Algorithm: Quick Sort 19

Algorithm: Quick Sort 19

Algorithm: Quick Sort 19

Algorithm: Quick Sort 19 While the group has more than 1 object Pick one object at random, put objects shorter than it on its left and objects taller than it on its right Repeat this same procedure on the left and right groups 19

Coding: Choose Your Own Adventure Use scratch.mit.edu Create backdrops Create scenes Match scenes to backdrops Code the choices

Coding: Robot Singing Use http://www.edwareapp.com/

Algorithm: Divide & Conquer Tower of Hanoi Think how we can use divide and conquer to solve the problem: Tower of Hanoi (https://www.mathsisfun.com/games/towerofhanoi.html) Next week: Building your own website!

Questions?