Berkay Akyap
12.12.2011
20800955
EEE424-Section01
1) c)
To analyze which one is better I used the code given below:
%
h
H
f
Part 1 c
= [0 -1/pi 0 1/2 0 -1/pi 0];
= fftshift(fft(h, 256);
= [1:256];
plot(f,abs(H)
hold on
h1 = [0 -1/(4*pi) 0 1/2 0 -1/(4*pi)
CS 476 8. Reducibility
1
Reducibility
Denition Reduction: transforming one problem into another, such that the solution to the second problem
yields the solution to the rst one.
solve A(. . .)
.
.
solve B(. . .)
.
.
return
If B can be solved, then A can
29 9 2014
www.cs.bilkent.edu.tr/~calkan/teaching/cs476/dfaMod.c
#include <stdio.h>
#include <string.h>
#define MAXCHR 500
#define DIV 23
/* DIV = NUMBER_OF_STATES */
int main(int argc, char *argv)cfw_
char w[MAXCHR];
int table[DIV][2];
int i;
int state;
i
CS 476 7. Decidability/Undecidability
1
Decidable languages
Languages that are always accepted or rejected by a Turing Machine (i.e. by a decider TM).
Denition We will use < M > to denote the binary encoding of a TM. Or, alternatively, write a program
for
CS 476 3. Regular Expressions
1
Regular expressions
An alternative way to describe regular languages
Common in scripting languages (perl, python, etc.) & UNIX utilities (awk, sed, grep, etc.)
Dened by the regular operations:
Union ( or +)
Concatenati
CS 476 2. Non-deterministic nite automata
1
Non-deterministic Finite Automata
Non-deterministic computation:
q1
0
start
q0
0
q2
For a given state and input, transition function can have more than one results, or no result at all.
(q0 , 0) = cfw_q1 , q2
(
CS 476 5. Pushdown Automata
1
Pushdown Automata
A pushdown automata (PDA) is:
An NFA with a stack.
Stack: an innite LIFO memory.
Equivalent to CFGs.
Denition A PDA is a 6-tuple (Q, , , , q0 , F ) where
Q is the nite set of states.
is the input alphab
CS 476 4. Context-Free Grammars
1
Context-free grammars
A formal grammar is considered context free when its production rules can be applied regardless of the
context of a nonterminal. It does not matter which symbols the nonterminal is surrounded by, the
CS 476 Introduction
1
Automata, Computability, and Complexity
Central areas of theory of computation include Automata, Computability, and Complexity, which are linked
by the question:
What are the fundamental capabilities and limitations of computers?
Thi
Berkay Akyap
14.11.2011
20800955
EEE424-Section 01
1.b) The code to calculate the 16 point DFT of x[n] is given below:
% FIRST QUESTION
N = 16;
n = [0:1:(N-1)];
xn = sin(2*pi*4*n)/N);
Xn = fft(xn, N)
The result is shown below:
Xn =
Columns 1 through 3
0.0
Bilkent University
EEE-424 Digital Signal Processing
Homework 1
[Onur Yorulmaz's pigeon box]
1. Download the shirt.jpg and shirt_small.jpg images and load them into Matlab by using
the following function:
imagename = imread ( 'filename.jpg' );
Comment on
Berkay Akyap
20800955
Q2) The data for the last 30 observations of dolar vs. TL obtained from the Central Bank of
Turkish Republic can be seen below:
17-11-2011
1.79350
18-11-2011
1.80200
21-11-2011
1.80720
22-11-2011
1.83360
23-11-2011
1.83290
24-11-2011
Berkay Akyap
20800955
EEE424-Section-01
14.10.2011
HOMEWORK #1
1. I found the size of the matrices as seen below:
small_shirt <400x380 uint8>,
shirt
<800x760 uint8>
The 400x380 and 800x760 part corresponds to the matrix (where the color of the
correspondi
Berkay Akyap
20800955
EE424-Section 01
23.10.2011
HOMEWORK #2
1. In this part we are wanted to analyze what number was dialed. I found the number
dialed as 1173 and it corresponds to the number of EE207 and the assistants Mehmet
Kseolu and Aya zelikkale.
CS 476 6. Turing Machines
1
Turing Machines
Denition Turing Machine is a nite state machine with an innite and unrestricted memory (denoted as
tape).
Differences from nite automata:
A TM can both read and write on the tape.
The tape head can move both l