You are on page 1of 4

As

sig
nme
ntNo2
S
ubmi
tte
dBy:
Ahme
dka
bir
S
ubmi
tte
dTo:
Ma,
amF
akhr
aNa
zar
Rol
l
No:
27
S
ess
ion2
022
-
2
026S
eme
ste
r:BS(
S.
E)
Cour
se:
Di
scr
eetMa
th

Uni
ver
ist
yof
Poonc
hRa
wal
akot
D
e
par
tme
ntofCS
AndI
T
Q.
1:
-Di
scus
s E xperi
ment,Sampl
e s p
ace,E ve
nt, P(E)
. Wh ati
s
the
proba
b i
l
ityof
get
ting
anumbe
rgr
eat
erthan4whenadi
cei
stos
sed?

Ans
:

Ex
peri
ment
isap
roce
sstha
tgene
rate
sanobser
va t
ion.I
npr
obabi
l
itytheor
y,a
nex
per
ime
nti
sap
roc
ess
t
hat
gene
rate
sanout
come.Fore
xampl
e,rol
l
ingadi
ceisanexp
eri
me nt.
S
ampl
esp
acei
sthe
setofa
ll
poss
ibl
eout
come
sof
ane
xpe
rime
nt.
For
exa
mpl
e,
whe
nadi
cei
srol
l
ed,
the
s
amp
les
pace
is{1,
2,3,4,5,6}
.
Ane
vent
isa
subset
ofthesa
mpl
esp
a c
e.F
ore
xamp
le,
i
fwe
def
i
nee
vent
Eas
get
ting
anumbe
rgr
eat
ert
han
4whena
dice
ist
ossed,t
henE={
5,6}.
Theprobabi
li
tyofaneventEi sdefi
nedasthera
tioofthenumbe
rofoutcomesi
nEt othe
tot
alnumberofout
comesi
nt hesamplesp
ace.
Thepr
obabi
l
ityofg
ett
inganumbergr
eat
erthan
4whenadi
cei
stosse
dcanbec
alcul
atedasf
oll
ows:

Thetota
lnumberofout
c ome s
inthesample
spac
eis
6.Then
umberofoutcomesineve ntEis2 .
Theref
ore,
theprobabi
li
t yofg
ettinganumber
greate
r t
han4whe
nadi
cei
stos
sedi
sP(
E)=2
/6
=1/3.

Q.
2:
-Whatisproba
bil
i
tyofg
ett
ing
atot
alof
ei
ght
orni
newhe
nap
air
of
di
cei
stos
sed?

Ans
:
T
hepr
obabi
l
ityofg
etti
nga
tota
lof
ei
ght
orni
newhe
nap
airof
di
cei
stos
sed
c
anbe
cal
cul
atedasfol
l
ows:

T
hetotal
numberofp ossi
ble
outcomeswhe ntwodic
earerol
l
edi
s6x 6=36.
T
henumberofwayst ogetatot
al of
ei
g htis5:
(2,6)
,
(3,
5),
(
4,4),
(5,3)
,
a nd(
6,2)
.
T
henumberofwa
yst og e
tat ot
al of
nineis4:(
3,6),
(4,5)
,
(5,
4),and(6,3)
.
There
for
e,theproba bi
li
tyofgetti
ngat otalofei
ghtorninewhenap airofdi
cei
stos
sedi
sP(
E)=(
5
+
4)/36=3/ 18=1/6.

Q.
3:
-Fort
heg
rap
hshownbe
low

Findall
edg esthata r
einci
denton
v1;F
indal
lverti
cesthatar
eadj
acent
to
v3;Fi
ndal
lloops;
Findall
pa ral
lel
edges;
Fi
nda ll
i
sola
te ve
rti
ces;
Ans
:

1
.The
gra
phha
s6ve
rti
ces
and7e
dge
s.T
ofi
nda
ll
edg
est
hata
rei
nci
dentonv1
,we
nee
dtol
ook
fora
ll
e
dge
stha ta
reconne
cte
dtov1
.Fr
omt
heg
rap
h,wec
ans
eet
hatt
hef
ol
lowi
nge
dge
s
a
rei
nci
dentonv1
:

e
1
e
2
e
3

2.Vert
ice
sthata
readj
acent
tov3are
vert
ice
sthats
harea
nedge
withv
3.F
romthe
gra
ph,
wec
ans
eet
hatt
hef
ol
lowi
ngve
rti
cesa
rea
dja
cent
tov3:

v2
v4
v5

3.Al
oopi
sane
dge
tha
tjoi
nsa
ver
tex
toi
tse
lf
.F
romt
heg
rap
h,we
cans
eet
hat
the
rea
renol
oop
s.
4.Pa
ral
lel
edge
sar
eedg
est
hat
conne
ctt
hes
ame
twove
rti
ces
.Fr
omt
heg
rap
h,we
cans
eet
hat
the
rea
re
nopara
ll
eledg
es.
5.Ani
sol
atedver
texi
saver
tex
tha
tis
not
conne
cte
dtoa
nyot
her
ver
tic
es.
Fromt
heg
rap
h,we
cans
eet
hatv4isanisol
ate
dve r
tex

Q.
4:
-Sup
pos
eag
rap
hha
sve
rti
ces
ofde
gre
es1
,1
,4,
4,
and6.
Howma
nye
dge
sdoe
stheg
rap
h
ha
ve?

I
nag raph,t
hedegre
eofaverte
xisthenumberofedg
esthata
reinci
denttoi
t.I
fag
rap
h
has
verti
cesofdeg
ree
s1,1
,4,4,and6,the
nt hetot
alnumbe
rofedge
sint heg
rap
hca
nbe
ca
lcul
ate
dasfol
l
ows:
Thes
umof thede
grees
ofa
ll
vertic
esise
qual
totwi ce
the numbe r
ofedgesi
nthegr
aph.
This
isbe
causeeac
h
edge
isinci
denttotwove rt
ices
.Theref
ore,we have:
Degr
e e
(v1)+degr
ee(
v2)+degree
(v3)+deg
re e
(v4)+degre e
(v5)=1+1+4+4+6=16
Thetotal
numberofe
dgesi
nthegraphi
shal
fthesumof t
he degre
e s
ofal
l
vertic
es.
Ther
efore,
wehave:
number_of_e
dges=(
1/2)
*sum_of
_degree
s=( 1/2)*16=8
T
her
efor
e,t
heg
rap
hha
s8e
dge
s

You might also like