Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Intro to Programming
CS 101

Fall 2017
/Project Option 2/
/PART1/
/Q2(part1).Write a C/C+ program which creates a rectangle.
/
The rectangle is defined by the floating point attributes length and
width,
/
each of which has a default value of 1, with a minimum value of 0 and
a maximum value of
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Computer Networking
CS 313

Spring 2017
CS313 Computer Networks
Engr. Rizwana Kalsoom
Introduction
About the Course
Credit hours: 3 + 1
Prerequisites: Nil
Textbook
Computer Networking: A TopDown Approach, 6th edition
by Kurose and Ross
Reference books
Computer Networks by A. Tanenbaum,
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Computer Networking
CS 313

Spring 2017
Chapter 2: Application layer
2.1 Principles of
2.6 P2P applications
network applications
2.2 Web and HTTP
2.3 FTP
2.4 Electronic Mail
2.7 Socket
SMTP, POP3, IMAP
2.5 DNS
programming with TCP
2.8 Socket
programming with
UDP
2.9 Building a Web
serv
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Computer Networking
CS 313

Spring 2017
CS313  Computer Communication & Networking
Assignment # 01
Deadline: Feb 15th, 2017
02:00 pm
Instructions
Copying or cheating will result in zero marks and also leads to the negative marking of
any future assignment.
Submit the hand written assignment. C
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
x2 + y2 + 1. Find the rate of change of
the density at (2; 1) in a direction _=3 radians from the positive x axis. )
6. Suppose the electric potential at (x; y) is ln
x2 + y2. Find the rate of change of the potential
at (3; 4) toward the origin and also i
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
the vector 3; 4 and show that it is parallel to the tangent plane at that point.
Since 3=5; 4=5 is a unit vector in the desired direction, we can easily expand it to a
tangent vector simply by adding the third coordinate computed in the previous example:
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
14.8 Lagrange Multipliers 381
x2 + y2 + z2. The function to maximize is xyz. The two gradient vectors are 2x; 2y; 2z
and yz; xz; xy, so the equations to be solved are
yz = 2x_
xz = 2y_
xy = 2z_
1 = x2 + y2 + z2
If _ = 0 then at least two of x, y, z must b
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
14.7 Maxima and minima 377
0.0
0.25
0.5
0.75
1.0
1.0
0.75
0.5
0.25
0.0
0.0
0.05
0.1
0.15
Figure 14.7.2 The volume of a box with _xed length diagonal.
5. Find all local maximum and minimum points of f = x2 + 4xy + y2 6y + 1. )
6. Find all local maximum and
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
p
2, and from the _fth equation we get z = 1 _
p
2. The distance
from the origin to (1=
p
2; 1=
p
2;1 +
p
2) is
42
p
2 _ 1:08 and the distance from the
origin to (1=
p
2;1=
p
2;1
p
2) is
4+2
p
2 _ 2:6. Thus, the points (1; 0; 0) and
(0; 1; 0) are closest
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
a bit more complicated.
It's easy to see where some complication is going to come from: with two variables
there are four possible second derivatives. To take a \derivative," we must take a partial
372 Chapter 14 Partial Differentiation
derivative with re
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
@y = 0.
So if there is a local maximum at (x0; y0; z0), both partial derivatives at the point must
be zero, and likewise for a local minimum. Thus, to _nd local maximum and minimum
points, we need only consider those points at which both partial derivativ
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
points, in fact an in_nite number, as we've only shown a few of the level curves. All along
the line y = x are points at which two level curves are tangent. While this might seem to
be a showstopper, it is not.
The gradient of 2x + 2y is _2; 2, and the g
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
indeed happen.
385
386 Chapter 15 Multiple Integration
c
y1
y2
y3
d
a x1 x2 x3 x4 x5 b
x
y
Figure 15.1.1 A rectangular subdivision of [a; b] _ [c; d].
Using sigma notation, we can rewrite the approximation:
1
mn
n1
i=0
m1
j=0
f(xj ; yi) =
1
(b a)(d c)
n1
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
a maximum value. )
14.8 Lagrange Multipliers 383
10. Find the points on the surface x2 yz = 5 that are closest to the origin. )
11. A manufacturer makes two models of an item, standard and deluxe. It costs $40 to manufacture the standard model and $60 for
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
14.8 Lagrange Multipliers
Many applied max/min problems take the form of the last two examples: we want to
_nd an extreme value of a function, like V = xyz, subject to a constraint, like 1 =
x2 + y2 + z2. Often this can be done, as we have, by explicitly
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
=
25
8
k2
so k = _2
p
2
5
. The desired points are
(
3
p
2
5
;
p
2
10
;
p
2
5
)
and
(
3
p
2
5
;
p
2
10
;
p
2
5
)
. The
ellipsoid and the three planes are shown in _gure 14.5.1.
370 Chapter 14 Partial Differentiation
Figure 14.5.1 Ellipsoid with two tangen
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
2T0y
(1 + x2 + y2 + z2)2 ;
2T0z
(1 + x2 + y2 + z2)2
=
2T0
(1 + x2 + y2 + z2)2
x; y; z:
The gradient points directly at the origin from the point (x; y; z)by moving directly
toward the heat source, we increase the temperature as quickly as possible.
EXAMP
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
it.
376 Chapter 14 Partial Differentiation
Recall that when we did single variable global maximum and minimum problems, the
easiest cases were those for which the variable could be limited to a _nite closed interval,
for then we simply had to check all cr
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
The derivatives:
fx = 4x3 fy = 4y3 fxx = 12x2 fyy = 12y2 fxy = 0:
Again there is a single critical point, at (0; 0), and
D(0; 0) = fxx(0; 0)fyy(0; 0) fxy(0; 0)2 = 0 _ 0 0 = 0;
so we get no information. However, in this case it is easy to see that there is
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Discrete Mathematics
CS 231

