Mobile CSP Unit 5
Merge sort
Merge sort is when you keep dividing up the numbers and then you start '_______' them together step by step. When you are splitting up the numbers you do not have to order them only when you are '_________' them.
general
As a rule of thumb, the more ________________ a procedure (or abstraction) the better.
Bubble sort
Bubble sort is better when the list small. You start at the start of the list comparing the number adjacent to each other keeping the highest number. Continue to do this until all numbers are sorted.
spider
Google sends out what's affectionately known as a ________' to 'crawl' the web, going from link to link creating a web and cataloging, or 'indexing' what it sees. If you wanted to mimic the actions of the Google ___________, start at a big site, like Wikipedia, and click every link you see. Then go to those pages, and click every link and so on. Once you've clicked a few hundred billion pages, you'll be somewhere close.
8
If using a binary sort, how many guesses would it take to guess a number between 1-250?
bug
In computer programming, a _________ is an error or defect that prevents the app from working the way it is supposed to.
Bubble sort (advantages)
It is very simple and easy to do, especially when dealing with short lists. The answer __________s to the top.
17
Suppose you are sorting the following list of numbers in ascending order using bubble sort: [16, 5, -1, 4, 12, 17, 3, 10, 5, 9]. After the first pass through the numbers, what value would appear on the right of the list?
zucchini
Suppose you are sorting the following list of words into alphabetical order using bubble sort: [apple, orange, banana, , zucchini, papaya, lemon, pumpkin, squash, tomato]. After the first pass through the list, what word would appear on the right of the list?
Which picture is prettier
This is an example of an undecidable problem
sequential search (disadvantages)
This searc is not the best because it is one of the slowest searches because it goes through every item such as looking for a phone number is a phone book if you don't know the person's name
If/Then
Use this type of block to check is something is true or false
canvas
Which of the following type of components must be always be used with a Ball?
Binary search (advantages)
_________________________ is good since it is the simple process of elimination and the simple process of halving. This is good when you are dealing with average numbers such as 100 or 50 or 20 etc...
Binary search
______________works with a sorted list. You split the numbers by 2. If you have a number between 1-100, you continue to divide by 2 and then guess higher or lowest. In a ______________________________ it would take 7 passes to guess the correct answer.
procedure
a group of code that can be called over and over again and use variables. It is a named block of code that perform a specific task
decidable problem
a problem for which an algorithm can be written to answer "yes" or "no" for all possible inputs.
undecidable problem
a problem that is impossible to solve
intractable
a problem that is practically impossible to solve. They can be solved but are too inefficient to solve when the number of inputs grows large. There are only inefficient algorithms.
Halting Problem
a theory by Alan Turing that there are undecidable problems that cannot be solved
tractable
can be solved within a reasonable time
semantic
error occurs when a programmer inadvertently puts code that is syntactically correct, but does not do what the programmer intended it to do.
syntax
error occurs when a programming language's rules are broken. This type of error can be detected by the compiler which will provide an error message.
efficiency
how long it takes to arrange the values in order
heuristic
produces a fast and often correct solution to a problem. Used when a problem cannot be solve in a reasonable time and an approximated solution is acceptable.
Artificial Intelligence
traditionally tackles problems that humans are good at but computers are not (yet) good at
repeat
used to loop
sequential search
used to search an un ordered list by going through each item
Bucket sort
you put number into their correct categories, such as all of the 2's together, then 3's and so on and then sort them into the correct order.
Radix sort
you sort them by a significant digit and then sort by another digit and continue until all sorted.