CS 109 Midterm

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Alpha go: Neural Network Training

"learned" to discover new strategies, playing games between its neural networks, using trial and error process known as reinforcement learning.

policy: throughput

# of processes that use the CPU in a certain time

total edges when of N, m vertices have 3, rest have 2

(2N+m)/2

Typical sequence of code

Algorithm -> high level program -> machine code

Building blocks of problem solving

Algorithms / abstract data types

Big O Quicksort

Avg : O(n log n), worst : O(n^2), Best: O(log n)

Multitask

1 program uses the cpu at a time OS switches tasks rapidly

Robot Types of state

1. External state(sensors) - night, day, at home, sleeping, etc 2. internal state(state of the robot) - velocity, mood Combination of 2

Design principle of internet

1. Global addressing 2. open architecture 3. complex processing at the edge(routers) 4. no global controller 5. best effort

Deep Blue

1. Parallel special purpose hardware 2. heuristic game tree search algorithm 3. Chess knowledge

FSM limitations

1. can't tell if revisited sate is for the 1st or 5th time 2. pigeonhole principle 3. cannot solve (tell if #A and #B's are the same or tell if a string is a palindrome) 4. FSM with n states with n+1 symbols, revisit 1 state at least once

Halting question

1. deciding whether a program will halt on an arbitrary input 2. Turing proved halting problem is undecidable

Philosophical issues with AI

1. is AI possible 2. moral issues with humans, machines

Demand paging

1. os doesn't allocate all the memory a process needs 2. only allocate for immediate work 3. keep the rest of the memory in disk 4. if a page in memory is unused, move to disk 5. when a page is needed, copied from disk to RAM

Problems with Internet (Technical)

1. outrages 2. speed is slow 3. not secure 4. attack of viruses

Problems with Internet (Ethical/legal/social)

1. ownership unclear 2. poorly define ethical standards 3. privacy concerns 4. legal enforcement

WATson(IBM)

1. parallel hardware 2. natural language understanding and generation 3. large knowledge base derived via machine learning from 200 million pages

Task of ALU?

1. perform arithmetic operation on the contents of registers 2. perform logical operation on the contents of registers

Tasks of Controller?

1. read instruction from memory 2. direct ALU to do arithmetic or logic 3. transfer data from one place to another 4. prepare for next instruction to be read 5. send a directive to input or output device

Robotics definition

1. study of the intelligent connection of perception to action 2. machine able to extract information from its environment and use knowledge about its world to move to perform tasks.

Robot control tradeoff

1. thinking is slow 2. reaction must be fast 3. thinking enables looking ahead to avoid bad solutions 4. thinking too long can be dangerous 5. to think robot needs accurate information

Loom program limitations

1. very large instructions 2. no counting(loops/repeats) 3. no modularity(functions, methods, etc) 4. no branching(if-then-else)

TCP

1.logical communications between A and B 2. packets arrive in order, compensation for loss, retransmission and congestion control

Computers

Transform information

policy

a set of rules the OS enforces to prioritize tasks high priority tasks are handled first

Packet: Header

address other information

IP

addressing system for the internet fast, connectionless, unreliable protocol to get packets from A to B

RAM

all locations in memory are equally slow/fast in terms of access speed

Robots: sensor space

all possible values of sensory readings (perceptual space)

spanning tree

any tree that covers all vertices

policy : latency

avg time that processes have to wait before running

Context switch

changeover from one program to another

Minimax serach

computer assumes user plays best move

Network

computers communicating with each other

Packet switching

connectionless, uses the capacity of links better

compute

convert one body of information to another

Compile

converts a high level program into machine instructions

kernel

core of an os coordinates other programs runs until some other program needs to use the cpu pauses itself to run other program

Packet: Payload

data. if payload is too big then the packet is split into smaller packets.

Undecidable

decision problem for which there is no algorithm solution on a Turing machine 1. non existence 2. not a matter of efficiency.

recursion

defining algorithms in terms of themsleves

state of the machine

description of what the machine is doing at any given time (parsimonious and adequate)

algorithms

descriptions of transformation

indirection: logical memory ordering

each corresponds to a page

