CS301 Data Structures Lecture No. 45 _
Data Structures Lecture No. 45
Reading Material
Data Structures and Algorithm Analysis in C+ 7.7 Chapter. 7.6, 7
Summary
Divide and Conquer Mergesort mergeArrays Mergesort and Linked Lists Mergesort Analysis Quickso
Lecture 24, Last Example, Part (a)
f(x) = kx.for 0<x<2
f(x) = 0 elsewhere
Find the value of K, if the given function is a density function.
SOLUTION:
We know that condition of the density function is that
+
f ( x) dx =1

According to the given question,
The value of z statistics in 95% confidence interval is given as:
100(1 a )% = 95%
1 a = 0.95
a = 1  0.95
a = 0.05
a
0.05
=
2
2
a
= 0.025
2
Z score Chart
Negative zscores:
z
0.09
0.08
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0.0
3.4
0.0002
0.0003
0.0003
0.
Find the median, first and third quartile for the following frequency distribution.
Class Boundaries
145 150
150 155
155 160
160 165
165 170
170 175
h
n
Median = l +  C
f
2
Frequency
4
6
28
58
64
30
Class Boundaries
Frequency
Cumulative Frequency
145 1
Firstly you click the TDB link you will see the following page.
Then click the My Topics link Under discussion Topics as highlighted in above picture
and you will see the Date and Time schedule of TDB assigned to you, as highlighted in
below picture.
Example:
The following table shows the downtime, in hours, recorded for 30 machines owned by a
large manufacturing company.
The period of time covered was the same for all machines.
4
6
1
8
1
4
10
6
4
4
1
5
10
3
4
4
5
1
9
11
1
8
13
4
8
4
2
5
9
9
Sol:
The
Example:
Class
Frequency
Cumulative Frequency
0 up to 5
2
2
5 up to 10
7
9
10 up to 15
12
21
15 up to 20
6
27
20 up to 25
3
30
n/2 = 30/2 = 15, see the Cf column 15 lies on 21 (means 21>15) and see the lower class
in front of 21 i.e. 10, hence
Median for
Hypergeometric Experiment:
There are four properties of Hypergeometric Experiment:
1. The outcomes of each trial may be classified into one of two categories, success and
failure.
2. The probability of success changes from trial to trial.
3. The trials ar
6 x y
where 0<x<2 and 2<y<4, then we want to
8
integrate this function with respect to x and y.
2 4
1
f ( x, y )dydx =  x  y )dydx
(6
80
x y
2
If we have the function f(x,y) =
In double integration, usually we have two variables and we integrate the s
Equally Likely:
Probability is the chance of something happening. Probability describes whether an
event is likely to happen, unlikely to happen, certain to happen, impossible, or more
likely, equally likely, or less likely to happen than another event.
I
Find first quartile from the following data:
Class
Frequency
0 up to 5
2
5 up to 10
7
10 up to 15
12
15 up to 20
6
20 up to 25
3
Sol:
Class
Frequency
Cumulative Frequency
0 up to 5
5 up to 10
10 up to 15
15 up to 20
20 up to 25
2
7
12
6
3
2
9
21
27
30
h
n
Any function of a random variable X is also a random variable.
For example, H(X) is a function of X (and X is a random variable) then H(X) is also a
random variable.
Also kth moments about mean of a random variable X are calculated as:
m k =E ( X  m )
=
Dear student:
Its nice to see that you are learning at a fast pace. It shows your deep interest in this
subject. The medium of the course is English. MDB in Urdu or Roman languages will not
be accepted. So try to write in English.
There are mainly four qu
How to make Class limits and Class boundaries:
Let suppose an example to learn the concept of making the Class limits and Class
boundaries.
For a sample of 40 pizza products, the following data represent cost of a slice in dollars (S
Cost).
Product
S Cost
Example:
The names of 5 men and 5 women are written on slips of paper and place in a hat. Four names
are drawn. What is the probability that 2 are men and 2 are women?
Solution:
N = Number of units in the population = 5 men + 5 women = 10
n = Number of un
INTRODUCTION TO ECONOMICS
In this module, your readings will focus on some of the major
principles and themes of microeconomics. Economics can be
defined as the study of the allocation of scarce resources among
competing uses. In this module, you are requ
INTRODUCTION TO ECONOMICS
Choosing a Firm
In this SLP assignment for this session, you will be asked to
examine the decisions of a small business owner. Since
microeconomics is the study of individual households, firms, and
government, we will take a clos
Poisson process:
You should read the concept of Poisson process on book and understand it with the help
of this example.
Example
Flaws in plywood occur at random with an average of one flaw per 50 square feet. What
is the probability that a 32 square feet
Quartiles:
If we want to consider the raw data then our first step will be to arrange the data in
ascending order of magnitude, then:
The median is the middle value of the data set.
The lower quartile (Q1) is the first quartile of the data set.
The upper
Chapter 8 Notes
Net Present Value (NPV) The difference between an investments market value and its cost.
Analyzing an investment decision by discounting future cash flows and comparing to costs is
called discounted cash flow, or DCF, valuation.
An investm
Data Warehousing
Cs614@vu.edu.pk
Course Code: CS614
Lecture Handout
Data Warehousing
Lecture No. 06
Normalization
Before we begin our discussion about the normal forms, it's important to understand that
what we will discuss are guidelines and guidelines o
Someone once said Money makes the world go round. I believe that is an apt description. In
order to earn money, a source of income must be had, but the quality of that job is another story
all together. Most children imagine having their dream job when th
What are the similarities between descriptive and inferential statistics? What are the
differences? When should descriptive and inferential statistics be used?
Descriptive or observational research designs might include case scenarios, retrospective, cros
Springfield Express is a luxury passenger carrier in Texas. All seats are first class, and the following data are available:
Number of seats per passenger train car 90
Average load factor (percentage of seats filled) 70%
Average full passenger fare $160
A
Week 1 Discussion
Q1:
Business ethics deals with the moral issues related to how the business is conducted and its
social, financial and environmental implications. The question of what is right and what is wrong
based mainly on one's priorities and one's
System Programming
Cs609@vu.edu.pk
Course Code: CS609
Lecture # 11
Programmable Peripheral Interface
(PPI)
Device Used as Parallel port Interface (I/O
controller) is PPI
Programmable Peripheral Interface
(PPI)
CPU
PPI
Parallel
I/O Device
Printer
The PPI
System Programming
Cs609@vu.edu.pk
Course Code: CS609
Lecture #7
The microprocessor package has many signals for data, control and addresses. Some of
these signals may be input signals and some might be output. Hardware interrupts make
use of two of such
System Programming
Cs609@vu.edu.pk
Course Code: CS609
Lecture # 6
The typical sequence in which registers will be pushed and poped into the stack on
invocation and on return can be best described by the following diagrams
Push
AX,BX,CX,DX,ES,DS,SI,DI,BP
P
System Programming
Cs609@vu.edu.pk
Course Code: CS609
Lecture # 5
This same task can be performed by the following program as well. In this case the video
text memory is accessed byte by byte.
unsigned char far *scr=(unsigned char far*)0xb8000000;
void ma