What maths can tell us about WiFi (and vice versa)?

Similar documents
The Witch at Endor I Samuel 28:5: he was afraid when Saul enquired of the Lord, the Lord answered him not

WiFi MAC Models David Malone

SOLOMON ASKS GOD FOR WISDOM (1 KINGS 3:3-14) MEMORY VERSE: "And Solomon loved the LORD, walking in the statutes of his father David.

Markov Models and Reinforcement Learning. Stephen G. Ware CSCI 4525 / 5525

Case #322 Evidence #1 Jesus Heals a Leper

2. "Then it happened, the third day after I had given birth, that this woman also gave birth." 1 KINGS 3:18 TRUE OR FALSE

Old Testament. Part One. Created for use with young, unchurched learners Adaptable for all ages including adults

Peter And John Visit Jesus Tomb John 20:1-10

There was once a miller who was poor, but he had

The Shunammite Woman s Land Restored 2 Kings 8:1-6

Bible Story 21 A BRIDE FOR ISAAC GENESIS 24:1-67

Matthew Series Lesson #060

Bible Story 137 JOB S SECOND TEST JOB 2:1-10

Lesson 5: Is The Light in You?

PART ONE. Once upon a time there was a very special baby. who grew up to be very wise. and to tell us how to be kind. His name was Jesus.

The Garden Of Gethsemane Luke 22:39-53

FRUIT OF THE SPIRIT L E S S O N WHAT COMES OUT WHEN YOU GET SQUEEZED? Mission Arlington/Mission Metroplex Curriculum - Summer 2010

Did God Really Say? Mark 16:9-20, Genesis 3:1-7 June 6, 2018

REFERENCES TO LIGHTNING IN THE HOLY BIBLE

Bible Story 64 SAMSON IS BORN JUDGES 13

JESUS HEALS A WOMAN S DAUGHTER

SATAN AND HIS EVIL ANGELS OF DARKNESS. Copyright by F. L. Walter. A Whisper Of Thunder All Rights Reserved.

4. "And this will be the sign to you: You will find a Babe wrapped in swaddling cloths, lying in a (MANGER, CRIB)." LUKE 2:12

THERE S SOMETHING AMAZING GOING ON

TRUE OR FALSE: 3. "And the second, like it, is this: 'You shall love your neighbor as yourself.'..." MARK 12:31 TRUE OR FALSE

ELISHA RAISES A BOY FROM THE DEAD

GOLDEN TEXT-"Doth not wisdom cry? and understanding put forth her voice?" (Proverbs 8:1).

Old Testament. Part One. Created for use with young, unchurched learners Adaptable for all ages including adults

Jesus Casting out Demons. What We can Learn

Jonah. A Study in Obedience and Attitude Lesson 5. Mission Arlington/Mission Metroplex Curriculum - Summer 2008

A STORY ABOUT INVESTING

SAUL IS REJECTED BY GOD (1 SAMUEL 15:10-35) MEMORY VERSE: "Behold, to obey is better than sacrifice." 1 SAMUEL 15:22

Multiaccess Communication

MITOCW ocw f99-lec30_300k

The Source of True Wisdom. Proverbs 1. Memory Verse: Proverbs 2:6

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z. world, standing. wickedness in high. places A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Old Testament. Part Two. Created for use with young, unchurched learners Adaptable for all ages including adults

2. He said, Be and of good for to this people you shall divide as an inheritance the land which I swore to their fathers to give them.

NT015. Matthew 4:1-11 (Mark 1:12-13; Luke 4:1-13) CalvaryCurriculum.com

JESUS AMAZING AUTHORITY LUKE 4:31-41

Gleanings of Grace. 1 John

Luke 1:26-38 & Matthew 1:18-25

Lent 1 I: Surrender & Liberation Text Mark 5 03/13/11

Lesson 32. The Grain of Wheat. John 12:20-26

"And the sun became black as sackcloth of hair, and the moon became As blood"

Bible Story 207 JESUS RAISES LAZARUS JOHN 11:1-44

