# Thread: Need Help in Programming

1. ## Need Help in Programming

Hello all - I have to create a program in C - I have very less experience in C. Could somebody help me in writing this program?

Here are the details:-

Suppose N stations are waiting for another packet to finish on an Ethernet.
All transmit at once when the other packet is finished, and collide. Write a
program to simulate the continuation of these attempts, and to determine how
long it takes before one succeeds. Make the following simplifications: ignore
interframe spacing, ignore variability in collision times (so that
retransmission is always after an exact integral multiple of the 51.2microsec
slot time), and assume that each collision uses up exactly one slot time.
Model the time, T, in units of slot times, so a collision at time T followed
by a backoff of k=0 would result in a retransmission attempt at time T+1.

Find out the average delay for N=20, N=40, N=100, and maybe some larger values
too. Do your data support the notion that the delay is linear in N? (It should.)

I appreciate any guidlines or help.

Thanks

2. Sorry - if I have annoyed or disregard any policy.

What I want somebody to guide me the process or steps which needs to be taken to code this problem. I want to do coding of my own but need a way to start.

Once again my apology.

Regards-

3. Originally Posted by namasteall2000
Sorry - if I have annoyed or disregard any policy.

What I want somebody to guide me the process or steps which needs to be taken to code this problem. I want to do coding of my own but need a way to start.

Once again my apology.

Regards-
Your problem is an interesting one however, I think you should specify the mathematical relationships between all these variables. Because I, for one, don't know them.

If I don't have enough info to do it by hand, I can't code it up for the computer. (almost always true).

Show us how you'd do this by hand in an example. Then we'll be able to figure out how it could be done algorithmically, by the computer. Hopefully.

4. sound complicated....
what is it?
udp?

5. I have just this information - this is given in our networking book - no other information is specified. This is in the link layer chapter where we are covering ethernet etc.

6. wow...
beyond my imagination...

good luck dude..

7. The math info we'd need is in your original post - I just don't have much of a handle on the words they're using, and don't want to sit down and work it out.

I'm not a math whiz!

I thought you might be, however. You should at least know the terms, and thus have a start on this enumeration

Show how you'd do this for one example, by hand. If you can't do that, you can't program a computer to do it, either.

Otherwise it looks like you're just saying "here's my assignment, please show me the program that will solve it."

8. for ( T = 0 ; T < someLimit ; T++ )

At each T, you decide
- which of the N stations is able to transmit.
- and some other stuff which I thought might be giving the game away

9. Salem - thanks for the reply.