Algorithms Flashcards
What is hardware?
physical devicecs
What is software?
programs that run on hardware to implement applications
How has computer storage changed?
computers have gotten much better at storing information in smaller spaces
changed computing – much larger number of pieces of data in a device
What are the 4 types of computer memory?
registers
caches
RAM
hard drive
What does the actual work in computers?
CPU/”chip” actually does the work
What memory does the CPU/”chip” have?
- registers
- several layers of caches
What are registers?
hold the data that the computer is actively working with
very small, and very fast to access
What are caches?
fast memory on CPU/chip
What memory does the computer have?
- RAM
- hard drive/solid state drive (ssd)
What is RAM?
random access memory
- fairly fast and small
- slower to access + a bit bigger than cache
Where is the RAM?
on motherboard, NOT on chip
Where is the hard drive/solid state drive (ssd)?
NOT on chip
NOT on motherboard
How fast is access to the hard drive/solid state drive (ssd)?
very slow to access, but generally much bigger
What is Moore’s Law?
computer speed and memory on a chip will double every 18 months to 2 years
1965: number of transistors on chips doubles every year
1975: number of transistors on microchips doubles every 2 years
2019: Moore’s law no longer holds true – the trend persists, but it is slowing down
(making chips smaller also makes them faster – but this has come to an end)
How big are transistors?
around 10 nm
Why is it becoming harder to double the number of transistors on a chip?
- harder to work on environments that are that small
- atom size – we are limited by the size of an atom
- battery cells too close together – overheating
- software is not the problem
What is computing speed up due to?
- hardware
- software
What is an operating system?
special kind of software that allows the other software to run (ie. Windows, Mac OS)
How does software work?
programmers write down algorithms in a special language that the computer can understand
Evaluating Algorithms - Sequential Algorithm
-
Evaluating Algorithms - Breaking Bad Algorithm
-
What do signal algorithms use?
decomposition
abstraction
What must occur before sorting?
swapping
What are the 3 ways to evaluate algorithms?
- validity
- time (copies, swaps, comparisons)
- space (memory slots for cards, markers, dividers)
Simple Sort vs. Selection Sort vs. Insertion Sort
on average, Selection Sort and Insertion Sort have roughly ½ as many comparisons, and use roughly ½ as much space as Simple Sort
Quick Sort and Merge Sort
even faster
What is a classifier?
algorithm that maps input data to a specific category, derived from patterns or correlations from data
What is training data?
data that classifiers learn the patterns that has the “answer”
What is test data?
some training data that is held back to check and see if the classifier works