DP
It is easy to hardcode the solution,
but it is difficult to come up with an
algorithm.
by jack choi
._.
What is DP?
Dutch
Programming (?)
Dynamic Programming
Overlapping
subproblems
Optimal substructure
Dynamic Programming
Basic
Classic Problem
Fibonac
Indian Institute of Technology Kharagpur
Department of Computer Sc'ience and Eng'ineeTing
Quz-A, Spring 2016
Computer Architecture and Operating System (CS31702)
Date: 12-April-2016
Students: 125
Time: 75 minutes
F\rll marks: 30
Nlod"cfw_
S'I"H*
Roll No.
Tutorial 1
1. For the given systems find the transfer function sought using,
(i) Differentioal equation approach.
(ii) The proper transfer function representations of each element followed by block-diagram reduction.
(a) Series RLC.
(b) DC motor.
(c) Spri
Into the Mind of the Hacker:
Hands-On Web Application Hacking
Adam Doup
University of California, Santa Barbara
4/23/12
Overview
Think like a hacker
SQL injection
Cross-site scripting (XSS)
Doup - 4/23/12
Me
7 years as UCSB student
2nd year PhD stude
Three-Phase Inverters
Consider three single-phase inverters in
parallel, driven 120 apart.
Three-Phase Inverter (continued)
Three single-phase full bridge inverters
12 transistors, 12 diodes, 3 transformers
Could it be simpler?
Alternative (Preferred) Con
Data Structure II
Heap
Binary
Search Tree
Hash Table
Binary Indexed Tree
Segment Tree
Outline
A
left-complete binary tree which has
every node greater than its two children, if
any of them exists
Insert
Extract-max
Heapify
Make-heap
Heap
A
binary tree whi
Problem 6.1.1
Derive the state table and the corresponding state diagram of the following finite state
machine (FSM).
Solution 6.1.1
Since the circuit has only one flip-flop, there would be two states in the state diagram. As the
output depends only on th
INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Department of Electrical Engineering
MID TERM EXAMINATION (AUTUMN) 2015-2016
Date: 14.09.2015 Time: 2 hours Full Marks: Q No. of Students: 113)
Sub. Name: Power Electronics Sub. No. EBB l011
Answer any FIVE questio
Extrusion Description Key
E
F
FG
f
L
l
W
l;W
max.
70000 N/mm2
[N]
[N]
[mm]
[mm]
[cm4]
[cm3]
see Extrusion Data Sheets
70 N/mm2 (recommendation)
E-modulus
Load
Dead load of structure
Deflection
Length
Moment of inertia
Section modulus
Ma
Laboratory Examination
Computer Programming Lab (CS 211) Dt: 9/11/07
Full Marks : 40
Time : 3 hrs
Consider a network of n nodes. A node vi could be directly connected to a
node vj by the edge eij (0 i,j n-1). Our task is to analyze the connectivity
of the
CS211: Computer Programming Laboratory
Date: 17.8.07
Topic: Sorting and Searching
LINEAR SEARCH: Linear(Data,N,Item,Loc)
Here Data is a linear array with N elements, and Item is a given item to be searched.
The algorithm finds the location Loc of Item in
Computer Programming Lab
7/9/2007
Linked Lists
Linked list, is a linear collection of data elements, called nodes, where the linear order is
given by means of pointers. Each node can be divided into two parts: the first part
contains the information of th
Computer Programming Lab
14/9/2007
Writing Recursive Functions without Recursions
Normally a non-recursive version of a program will execute more efficiently compared to
a recursive implementation in terms of space and time. This is because the overhead
i
Computer Programming Lab: CS211
Date: 31.8.07
Pointers and 2 Dimensional Arrays
1 (a). Write a C function to read a two dimensional array or matrix, say A, of elements
of data type int. The sizes of the matrices should be user defined and the space for th
Computer Programming Lab
Date: 24/8/07
It is often the case that a program cannot determine that it has read enough input until it
has really read too much. One example is when asked to read the characters that make a
number. So, unless the first non-digi
Computer Programming Lab
12/10/2007
Implementing Expression Trees
Expression Trees are a very handy data structure. It is used for various purposes,
starting from simple expression manipulations to the area of compiler designs.
a) Write a C-code to read t
Median, Order Statistics
Lecture 6
Order statistics
Select the i th smallest of n elements (the
element with rank i).
i = 1: minimum;
i = n: maximum;
i = (n+1)/2 or (n+1)/2: median.
Naive algorithm: Sort and index i th element.
Worst-case running time
Greedy Algorithms, Graphs,
Minimum Spanning Trees
Lecture 13
Graphs (review)
Definition. A directed graph (digraph)
G = (V, E) is an ordered pair consisting of
a set V of vertices (singular: vertex),
a set E V V of edges.
In an undirected graph G = (V,
Shortest Paths II: BellmanFord, Topological Sort, DAG
Shortest Paths, Linear
Programming, Difference
Constraints
Lecture 15
Negative-weight cycles
Recall: If a graph G = (V, E) contains a negativeweight cycle, then some shortest paths may not exist.
Examp
Augmenting Data Structures,
Dynamic Order Statistics,
Interval Trees
Lecture 11
Dynamic order statistics
OS-SELECT(i, S): returns the i th smallest element
in the dynamic set S.
OS-RANK(x, S): returns the rank of x S in the
sorted order of Ss elements.
ID
Shortest Paths I: Properties,
Dijkstra's Algorithm
Lecture 14
Paths in graphs
Consider a digraph G = (V, E) with edge-weight
function w : E R. The weight of path p = v1
v2 L vk is defined to be
k 1
w( p) w(vi , vi 1 ) .
i 1
Example:
v
4
1
v
2
2
v
3
5
v
4
Red-black Trees, Rotations,
Insertions, Deletions
Lecture 10
Balanced search trees
Balanced search tree: A search-tree data
structure for which a height of O(lg n) is
guaranteed when implementing a dynamic
set of n items.
Examples:
AVL trees
2-3 trees
Dynamic Programming,
Longest Common
Subsequence
Lecture 12
Dynamic programming
Design technique, like divide-and-conquer.
Example: Longest Common Subsequence (LCS)
Given two sequences x[1 . . m] and y[1 . . n], find
a longest subsequence common to them b
The structure and function of complex networks
M. E. J. Newman
Department of Physics, University of Michigan, Ann Arbor, MI 48109, U.S.A. and
Santa Fe Institute, 1399 Hyde Park Road, Santa Fe, NM 87501, U.S.A.
arXiv:cond-mat/0303516 v1 25 Mar 2003
Inspire
1
Introduction
Network data involving relational structure representing interactions between actors are commonly
represented by graphs where the actors are referred to as vertices or nodes, and the relations are
referred to as edges or ties connecting pai
Networks
Carlos Carvalho, Mladen Kolar and Robert McCulloch
11/12/2015
Networks are everywhere
Our world is complex
I
I
I
I
I
Societies are collections of individuals who interact
Communication systems link electronic devices
Information and knowledge is
Fast Algorithm for Modularity-based
Graph Clustering
Hiroaki Shiokawa
NTT Software Innovation Center, NTT Corporation,
July 23 rd , 2013
2013 NTT Software Innovation Center
BACKGROUND & MOTIVATION
2013 NTT Software Innovation Center
2
Large Graphs
Larg