Fall 2016
Types of Graphs: Cubes
I
The vertices of the cube correspond to bit strings.
I
For n bits the graph is denoted Qn .
I
There is an edge between two vertices if they differ by only a
single bit.
Q1 , Q2 and Q3
Types of Graphs: Bipartite Graphs
I
A graph is
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Pattern recognition
CS 564

Fall 2016
4/11/2011
Artificial Neural Networks
By: Bijan Moaveni
Email: [email protected]
http:/webpages.iust.ac.ir/b_moaveni/
Programs of the Course
Aims of the Course
Reference Books
Preliminaries
Evaluation
1
4/11/2011
Aims of the Course
1. Discuss the fundam
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Pattern recognition
CS 564

Fall 2016
Lecture 14: Neural Network
CSE 564 : Pattern Recognition
Lecture #14
Neural Networks  III
Dr. Fawad Hussain
Dr. Fawad Hussain
Faculty of CS and Engg., GIK Institute
1
Lecture 14: Neural Network
CSE 564 : Pattern Recognition
The Generalized Delta Rule
Let
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Pattern recognition
CS 564

Fall 2016
Lecture 01: Introduction
CSE 564 : Pattern Recognition
Lecture #1
Introduction
Dr. Fawad Hussain
Dr. Fawad Hussain
Faculty of CS and Engg., GIK Institute
1
Lecture 01: Introduction
CSE 564 : Pattern Recognition
Todays Lecture
What is Pattern Recognition
W
Ghulam Ishaq Khan Institute of Engineering Sciences & Technology, Topi
Pattern recognition
CS 564

Fall 2016
Lecture 13: Neural Network
CSE 564 : Pattern Recognition
Lecture #13
Neural Networks  II
Dr. Fawad Hussain
Dr. Fawad Hussain
Faculty of CS and Engg., GIK Institute
1
Lecture 13: Neural Network
CSE 564 : Pattern Recognition
Need for Training
In the simple