File:Drunkard’s walk.svg

From formulasearchengine
Jump to navigation Jump to search
Original file (SVG file, nominally 598 × 97 pixels, file size: 16 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: The absorbing Markov chain for the drunkard's walk (a type of random walk) on the real line starting at 0 with a range of two in both directions.
Date
Source Own work
Author Bender2k14
SVG development
InfoField
 The SVG code is valid.
V
 This vector image was created with PGF/TikZ.

Licensing

Bender2k14, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Attribution:
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Source code

Created in LaTeX by the following code:

\documentclass{article}
\thispagestyle{empty}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
 \begin{tikzpicture}[scale=1.5, transform shape, >=stealth, node distance=2cm, very thick]
  \tikzstyle{nodeStyle} = [draw,fill,shape=circle, ,circle,inner sep=0pt,minimum size=4pt]
   \node[nodeStyle] (0)              {};
   \node[nodeStyle] (1) [right of=0] {};
   \node[nodeStyle] (2) [right of=1] {};
   \node[nodeStyle] (3) [right of=2] {};
   \node[nodeStyle] (4) [right of=3] {};
   \node[below] at (0.south) {$-2$\ \ \ };
   \node[below] at (1.south) {$-1$\ \ \ };
   \node[below] at (2.south) {$0$};
   \node[below] at (3.south) {$1$};
   \node[below] at (4.south) {$2$};
   \path (0) edge [->, out=215, in=145, min distance=2cm] node[left] {1} (0)
         (1) edge [->, bend left] node[above] {$\frac{1}{2}$} (2)
         (1) edge [->, bend left] node[below] {$\frac{1}{2}$} (0)
         (2) edge [->, bend left] node[below] {$\frac{1}{2}$} (1)
         (2) edge [->, bend left] node[above] {$\frac{1}{2}$} (3)
         (3) edge [->, bend left] node[below] {$\frac{1}{2}$} (2)
         (3) edge [->, bend left] node[above] {$\frac{1}{2}$} (4)
         (4) edge [->, out=35, in=-35, min distance=2cm] node[right] {1} (4)
         (0) edge [-, thin] (1)
         (1) edge [-, thin] (2)
         (2) edge [-, thin] (3)
         (3) edge [-, thin] (4);
 \end{tikzpicture}
\end{document}

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

31 October 2011

16,079 byte

image/svg+xml

541df13c76025ed4ca151d7ab992d2aaf637a0f6

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:31, 31 October 2011Thumbnail for version as of 20:31, 31 October 2011598 × 97 (16 KB)wikimediacommons>Bender2k14Cropping done manually in the raw SVG based on Inkscape's crop.

There are no pages that use this file.