major1_coe_072_540_sol

6
Dr. Ashraf S. Hasan Mahmoud – April 8 th , 2008 Major1_COE_072_540_sol.doc:Page 1 of 6 KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COLLEGE OF COMPUTER SCIENCES & ENGINEERING COMPUTER ENGINEERING DEPARTMENT COE 540 –Computer Networks April 8 th , 2008 – Midterm Exam Student Name: Student Number: Exam Time: 120 mins Do not open the exam book until instructed The use of programmable calculators and cell phone calculators is not allowed – only basic calculators are permitted Answer all questions All steps must be shown Any assumptions made must be clearly stated Question No. Max Points 1 40 2 40 3 50 4 40 Total: 170

Upload: mohjo2007

Post on 25-Nov-2015

3 views

Category:

Documents


1 download

TRANSCRIPT

  • Dr. Ashraf S. Hasan Mahmoud April 8th, 2008 Major1_COE_072_540_sol.doc:Page 1 of 6

    KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COLLEGE OF COMPUTER SCIENCES & ENGINEERING

    COMPUTER ENGINEERING DEPARTMENT COE 540 Computer Networks April 8th, 2008 Midterm Exam

    Student Name: Student Number: Exam Time: 120 mins

    Do not open the exam book until instructed The use of programmable calculators and cell phone calculators

    is not allowed only basic calculators are permitted Answer all questions All steps must be shown Any assumptions made must be clearly stated

    Question No. Max Points

    1 40 2 40 3 50 4 40

    Total: 170

  • Dr. Ashraf S. Hasan Mahmoud April 8th, 2008 Major1_COE_072_540_sol.doc:Page 2 of 6

    Q1.) (40 points) On the subject of OSI and TCP/IP network models a) (15 points) List the 7 OSI layers in ORDER. b) (15 points) List the TCP/IP layers in ORDER and describe briefly the main function

    of each layer (not more than one line). c) (10 points) Give example applications of the TCP/IP network.

    Solution:

    a) The OSI layers are: (1) Application, (2) Presentation, (3) Session, (4) Transport, (5) Network, (6) Data link, (7) Physical.

    b) The layers and their main functions are:

    (1) Application layer: comm between processes or applications on separate hosts

    (2) Transport layer: end-2-end transfer service may include reliability mechanisms

    (3) Internet layer: routing data from source to destination through one or more networks

    (4) Network access layer: logical interface between end systems and the network

    (5) Physical layer: defines mechanism of transmitting raw bits depending on media characteristic

    c) Example applications are: HTTP (web browsing), SMTP (Email), FTP, etc.

  • Dr. Ashraf S. Hasan Mahmoud April 8th, 2008 Major1_COE_072_540_sol.doc:Page 3 of 6 Q.2) (40 point) On the subject of channels and modems a) (10 points) What the three properties of Linear Time Invariant systems. b) (10 points) If a system has an impulse response function h(t), write an expression specifying the system output r(t) as a function of h(t) and the input signal s(t). Write the equivalent relationship in the frequency domain. c) (10 points) Let the input signal s(t) be equal to an impulse A(t), where A is some constant. Plot the input signal in both the time-domain and frequency domain. What is the system output in response to this input? d) (10 points) Bandpass channels are known to produce ringing. Explain this phenomenon very briefly. For such channels is it better to use NRZ encoded data or Manchester encoded data and why? Solution:

    a) Linear-Time-Invariant system is a system that satisfies:

    If input s(t) yields output s(t), then for any , input s(t-) yields s(t-)

    If s(t) yields r(t), then for any real number , s(t) yields r(t), and

    If s1(t) yields r1(t) and s2(t) yields r2(t), then s1(t)+s2(t) yields r1(t)+r2(t)

    b) r(t) is given by the convolution ( ) ( ) ( )r t s h t d

    = . The equivalent frequency domain

    relationship is R(f) = S(f) H(f) where X(f) = F.T.{x(t)}.

    c) If s(t) = A(t) s(t) in time and frequency domain is as shown in figure. s(t) exists only at t = zero and is zero otherwise; S(f) = A for all f. R(f) = S(f) H(f) = AH(f) r(t) = Ah(t);

    d) Bandpass channels are by definition zero at f = 0. This means ( 0) ( ) 0H f h t dt

    = = = . This

    means h(t) is oscillating! For such channels it is better to use Manchester encoding (no DC component) as opposed to NRZ (which has a DC component).

  • Dr. Ashraf S. Hasan Mahmoud April 8th, 2008 Major1_COE_072_540_sol.doc:Page 4 of 6 Q.3) (50 points) On the subject of error control and framing a) (20 point) Assume a sliding window protocol is used on a link that connects node A to Nod B through a geostationary satellite relay station. Let the sliding window size, W, be 7 and the frame length, L, equal to 1500 Bytes. Ignoring the ACK and processing times it is required to: (1) Plot the utilization of the link AB as a function of the bit rate R offered by the service provider. (2) What is the maximum possible throughput link AB in frames per second. Assume a geostationary orbit for the satellite (i.e. d = 36,000 km) speed of light, c, is 3x108 m/sec. b) (10 points) Given a string of si bits where i=1,2, ,n. A single parity bit is added cn+1 such that cn+1 is equal to the Modula 2 sum of all sis. If the bit error probability is p and bit errors are IID, what is the probability of an undetected error in the code word using this scheme? What is the burst detecting capability of this single parity check scheme? c) (20 points) Assume frame lengths occur as follows: 30% of frames are of length equal to 64K bytes, 50% of frames are of length 256K bytes, while the remaining 20% are of length 512K bytes. (1) What is the average frame length? (2) Draw the cumulative distribution function for the frame length variable. (3) What is the minimum number of bits required to encode the frame length information. (4) If all frames are of length 256K bytes, then what is the minimum number of bits required to encode the frame length information. Solution: a) Sliding window protocol (1) Tf = L bits/R bit/sec = 1500x8 bits/ R bit/sec Tprop = 2 d/c = 2x36x106 m/3x108 m/sec = 0.240 sec U = min(1, W/(2xTprop/Tf + 1) The knee point occurs when W = 2xa + 1 W = 2Tprop/(L/R*) + 1 R* = L(W-1)/(2Tprop) Therefore, R* = 150 kb/s. For R < R* U = 1; for R >= R* U = W/(2xa+1); The plot for the utilization of link AB is as shown in figure. (2) The throughput for link AB is given by Thr = U x R The maximum throughput occurs as R infinity or Tf 0; therefore the maximum possible throughput in frames per second is equal to W / (2Tprop) = 7 / 0.48 = 14.58 frame per second (or 175 kb/s).

    0 200 400 600 800 10000

    0.2

    0.4

    0.6

    0.8

    1

    b) Single parity check: (1) Random errors that will produce the same modulo 2 sum will not be detected. Meaning all error sequences of even length will not be detected. Therefore, the probability of undetected

    error is given by [ ] ( )1 2 1 221

    1Pr ob bits in error 1

    2

    nn ii

    i

    neven p p

    i

    + +

    =

    + = (2) The burst detecting capability of this code is equal to 1 (i.e. the code can detect any errors of size 1 or less).

  • Dr. Ashraf S. Hasan Mahmoud April 8th, 2008 Major1_COE_072_540_sol.doc:Page 5 of 6

    0 100 200 300 400 500 6000

    0.2

    0.4

    0.6

    0.8

    1

    c) Frame length fields: L1 = 64; p1 = 0.3 L2 = 256; p2 = 0.5 L3 = 512, p3 = 0.2; (1) average L =L1xp1 + L2xp2 + L3xp3 = 249.6 K bytes. (2) The CDF for the frame length variable is given by the stairs-case function shown in figure. (3) The minimum number of needed bits is the entropy of the given distribution given by H = pk log2 pk-1 bits = -0.3 log2(0.3)-0.5 log2(0.5) 0.2 log2(0.2) = 1.4855 bits (4) = If all frames are of length = 512 K bytes p = 1, therefore, the minimum number of bits is equal to plog2(p) = 0 bits. i.e. when the frame length is fixed, there is no need to encode the frame length information!

  • Dr. Ashraf S. Hasan Mahmoud April 8th, 2008 Major1_COE_072_540_sol.doc:Page 6 of 6 Q.4) (40 points) On the subject of Orthogonal Frequency Division Multiple Access (OFDMA) a) (25 point) The problem of sub-carrier and power allocations can be formulated to satisfy different objectives with different constraints. As explained in class, there exist 4 broad classes of formulations or algorithms that tackle this problem. These are Maximum Sum Rate (MSR) formulation, Maximum Fairness (MF) formulation, Proportional Rate Constraints (PRC) formulation, and Proportional Fairness (PF) formulation. Describe, briefly, the MSR and MF formulations and specify the objective functions and constraints for each formulation. Define any notations you use in your specifications. b) (15 points) To what formulation type does the problem discussed in Shens paper belong to? Why? Specify the objective function and the constraints. Solution: (a) K = number of users, N = number of sub-carriers, Hk,n the channel power gain (relative to noise) for kth user on the nth sub-carrier B = total system bandwidth in Hz. (1) MSR maximumize total system throughput the only constraint is the total power budget. That is:

    Objective: ( ), ,

    ,2 , ,, 1 1

    max log 1k n k n

    K Nk n

    k n k nP k n

    Bp H

    N

    = =+ - constraint: ,

    1 1

    K N

    k n totalk n

    P P= =

    . (2) For MF maximize the minimum possible user rate the only constraint is the total power budget. That is:

    Objective: ( ), ,

    ,2 , ,, 1

    max min log 1k n k n

    Nk n

    k n k nkP n

    Bp H

    N

    =

    + - constraint: ,1 1K N

    k n totalk n

    P P= =

    . (b) The problem solved by Shen belongs to the proportional rate constraints (PRC) formulation.

    The problem is to maximum the system rate (i.e. ( ), ,

    ,2 , ,, 1 1

    max log 1k n k n

    K Nk n

    k n k nP k n

    Bp H

    N

    = =+ ) with the total

    power constraint (i.e. ,1 1

    K N

    k n totalk n

    P P= =

    ) and the rate proportion constraints (i.e. 1 2

    1 2

    K

    K

    R R R = = =" )