Journals
Publish with us
Publishing partnerships
About us
Blog
Advances in Multimedia
Journal overview
For authors
For reviewers
For editors
Table of Contents
Special Issues
Advances in Multimedia
/
2008
/
Article
/
Alg 2
/
Research Article
Scalable Video Streaming for Single-Hop Wireless Networks Using a Contention-Based Access MAC Protocol
Algorithm 2
Compute
p
i
's given all
R
i
′
's.
[
p
1
,
p
2
,
…
,
p
N
,
success
]
=
Compute
_
p
(
R
1
′
,
R
2
′
,
…
,
R
N
′
,
N
)
ϵ
=
0.01
I
′
=
1
{
I
′
is the percentage of idle slots
}
search_step
=
0.01
success
=
0
for
i
=
1
to
N
do
S
i
=
R
i
′
TXOP
×
(
1
−
∑
i
=
1
N
R
i
′
)
end for
while
I
′
<
1
do
for
i
=
1
to
N
do
p
i
=
S
i
I
′
+
S
i
end for
{
run Algorithm
1
to compute collision probability
C
}
C
=
Compute
_
C
(
p
1
,
p
2
,
…
,
p
N
,
N
)
total
=
I
′
+
C
(
RTS
+
DIFS
)
+
∑
i
=
1
N
S
i
(
RTS
)
{
check for boundary condition smaller
ϵ
results in higher accuracy
}
if
(
abs
(
total
−
1
)
<
ϵ
)
then
success
=
1
return
[
p
1
,
p
2
,
…
,
p
N
,
success
]
end if
I
′
=
I
′
−
search_step
e
n
d
w
h
i
l
e
{
fail to find
p
,
success
=
0
}
return
[
0,0,
…
,0,
success
]