52
Glenforest Secondary School Extended Essay Probability of a 45º Drunkard’s Walk David Kong 2203-0033 Math Word Count: 3814

Probability of a 45º Drunkard’s Walkstatic.squarespace.com/static/4ff39269c4aaf3fdb14faa05/t/...2.0 Developing a Method PAGE 8 David Kong – 2203 033 The probability of winning

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

  • Glenforest Secondary School

    Extended Essay

    Probability of a 45º Drunkard’s Walk

    David Kong

    2203-0033

    Math

    Word Count: 3814

  • ABSTRACT PAGE 2

    David Kong – 2203 033

    Abstract We take a glimpse into higher level probability with the ‚random walk,‛ a particle

    moving in random directions on a plane. The focus, however, is very specific: a very

    particular kind of random walk, as described by an ‚USA Mathematics Talent

    Search‛ question,

    3/4/20. A particle is currently at the point (0, 3.5) on the plane and is moving towards the origin. When the particle hits a lattice point (a point with integer coordinates), it turns with equal probability 45° to the left or to the right from its current course. Find the probability that the particle reaches the x-axis before hitting the line y = 6 USA (Mathematical Talent Search).

    We begin by considering a smaller model in order to develop theorems based around

    the symmetrical nature of the particle’s movement. These theorems are applied to

    the original question and by focusing on particular points of the particle’s motion

    and we solve a system of equations to reveal the answer to be

    . We then check the

    validity of our work by comparing the theoretical probability to the empirical

    probability as found by an excel program we later create.

    We then extend the problem to find that for a particle beginning downward at

    (0,4.5), the probability of reaching the x-axis before reaching y=8 is

    .

    Finally, we use the patterns from these smaller models to create a system of

    equations which, when solved, gives the answers to much larger models, including

    the final assignment: finding the probability of reaching the x-axis before reaching

    y=50. Assuming the particle, again, begins halfway (0,25.5), this was found by our

    excel program to be around 0.555.

    269 words

  • ABSTRACT PAGE 3

    David Kong – 2203 033

    Table of Contents Abstract ................................................................................................................... 2

    1.0 Introduction ................................................................................................... 4

    2.0 Developing a Method ..................................................................................... 7

    3.0 Creating an Excel Model .................................... Error! Bookmark not defined.

    4.0 Solving the Problem ..................................................................................... 12

    5.0 Extending the Problem ................................................................................ 19

    6.0 Using Excel for Scalability ........................................................................... 29

    7.0 Conclusion ................................................................................................... 43

    8.0 Works Cited ................................................................................................. 46

    9.0 Acknowledgements ....................................................................................... 46

    10.0 Appendices ................................................................................................. 47

  • 1.0 Introduction PAGE 4

    David Kong – 2203 033

    1.0 Introduction Simple probability almost always involves an event space and sample space. Even the more difficult questions, such as those involving binomial distribution can still be represented in the number of times of success over the number of successes and failures.

    However, in higher level probability, questions are elevated to a point where the sample space is infinite. As a direct approach becomes impossible, these questions are more difficult, and require original solutions. An integral part of higher level probability is the ‚random walk,‛ the study of a particle moving randomly in space. While applications of this field are numerous and significant, including the stock market and molecular movement (Brownian motion), it is outside the scope of this essay. Instead we will thoroughly investigate one particular type of random walk to demonstrate the sort of treatment a question of this calibre requires.

    While our solution will include probability laws like that of ‚combined events,‛ it has a surprisingly high reliance on other pre-calculus disciplines.

    From the USA Math Talent Search:

    3/4/20. A particle is currently at the point (0, 3.5) on the plane and is moving towards the origin. When the particle hits a lattice point (a point with integer coordinates), it turns with equal probability 45° to the left or to the right from its current course. Find the probability that the particle reaches the x-axis before hitting the line y = 6 (Mathematical Talent Search).

    The following diagram elucidates the motion described above.

  • 1.0 Introduction PAGE 5

    David Kong – 2203 033

    The particle starts at (0,4),1 and begins its path down to (0,3). In this path, the particle first turns right of its current path at a 45° angle, towards the lattice point (-1,2), where it turns right 45° again. The particle continues to make left and right turns randomly until it hits y=6, where it terminates. This path is considered a failure.

    1.1 Definitions and Notation Let us define the event of the particle reaching y=0 before y=6 a success, or winning. Let us refer to y=0 as the lower bound and y=6 as the upper bound. Let represent the probability of winning given that the particle is at point (x,y), and the upper bound is y=a while the lower bound is y=0. As the question specifies ‘lattice points,’ a, x and y and all other variables or parameters introduced can be expected to be either integers or a subset of .

    Please note that our notation has a limitation in that it does not specify the direction. For simplicity, directional information will not be denoted in ‘ .’ We only consider the most direct path a particle can take to (x,y). For example, can only represent the probability of a particle moving south because the particle arrives in that situation in only one move whereas any other direction would require repositioning and thus many more moves. The reader will have access to

    1 Although the question specifies that the particle starts at (0,3.5), we begin our paths on a lattice point without altering the results in any way.

  • 1.0 Introduction PAGE 6

    David Kong – 2203 033

    graphs which accompany the mathematical equations which explicitly show the direction in question.

    The answer to our problem is expressed as , since the particle necessarily goes through (0,3).

  • 2.0 Developing a Method PAGE 7

    David Kong – 2203 033

    2.0 Developing a Method To solve this problem, our strategy is to look at a smaller model.

    Particle bound by y=0 and y=4

    As the particle in the original problem began just above half, we will begin our smaller model at (0,3). The first move will be down to (0,2) where it can either turn left or right, and have these possible paths for the first five moves of the particle.

    Theorem 2.1

    where (d,e) and (f,g)are the two

    possible progressions from (b,c).

    Proof. From a tree diagram,

    at(b,c)

    turning right to (d,e) winning from (d,e)

    losing from (d,e)

    turning left to (f,g) wining from (f,g)

    losing from (f,g)

  • 2.0 Developing a Method PAGE 8

    David Kong – 2203 033

    The probability of winning at (b,c) is therefore:

    Therefore the probability of winning on the first move,

    (2.1)

    However, notice from the diagram that the particle at (-1,1) is on a similar path as the one at (1,1), just in the opposite direction.

    Theorem 2.2 Vertical Line of Symmetry. given that the particle at when flipped in the line x=d shares the same path as .

    Proof. The particles at and have congruent paths, which is easily shown when one is flipped in the line x=d. Therefore, their probabilities of success must be equal.

    Since we can simplify Equation 2.1,

  • 2.0 Developing a Method PAGE 9

    David Kong – 2203 033

    This is useful because we can eliminate (-1,1) from our solution. In the diagram below, the orange path can be eliminated because for the same reason , we reason that .

    One method of finding would be to apply theorem 2.1 over and over again as such:

    (Theorem 2.2)

    (

    )

    (

    )

    (2.2)

    However, such a solution is unappealing and hard to follow. Instead, we will use a step counting method. Here is a graph for the interval . The endpoints, or the points in Equation 2.2, are marked.

  • 2.0 Developing a Method PAGE 10

    David Kong – 2203 033

    Identifying the endpoints is important because each end point corresponds to a path, whose collective probabilities make up . In order for the particle to arrive at the point, must turn in the correct direction at every junction. For example, a particle at (4,4) arrives after turning left at each of the 3 junctions.2 The probability of passing the junction on the correct trajectory is 0.5 so

    (

    )

    Since is the combination of the probabilities at all possible endpoints,

    (

    )

    (

    )

    (

    )

    2 Please note that (0,2) and (3,3) are not counted as junctions. As Thorem 2.2 points out, no matter if the particle moves left or right at these point, the particle will follow congruent paths.

  • 2.0 Developing a Method PAGE 11

    David Kong – 2203 033

    We reason that , since the probability of success from either point is definite. because it is a losing point.

    (2.3)

    Theorem 2.3 Horizontal at Half. (

    )

    for all b, given that the particle is

    moving horizontally

    Proof. Consider an horizontally east moving particle at (

    ). The two possible

    progressions are therefore (

    ) and (

    ).

    Let (

    ) . Reflecting the point (

    ) by

    , we can

    conclude that the probability of the reflected particle reaching is also . But

    since it was reflected, is actually the probability of it reaching . Therefore,

    the probability of success, (

    ) .

    (

    )

    (

    )

    (

    )

    (

    )

    The case for a particle moving west is similar

    Therefore from Equation 2.3,

    (

    )

    The probability of a particle reaching the x-axis before y=4 is

    .

  • 4.0 Solving the Problem PAGE 12

    David Kong – 2203 033

    4.0 Solving the Problem

    Particle bound by y=0 and y=6

    Following a similar strategy as before, this diagram can help us find .

    Based on the possible paths after the first 4 moves, employing the step counting method,

    (

    )

    (

    )

    (

    )

    (

    )

    We can simplify since and are success points and is a horizontal at half (Theorem 2.3)

    (

    )

    (

    )

    (

    )

    (

    ) (

    )

  • 4.0 Solving the Problem PAGE 13

    David Kong – 2203 033

    (4.1)

    Let us first deal with .

    (Theorem 2.2)

    (4.2)

    One final theorem must be developed. Notice how the particle at (5,5) is making similar moves as the one at (4,1). These paths when translated horizontally are symmetrical by y=3, and their probabilities are related.

  • 4.0 Solving the Problem PAGE 14

    David Kong – 2203 033

    Theorem 4.1 Horizontal Line of Symmetry. for all b,c

    and d, given that the particle at , when reflected in

    shares the same path

    at the particle at

    Proof. By reflecting point (d,a-c) in the line

    , we arrive at point (d, c), where

    translated horizontally will have the same motion as the particle with .

    Therefore, the probability of hitting the line is for both particles. But

    since one was reflected, is actually the probability of hitting the line

    for the reflected particle:

    , where P’ is the probability of failure (hitting y=a) therefore,

    From Equation 4.2,

    ( )

    (4.3)

    Substituting this into Equation 4.1,

    (

    )

    (4.4)

  • 4.0 Solving the Problem PAGE 15

    David Kong – 2203 033

    We will track our motion starting at (4,1):

    in fact is a part of theorem 4.1. If the path of the particle from (5,2) to (5,3) were to be reflected in y=3, and translated horizontally, it would be the same path as the particle from (0,4) to (0,3). In such a way we know that

    We also notice that since the particles are making the same move, just translated horizontally.

  • 4.0 Solving the Problem PAGE 16

    David Kong – 2203 033

    Therefore, from above,

    ( )

    (4.5)

    Now we have Equation 4.4 and Equation 4.5

    We realize that we must solve a system. However we have 3 variable and only 2 equations. The solution is to write another one, ensuring it only has the three variables we’ve selected: , and . It seems reasonable that we begin the next equation with .

  • 4.0 Solving the Problem PAGE 17

    David Kong – 2203 033

    We take another look at the first diagram:

    Counting the junctions from the endpoints to (2,2),

    (

    )

    (

    )

    (

    )

    (

    )

    Knowing that 3,0)=1, (4,3) =

    and from Equation 4.3,

    (

    )

    (

    )

    (

    )

    (

    ) (

    )

    (

    )

    (4.6)

  • 4.0 Solving the Problem PAGE 18

    David Kong – 2203 033

    Solving the System Using equations 4.4, 4.5 and 4.6,

    3 equations with 3 variables: solve using Microsoft Math:

    Of course, the only value we need is

    The decimal representation 0.7936 is very close to the predicted value at the end of section 3.0 (which was 79.45%).

  • 5.0 Extending the Problem PAGE 19

    David Kong – 2203 033

    5.0 Extending the Problem This problem lends itself to further investigation quite easily. The goal of this section will be to solve the probability for the particle bound by and . To see the general trend, the probability generator produced empirical probabilities for various upper bounds.3 The data is graphed:

    3 Data for graph found in Appendix 10.7.

  • 5.0 Extending the Problem PAGE 20

    David Kong – 2203 033

    When these points are graphed on a scatter plot, a few interesting features are revealed. The points appear to form an asymptote to the line . This is easily explained. All probabilities are above 50% because all particles begin downwards, closer to the x axis closer, so that it is more likely that the particle reaches the x axis. However, as the bounds expand, the downward movements at the beginning grow increasingly irrelevant because there is a large area for the particle to change direction.

    Seeing the increase in difficult from the problem to the problem, one can only assume the difficulty of solving a problem. Our initial method is therefore unscable. Solving a problem will be next to impossible.

    The notation is also unscaleable. For a particle bound by y=8, becomes ambiguous.

    Calculations might lead us to , which could refer to the blue path and the red path but have different probabilities. To add to the confusion, the purple path is shared by both.

  • 5.0 Extending the Problem PAGE 21

    David Kong – 2203 033

    Fortunately, our solution to the problem has created some hints with which we can continue our investigation. Here is a graph from before:

    The large dots highlight the three crutial points which which we used to solve our system of equations: (0,3), (2,2), (4,1). With the exclusion of (0,3), which is the starting point, notice that both of the other two points lie on horizontal particle movements.

    Notation Let represent the probability of success with upper bound when the particle is traveling on the line . For example, . Similarly, . However, does not necessarily equal .

  • 5.0 Extending the Problem PAGE 22

    David Kong – 2203 033

    We were only able to solve the y=6 problem after all probabilities of horizontal movements were calculated.

    Note that and were calculated through a system at the end of section 4.0.

    Particle bound by y=0 and y=8

    Using our observations concerning the smaller models, we employ the horizontal line method to solve for . To find the probabilites of all the horizontal lines, we would require . The probabilities will be stated in the terms of each other, creating a system of equations, which can be solved to find the the exact probabilities.

  • 5.0 Extending the Problem PAGE 23

    David Kong – 2203 033

    Begining the particle on a horizontal line of y=1, we will find the probability that the particle reaches the x axis.

    This graph shows the possible paths of the particle, each terminating at either the bounds or at a horizontal line.

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    ( )

    (5.1)

  • 5.0 Extending the Problem PAGE 24

    David Kong – 2203 033

    This graph shows the particle beginning on a y=2 and having various end points.

    Counting the number of junctions,

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (5.2)

  • 5.0 Extending the Problem PAGE 25

    David Kong – 2203 033

    Similarly, for

    (

    )

    (

    )

    ( )

    (5.3)

  • 5.0 Extending the Problem PAGE 26

    David Kong – 2203 033

    Solving the system using Equations 5.1, 5.2 and 5.3,

    Therefore,

    Now we can solve for .

  • 5.0 Extending the Problem PAGE 27

    David Kong – 2203 033

    The graph which maps particle motions for , shows three distinct end points located at horizontal movement and upper/lower bounds.

    Using the step-counting method, and knowing that

    (5.4)

    (

    )

    (

    )

  • 5.0 Extending the Problem PAGE 28

    David Kong – 2203 033

    This result is extremely close to the 72.75%4 predicted by the excel program,

    attesting to the accuracy of both methods. However, our method by hand is

    arguable more useful because it provides the exact value of

    .

    Another benefit of the horizontal line method is how scalable it is. This method can handle a graph of any size because of its wrought formulaic approach. The original ‚point by point‛ method requires an immense amount of thinking on the mathematician’s part and is very difficult to complete for larger grids.

    However, as good as the horizontal line approach is, it is limited by the amount of equations a mathematician can write out. A particle bound by y=20, for example, needs 9 equations with 9 variables, an extremely difficult task. So even the horizontal line approach is not scalable to the degree we want it to be.

    The solution is the automatic generation of equations. The next section will create another excel program but this time, it will output exact answers instead of probabilities based on emperical data.

    4 Refer to data found in Appendix 10.7

  • 6.0 Using Excel for Scalability PAGE 29

    David Kong – 2203 033

    6.0 Using Excel for Scalability In the last section, we solved the particle bound by y=0 and y=8 by finding the values of all of the probabilities of particles travelling horizontally, and then used those numbers in the final calculation of probability. Using a spreadsheet, we will find P(1), P(2), …, P(a-1) values automatically.

    Finding a General Formula

    The beauty of the horizontal line method is its recurring graphical representations.

    Here is a graph we’re used to seeing, but without labels for the y axis. This is simply to show that the particle’s path is the same no matter where the bounds are. Assuming the particle begins y=b, we can write a general formula for P(b):

  • 6.0 Using Excel for Scalability PAGE 30

    David Kong – 2203 033

    Using the step-counting method,

    (6.1)

  • 6.0 Using Excel for Scalability PAGE 31

    David Kong – 2203 033

    We realize that the coefficient is dependant on the distance from y=b (let this offset be denoted as n).

    This table compares the highlighted values

    A quick graph reveals that the relationship is a variation on the absolute value function . Since it was vertically stretched by a factor of 0.5 (as determined by the first differences) and translated up 1.5,

    .

    Offset from y=b, n Exponent, k(n)

    -5 4 -3 3 -0.5 -1 2 -0.5 1 2 3 3 0.5 5 4 0.5

  • 6.0 Using Excel for Scalability PAGE 32

    David Kong – 2203 033

    We can rewrite Equation 6.1 as:

    This can be further simplified into:

    ∑(

    )

    Of course, since the equation never ends, we must eliminate some terms according to the defined bounds. Since the argument (b+n) is always within the bounds of the specified question, ( ). For example P(-1) does not exist and must be eliminated.

    Therefore,5

    ∑ (

    )

    There is one part of the equation that is missing. In our horiontal line equations, we always have a constant. For example, in Equation 5.2, the constant was 0.25.

    This constant is created because there is always a particle path that is ‘successful’ and terminates in the line y=0. The point at which this occurs is directly related with the value of b. The smaller b is, the closer the particle begins to y=0, and the likelihood of success is larger.

    5 The following sigma notation is read: the sum of (

    )

    over all odd integers in

    the specified range ( ).

  • 6.0 Using Excel for Scalability PAGE 33

    David Kong – 2203 033

    The light blue lines on this graph represent possible x axes. When b=3, for example,

    the particle begins 3 units above the x axis, allowing it to go through two junctions

    before terimnating. Therefore, the constant value for b=3 is (

    )

    .

  • 6.0 Using Excel for Scalability PAGE 34

    David Kong – 2203 033

    The constants for other values of b, determined by the graph, are as follows:

    b Constan

    t

    Exponen

    t

    1

    1

    2 (

    )

    2

    3 (

    )

    2

    4 (

    )

    3

    5 (

    )

    3

    6 (

    )

    4

    Expressing the exponent as a function is a little complicated because it resembles a floor/cieling function. Since b increases twice as fast as the exponent, the general formula is

    Where ⌊ ⌋ is the largest integer smaller or equal to x. I.e. ⌊ ⌋ ⌊ ⌋ where x is any real number. In order to determine possible values for , we create a chart:

    b

    1 0.5+ 1

    2 1+ 2

    Using the definition ⌊

    First row Second row

    and

    Since must render both and true, for simplicity. Therefore,

    (

    )⌊ ⌋

  • 6.0 Using Excel for Scalability PAGE 35

    David Kong – 2203 033

    Now we can conclude that

    ∑ (

    )

    (

    )⌊ ⌋

    Using the General Formula

    a and b are parameters when defined creates a system of equations. When a=8,

    b=1,2,3,4,5,6,7. This creates 7 different equations that can be solved.

    We will use a matrix to solve the system because it is the quickest way to do so on

    excel. The previous equation rearranged for a matrix (isolate constants to the right

    side) appears as:

    ∑ (

    )

    (

    )⌊ ⌋

    The matrices (for a=8) will look like:

    (

    )

    (

    )

    (

    )

    We will arbitrarily define the row number as the starting point of the particle. ( ). Everything in Row 1 corresponds with events that occured when the particle began on line y=1.

    The column number refers to the argument (b+n), or where the particle ended up. (j=b+n). Column 2 contains all the coefficients of P(2).

    The entry in Row 1 Column 2 corresponds with the coefficient of the term P(2) of the particle which began at y=1.

  • 6.0 Using Excel for Scalability PAGE 36

    David Kong – 2203 033

    Right Hand Matrix

    Since i=b,

    (

    (

    )⌊

    (

    )⌊

    (

    )⌊

    (

    )⌊

    (

    )⌊

    (

    )⌊

    )

    Coefficient Matrix

    Refering back to the general equation, note that the coefficient of is always one.

    ∑ (

    )

    (

    )⌊ ⌋

    When b=1, will have a coefficient of 1. When b=2, will have a coefficient of 1:

    (

    )

    Also, since b+n=j, we can substitute b=i to create

  • 6.0 Using Excel for Scalability PAGE 37

    David Kong – 2203 033

    Therefore, coefficient may be rewritten

    (

    )

    (

    )

    This coefficient does not appear for every term. Instead it only appears for when n,

    the offset is odd. Therefore, it appears to the left and right of P(b), and then

    appears in every other entry.

    (

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    )

    All the empty entries, when the offset is even, are evidently given a value of 0.

    This creates the scalability we need because this pattern can be expanded to whatever size we need it to be. (This matrix transfered into excel script can be found in appendix 10.5).

    The matrices, for a particle bound by y=8, will look like

    (

    )

    (

    )

    (

    )

  • 6.0 Using Excel for Scalability PAGE 38

    David Kong – 2203 033

    Solving for the variable matrix is simple:

    (

    )

    (

    )

    (

    )

    (

    )

    (

    )

    This matrix method is evidently accurate as values for the first three match those

    we already found

    . is also

    accurate because it is a horizontal line at half, and the final 3 values are simply

    complements to the first three.

  • 6.0 Using Excel for Scalability PAGE 39

    David Kong – 2203 033

    The beauty of this method is how simple it is to expand. For a particle bound by and , excel instantaneously calculates that the coefficient and right hand matrix to be

    (

    )

    (

    )

    (

    )

    Please note how this matrix 9x9 matrix is simply an add-on to the 7x7 matrix seen in the y=8 example.

  • 6.0 Using Excel for Scalability PAGE 40

    David Kong – 2203 033

    Excel then solves the matrix equation, giving

    (

    )

    (

    )

  • 6.0 Using Excel for Scalability PAGE 41

    David Kong – 2203 033

    Again, a graph of the original particle’s path is needed:

    (

    )

    (

    )

    The decimal approximation of 0.707 fits quite well with the predicted 70.6%.6

    6 Refer to data found in Appendix 10.7

  • 6.0 Using Excel for Scalability PAGE 42

    David Kong – 2203 033

    Particle bound by y=0 and y=50

    We end the investigation with a demonstration of scaleability. The excel program creates a 49x49 matrix and outputs values for . (Refer to appendix 10.6.)

    Compared with the empirical value of 0.55587, we can reason that 0.555 is both accurate and the actual value (it has been converted to a decimal because the numerator/denominators were too large).

    7 Refer to data found in Appendix 10.7

  • 7.0 Conclusion PAGE 43

    David Kong – 2203 033

    7.0 Conclusion As such, we find out the probability of a particle travelling randomly between y=0 and y=50, in less than a minute, when at the beginning of the investigation, it took dedication of time and thinking to produce even a particle travelling between y=0 and y=6.

    And to highlight the gravity of , I illustrate a few of the possible paths of such a particle using a few graphs:

  • 7.0 Conclusion PAGE 44

    David Kong – 2203 033

    It is fulfilling to be able to predict the outcome of a particle’s path as diverse, random and interesting as those seen above.

  • 7.0 Conclusion PAGE 45

    David Kong – 2203 033

    In this investigation, we began with finding the probability that a particle randomly

    travelling between and will hit the lower bound before hitting the upper

    bound to be

    . We extended the problem to find the same probability for a particle

    between and . This was

    . We also developed an excel program that

    runs a set number of trials to find the empirical probability of a particle bound by

    any two lines, as well as a method known as the ‚horizontal line method‛. This

    horizontal line method uses a system of equations to quickly arrive at an answer

    which would have taken much longer using the step-by-step approach that was

    primarily adopted. This horizontal line method is limited by the number of

    equations one would like to solve by hand. With technology, our second excel

    program could find the exact probability of a particle bound by any two lines,

    including the probability of hitting y=50 before y=0 (0.555).

    However, our current method has a heavy reliance on technology. In the future, I’d

    like to explore to find perhaps an even more direct method of attaining the answer.

  • 8.0 Works Cited PAGE 46

    David Kong – 2203 033

    8.0 Works Cited "USA Mathematical Talent Search Round 4 Problems Year 20 — Academic Year 2008–

    2009." USA Mathematical Talent Search. March 9, 2009. 7 Sep 2009 .

    9.0 Acknowledgements I would like to thank websites like www.mrexcel.com for excellent instructions for all

    of the formulas I have never used before. Creating the excel programs was extremely

    enjoyable. Finally, I’d like to thank my extended essay mentor, Mr. De Bruyn for

    digesting all the formulas and theorems in my essay. All the math teachers I

    approached directed me to him because as they proclaimed, ‚his mind works in

    wondrous ways.‛

  • 10.0 Appendices PAGE 47

    David Kong – 2203 033

    10.0 Appendices

    10.1 Excel Program for Mapping Particles

    A B C D

    1 Step x y Movement

    2

    0 4 Down

    3 1 0 3

    =IF(RANDBETWEEN(0,1)=1,"Left","Right")

    4

    2

    =IF(D4="Left",IF((B3-B2)=0,-(C3-C2),0)+IF((B3-B2)=(C3-C2),0,0)+IF((C3-C2)=0,(B3-B2),0)+IF((B3-B2)=-(C3-C2),(B3-B2),0)+B3, IF((B3-B2)=0,(C3-C2),0)+IF((B3-B2)=(C3-C2),(B3-B2),0)+IF((C3-C2)=0,(B3-B2),0)+IF((B3-B2)=-(C3-C2),0,0)+B3)

    =IF(D4="Left", IF((C3-C2)=0, (B3-B2),0)+IF((B3-B2)=0,(C3-C2),0)+IF((B3-B2)=(C3-C2), (C3-C2),0)+IF((C3-C2)=-(B3-B2), 0,0)+C3, IF((C3-C2)=0, -(B3-B2),0)+IF((B3-B2)=0,(C3-C2),0)+IF((B3-B2)=(C3-C2),0,0)+IF((C3-C2)=-(B3-B2), (C3-C2),0)+C3)

    =IF(RANDBETWEEN(0,1)=1,"Left","Right")

    5

    3

    =IF(D5="Left",IF((B4-B3)=0,-(C4-C3),0)+IF((B4-B3)=(C4-C3),0,0)+IF((C4-C3)=0,(B4-B3),0)+IF((B4-B3)=-(C4-C3),(B4-B3),0)+B4, IF((B4-B3)=0,(C4-C3),0)+IF((B4-B3)=(C4-C3),(B4-B3),0)+IF((C4-C3)=0,(B4-B3),0)+IF((B4-B3)=-(C4-C3),0,0)+B4)

    =IF(D5="Left", IF((C4-C3)=0, (B4-B3),0)+IF((B4-B3)=0,(C4-C3),0)+IF((B4-B3)=(C4-C3), (C4-C3),0)+IF((C4-C3)=-(B4-B3), 0,0)+C4, IF((C4-C3)=0, -(B4-B3),0)+IF((B4-B3)=0,(C4-C3),0)+IF((B4-B3)=(C4-C3),0,0)+IF((C4-C3)=-(B4-B3), (C4-C3),0)+C4)

    =IF(RANDBETWEEN(0,1)=1,"Left","Right")

    6

    4

    =IF(D6="Left",IF((B5-B4)=0,-(C5-C4),0)+IF((B5-B4)=(C5-C4),0,0)+IF((C5-C4)=0,(B5-B4),0)+IF((B5-B4)=-(C5-C4),(B5-B4),0)+B5, IF((B5-B4)=0,(C5-C4),0)+IF((B5-B4)=(C5-C4),(B5-B4),0)+IF((C5-C4)=0,(B5-B4),0)+IF((B5-B4)=-(C5-C4),0,0)+B5)

    =IF(D6="Left", IF((C5-C4)=0, (B5-B4),0)+IF((B5-B4)=0,(C5-C4),0)+IF((B5-B4)=(C5-C4), (C5-C4),0)+IF((C5-C4)=-(B5-B4), 0,0)+C5, IF((C5-C4)=0, -(B5-B4),0)+IF((B5-B4)=0,(C5-C4),0)+IF((B5-B4)=(C5-C4),0,0)+IF((C5-C4)=-(B5-B4), (C5-C4),0)+C5)

    =IF(RANDBETWEEN(0,1)=1,"Left","Right")

    Seen here is a truncated table used to produce a random path of the particle. While this only shows four steps, our program regularly has over 500.

  • 10.0 Appendices PAGE 48

    David Kong – 2203 033

    10.2 Excel Program for Mapping Particles (2)

    First x value for y= upper bound =MATCH(F2,C:C,0)

    First x value for y= lower bound =MATCH(F3,C:C,0)

    Where does particle reach first? =IF(F9

  • 10.0 Appendices PAGE 49

    David Kong – 2203 033

    10.5 Coefficient Matrix and Right Hand Matrix

    F I J K

    1 1 2 3

    2 1 =IF(I$1=$F2,1,0)+IF(MOD(I$1-$F2,2)=1,-1/2^(((ABS(I$1-$F2))+3)/2),0)

    =IF(J$1=$F2,1,0)+IF(MOD(J$1-$F2,2)=1,-1/2^(((ABS(J$1-$F2))+3)/2),0)

    =IF(K$1=$F2,1,0)+IF(MOD(K$1-$F2,2)=1,-1/2^(((ABS(K$1-$F2))+3)/2),0)

    3 2 =IF(I$1=$F3,1,0)+IF(MOD(I$1-$F3,2)=1,-1/2^(((ABS(I$1-$F3))+3)/2),0)

    =IF(J$1=$F3,1,0)+IF(MOD(J$1-$F3,2)=1,-1/2^(((ABS(J$1-$F3))+3)/2),0)

    =IF(K$1=$F3,1,0)+IF(MOD(K$1-$F3,2)=1,-1/2^(((ABS(K$1-$F3))+3)/2),0)

    4 3 =IF(I$1=$F4,1,0)+IF(MOD(I$1-$F4,2)=1,-1/2^(((ABS(I$1-$F4))+3)/2),0)

    =IF(J$1=$F4,1,0)+IF(MOD(J$1-$F4,2)=1,-1/2^(((ABS(J$1-$F4))+3)/2),0)

    =IF(K$1=$F4,1,0)+IF(MOD(K$1-$F4,2)=1,-1/2^(((ABS(K$1-$F4))+3)/2),0)

    A translation to excel of the co-efficient matrix shown in the body of the essay.

    C D

    1 X

    2 1 =0.5^(FLOOR(F2/2+1,1))

    3 2 =0.5^(FLOOR(F3/2+1,1))

    4 3 =0.5^(FLOOR(F4/2+1,1))

    Right Hand Matrix

  • 10.0 Appendices PAGE 50

    David Kong – 2203 033

    10.6 Particle Bound by y=50, Horizontal Line Probabilities

    =

    1 16/17

    2 865/942

    3 158/175

    4 731/828

    5 567/655

    6 779/920

    7 712/859

    8 594/733

    9 225/284

    10 599/774

    11 365/483

    12 629/853

    13 443/616

    14 239/341

    15 499/731

    16 192/289

    17 555/859

    18 415/661

    19 573/940

    20 0.591312

    21 0.57305

    22 0.554787

    23 0.536525

    24 0.518262

    25 0.5

    26 0.481738

    27 0.463475

    28 0.445213

    29 0.42695

    30 0.408688

    31 0.390426

    32 0.372164

    33 0.3539

  • 10.0 Appendices PAGE 51

    David Kong – 2203 033

    34 0.335641

    35 0.317374

    36 0.299119

    37 0.280844

    38 0.262602

    39 0.244306

    40 0.226099

    41 0.207747

    42 0.189631

    43 0.171128

    44 0.153261

    45 0.134351

    46 0.117151

    47 0.097146

    48 0.081742

    49 0.058791

    Note that fractions greater than 3digits/3digits are represented as decimals

  • 10.0 Appendices PAGE 52

    David Kong – 2203 033

    10.7 Empirical Probabilities

    Upper bound y= % of success Trials

    4 81.72 65000

    6 79.12 65000

    8 72.75 50000

    10 70.6 50000

    12 67 10000

    14 66.6 1000

    16 65.39 1000

    18 64.33 1000

    20 61.2 1000

    24 61 1000

    30 57.96 1000

    40 56.1 1000

    50 55.58 3341