Download as pdf or txt
Download as pdf or txt
You are on page 1of 8



Faculty Of Engineering
Department of Electronics & Electrical Communications
Data Structure Course Contest One
Time: Two Days

Mobile Technology Scheduling


Algorithms
In a mobile telecommunications company; it's required to increase the overall
throughput [Data rate] of the wireless coverage.

For each mobile cell there are n slots that the n users could be assigned.

[Assuming that the number of users = the number of the frequency slots]

i.e. User number one could be operated on slot one or two or three or any
combinations of them

If we assume that the user one could be operated in both slots one , two
and three then the user one data rate = the summation of the data rate in
each slot.

There's a metric coefficient to indicate the datarate corresponds to a specific


user assuming certain operating frequency slot.

If user number one operates on the frequency slot number one then the
datarate =10 Mbps and if the same user operates on the frequency slot
number two then the data rate =15 Mbps and if the same user operates on the
frequency slot number three the datarate could be =12Mbps

But why for the same user if he operates on different slot the datarate is
different?

The answer is related to the communications theory; there are many factors
relates the user location (distance between the user and the cell base station)
, the transmitting power of the mobile , the frequency that the mobile
operating in [The frequency slot selected when initiating the communication
process] ,...etc

These factors are analyzed in a stochastic fashion [Probabilistic model] to


calculate the data rate of each user if s/he operates on a certain frequency
slot.

We could develop a matrix called the metric matrix its rows represent the
user number and its columns represent the frequency slot number.

You are required to develop a c++ program that makes a channel assignment.
so that we could decide which channel the user number j should use to get
the maximum overall system throughput.

This problem is known in the algorithms world as a scheduling problem.

Given the required algorithms to be implemented by your program; and the


algorithm explanation
Also the scheduling should be implemented under some assumptions

1-Each user must operates only [at most and at least] on a single
channel(frequency slot).

[To make the fairness as the number of channels = the number of users; if a
user operates on more than a single channel then there's another user that
wouldn't find any channel to operate on and it's not fair]

2-Each channel couldn't be assigned to more than a single user.

(And its realistic the user sends the data as an analog signal

[Digital inside the mobile or the computer] and after the transmitter + the
antenna; it's converted to analog signal.

The analog signal is a sinusoidal signal of a certain frequency band.

(After a process known as the modulation process)

The final deduction:

Each user should operates on only one channel

Each channel must only assigned to a single user.

More practical:

The user could operate on more than a channel.

[But still each channel couldn't be assigned to more than a single user at the
same time].
Assuming that the metric matrix as the following

We will give each metric matrix element a symbol as which means the
metric of the user number i if s/he uses the channel (frequency slot) number c

So is the metric (data rate) of the first user if s/he uses the first channel
(frequency slot) which is equal 380 Mbps in our example.

And is the metric (data rate) of the second user if s/he uses the third
channel (frequency slot) which is equal 1390 Mbps in our example.

The algorithm procedure:

Initially we pick the largest data rate from the matrix (1530) then delete all the
data on the same row (first row) of the picked data rate

(As the same row means the same user and as the user is assigned to the
channel then the rest channels couldn't be assigned to the user)
and also delete all the data on the same column(third column) of the picked data rate
(as the same column means the same channel and as the channel is assigned
to the user then it couldn't be assigned to any other users)

So the resultant matrix is as the following:

Step 1
From the resultant data pick the largest data rate (810) and repeat the process
until the matrix is empty and all the users are assigned to the required
channel.

Step 2

Step 3
Each time the maximum selected element is the target data rate.

Which is meaning that we finally choose the flowing data rates:


1530,810 and 300
Or which is meaning that the user one will use the
channel number three and the user two will use the channel number two and
the user two will choose channel number one

The total system throughput =1530+810+300=2640 Mbps


0- Initialize the total throughput to zero and a counter to zero.
1- Store all of the matrix data into an in-order linked list
2- Increment the counter
3- Get the first element of the in-order linked list and store it in a variable
(SDR[counter] an acronym for Selected_data_rate)
=>specify its row number and column number
=>Get all the data on the same row (same user) and the same column
(same channel ) and delete them from the in-order linked list.
4- Add the SDR[i] to the total throughput and store the result in the total
throughput.
5- If the resulted linked list is not empty go to step 2 and repeat
6- After the linked list becomes empty then the number in the total
throughput is the resulted Overall system throughput.
7- The numbers on the array SDR represents the selected data rates to be
assigned .
8- Output which channel is assigned to eachuser.

[Repeat the previous 8 steps but using a linear in-order list] compare between
the memory utilization for both implementations and for a given number of
users.

Notes:

1-Number of user [=number of channels] could be between 2 and till to 1000


2-The current algorithm is not the optimized one as for the given metric
matrix

If we choose the following metrics: 1530, 730 and 650

We satisfied the conditions that each user takes only one channel and in the
same time maximizing the total throughput 1530+730+650=2910Mbps

We will learn in the next sessions more optimized methods but need a new
data structures to be implemented like the binary tree, Quad-tree..etc.

For a better memory utilization store the matrix into a dynamically two
dimensional array [Double Pointer] .

In the beginning of the program ask the program user for the number of the
users and the number of the frequency slots. [They must be the same]. and
then allocate the corresponding memory blocks

If you use a static two dimensional array 1000*10000 then in the worst case

You will lose 1000*1000 -2*2 memory locations [You now are not a programmer]

The same concepts are applied when using the in-order linear linked list rather
than the in-order linear static list.

Good Luck
"Abdelrhman Mohamed Abotaleb" 30 August 2010

You might also like