P (E) = P (A 1 )P (A 2 )... P (A n ).

Lesson 39. The Vine and the Branches. John 15:1-8

JOSHUA BECOMES ISRAEL S NEW LEADER

THE BIRTH OF JOHN THE BAPTIST

BRIGHT STAR COMMUNITY CHURCH

THE SON OF THE WIDOW OF NAIN

Note: Please use the actual date you accessed this material in your citation.

Elijah Helps A Poor Widow 1 Kings 17:8-24

Elijah Helps A Poor Widow 1 Kings 17:8-24

1.25 Creation Stories

All Glory, Laud, and Honor

Chapter 24. In it are judgments concerning the matter of fortune and property in nativities.

requests/sec. The total channel load is requests/sec. Using slot as the time unit, the total channel load is 50 ( ) = 1

Lesson 19. Jesus Walks on Water. John 6:16-21

YOUR NAME SHALL BE ISRAEL

THE BENEFITS OF WISDOM (PROVERBS 3) MEMORY VERSE: " Trust in the LORD with all your heart, and lean not on your own understanding; in all your ways

Performance Analysis of the IEEE e Block ACK Scheme in a Noisy Channel

MORDECAI IS HONORED (ESTHER 6:1-14) MEMORY VERSE: "Pride goes before destruction and a haughty spirit before a fall.

BRIGHT STAR COMMUNITY CHURCH

Gnostic Mysteries The Son of Man

The Happy Prince. Why aren t you like the Happy Prince? mothers said to their little boys when they cried.

Ananias And Sapphira Acts 5:1-11

Presents Clever Alice From "The Fairy Book" by Miss Mulock - 1 -

DAVID SPARES SAUL S LIFE (TWICE)

The Good Shepherd John 10:1-21

Moses Dies Deuteronomy 34

NT001. Matthew 5:17-18 (and other verses) CalvaryCurriculum.com

3PK. February 16-17, Matt s Friends Bring Him to Jesus. Luke 5: We can ask Jesus to help us!

How The Coconut Came To Myanmar

Samson Is Born Judges 13

Wireless Internet Exercises

Signs, End Of The Age And The Tribulation Matthew 24:3-28

The vicissitude of the Day and Night and their regular alternation

UFOs and Intelligent Life in Outer Space

3PK. February 13-14, Matt s friends bring him to Jesus. Luke 5: We can share Jesus with our friends.

Graph Theory. Thomas Bloom. February 6, 2015

CS115 Computer Simulation Project list

THE EXODUS (EXODUS 12:31-51) MEMORY VERSE: "You in Your mercy have led forth the people whom You have redeemed." EXODUS 15:13

Read the selection and choose the best answer to each question. Then fill in the answer on your answer document. Lights Out

1 There was a man in the land of Uz, whose name was Job; and that man was blameless and upright, and one who feared God and shunned evil (Job 1.1).

Power Controlled FCFS Splitting Algorithm for Wireless Networks

PAUL GOES BEFORE AGRIPPA (ACTS 25:13-26:32) MEMORY VERSE: "Then Agrippa said to Paul, 'You almost persuade me to become a Christian.

The Burning Bush Exodus 3:1-4:17

Online Bible Study Lesson 8 Jesus Heals the Blind Seeing-eye dogs are a blessing to our physically blind neighbors. These amazing dogs are loyal

Bible Story 19 ISAAC IS BORN GENESIS 21:1-8

PIMA TALES BY HENRIETTE ROTHSCHILD KROEBER THE CREATION OF THE WOKLD

NT085. John 15:18-16:15. CalvaryCurriculum.com

STORIES OF LIFE! The Gospel of Luke

Healing Man with Unclean Spirit

NT009. Luke 2: CalvaryCurriculum.com

MITOCW MITRES18_005S10_DerivOfSinXCosX_300k_512kb-mp4

A NEW BEGINNING. Luke 8:26-39 (Mt 8:28-34, Mk 5:1-20) By Chris Losey

