import java.awt.Color;
public class Circle cfw_
private double radius;
private double x;
private double y;
private Color color;
public Circle() cfw_
radius = 1;
x = 0;
y = 0;
color = Color.BLACK;
public Circle(double radius) cfw_
this.radius = radius;
x
Outline
Computation That Counts
Xiaofeng Gu1
1 Math Department
West Virginia University
May 1, 2009
Xiaofeng Gu
Computation That Counts
Outline
Outline
1
The Class #P
Counting Problems
The class #P
2
The Class P
Introduction to P
P-complete
Xiaofeng Gu
Co
Outline
Randomized Computation
K. Subramani1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
March 27, 2009
Subramani
Complexity Classes
Outline
Outline
1
Randomized Algorithms
Three paradigmatic problems
2SAT
Min
Outline
An Introduction to First-Order Logic
K. Subramani1
1
Lane Department of Computer Science and Electrical Engineering
West Virginia University
Syntax, Semantics and Validity
Subramani
First-Order Logic
Outline
Outline
1
The Syntax of First-Order Log
Outline
The classes FNP and TFNP
C. Wilson1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
Christopher Wilson
Function Problems
Outline
Outline
1
Function Problems dened
What are Function Problems?
FSAT Dened
TSP
Introduction Problems
Approximation Algorithms
Ron Reaser
Lane Department of Computer Science and Electrical Engineering
West Virginia University
March 31, 2009
Reaser
Approximation Algorithms
Introduction Problems
1
Introduction
Notion of Approximability
Principles of Programming Languages - Homework I
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Instructions
1. The homework assignment is to turned in by 11 : 00 am. in class on February 1.
2. Each question is wor
Principles of Programming Languages - Final (Solutions)
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Instructions
(a) The nal is to be turned in by 10 : 30 am.
(b) Each question is worth 4 points.
(c) Attempt as
Proofs of equivalence in CFGs
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Denitions
Denition 1.1 A Context-Free Grammar (CFG) is a 4-tuple G = V , T, P, S , with V representing a set of non-terminals,
T represen
Outline
An Introduction to First-Order Logic
K. Subramani1
1
Lane Department of Computer Science and Electrical Engineering
West Virginia University
Completeness, Compactness and Inexpressibility
Subramani
First-Order Logic
Outline
Outline
1
Completeness
Theory
Applications
Cryptography
Ron Reaser
Chris Wilson
Lane Department of Computer Science and Electrical Engineering
West Virginia University
April 28, 2009
Reaser, Wilson
Cryptography
Theory
Applications
1
Theory
Purpose and Examples
Public-Key Crypto
Outline
NP-Completeness Proofs
Matt Williamson1
1
Lane Department of Computer Science and Electrical Engineering
West Virginia University
Graph Theory, Packing, and Covering
Williamson
NP-Completeness Proofs
Outline
Outline
1
NP-Complete Problems in Graph
Outline
Logarithmic Space
Lee Zaniewski1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
Zaniewski
Logarithmic Space
Outline
Outline
1
The Relationship between L and NL
Denitions
Relations
REACHABILITY
2SAT
L-comp
Outline
The polynomial hierarchy and PSPACE
Piotr Wojciechowski1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
Wojciechowski
PH and PSPACE
Outline
Outline
1
The complexity class DP
Denition of DP
Problems in DP
Outline
The class NP
Xiaofeng Gu1
1 Department of Mathematics
West Virginia University
NP-completeness
Xiaofeng Gu
NP-Complete Problems
Outline
Outline
1
Problems in NP
2
Variants of Satisability
3SAT
2SAT
MAX2SAT
NAESAT
3
Graph-Theoretic Problems
INDEPEN
Outline
A Randomized Algorithm for Primality
Piotr Wojciechowski1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
Wojciechowski
Primality
Outline
Outline
1
Looking at Primality
An attempt at a simple algorithm
Pro
Outline
Parallel Computation
Matt Williamson1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
Algorithms, Models, Classes NC and RNC
Williamson
Parallel Computation
Outline
Outline
1
Parallel Algorithms
Matrix Mul
Outline
Circuit complexity
K. Subramani1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
April 1, 2009
Subramani
Complexity Classes
Outline
Outline
1
Circuit Complexity
Circuits
Circuit complexity of Reachability
Outline
The complexity class coNP
Piotr Wojciechowski1
1 Lane Department of Computer Science and Electrical Engineering
West Virginia University
Wojciechowski
coNP
Outline
Outline
1
Description of coNP and examples of problems
What is coNP
Examples of pro
Principles of Programming Languages - Homework I (Solutions)
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Problems
1. Write a function in SCHEME for computing the number of digits of a positive integer. You may a
Principles of Programming Languages - Midterm (Solutions)
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Problems
1. Language Design Principles: Using the various languages discussed in class, explain the following
Principles of Programming Languages - Quiz II (Solutions)
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Problems
1. Type-Checking:
Consider the following ML function denition:
> fun thrice f
x = f(f(f(x);
Use the
Principles of Programming Languages - Homework II
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Instructions
1. The homework assignment is to turned in by 11 : 00 am. in class on April 7.
2. Each question is worth
Principles of Programming Languages - Homework II (Solutions)
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Problems
1. Consider the following C fragment. Categorize the three assignments as legal or illegal, prov
Principles of Programming Languages - Scrimmage I
K. Subramani
LCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Instructions
1. The scrimmage will not be graded.
2. Attempt as many questions as you can.
2
Problems
1. Argue that if
Principles of Programming Languages - Midterm (Solutions)
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Problems
1. Language Design Principles: Using the various languages discussed in class, explain the following
Principles of Programming Languages - Quiz I
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Instructions
1. The quiz is to be turned in by 11 : 50 am.
2. Each question is worth 3 points.
3. Attempt as many problems
Principles of Programming Languages - Quiz II
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Instructions
1. The quiz is to be turned in by 12 : 00 noon.
2. Each question is worth 3 points.
3. Attempt as many probl
Principles of Programming Languages - Midterm
K. Subramani
LDCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Instructions
(a) The midterm is to be turned in by 12 : 10 pm.
(b) Each question is worth 4 points.
(c) Attempt as many q
Principles of Programming Languages - Scrimmage I (Solutions)
K. Subramani
LCSEE,
West Virginia University,
Morgantown, WV
cfw_ksmani@csee.wvu.edu
1
Problems
1. Argue that if a programming language has a while statement, it does not need an if statement.