Linear ordereing

each stored item has an address, retrieval is by address.

CPU process

fetch-decode-execute

Hollerth Tabulator

first device to read data into a machine. build to tabulate the result of the US census became to be IBM

Policy: utiliation

how much work the cpu does

Breadth first travel

list all nodes in hiearchical order

end-to-end protocol

location 1 and 2 appear to be next to each other but they are in different locations. sends 1 -> 2

Locality Principle

look at what tiems in memory are being used keep items from near by location (spatial locality) keep items that were recently used (temporal locality)

Operating System

manager for the computer space, time, peripherals

indirection: physical memory ordering:

memory divided into fixed size blocks called Frames

non-volatile

memory intact when power turned off (Harddrive)

volatile

memory that is erased when the computer shuts down (RAM & CPU/registers)

Layers of services

modular

Fragmentation

move memory around in the background so when a new process needs memory, there is a large enough contagious block to allocate

total edges in a graph

n (n-1) / 2

How many subsets in N elements?

If a set has N elements, it has 2^N subsets

Registers

Inside CPU, fastest storage unit in the computer

Internet

Interconnected networks

Checking sum of each subset

Max of N operations

Abstract Data types

Models of collection of information

Big O of Kruskal's algorithm

O(E Log E)

Binary sort

O(Log2(n))

Breadth first traversal / Depth first traversal

O(V)

Big O of Dijkstra's algorithm

O(V^2)

Big O of Prims Algorithm

O(V^2)

Salesperson algorithm / List of Permutations

O(n!)

Big O Selection Sort

O(n^2) / no difference between the best case and worst case

Kruskal's algorithm

Order edges in ascending order. Keep adding lowest edges without creating a cycle.

NP

Set of problems which a solution can be checked in polynomial time

Cache

Small, fast memory between registers and RAM

difference Engine

Charles Babbage / mechanical calculator to compute mathematical tables. - no branching or looping

The cpu is made up of?

Controller + ALU

Tree Traversal (2 types)

Depth / Breadth first travel

Modular

Doesn't matter how and where it is located as long as we know the address

Depth Traversal

Pick 1 node, go down as far as you can. If it ends, move on to the next child.

2 Algorithms for MST

Prim's / Kruskal's algorithm

Booting & ROM

Read only memory

3 types of Data

Sequences ( list ) , Trees, Graphs

Information is chunked into

packets

discrete

proceeding in finite steps (individually separate and distinct)

WWW

repository of information distributed across the internet

Sequential access memory

retrieving memory is different in speed depending on location. Track 1 -> 6 is different from Track 1 -> 2

Protocol

rules for exchanging information

Message from A to B is sent as

sequence of packets

high level programs

sequence of statements, 1 statement = many instructions designed for human convenience, block structured.

high level programming

set of instructions expressed in language computers can understand and execute

P

set of problems that can be solved in polynomial time

Prims Algorithm

start with any node, greedily grow the tree from there

cache

stores things that programs are likely to need in the future

Robot State

sufficient description of the system 1. observable 2. hidden 3. partially observable 4. discrete 5. continous

encoding

the vocabulary to describe the state

Robot controls

the way in which the sensing and action of a robot are coordinated 1. Control is hybrid

Minimum spanning tree(MST)

tree of minimal total edge cost

AI definition

understanding of the mechanisms underlying thought and intelligent behavior and their embodiment in machines.

Big O notation

upper bound on the growth rate of the function F(x) = O((g(x)) as x -> infinite if and only if there exists a positive number M such that f(x) < M * g(x) for all x > x0

Virtual memory

use indirection to pretend RAM is bigger than it is

statement include..

variable names and operators

Indirection

when a process uses memory assigned to it, uses local addresses. OS translate logical memory locations to physical memory locations

Analytical Engine

worlds fist general purpose mechanical calculator -branching, examine a piece of data and decides to proceed to the next step


Ensembles d'études connexes

PS103 Ch. 6,7,8,9&10 Post and Pre Tests

View Set

Chapter 31: Animal Organization and Homeostasis Set 1

View Set

MC Practice Test - Block 2 (part 2)

View Set