Assignment On Linear Algebra: Es1101: Computational Data Analysis
Assignment On Linear Algebra: Es1101: Computational Data Analysis
Assignment On Linear Algebra: Es1101: Computational Data Analysis
on
Linear Algebra
ES1101: COMPUTATIONAL DATA
ANALYSIS
2021B.Tech062
December 2021
1
1. Introduction :
➢ In this assignment we are using concept of linear Algebra that include formation of matrixes ,
Eigen value and Eigen vector , finding root of characteristics equation , power method , inverse
power method, application eigen vector, And use of python to solve complex question
2. OBJECTIVE
➢ To study data and interpret the result of data, To use of python to solve real life problem and
To find Rank of teams in real life game
3. METHODOLOGY
➢ In power method we have start with an approximation , mostly we start with column matrices
of 1 and we multiple it with original and this lead to be a new matrices and we take largest
element of new matrices common that element is the approximate eigen value and left vector
is approximate eigen vector it is iteration 1 and then we multiple left vector with original
matrixes now take common and we get more approximate eigen value and vector this process
continuous till you get very approximation , the more iteration lead to most approximate eigen
value and eigen vector
4. MATHEMATICAL MODEL
➢ In this assignment we make a model to solve real life complex question using python
With power method.
5. DATA COLLECTION
➢ We take the data from world chess championship 2018
Source Wikipedia
Link - World Chess Championship 2018 - Wikipedia
7. CONCLUSION
➢ With doing this assignment we understand the use and importance of linear algebra, we also
understand how to work in team and how to collect real life data.
1. Solve the following problem using manual calculation. Suppose that there are four teams in
a league match. At the end of season, the results are as follows
Team 1 beat teams 2 and 3, but lost to team 4.
Team 2 beat team 3, but lost to teams 1 and 4.
Team 3 beat team 4, but lost to teams 1 and 2.
Team 4 beat teams 1 and 2, but lost to team 3.
(a) Form the corresponding matrix A that reflects these results, where 𝑎𝑖𝑗 = { 1 if team i
beats team j 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒.
(b) How small can the dominant eigenvalue for A be? How large? Explain.
(d) Find out eigen vector corresponding to most dominant eigen value using Power method
and find how the teams can be ranked using eigen vectors
Solution:
(a) 1 = Team1
2= Team 2
3= Team 3
4= Team 4
1 2 3 4
1 0 1 1 0
2 0 0 1 0
A= [ ]
3 0 0 0 1
4 1 1 0 0
(b)
Small dominant value can also be find out by using Inverse power method where we have to
convert A to A-1 and rest thing same as Power method And then convert lambda equal to 1 by
lambda
−1 1 0 1
1 −1 0 0
A-1 = [ ]
0 1 0 0
0 0 1 0
⋋=2.106919340576228
So small dominant eigen value = 1/⋋=1/2.106919340576228
=0.474626618
In [1]:
import numpy as vinay
a=vinay.array([[-1,1,0,1],[1,-1,0,0],[0,1,0,0],[0,0,1,0]], dtype=float)
b=vinay.array([[1],[1],[1],[1]],dtype=float)
d=[[0],[0],[0],[0]]
count=1
c=vinay.dot(a,b)
while count<26:
c=vinay.dot(a,b)
for i in range(4):
if c[i,0]<0:
d[i][0]= (c[i,0])*(-1)
else:
d[i][0]=c[i,0]
maxi=max(d[0][0],d[1][0],d[2][0],d[3][0])
for i in range(4):
c[i][0]=c[i][0]/maxi
print(c)
print('')
print('')
count+=1
b=c
Iteration No. 1
[[1.]
[0.]
[1.]
[1.]]
[[1.]
[0.]
[1.]
[1.]]
Iteration No. 2
[[0.]
[1.]
[0.]
[1.]]
[[0.]
[1.]
[0.]
[1.]]
Iteration No. 3
[[ 2.]
[-1.]
[ 1.]
[ 0.]]
[[ 1. ]
[-0.5]
[ 0.5]
[ 0. ]]
Iteration No. 4
[[-1.5]
[ 1.5]
[-0.5]
[ 0.5]]
[[-1. ]
[ 1. ]
[-0.33333333]
[ 0.33333333]]
Iteration No. 5
[[ 2.33333333]
[-2. ]
[ 1. ]
[-0.33333333]]
[[ 1. ]
[-0.85714286]
[ 0.42857143]
[-0.14285714]]
Iteration No. 6
[[-2. ]
[ 1.85714286]
[-0.85714286]
[ 0.42857143]]
[[-1. ]
[ 0.92857143]
[-0.42857143]
[ 0.21428571]]
Iteration No. 7
[[ 2.14285714]
[-1.92857143]
[ 0.92857143]
[-0.42857143]]
[[ 1. ]
[-0.9 ]
[ 0.43333333]
[-0.2 ]]
Iteration No. 8
[[-2.1 ]
[ 1.9 ]
[-0.9 ]
[ 0.43333333]]
[[-1. ]
[ 0.9047619 ]
[-0.42857143]
[ 0.20634921]]
Iteration No. 9
[[ 2.11111111]
[-1.9047619 ]
[ 0.9047619 ]
[-0.42857143]]
[[ 1. ]
[-0.90225564]
[ 0.42857143]
[-0.20300752]]
Iteration No. 10
[[-2.10526316]
[ 1.90225564]
[-0.90225564]
[ 0.42857143]]
[[-1. ]
[ 0.90357143]
[-0.42857143]
[ 0.20357143]]
Iteration No. 11
[[ 2.10714286]
[-1.90357143]
[ 0.90357143]
[-0.42857143]]
[[ 1. ]
[-0.90338983]
[ 0.42881356]
[-0.20338983]]
Iteration No. 12
[[-2.10677966]
[ 1.90338983]
[-0.90338983]
[ 0.42881356]]
[[-1. ]
[ 0.90345937]
[-0.42880129]
[ 0.20353982]]
Iteration No. 13
[[ 2.1069992 ]
[-1.90345937]
[ 0.90345937]
[-0.42880129]]
[[ 1. ]
[-0.90339824]
[ 0.42878961]
[-0.20351279]]
Iteration No. 14
[[-2.10691103]
[ 1.90339824]
[-0.90339824]
[ 0.42878961]]
[[-1. ]
[ 0.90340703]
[-0.42877854]
[ 0.20351577]]
Iteration No. 15
[[ 2.1069228 ]
[-1.90340703]
[ 0.90340703]
[-0.42877854]]
[[ 1. ]
[-0.90340616]
[ 0.42878032]
[-0.20350938]]
Iteration No. 16
[[-2.10691553]
[ 1.90340616]
[-0.90340616]
[ 0.42878032]]
[[-1. ]
[ 0.90340886]
[-0.42878138]
[ 0.20351092]]
Iteration No. 17
[[ 2.10691978]
[-1.90340886]
[ 0.90340886]
[-0.42878138]]
[[ 1. ]
[-0.90340832]
[ 0.4287818 ]
[-0.20351102]]
Iteration No. 18
[[-2.10691934]
[ 1.90340832]
[-0.90340832]
[ 0.4287818 ]]
[[-1. ]
[ 0.90340825]
[-0.42878164]
[ 0.20351126]]
Iteration No. 19
[[ 2.10691951]
[-1.90340825]
[ 0.90340825]
[-0.42878164]]
[[ 1. ]
[-0.90340815]
[ 0.42878157]
[-0.20351116]]
Iteration No. 20
[[-2.10691931]
[ 1.90340815]
[-0.90340815]
[ 0.42878157]]
[[-1. ]
[ 0.90340818]
[-0.42878156]
[ 0.20351115]]
Iteration No. 21
[[ 2.10691933]
[-1.90340818]
[ 0.90340818]
[-0.42878156]]
[[ 1. ]
[-0.90340819]
[ 0.42878157]
[-0.20351114]]
Iteration No. 22
[[-2.10691933]
[ 1.90340819]
[-0.90340819]
[ 0.42878157]]
[[-1. ]
[ 0.90340819]
[-0.42878158]
[ 0.20351115]]
Iteration No. 23
[[ 2.10691934]
[-1.90340819]
[ 0.90340819]
[-0.42878158]]
[[ 1. ]
[-0.90340819]
[ 0.42878158]
[-0.20351115]]
Iteration No. 24
[[-2.10691934]
[ 1.90340819]
[-0.90340819]
[ 0.42878158]]
[[-1. ]
[ 0.90340819]
[-0.42878157]
[ 0.20351115]]
Iteration No. 25
[[ 2.10691934]
[-1.90340819]
[ 0.90340819]
[-0.42878157]]
[[ 1. ]
[-0.90340819]
[ 0.42878157]
[-0.20351115]]
In [ ]:
So ,
|k1|<|k2|
Iteration No. 1
[[2.]
[1.]
[1.]
[2.]]
[[1. ]
[0.5]
[0.5]
[1. ]]
Iteration No. 2
[[1. ]
[0.5]
[1. ]
[1.5]]
[[0.66666667]
[0.33333333]
[0.66666667]
[1. ]]
Iteration No. 3
[[1. ]
[0.66666667]
[1. ]
[1. ]]
[[1. ]
[0.66666667]
[1. ]
[1. ]]
Iteration No. 4
[[1.66666667]
[1. ]
[1. ]
[1.66666667]]
[[1. ]
[0.6]
[0.6]
[1. ]]
Iteration No. 5
[[1.2]
[0.6]
[1. ]
[1.6]]
[[0.75 ]
[0.375]
[0.625]
[1. ]]
Iteration No. 6
[[1. ]
[0.625]
[1. ]
[1.125]]
[[0.88888889]
[0.55555556]
[0.88888889]
[1. ]]
Iteration No. 7
[[1.44444444]
[0.88888889]
[1. ]
[1.44444444]]
[[1. ]
[0.61538462]
[0.69230769]
[1. ]]
Iteration No. 8
[[1.30769231]
[0.69230769]
[1. ]
[1.61538462]]
[[0.80952381]
[0.42857143]
[0.61904762]
[1. ]]
Iteration No. 9
[[1.04761905]
[0.61904762]
[1. ]
[1.23809524]]
[[0.84615385]
[0.5 ]
[0.80769231]
[1. ]]
Iteration No. 10
[[1.30769231]
[0.80769231]
[1. ]
[1.34615385]]
[[0.97142857]
[0.6 ]
[0.74285714]
[1. ]]
Iteration No. 11
[[1.34285714]
[0.74285714]
[1. ]
[1.57142857]]
[[0.85454545]
[0.47272727]
[0.63636364]
[1. ]]
Iteration No. 12
[[1.10909091]
[0.63636364]
[1. ]
[1.32727273]]
[[0.83561644]
[0.47945205]
[0.75342466]
[1. ]]
Iteration No. 13
[[1.23287671]
[0.75342466]
[1. ]
[1.31506849]]
[[0.9375 ]
[0.57291667]
[0.76041667]
[1. ]]
Iteration No. 14
[[1.33333333]
[0.76041667]
[1. ]
[1.51041667]]
[[0.88275862]
[0.50344828]
[0.66206897]
[1. ]]
Iteration No. 15
[[1.16551724]
[0.66206897]
[1. ]
[1.3862069 ]]
[[0.84079602]
[0.47761194]
[0.72139303]
[1. ]]
Iteration No. 16
[[1.19900498]
[0.72139303]
[1. ]
[1.31840796]]
[[0.90943396]
[0.54716981]
[0.75849057]
[1. ]]
Iteration No. 17
[[1.30566038]
[0.75849057]
[1. ]
[1.45660377]]
[[0.89637306]
[0.52072539]
[0.6865285 ]
[1. ]]
Iteration No. 18
[[1.20725389]
[0.6865285 ]
[1. ]
[1.41709845]]
[[0.85191956]
[0.48446069]
[0.70566728]
[1. ]]
Iteration No. 19
[[1.19012797]
[0.70566728]
[1. ]
[1.33638026]]
[[0.89056088]
[0.52804378]
[0.74829001]
[1. ]]
Iteration No. 20
[[1.27633379]
[0.74829001]
[1. ]
[1.41860465]]
[[0.8997107 ]
[0.52748312]
[0.70491803]
[1. ]]
Iteration No. 21
[[1.23240116]
[0.70491803]
[1. ]
[1.42719383]]
[[0.86351351]
[0.49391892]
[0.70067568]
[1. ]]
Iteration No. 22
[[1.19459459]
[0.70067568]
[1. ]
[1.35743243]]
[[0.88003982]
[0.5161772 ]
[0.73668492]
[1. ]]
Iteration No. 23
[[1.25286212]
[0.73668492]
[1. ]
[1.39621702]]
[[0.8973262 ]
[0.52762923]
[0.71622103]
[1. ]]
Iteration No. 24
[[1.24385027]
[0.71622103]
[1. ]
[1.42495544]]
[[0.87290468]
[0.50262697]
[0.70177633]
[1. ]]
Iteration No. 25
[[1.2044033 ]
[0.70177633]
[1. ]
[1.37553165]]
[[0.87559112]
[0.51018552]
[0.72699163]
[1. ]]
Iteration No. 26
[[1.23717716]
[0.72699163]
[1. ]
[1.38577665]]
[[0.89276808]
[0.52460953]
[0.72161701]
[1. ]]
Iteration No. 27
[[1.24622654]
[0.72161701]
[1. ]
[1.41737761]]
[[0.87924808]
[0.50912121]
[0.70552829]
[1. ]]
Iteration No. 28
[[1.2146495 ]
[0.70552829]
[1. ]
[1.38836929]]
[[0.87487494]
[0.50817048]
[0.72026946]
[1. ]]
Iteration No. 29
[[1.22843994]
[0.72026946]
[1. ]
[1.38304542]]
[[0.88821373]
[0.52078511]
[0.72304205]
[1. ]]
Iteration No. 30
[[1.24382716]
[0.72304205]
[1. ]
[1.40899884]]
[[0.88277373]
[0.51316015]
[0.70972379]
[1. ]]
Iteration No. 31
[[1.22288394]
[0.70972379]
[1. ]
[1.39593387]]
[[0.87603286]
[0.50842221]
[0.71636631]
[1. ]]
Iteration No. 32
[[1.22478853]
[0.71636631]
[1. ]
[1.38445507]]
[[0.88467192]
[0.51743558]
[0.72230585]
[1. ]]
Iteration No. 33
[[1.23974143]
[0.72230585]
[1. ]
[1.4021075 ]]
[[0.88419856]
[0.51515726]
[0.71321208]
[1. ]]
Iteration No. 34
[[1.22836933]
[0.71321208]
[1. ]
[1.39935582]]
[[0.87781057]
[0.50967171]
[0.71461453]
[1. ]]
Iteration No. 35
[[1.22428624]
[0.71461453]
[1. ]
[1.38748229]]
[[0.88237973]
[0.51504408]
[0.72072992]
[1. ]]
Iteration No. 36
[[1.235774 ]
[0.72072992]
[1. ]
[1.3974238 ]]
[[0.88432299]
[0.51575615]
[0.71560252]
[1. ]]
Iteration No. 37
[[1.23135867]
[0.71560252]
[1. ]
[1.40007914]]
[[0.87949219]
[0.51111577]
[0.71424534]
[1. ]]
Iteration No. 38
[[1.2253611 ]
[0.71424534]
[1. ]
[1.39060796]]
[[0.88116935]
[0.51362092]
[0.71910994]
[1. ]]
Iteration No. 39
[[1.23273086]
[0.71910994]
[1. ]
[1.39479026]]
[[0.88381091]
[0.51556851]
[0.71695367]
[1. ]]
Iteration No. 40
[[1.23252218]
[0.71695367]
[1. ]
[1.39937942]]
[[0.8807634 ]
[0.51233687]
[0.71460248]
[1. ]]
Iteration No. 41
[[1.22693935]
[0.71460248]
[1. ]
[1.39310027]]
[[0.8807258 ]
[0.51295839]
[0.71782342]
[1. ]]
Iteration No. 42
[[1.23078181]
[0.71782342]
[1. ]
[1.39368419]]
[[0.88311385]
[0.51505458]
[0.71752267]
[1. ]]
Iteration No. 43
[[1.23257724]
[0.71752267]
[1. ]
[1.39816843]]
[[0.88156564]
[0.51318758]
[0.71522141]
[1. ]]
Iteration No. 44
[[1.22840899]
[0.71522141]
[1. ]
[1.39475322]]
[[0.88073573]
[0.51279424]
[0.71697271]
[1. ]]
Iteration No. 45
[[1.22976695]
[0.71697271]
[1. ]
[1.39352997]]
[[0.88248332]
[0.51450111]
[0.71760208]
[1. ]]
Iteration No. 46
[[1.23210319]
[0.71760208]
[1. ]
[1.39698443]]
[[0.88197346]
[0.51367937]
[0.71582759]
[1. ]]
Iteration No. 47
[[1.22950696]
[0.71582759]
[1. ]
[1.39565283]]
[[0.88095473]
[0.51289804]
[0.71651057]
[1. ]]
Iteration No. 48
[[1.2294086 ]
[0.71651057]
[1. ]
[1.39385277]]
[[0.88202186]
[0.5140504 ]
[0.71743589]
[1. ]]
Iteration No. 49
[[1.23148629]
[0.71743589]
[1. ]
[1.39607225]]
[[0.88210785]
[0.51389596]
[0.7162953 ]
[1. ]]
Iteration No. 50
[[1.23019126]
[0.7162953 ]
[1. ]
[1.3960038 ]]
[[0.88122343]
[0.51310412]
[0.71633043]
[1. ]]
Iteration No. 51
[[1.22943455]
[0.71633043]
[1. ]
[1.39432755]]
[[0.88174012]
[0.51374616]
[0.71719159]
[1. ]]
Iteration No. 52
[[1.23093775]
[0.71719159]
[1. ]
[1.39548628]]
[[0.88208517]
[0.51393668]
[0.71659608]
[1. ]]
Iteration No. 53
[[1.23053277]
[0.71659608]
[1. ]
[1.39602185]]
[[0.88145666]
[0.51331294]
[0.71632116]
[1. ]]
Iteration No. 54
[[1.2296341 ]
[0.71632116]
[1. ]
[1.3947696 ]]
[[0.88160374]
[0.5135767 ]
[0.71696429]
[1. ]]
Iteration No. 55
[[1.23054099]
[0.71696429]
[1. ]
[1.39518044]]
[[0.88199415]
[0.51388643]
[0.71675317]
[1. ]]
Iteration No. 56
[[1.23063959]
[0.71675317]
[1. ]
[1.39588058]]
[[0.88162241]
[0.51347743]
[0.71639366]
[1. ]]
Iteration No. 57
[[1.22987109]
[0.71639366]
[1. ]
[1.39509983]]
[[0.88156493]
[0.51350709]
[0.71679458]
[1. ]]
Iteration No. 58
[[1.23030168]
[0.71679458]
[1. ]
[1.39507203]]
[[0.88189115]
[0.51380471]
[0.71680887]
[1. ]]
Iteration No. 59
[[1.23061358]
[0.71680887]
[1. ]
[1.39569586]]
[[0.88172045]
[0.51358529]
[0.71648847]
[1. ]]
Iteration No. 60
[[1.23007377]
[0.71648847]
[1. ]
[1.39530574]]
[[0.8815801 ]
[0.51349927]
[0.7166888 ]
[1. ]]
Iteration No. 61
[[1.23018807]
[0.7166888 ]
[1. ]
[1.39507936]]
[[0.88180508]
[0.51372619]
[0.7168051 ]
[1. ]]
Iteration No. 62
[[1.23053129]
[0.7168051 ]
[1. ]
[1.39553127]]
[[0.88176547]
[0.51364317]
[0.71657298]
[1. ]]
Iteration No. 63
[[1.23021615]
[0.71657298]
[1. ]
[1.39540864]]
[[0.88161712]
[0.51352196]
[0.71663595]
[1. ]]
Iteration No. 64
[[1.23015792]
[0.71663595]
[1. ]
[1.39513908]]
[[0.88174572]
[0.51366632]
[0.71677441]
[1. ]]
Iteration No. 65
[[1.23044073]
[0.71677441]
[1. ]
[1.39541204]]
[[0.88177592]
[0.51366506]
[0.71663421]
[1. ]]
Iteration No. 66
[[1.23029927]
[0.71663421]
[1. ]
[1.39544098]]
[[0.88165626]
[0.51355393]
[0.71661934]
[1. ]]
Iteration No. 67
[[1.23017328]
[0.71661934]
[1. ]
[1.39521019]]
[[0.88171179]
[0.51362823]
[0.71673788]
[1. ]]
Iteration No. 68
[[1.23036612]
[0.71673788]
[1. ]
[1.39534002]]
[[0.88176795]
[0.5136654 ]
[0.71667119]
[1. ]]
Iteration No. 69
[[1.23033659]
[0.71667119]
[1. ]
[1.39543335]]
[[0.88168782]
[0.51358325]
[0.71662326]
[1. ]]
Iteration No. 70
[[1.23020651]
[0.71662326]
[1. ]
[1.39527107]]
[[0.88169714]
[0.51360863]
[0.71670661]
[1. ]]
Iteration No. 71
[[1.23031524]
[0.71670661]
[1. ]
[1.39530577]]
[[0.88175314]
[0.51365559]
[0.71668879]
[1. ]]
Iteration No. 72
[[1.23034438]
[0.71668879]
[1. ]
[1.39540873]]
[[0.88170896]
[0.51360492]
[0.71663591]
[1. ]]
Iteration No. 73
[[1.23024083]
[0.71663591]
[1. ]
[1.39531388]]
[[0.88169468]
[0.51360193]
[0.71668462]
[1. ]]
Iteration No. 74
[[1.23028656]
[0.71668462]
[1. ]
[1.39529662]]
[[0.88173836]
[0.5136432 ]
[0.71669349]
[1. ]]
Iteration No. 75
[[1.23033669]
[0.71669349]
[1. ]
[1.39538157]]
[[0.88172061]
[0.51361829]
[0.71664986]
[1. ]]
Iteration No. 76
[[1.23026814]
[0.71664986]
[1. ]
[1.3953389 ]]
[[0.88169845]
[0.51360272]
[0.71667177]
[1. ]]
Iteration No. 77
[[1.23027449]
[0.71667177]
[1. ]
[1.39530117]]
[[0.88172684]
[0.51363232]
[0.71669115]
[1. ]]
Iteration No. 78
[[1.23032347]
[0.71669115]
[1. ]
[1.39535916]]
[[0.8817253 ]
[0.51362486]
[0.71666137]
[1. ]]
Iteration No. 79
[[1.23028623]
[0.71666137]
[1. ]
[1.39535016]]
[[0.8817043 ]
[0.51360683]
[0.71666599]
[1. ]]
Iteration No. 80
[[1.23027282]
[0.71666599]
[1. ]
[1.39531112]]
[[0.88171935]
[0.51362451]
[0.71668604]
[1. ]]
Iteration No. 81
[[1.23031055]
[0.71668604]
[1. ]
[1.39534386]]
[[0.8817257 ]
[0.51362683]
[0.71666922]
[1. ]]
Iteration No. 82
[[1.23029605]
[0.71666922]
[1. ]
[1.39535253]]
[[0.88170984]
[0.51361158]
[0.71666477]
[1. ]]
Iteration No. 83
[[1.23027635]
[0.71666477]
[1. ]
[1.39532142]]
[[0.88171538]
[0.51361984]
[0.71668075]
[1. ]]
Iteration No. 84
[[1.23030059]
[0.71668075]
[1. ]
[1.39533522]]
[[0.88172403]
[0.51362621]
[0.71667366]
[1. ]]
Iteration No. 85
[[1.23029987]
[0.71667366]
[1. ]
[1.39535024]]
[[0.88171402]
[0.51361561]
[0.71666595]
[1. ]]
Iteration No. 86
[[1.23028155]
[0.71666595]
[1. ]
[1.39532963]]
[[0.88171392]
[0.51361767]
[0.71667653]
[1. ]]
Iteration No. 87
[[1.2302942 ]
[0.71667653]
[1. ]
[1.39533158]]
[[0.88172175]
[0.51362453]
[0.71667553]
[1. ]]
Iteration No. 88
[[1.23030006]
[0.71667553]
[1. ]
[1.39534628]]
[[0.88171666]
[0.5136184 ]
[0.71666798]
[1. ]]
Iteration No. 89
[[1.23028638]
[0.71666798]
[1. ]
[1.39533507]]
[[0.88171394]
[0.51361712]
[0.71667374]
[1. ]]
Iteration No. 90
[[1.23029086]
[0.71667374]
[1. ]
[1.39533107]]
[[0.88171968]
[0.51362272]
[0.71667579]
[1. ]]
Iteration No. 91
[[1.23029852]
[0.71667579]
[1. ]
[1.3953424 ]]
[[0.881718 ]
[0.51362002]
[0.71666997]
[1. ]]
Iteration No. 92
[[1.23028999]
[0.71666997]
[1. ]
[1.39533802]]
[[0.88171466]
[0.51361746]
[0.71667222]
[1. ]]
Iteration No. 93
[[1.23028968]
[0.71667222]
[1. ]
[1.39533212]]
[[0.88171817]
[0.51362124]
[0.71667525]
[1. ]]
Iteration No. 94
[[1.2302965 ]
[0.71667525]
[1. ]
[1.39533941]]
[[0.88171845]
[0.51362073]
[0.71667151]
[1. ]]
Iteration No. 95
[[1.23029224]
[0.71667151]
[1. ]
[1.39533918]]
[[0.88171554]
[0.51361814]
[0.71667163]
[1. ]]
Iteration No. 96
[[1.23028976]
[0.71667163]
[1. ]
[1.39533368]]
[[0.88171724]
[0.51362025]
[0.71667445]
[1. ]]
Iteration No. 97
[[1.2302947 ]
[0.71667445]
[1. ]
[1.39533749]]
[[0.88171837]
[0.51362087]
[0.7166725 ]
[1. ]]
Iteration No. 98
[[1.23029336]
[0.7166725 ]
[1. ]
[1.39533924]]
[[0.88171631]
[0.51361882]
[0.7166716 ]
[1. ]]
Iteration No. 99
[[1.23029042]
[0.7166716 ]
[1. ]
[1.39533513]]
[[0.88171679]
[0.51361969]
[0.71667371]
[1. ]]
[[1.2302934 ]
[0.71667371]
[1. ]
[1.39533648]]
[[0.88171807]
[0.5136207 ]
[0.71667301]
[1. ]]
[[1.23029372]
[0.71667301]
[1. ]
[1.39533878]]
[[0.88171685]
[0.51361936]
[0.71667183]
[1. ]]
[[1.23029119]
[0.71667183]
[1. ]
[1.39533621]]
[[0.88171667]
[0.51361946]
[0.71667315]
[1. ]]
[[1.23029261]
[0.71667315]
[1. ]
[1.39533613]]
[[0.88171774]
[0.51362044]
[0.7166732 ]
[1. ]]
[[1.23029363]
[0.7166732 ]
[1. ]
[1.39533817]]
[[0.88171717]
[0.51361972]
[0.71667214]
[1. ]]
[[1.23029186]
[0.71667214]
[1. ]
[1.39533689]]
[[0.88171672]
[0.51361943]
[0.7166728 ]
[1. ]]
[[1.23029224]
[0.7166728 ]
[1. ]
[1.39533615]]
[[0.88171745]
[0.51362018]
[0.71667318]
[1. ]]
[[1.23029336]
[0.71667318]
[1. ]
[1.39533763]]
[[0.88171732]
[0.51361991]
[0.71667242]
[1. ]]
[[1.23029233]
[0.71667242]
[1. ]
[1.39533723]]
[[0.88171684]
[0.51361951]
[0.71667263]
[1. ]]
[[1.23029214]
[0.71667263]
[1. ]
[1.39533634]]
[[0.88171726]
[0.51361998]
[0.71667308]
[1. ]]
[[1.23029307]
[0.71667308]
[1. ]
[1.39533724]]
[[0.88171736]
[0.51361998]
[0.71667262]
[1. ]]
[[1.2302926 ]
[0.71667262]
[1. ]
[1.39533734]]
[[0.88171696]
[0.51361961]
[0.71667257]
[1. ]]
[[1.23029219]
[0.71667257]
[1. ]
[1.39533658]]
[[0.88171715]
[0.51361986]
[0.71667296]
[1. ]]
[[1.23029282]
[0.71667296]
[1. ]
[1.395337 ]]
[[0.88171733]
[0.51361998]
[0.71667274]
[1. ]]
[[1.23029272]
[0.71667274]
[1. ]
[1.39533731]]
[[0.88171707]
[0.51361971]
[0.71667259]
[1. ]]
[[1.2302923 ]
[0.71667259]
[1. ]
[1.39533678]]
[[0.8817171 ]
[0.51361979]
[0.71667286]
[1. ]]
[[1.23029265]
[0.71667286]
[1. ]
[1.39533689]]
[[0.88171728]
[0.51361995]
[0.7166728 ]
[1. ]]
[[1.23029275]
[0.7166728 ]
[1. ]
[1.39533723]]
[[0.88171714]
[0.51361978]
[0.71667263]
[1. ]]
[[1.23029241]
[0.71667263]
[1. ]
[1.39533692]]
[[0.88171709]
[0.51361977]
[0.71667279]
[1. ]]
[[1.23029256]
[0.71667279]
[1. ]
[1.39533686]]
[[0.88171723]
[0.51361991]
[0.71667282]
[1. ]]
[[1.23029272]
[0.71667282]
[1. ]
[1.39533714]]
[[0.88171718]
[0.51361982]
[0.71667267]
[1. ]]
[[1.2302925 ]
[0.71667267]
[1. ]
[1.395337 ]]
[[0.8817171 ]
[0.51361977]
[0.71667275]
[1. ]]
[[1.23029252]
[0.71667275]
[1. ]
[1.39533688]]
[[0.8817172 ]
[0.51361987]
[0.71667281]
[1. ]]
[[1.23029268]
[0.71667281]
[1. ]
[1.39533707]]
[[0.88171719]
[0.51361985]
[0.71667271]
[1. ]]
[[1.23029256]
[0.71667271]
[1. ]
[1.39533704]]
[[0.88171712]
[0.51361979]
[0.71667273]
[1. ]]
[[1.23029251]
[0.71667273]
[1. ]
[1.39533691]]
[[0.88171717]
[0.51361984]
[0.71667279]
[1. ]]
[[1.23029264]
[0.71667279]
[1. ]
[1.39533702]]
[[0.88171719]
[0.51361985]
[0.71667274]
[1. ]]
[[1.23029259]
[0.71667274]
[1. ]
[1.39533705]]
[[0.88171714]
[0.5136198 ]
[0.71667272]
[1. ]]
[[1.23029253]
[0.71667272]
[1. ]
[1.39533694]]
[[0.88171716]
[0.51361983]
[0.71667278]
[1. ]]
[[1.23029261]
[0.71667278]
[1. ]
[1.39533699]]
[[0.88171719]
[0.51361985]
[0.71667275]
[1. ]]
[[1.2302926 ]
[0.71667275]
[1. ]
[1.39533704]]
[[0.88171715]
[0.51361982]
[0.71667273]
[1. ]]
[[1.23029254]
[0.71667273]
[1. ]
[1.39533697]]
[[0.88171715]
[0.51361982]
[0.71667276]
[1. ]]
[[1.23029258]
[0.71667276]
[1. ]
[1.39533698]]
[[0.88171718]
[0.51361985]
[0.71667276]
[1. ]]
[[1.2302926 ]
[0.71667276]
[1. ]
[1.39533702]]
[[0.88171716]
[0.51361982]
[0.71667273]
[1. ]]
[[1.23029256]
[0.71667273]
[1. ]
[1.39533699]]
[[0.88171715]
[0.51361982]
[0.71667275]
[1. ]]
[[1.23029257]
[0.71667275]
[1. ]
[1.39533698]]
[[0.88171717]
[0.51361984]
[0.71667276]
[1. ]]
[[1.2302926 ]
[0.71667276]
[1. ]
[1.39533701]]
[[0.88171717]
[0.51361983]
[0.71667274]
[1. ]]
[[1.23029257]
[0.71667274]
[1. ]
[1.395337 ]]
[[0.88171716]
[0.51361982]
[0.71667275]
[1. ]]
[[1.23029257]
[0.71667275]
[1. ]
[1.39533698]]
[[0.88171717]
[0.51361983]
[0.71667276]
[1. ]]
[[1.23029259]
[0.71667276]
[1. ]
[1.395337 ]]
[[0.88171717]
[0.51361983]
[0.71667275]
[1. ]]
[[1.23029258]
[0.71667275]
[1. ]
[1.395337 ]]
[[0.88171716]
[0.51361982]
[0.71667275]
[1. ]]
[[1.23029257]
[0.71667275]
[1. ]
[1.39533698]]
[[0.88171717]
[0.51361983]
[0.71667275]
[1. ]]
[[1.23029259]
[0.71667275]
[1. ]
[1.395337 ]]
[[0.88171717]
[0.51361983]
[0.71667275]
[1. ]]
Rank 2: Team 1
Rank 3 : Team 3
Rank 4: Team 2
Q2. Identify one from the following categories based on discussion within your team:
b) Economics
c) Entertainment
d) Politics or Policies
Solution:
Q3.Collect real data of the tournaments in which one team played or can be compared with all other
teams based on the defined parameter.
Solution
FC SM SK DL VK AG WS LA
FC 1 1 0.5 1 1.5 1.5 1.5 2
SM 1 1 1.5 0.5 1.5 1.5 1 1
SK 1.5 0.5 1 1 1.5 1 1.5 1
DL 1 1.5 1 1 1 1 1 1
0.5 0.5 0.5 1 1 1 1 2
VK
0.5 0.5 1 1 1 1 1.5 1
AG
0.5 1 0.5 1 1 0.5 1 1.5
WS [0 1 1 1 0 1 0.5 1 ]
LA
Here,
FC=Fabiano Caruana
SM=Shakhriyar Mamedyarov
DL=Ding Liren
AG=Alexander Grischuk
WS= Wesley So
4. Define the rank of teams. You should be able to use Python for Mathematical calculation,
wherever needed.
[[1. ]
[0.94319696]
[0.94086389]
[0.9052184 ]
[0.73335755]
[0.76522272]
[0.70775759]
[0.57636516]]
Rank 7= Wesley So
a=vinay.array([[1,1,0.5,1,1.5,1.5,1.5,2],[1,1,1.5,0.5,1.5,1.5,1,1],[1.5,0.5,1,1,1.5,
b=vinay.array([[1],[1],[1],[1],[1],[1],[1],[1]],dtype=float)
count=1
c=vinay.dot(a,b)
print(a)
while count<14:
c=vinay.dot(a,b)
maxi=max(c[0,0],c[1,0],c[2,0],c[3,0],c[4,0],c[5,0],c[6,0],c[7,0])
for i in range(8):
c[i][0]=c[i][0]/maxi
print(c)
print('')
print('')
count+=1
b=c
Iteration No. 1
[[10. ]
[ 9. ]
[ 9. ]
[ 8.5]
[ 7.5]
[ 7.5]
[ 7. ]
[ 5.5]]
[[1. ]
[0.9 ]
[0.9 ]
[0.85]
[0.75]
[0.75]
[0.7 ]
[0.55]]
Iteration No. 2
[[7.6 ]
[7.175]
[7.175]
[6.85 ]
[5.55 ]
[5.8 ]
[5.35 ]
[4.3 ]]
[[1. ]
[0.94407895]
[0.94407895]
[0.90131579]
[0.73026316]
[0.76315789]
[0.70394737]
[0.56578947]]
Iteration No. 3
[[7.74506579]
[7.32072368]
[7.29769737]
[7.02467105]
[5.67434211]
[5.93256579]
[5.48190789]
[4.47039474]]
[[1. ]
[0.9452113 ]
[0.94223827]
[0.90698662]
[0.73263963]
[0.76598004]
[0.70779359]
[0.57719261]]
Iteration No. 4
[[7.78732215]
[7.3449777 ]
[7.325653 ]
[7.0506477 ]
[5.71150987]
[5.95933319]
[5.5125292 ]
[4.49150563]]
[[1. ]
[0.94319685]
[0.94071529]
[0.9054008 ]
[0.73343696]
[0.7652609 ]
[0.70788508]
[0.57677152]]
Iteration No. 5
[[7.78237275]
[7.33967358]
[7.32173 ]
[7.04426583]
[5.70748285]
[5.95501152]
[5.50806507]
[4.4852879 ]]
[[1. ]
[0.94311514]
[0.94080947]
[0.90515657]
[0.73338595]
[0.76519228]
[0.70776166]
[0.57633938]]
Iteration No. 6
[[7.78086505]
[7.33887602]
[7.32077669]
[7.04331803]
[5.70613753]
[5.95408372]
[5.50692927]
[4.48449367]]
[[1. ]
[0.94319539]
[0.94086925]
[0.90521015]
[0.73335516]
[0.76522131]
[0.70775283]
[0.57634899]]
Iteration No. 7
[[7.78103208]
[7.33907086]
[7.32090938]
[7.04355077]
[5.70626974]
[5.9542318 ]
[5.50708229]
[4.4847215 ]]
[[1. ]
[0.94320018]
[0.94086611]
[0.90522063]
[0.73335641]
[0.76522391]
[0.7077573 ]
[0.57636589]]
Iteration No. 8
[[7.78109208]
[7.33910333]
[7.3209472 ]
[7.04359052]
[5.70632318]
[5.954269 ]
[5.50712837]
[4.48475537]]
[[1. ]
[0.94319708]
[0.94086371]
[0.90521876]
[0.73335762]
[0.76522279]
[0.70775777]
[0.5763658 ]]
Iteration No. 9
[[7.78108657]
[7.33909622]
[7.32094269]
[7.04358208]
[5.70631894]
[5.95426388]
[5.50712318]
[4.48474703]]
[[1. ]
[0.94319683]
[0.9408638 ]
[0.90521832]
[0.7333576 ]
[0.76522268]
[0.7077576 ]
[0.57636514]]
Iteration No. 10
[[7.78108414]
[7.33909484]
[7.32094115]
[7.04358038]
[5.70631678]
[5.95426235]
[5.50712129]
[4.48474557]]
[[1. ]
[0.94319695]
[0.9408639 ]
[0.90521838]
[0.73335755]
[0.76522272]
[0.70775758]
[0.57636513]]
Iteration No. 11
[[7.78108431]
[7.3390951 ]
[7.3209413 ]
[7.04358068]
[5.70631691]
[5.95426252]
[5.50712146]
[4.48474587]]
[[1. ]
[0.94319696]
[0.9408639 ]
[0.9052184 ]
[0.73335755]
[0.76522272]
[0.70775759]
[0.57636516]]
Iteration No. 12
[[7.78108441]
[7.33909516]
[7.32094136]
[7.04358075]
[5.706317 ]
[5.95426258]
[5.50712154]
[4.48474593]]
[[1. ]
[0.94319696]
[0.94086389]
[0.9052184 ]
[0.73335755]
[0.76522272]
[0.70775759]
[0.57636516]]
Iteration No. 13
[[7.7810844 ]
[7.33909515]
[7.32094135]
[7.04358074]
[5.70631699]
[5.95426258]
[5.50712154]
[4.48474592]]
[[1. ]
[0.94319696]
[0.94086389]
[0.9052184 ]
[0.73335755]
[0.76522272]
[0.70775759]
[0.57636516]]