EECS 376 Midterm

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Decider

1. A TM M is a decider if for some language L, M accepts all input x in L and rejects all input x not in L. 2. No looping can occur. 3. Can only decide 1 language

Recognizer

1. A TM M is a recognizer if for some language A, M accepts all input x in A and rejects/loops on all input x not in A. 2. Every machine is a recognizer for its own language. 3. A recognizer can recognize only 1 language

Turing Machine Model Assumptions

1. Assume paper is divided into discrete cells 2. Assume a finite number of symbols can be written in each cell 3. Assume paper is infinite 4. Assume we can only look at one cell at a time 5. Assume we can only remember a fixed amount of information. There will be a finite set of states.

Properties of a Minimal Spanning Tree

1. Connected 2. Has the least total edge cost 3. Forms a tree

Types of proofs

1. Direct 2. Proof by contradiction 3. Proof by contraposition 4. Proof by induction

Church-Turing Thesis

1. Every function that is computable by any mechanical device is computable by a Turing Machine. 2. Every function that is not computable by a Turing Machine cannot be computed by any computer.

Sigma*

1. The set of all finite length strings over Sigma. 2. Is infinite 3. A language is a subset of this

Kolmogorov Complexity

1. The size in bits of the shortest U program that outputs some value w. 2. For every U, Ku(w) is incomputable 3. No program can compute Ku(w) correctly on all binary strings.

The class of recognizable languages is closed under...

1. Union 2. Intersection

Alphabet

A finite set of symbols

Computable

A function is computable if there exists a program M s.t. given w as input, M halts and outputs f(w).

Decidable

A language A is decidable if there exists an M s.t. M decides A.

Turing Complete

A model is Turing complete if it can implement all algorithms that a TM can.

String

A sequence of symbols from an alphabet

Language

A set of all "yes" instances for some input. Encodes a "ye/no" problem.

Principle of Optimality (Optimal Substructure)

A substructure of an optimal substructure is itself optimal. Example: A subpath of any shortest path is itself a shortest path.

If a language A is undecidable, then what does this say about A or A-complement

At least one of A or A-complement must be unrecognizable.

Combination theorem from HW

C(n, k) = C(n-1, k-1) + C(n-1, k)

If A and A-complement are both recognizable, then A is...

Decidable

If A is Turing-Reducible to B and B is decidable, then A is

Decidable

If A is Turing-Reducible to B and A is decidable, then B is

Decidable/Undecidable

If A is Turing-Reducible to B and B is undecidable, then A is

Decidable/Undecidable

Every language is recognizable? (T/F)

False

Kruskal's Algorithm

For each edge in the set of edges E sorted by weight, add the next edge if it does not induce a cycle.

Euclid's Algorithm

GCD(a, b) = GCD(b, a mod b), finds GCD, run-time = O(log(a+b))

Exchange Property of MSTs

If T is an MST, and we construct a new tree S, which exchanges an edge from T for an edge not in T. Then w(T) <= W(S).

D&C Multiplication

Karatsuba Algorithm N1 x N2 = M2*10^n + (M1-M2-M3)10^(n/2)+M3 M1 = (a+b) x (c+d) M2 = a x c M3 = b x d Time complexity: 3 T(n/2) recursive calls, 2 O(n) subtractions. Applying Master's Theorem: T(n) = O(n^(log_{2}^{3})) = O(n^1.585)

Negative Result

No algorithm can solve a given problem

Closest Point Problem

Procedure: 1. Sort the list of points 2. Go through the list and manually check the distance of points within some fixed amount. This will be done in a constant number of steps. 3. Return closest distance we find. Runtime: O(nlogn) to sort points. O(1) to check closest distance to other desks for each desk. Total time complexity is O(nlogn) + O(n) = O(nlogn).

lossless data compression

Represent data w/o losing info.

Potential Function

S Maps an algorithm to the set of real numbers s.t. 1. S strictly decreases 2. S has a lower bound

Lossy data compression

Some loss of data is OK

Proving Big O:

There are positive real-numbers C and K s.t. 0 <= f(x) <= C*g(x) for every x >= k.

Positive Result

There exists an algorithm that solves a given problem

Intrinsic Complexity

Time complexity of the most efficient algorithm that solves a problem.

If A is Turing-Reducible to B and A is undecidable, then B is

Undecidable

An incomputable problem is one that takes

an uncountable number of steps

Little-o notation

f(n) < M(g(n)), where M is some constant. Describes an upper bound that cannot be tight.

Big-o notation

f(n) <= M(g(n)), where M is some constant. Describes an upper bound that can be tight or loose.


Kaugnay na mga set ng pag-aaral

Nclex Review: Urinary Tract Infection

View Set

Ch 8 Weight Control Review Questions

View Set

Medicare Part D Prescription Drug Plans

View Set

Sources and Uses of short-term and long-term funds

View Set

Microeconomics Final Ch. 10,11,12,13

View Set