Basic Introduction of Mathematics Part 3
Basic Introduction of Mathematics Part 3
BCA -201
1
Course Title
Assignment No.
Question 1:
VLUMC
OF DATA
1970
1980
1990
2000
Question 2:
Rol Roll
number
Stu
10
Student name
Ad
Address
S.A. Patel
1102, sedative
path, pane
50
N.M. Joshi
456
P.G. Desponded
M.R.Shinde
7890
Student name
Ad
Address
College
Id
10
50
456
7890
S.A. Patel
N.M. Joshi
102, M.D.
Road, pane
1002
P.G. Desponded
119, Narayan
path, pane
1001
M.R.Shinde
234, parfait,
pane
1005
College table
Roll number is a primary key of student table
10
College ID
College name
11
Address
1001
National college
1002
Model college
456, Shankar
1005
City
OODBMA
Data access
performance is normal
15
18
Course Code
BCA -202
Course Title
Assignment No.
19
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
0
1
2
3
4
5
22
22
22
22
11
11
56
45
39
11
22
22
45
39
11
32
39
39
39
11
45
45
32
32
11
56
56
56
45
45
99
82
32
32
56
56
82
32
82
82
82
82
32
99
99
99
99
99
21
PASS
A [0]
A [0]
A [0]
A [0]
A [0]
A [0]
A [0]
A [0]
K=
K=
K=
K=
K=
K=
K=
K=
1
2
3
4
5
6
7
8
75
75
32
32
12
12
12
12
32
32
75
45
32
32
23
23
45
45
45
75
45
45
32
32
12
12
12
12
75
75
45
45
84
84
84
84
84
84
75
64
23
23
23
23
23
23
84
75
64
64
64
64
64
64
64
84
57
57
57
57
57
57
57
57
SORTED
ARRAY
12
23
32
45
64
75
84
57
Begin
Value: =X [i]
J: =i-1;
While j > 0 and X [j]>value do
Begin
X [j + 1]: = X [i];
X [j]: =value;
J: =j-1;
End;
Complexity analysis
Worst case: in this case, array is in reverse order and
the inner loop must use the number k-1 of comparisons.
Hence.
F (n) = 1+2.. + (n-1) =n (n-1)/2=0 (n2)
Average case: In this case there will be approximately
(k-1)/2 comparisons in the inner loop.
F (n) = 1/2+2/2+.. (n-1)/2 =n (n-1)/4=0(n2)
Insertion sorts overall complexity is O (n 2) on average.
Regardless of the method of insertion.
Number of writes is O (n2) on average. But number of
comparisons may vary depending on the insertion
algorithm.
Selection Sort
The Selection Sort method entirely consists of a selection
phase in which the smallest element of the array is
selected and is positioned at the First place.
At the end of n-1 selections. The entire array gets sorted.
For example,
Suppose an array A contains 8 element as
followings:
75, 32, 45, 12, 23, 64, 57
23
A [1]
A [2]
A [3]
A [4]
A [5]
A [6]
A [7]
A [8]
K= 1, LOC=4
75
32
45
12
84
23
64
57
K= 2, LOC=6
12
32
45
75
84
23
64
57
K= 3, LOC=6
12
23
45
75
84
32
64
57
K= 4, LOC=6
12
23
32
75
84
45
64
57
K= 5, LOC=6
12
23
32
75
84
75
64
57
K= 6, LOC=8
12
23
32
45
57
75
64
84
K= 7, LOC=7
12
23
32
45
57
64
64
84
SORTED
ARRAY
12
23
32
45
57
64
84
84
If AR [J]
{
Small = AR [J]
Pos = j;
}
J = J + 1;
}
Temp = AR [i]
AR [i] =small
AR [pos] = temp;
End
Complexity of selection sort:
The number f (n) of comparison in the selection sort
algorithm is independent of the original order of the
element.
There are n-1 comparisons during pass to the
smallest element, there are n-2 comparisons during
pass2 to find the second smallest number and so on.
Accordingly,
F (n) = (n-1) + (n-2) + (n-3) +3 + 2 + 1 = n (n-1)/2 = 0 (n2)
Binary search
25
For example,
26
55
66
72
77
85
89
92
96
99
55
66
72
77
85
89
92
96
99
28
H: K-> L
And the same is called a hash function or
hashing function.
A good hash function should:
- Minimize collision
- Be easy and quick to computer
- Distribute key values evenly in the hash
table.
- Use all the information providers in the key.
- Have a high load factor a given set of keys.
Methods of building hash function
1. Truncation:
By ignoring some part of the key and using the
remaining part as the index is truncation.
For example, if key has 8 digit integer and hash table
has 1000 location; then first, second and fifth digit
from right might make a hash function.
So that 62538194 reduce to 394, truncation is very
fast method, but it often fails to distribute the key
exactly through the table.
2. Folding:
Partition the key into several parts and combine
the part in a convenient way to obtain the index.
30
Notice that the fourth and fifth digits from are chosen from
the hash address.
31
1.
2.
3.
4.
33
For example,
Consider the above graph. Now , suppose we
want to traverse and print all the nodes
reachable from X, then the same can be
done using depth first search by starting
from node X, given below:
a) Initially, push X onto the stack as
followings:
STACK: K
b) Pop and print the top element X and then
push onto the stack all the neighbors of X
as following:
Print X
STACK: T, Y
c) Pop and print the top element Y and then
push onto the stack all the neighbors of Y
as following:
Print Y STACK: T, U, Y
d) Now, Pop and print the top element V and
then push onto the stack all the neighbors
of V as following:
Print V STACK: T, U, R
e) Pop and print the top element R and then
push onto the stack all the neighbors of R
as following:
Print R STACK: T, U, Q
f) Pop and print the top element Q and then
push onto the stack all the neighbors of Q
as following:
34
Print Q STACK: T, U
g) Pop and print the top element U and then
push onto the stack all the neighbors of U
as following:
Print U STACK: T
h) Pop and print the top element T and then
push onto the stack all the neighbors of T
as following:
Print T STACK:
As the stack is empty now, so the depth first
search is now complete. And the nodes are
accordingly printed as given below:
X, Y, V, R, Q, U, T
Breadth first search (BFS)
Breadth first search (BFS) is a general technique
for traversing a graph.
Breadth first traversal/search visits all successors
of a visited node before visiting any successors of
any of those successors.
The breadth first traversal involves the following:
- Visits all the vertices and edges of G.
- Determines whether G is connected.
- Compute the connected components of G.
- Computes a spanning forest of G.
Algorithms
This algorithm executes a breadth first search on a
graph G beginning at a starting node A.
In breadth first search, queue data structure is used,
now, suppose that the status of queues can be of
following types which can be written as:
SATCK= 1 (read state) - the initial state of the node
SATCK= 2 (waiting state)
SATCK= 3 (processed state)
35
36
37
39
Course Code
BCA -203
Course Title
Management
Assignment No.
43
Grouping and
ii.
Marshalling
II.
Liquidity Order
BALANCE SHEET OF
As on
II.
Order of performance
45
2.
3.
4.
46
47
48
49
50
51
52
53
54
ss
55
56
Traditional/Non-discounting
Adjusted/discount cash
Time
Techniques
flow method
index (PI)
PB Period =
Investment
Constant annual cash flow
Example:
A project requires an initial investment of Rs, 1, 80,000
and yields an annual cash inflow of Rs, 60, 000 for years.
PB Period =
1, 80, 000
= 3 years
60, 000
58
NPV= C0+
NPV= C0+
C1
(1+r) 1
C1 +
C2
1
(1+r)
(1+r)
+
2
59
. + CR
(1+r)
80, 000
70, 000
60, 000
60
Course Code
BCA -204
Course Title
Assignment No.
b1
A2
b2
A1
b1
A2
or the value of
Determinant of third order: A square array of 9 i.e. 3^2 numbers in the form
a1
b1
c1
a2
b2
c2
a3
b3
c3
b1
c1
a2
b2
c2 =a1
b2 c2 a2
b3 c3 b1 a3
62
c2
a2
c3 +c1 a3
b2
b3
a3
b3
c3
Properties of determinants:1. The value of determinants remains unchanged if its rows and
columns are interchanged.
a1 b1 c1
a1 a2 a3
D= a2 b2 c2 and D= b1 b2 b3
a3 b3 c3
c1 c2 c3
Then D=D
Note: - from the above property it follows that a result which is
true for rows is also true.
2. The value of determinant changes only in sign if any two
rows are interchanged
Let
a1 b1 c1
D=
a2 b2 c2
a3 b3 c3
a1 b1 c1
D= a3 b3 c3
a2 b2 c2
D= -D
3.
Let
D=
a1 b1 c1
a2 b2 c2
a2 b2 c2
a1
D= a2 b2 c2
and D
A3 b3 c3
b1
c1
b3
c3
(Obtained by kR2)
Then D=kD
64
Let
b3
c3
Then
a1 b1 c1
D= a2 b2 c2
+ a2 b2 c2
a3 b3 c3
a3 b3 c3
and D=
a1+mc1 b1 c1
a2+mc2 c2 c2
a3+mc3 b3 c3
(Obtained by C1+mC3)
Then D=D
65
correspond
to
identities
and
implications
of
BD
14. A AUB
15. AB A
The properties 1 6 and 11 can be proven using
equivalences of propositional logic.
The others can be proven similarly by going to logic, though
they can be proven also using some of these properties.
Lets prove some of the properties.
Proof for 4:- AUB=BUA
We are going to prove this by showing that every element is
in AUB is also in BUA and vice versa.
Consider an arbitrary element x. then by the definition of set
union
xAUB
xAVxB
xAVxB by the commutatively.
XBUA by the definition of set union.
Hence by Universal Generalization, every element is in AUB
is also in BUA.
Hence AUB=BUA
Proof for 6:- By the definition of the equality of sets, we
need to prove that x [x AU(BC) if and only if
x(AUB)(AUC)]
For that, considering the Universal Generalization
rule, we need to show that for an arbitrary
element in the universe x,
x AU(BC) if and only if x(AUB)(AUC).
Here the only if part is going to be proven. The if
part can be proven similarly.
x AU(BC)
xAV x(BUC) by the definition of U.
XAV (xBxC)
by the definition of
(XAVxB) (XAVxC)
propositional logic.
(XAUB) (XAUC)
by the definition of
X (AUB) (AUC)
U.
by the definition of
67
The rank of matrix by reducing it to normal: Definition:- By performing elementary transformation, any
non-zero matrix 4 can be reduced on one of the follow 4,
forms called as
Normal form of A.
[Ir], [Ir, O], Ir
Ir O
O, O O
Ir is unit matrix or identify matrix and O denotes null matrix.
1. Number or so obtained is rank of the matrix.
2. p(A)=r
3. One can use both row and column transformations.
Solved Examples
e.g.
1) Reduce the following matrix to normal form and then find its
rank.
1
2
3
6
2
4
2
8
3
3
1
7
0
2
3
5
R4-(R1+R2+R3)
1
2
3
6
2
4
2
8
3
3
1
7
0
2
3
5
1
0
0
0
2
0
-4
0
68
3
-3
-8
0
0
2
3
0
0
-8
-3
0
- (C3+C4)
1 0 0
0 1 0
0 0 1
0 0 0
0
0
2
0
0
3
2
0
R23
1 0 0
0 -4 -8
0 0 -3
0 0 0
C3+8C2
1
0
0
0
C4-2C3
1 0
0 1
0 0
0 0
0
3
2
0
C4-3C2
0 0 0
1 0 0
0 -3 2
0 0 0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
-3
0
0
0
2
0
0
0
0
0
= I3 0
0 0
e (A) =3
2. Reduce to normal form and hence find i th rank
1 2 1 0 2
3 1 2 2 -3
2 5 5 6 3
2 1 3 -1 -3
R2-3R1, R3-2R1, R4-2R1, Elements of col.1 except R1 (i.e. - Row 2, 3,
4=0)
1 2 1 0 2
69
0 -5 -1 2 -1
0 1 3 6 -1
0 -3 1 -1 -7
Make Elements of Row 1 except R11 i.e. Column 2, 3, 4, 5=0
0
70
0 1 -1 2 -2
0 0 2 7 2
0 0 6 -11 -6
C4-9C3
71
1 0 0 0 0
0 1 0 0 0
0 0 1 0 2
0 0 0 -32 0
-1/32 R4
1 0 0 0 0
0 1 0 0 0
0 0 1 0 2
0 0 0 1 0
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
[I4; 0]
Therefor e (A) =4.
72
Question 3: What are Sets? With the help of examples explain the
different set operations
A set can be described in a number of different ways.
The simplest is to list up all of its numbers if that is possible.
For example {1, 2, 3} is the set of three numbers 1, 2 and 3.
{Indicates the beginning of the set, and} it ends.
Every object between them separated by commas is a
member of the set.
Thus {{1, 2}, { {3}, 2}, 2}, {1 } } is the set of the elements
{1, 2}, { {3}, 2} and {1}.
A set can also be described by listing the properties that its
members must satisfy.
Set operations: Sets can be combined in a member of different ways to
produce another set.
Here four basic operations
are
introduced
and
their
correspond
to
identities
and
implications
of
20. (AUB)UC=AU(BUC)
(AB) C=A(BC)
.. Associative Laws
21. AU(BC)=(AUB) (AUC)
A(BUC)=(AB)U(AC)
. Distributive Laws
22. If A B and C D, then AUC BUD, and AC
23. If A B, then AUB-B and AB-A.
24. AU(B-A)=AUB
BD
A(B-A)=
25. A-(BUC)=(A-B)(A-C) (cf.AUB=AB)
26. A-(BC)=(A-B)U(A-C) (cf. AB=AUB)
.De Morgans Laws
27. B=A if and only if AUB= U and AB=
28. A=A
Additional properties:
29. A AUB
30. AB A
The properties 1 6 and 11 can be proven using
equivalences of propositional logic.
The others can be proven similarly by going to logic, though
they can be proven also using some of these properties.
Lets prove some of the properties.
Proof for 4:- AUB=BUA
We are going to prove this by showing that every element is
in AUB is also in BUA and vice versa.
Consider an arbitrary element x. then by the definition of set
union
xAUB
xAVxB
xAVxB by the commutativity.
XBUA by the definition of set union.
Hence by Universal Generalization, every element is in AUB
is also in BUA.
Hence AUB=BUA
76
by the definition of
(XAVxB) (XAVxC)
propositional logic.
(XAUB) (XAUC)
by the definition of
X(AUB) (AUC)
U.
by the definition of
1
1
[2 0] =[T]= [2 0]
=[ 5
5]
1 =[6
1
2]
2
2] transformed to A*[5
5] & b
[2 0]
Y
5
4
3
2
1
A*(5, 5)
B*(6, 2)
A (1, 2)
B(2,0)
D*
B*
C* A*
A
B
=
x1
x2
y1
y2
ax1+cy1 bx1+dy1
Ax2+cy2 bx2+dy2
x*1
y*1
x*2
y*2
79
a
c
b
d
=b+d (y2-y1/x2-x1)
a+c(y2-y1/x2-x1)
m*=b+dm/a+cm
m* is independent of x1, x2, y1, y2 Also m, a, b, c, d are
some for AB &CD Hence m* is same for A*B* & C*D*
Give parallel lines are transformed into another set of
parallel
lines
similarly
parallelogram
will
be
gets
transformed
into
the
intersection
of
b
d
get transformed to
y*=m*x*+h
1) We know proof of m*=b+dm/a+cm
2) We need find out h* when
Y=mx+h gets transformed to y*=m*x*+h
[x y][T]=[x* y*] means
[x y] a
b
c
=[x*
80
y*]
.. (1)
Therefor [ax+cy
bx+dy]= [x*
y*]
Therefor h*=dh-
(0+ch)+ h*
b+dm
a+cm (ch)
bc+dcm
ad+dcm-bc-dcm
Therefor h*=h
a+cm
..
(1)
&
81
Y=m2x+h2
(2)
to
y=m1*x+h1* .. (3)
y=m2*x+h1* ..(4)
Then,
a) Transformed lines are intersecting.
b) Point of intersection of original pair is transformed onto the
point
of
intersection
of
new
pair
of
lines
transformation matrix[T]
a) The lines y=m1x+h1
y=m2x+h2
are intersecting as m1 & m2 are different m1 m2
[x
y] -m1
1
-m2
1
=[h1 h2]
Therefor
82
under
[x
-m2 -1
1
=[h1 h2]
m2-m1
m2
-1 -m1
[h1 h2] 1
m2-m1
m2
-1 -m1
[h1-h2
h1m2-h2m1] as m2-m2 0
m2-m1
[x y]= h1-h2
m2-m1
h1m2-h2m1
m2-m1
Therefor m1*=b+dm1
& h1*=h1
ad-bc
a-cm1
a+cm1
& h*=h
a-cm2
ad-bc
a+cm
It will
[x*
y*]=
h1*- h2*
m2*-m1*
m2*-m1*
. (6)
ad-bc
Therefor x*= h1*- h2*
==
h1
m2*-m1*
ad-bc
b+dm1
a+cm2
a+cm1
x*=a(h1-h2)+c(h1m2-h2m1)
m2-m1
As m2m1 therefor it exits
h2m2-h2m1
m2-m1
= a(h1-h2)+c(h1m2-h2m1)
b(h1-h2)+d(h1m2-h2m1)
84
m2-m1
m2-m1
(7)
9], B[-2
9+1
=[1
5]
d line y=mx+h is
Transformed to y* =m*x*+h
85
Where m* =b+dm
& h*=h
ad-bc
a+cm
a+cm
Now,
T= 4
-1
==
4+(-1)2
2+6
==
4-2
h*=1 43-2(-1)
4+(-1)2
==
8 =4
2
12+2
==
14
==
-1
line y=mx+h is
Transformed to y*=m*x*+h
86
87
Course Code
BCA -205
Course Title
:
Introduction to Multimedia
System and its Applications
Assignment No.
5. Advanced databases
6. Operating systems
As discussed earlier that information can be in any form
such as video, audio, images and text.
Multimedia information system components
A multimedia system consists mainly f several
components including multimedia storage sever, media
synchronization, multimedia representation and
compression, multimedia database management,
networking and communicating and methodologies and
tools f many multimedia application.
The explanation f its each and every component is given
below:
1. Multimedia data management:
When the concept of internet was developed,
people were much excited with that
technology which is used to find information
more quickly.
As we know that multimedia data are growing
at an controlled, organized and efficient
manner.
The management f non-text data such as
image, video and audio is really challenging
and has attracted many research activities t
be done n the same.
These techniques and system will make
search retrieval and filtering of digital media
manageable.
2. multimedia representation:
It is indeed a challenging job for the capacity
and speed of the storage device to store to
large amount of multimedia data.
And is also difficult to represent that data in
compact way.
89
90
Keyboard.
93
94
95
CDs:
98
Application of multimedia
As multimedia becomes one of the hottest craze in the
computing industry, there are a lot of programmers
turning their application into multimedia capable.
1. Film industry:
The film industry is the biggest industry
that is using multimedia application to
improve quality of their production.
A help few major blockbusters such as
terminator 2, lion king and Jurassic park
used multimedia applications hugely.
The stunts developed by the applications
look more breathtaking real.
Several seemingly impossible to shoot
sequences have been created using
multimedia.
2. Music industry:
Multimedia applications play a big role in
the music industry.
The various sounds can be compiled into
one tape and of course, can be edited too.
The CD nowadays has become a very
important media in music industry as its
can hold a lot of sound data.
The applications are designed to suit the
companys need.
A very powerful multimedia music
application sometimes can suggest to us
what exact sounds or music hardware
should be used to improve our songs.
3. Companys presentation:
A multimedia presentation is a great tool to
grab the attention of the audiences.
100
103
The
The
104
105
106