SODOM & GOMORRAH (GENESIS 19:1-30) MEMORY VERSE: "The Lord knows how to deliver the godly out of temptations and to reserve the unjust under

road through the interior and arrived at Ephesus. There he found some disciples 2

Transcription:

What maths can tell us about WiFi (and vice versa)? David Malone <David.Malone@nuim.ie> 28 January 2009 1

The Plan Do a little mathematical modeling. Interested in 802.11 (WiFi). Example MAC layer. Detour Markov Chains. Example Channel assignment. Detour Graph Colouring. Any feedback? 2

ALOHA MAC protocol. Used in University of Hawaii (1970). Basic idea: transmit and retry if failed. Idea has been reused again and again. 3

Good Transmission Send Repeat 4

Collision Send Send *silence* 5

Slotted Aloha If you have data, transmit with probability τ. 1 1+2 2 2 1+4 time How can we model this? no transmission good transmission collision transmission (1 τ) n nτ(1 τ) n 1 n ( ) n τ r (1 τ) n r r r=2 6

1 1 user 4 users 10 users 100 users 0.8 total throughput 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 transmission probability 7

Some Analysis How should we pick τ? d dτ [ nτ(1 τ) n 1 ] = (1 τn)(1 τ) n 2 Best throughput at τ = 1/n is (1 1/n) n 1. Asymptotic throughput 1/e! 8

1 (1-1/x)**(x-1) exp(-1) 0.8 throughput (success probability) 0.6 0.4 0.2 0 5 10 15 20 25 30 35 40 45 50 number guys 9

What About WiFi After transmission choose rand(0,cw-1). Wait until medium idle. Count down in slots. Transmit when get to 0. If ACK then CW CW min else CW 2CW. 10

Counting Down (20us) Transmissions (~500us) Someone else transmits, stop counting! Data and then ACK Collision followed by timeout Like ALOHA like: slots different size; How to find τ? 11

Markov Chain Structure in probability: next state depends only on present. E.g. Politician in power gets re-elected with probability 0.8. Politician out of power gets elected with probability 0.4. 0.6 0.2 0.4 0.8 1 0 = 0.6 0.4 This is called transition matrix. 12

A 1 ( 1 0 ) = ( 0.6 0.4 ), A 2 ( 1 0 ) = ( 0.44 0.56 ), A 3 ( 1 0 ) = ( 0.376 0.624 ), A 4 ( 1 0 ) = ( 0.3504 0.6496 ), A 5 ( 1 0 ) = ( 0.34016 0.65984 ),... A 600 ( 1 0 ) = ( 0.33333 0.66666 ). Eigenvectors are 1 3 2 3 and 1 1. 13

Applications of Markov Chains Queueing theory, Physics, Economics, Google, Spammers. 14

No state all and of fierce to a rods no gathered in and will of kingdoms turneth lay as the answered lamp not bullocks, flax, egypt. because the sleep, the him mine top their son mother, plenty one planted the but comfort he king, be possessed whom among there. mother shall displeased that and of and thou the of eighth to and him, thou you; they and him, the because horns man stablish enquire so i all and do the about. in knew can but mercy the do shall the that why their them. which beloved be field, thence shall and my 1 word the other on a truth, nor your god, that also is come, they were more with assyria, and fro through the thunder they wax at liberty of the night and departed, he said, god do i have. and to give them that holdest mine own pleasure, nor to caesar, or sojourner among you; and shall swear unto the tenth part it was gathered together of the lord shall live will slay them. wherefore then spake very good. know them that after his thoughts. for and he shall sit, one of all the sake, o thou art and his god hath 15

2 words died, so shall ye lodge, o ye shepherds, and cry; and came to jesus, they besought him that dwelleth in this and i delivered the commissions unto the levite, he hath redeemed my soul made me to bring them before them; and ye know whence i came forth of me, saith the lord god; behold, i have commanded you; and ye shall eat unclean things in your behold my hands; and said, o my god, to do evil; learn to fear the lord, from the earth, and let him alone. their drink offerings; and as they were over the then 3 words himself had silver, and gold, and make crowns, and set them in their synagogue, insomuch that they pressed upon him for to touch him, as many as obeyed him, were dispersed. and now i am no more worthy to be beaten, that the judge shall cause him to fall upon it suddenly, and terrors upon the city. she that hath many children is waxed feeble. the lord killeth, and maketh he bringeth low, and lifteth up. he raiseth up himself, the mighty are gathered against me; not for my transgression, the fruit of thy works. he causeth the vapours to 16

Bianchi: Mean Field 1. Assume fixed chance of collision p. 2. Use CW and counter as state. 3. Build Markov Chain A(p) based on 802.11. 4. Find stationary distribution b. 5. Add up transmitting states to get τ. Now we have τ(p), but also 1 p = (1 τ) n 1. 17

How Good Is This? 0.35 0.3 0.25 Probability 0.2 0.15 0.1 0.05 0 2 4 6 8 10 12 14 Number of STA(s) P(col) Predicted P(col) 18

The other direction Bianchi assumes fixed p. State space from 2000 n to 2000. Gives explicit solution. Why does this give good results? Not yet understood, question in probability/linear algebra. 19

WiFi Channels 802.11b/g sends signals at about 2.4Ghz. In fact, 11 (or 13/14) channels. But signals are a few channels wide! Channels 1, 6 and 11 are orthogonal. What happens if networks overlap? 20

Hidden Node If everyone can hear, good. Otherwise... Can result in pretty bad performance. 21

Graphs A graph is a handy structure with vertices V and edges E V 2. 1. (n,n) is never an edge. 2. (n 1,n 2 ) E (n 2,n 1 ) E. n2 n4 n5 n1 n3 n6 E = {(n 1,n 2 ), (n 1,n 3 ), (n 1,n 4 ), (n 4,n 5 ), (n 4,n 6 )}. 22

Graph Colouring A node colouring of a graph is a function c from the vertices V to a set of colours C. 1. Sometimes no restriction on c. 2. Sometimes want c(n 1 ) c(n 2 ) if (n 1,n 2 ) E. n2 n4 n5 n1 n3 n6 c(n 1 ) = B,c(n 2 ) = R,c(n 3 ) = R,c(n 4 ) = G,c(n 5 ) = B,... 23

Ramsey Number How big does a graph have to be so it, or its complement, contains a clique of size n? For n = 1 the answer is 1. For n = 2 the answer is 2. For n = 3 and 4 the answer is 6 and 18 respectively. For n = 5 the answer is between 43 and 46. We may never know! Work to do the dumb way is: ( ) m 2 (m 1)(m 2) n 2. 24

That s a lot of work! Erdös asks us to imagine an alien force, vastly more powerful than us, landing on Earth and demanding the value of R(5, 5) or they will destroy our planet. In that case, he claims, we should marshal all our computers and all our mathematicians and attempt to find the value. But suppose, instead, that they ask for R(6, 6). In that case, he believes, we should attempt to destroy the aliens. 25

Picking a Channel Channel assignment is graph colouring. Know the graph? Use centralised scheme. Distributed schemes exist too. What about when stations can t talk? 26

Colouring in the Dark Keep changing colour until no clash. 1. Initially p (1/C,...,1/C). 2. Choose a channel according to p. 3. No Clash? p (0, 0,..., 1,...). 4. Clash? p (1 β) p + β (1, 1,... 0,...). C 1 5. Goto 2. 27

How Fast? Unfinished after T steps with probability: 1 A ( (1 β) 2 ( β C 1 ) 2C+1 ) N Where A is the number of good colourings, N is number of nodes, C is number of colours. T N 28

29

Graph Variants Directed graphs. Hypergraphs. Better communication free colouring. Colouring in colouring dependent graphs. 30

Wrapping Up Modeling WiFi MAC. Markov chains. Why does approximation work? Channel allocation. Graph theory. New graph varients. 31