Ghost Leg
   HOME

TheInfoList



OR:

Ghost Leg (), known in Japan as or in Korea as Sadaritagi (사다리타기, literally "ladder climbing"), is a method of lottery designed to create random pairings between two sets of any number of things, as long as the number of elements in each set is the same. This is often used to distribute things among people, where the number of things distributed is the same as the number of people. For instance, chores or prizes could be assigned fairly and randomly this way. It consists of vertical lines with horizontal lines connecting two adjacent vertical lines scattered randomly along their length; the horizontal lines are called "legs". The number of vertical lines equals the number of people playing, and at the bottom of each line there is an item - a thing that will be paired with a player. The general rule for playing this game is: choose a line on the top, and follow this line downwards. When a horizontal line is encountered, follow it to get to another vertical line and continue downwards. Repeat this procedure until reaching the end of the vertical line. Then the player is given the thing written at the bottom of the line. If the elements written above the Ghost Leg are treated as a
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is calle ...
, and after the Ghost Leg is used, the same elements are written at the bottom, then the starting
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is calle ...
has been transformed to another
permutation In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or proc ...
. Hence, Ghost Leg can be treated as a kind of permuting operator.


Process

As an example, consider assigning roles in a play to actors. # To start with, the two sets are enumerated horizontally across a board. The actors' names would go on top, and the roles on the bottom. Then, vertical lines are drawn connecting each actor with the role directly below it. # The names of the actors and/or roles are then concealed so that people do not know which actor is on which line, or which role is on which line. # Next, each actor adds a leg to the board. Each leg must connect two adjacent vertical lines, and must not touch any other horizontal line. # Once this is done, a path is traced from top of each vertical line to the bottom. As you follow the line down, if you come across a leg, you must follow it to the adjacent vertical line on the left or right, then resume tracing down. You continue until you reach the bottom of a vertical line, and the top item you started from is now paired with the bottom item you ended on. Another process involves creating the ladder beforehand, then concealing it. Then people take turns choosing a path to start from at the top. If no part of the amidakuji is concealed, then it is possible to fix the system so that you are guaranteed to get a certain pairing, thus defeating the idea of random chance.


Mathematics

Part of the appeal for this game is that, unlike random chance games like
rock, paper, scissors Rock paper scissors (also known by other orderings of the three items, with "rock" sometimes being called "stone," or as Rochambeau, roshambo, or ro-sham-bo) is a hand game originating in China, usually played between two people, in which each p ...
, amidakuji will always create a 1:1 correspondence, and can handle arbitrary numbers of pairings. It is guaranteed that two items at the top will never have the same corresponding item at the bottom, nor will any item on the bottom ever lack a corresponding item at the top. It also works regardless of how many horizontal lines are added. Each person could add one, two, three, or any number of lines, and the 1:1 correspondence would remain. One way of realizing how this works is to consider the analogy of coins in cups. You have ''n'' coins in ''n'' cups, representing the items at the bottom of the amidakuji. Then, each leg that is added represents swapping the position of two adjacent cups. Thus, it is obvious that in the end there will still be ''n'' cups, and each cup will have one coin, regardless of how many swaps you perform.


Properties


Permutation

A Ghost Leg transforms an input sequence into an output sequence with the same number of elements with (possibly) different order. Thus, it can be regarded a permutation of ''n'' symbols, where ''n'' is the number of vertical lines in the Ghost Leg.,Ho 2012, p.31 hence it can be represented by the corresponding
permutation matrix In mathematics, particularly in matrix theory, a permutation matrix is a square binary matrix that has exactly one entry of 1 in each row and each column and 0s elsewhere. Each such matrix, say , represents a permutation of elements and, when ...
.


Periodicity

Applying a Ghost Leg a finite number of times to an input sequence eventually generates an output sequence identical to the original input sequence. I.e., if M is a matrix representing a particular Ghost Leg, then for some finite ''n''.


Reversibility

For any Ghost Leg with matrix representation M, there exists a Ghost Leg with representation M−1, such that


Odd/Even property of permutation

As each leg exchanges the two neighboring elements at its ends, the number of legs indicates the odd/even permutation property of the Ghost Leg. An odd number of legs represents an odd permutation, and an even number of legs gives an even permutation.


Infinite Ghost Legs with same permutation

It is possible to express every permutation as a Ghost Leg, but the expression is not one-to-one, i.e. a particular permutation does not correspond to a unique Ghost Leg. An infinite number of Ghost Legs represents the same permutation.


Prime

As there are an infinite number of Ghost Legs representing a particular permutation, it is obvious those Ghost Legs have a kind of equivalence. Among those equivalent Ghost Legs, the one(ones) which have smallest number of legs are called Prime.


Bubble sort and highest simplicity

A Ghost Leg can be constructed arbitrarily, but such a Ghost Leg is not necessarily prime. It can be proven that only those Ghost Legs constructed by
bubble sort Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the input list element by element, comparing the current element with the one after it, swapping their values if needed. These passes ...
contains the fewest legs, and hence is prime. This is equivalent to saying that bubble sort performs the minimum number of adjacent exchanges to sort a sequence.


Maximum number of legs of prime

For a permutation with ''n'' elements, the maximum number of neighbor exchanging = \frac In the same way, the maximum number of legs in a prime with ''n'' tracks = \frac


Bubblization

For an arbitrary Ghost Leg, it is possible to transform it into prime by a procedure called bubblization. When bubblization operates, the following two identities are repeatedly applied in order to move and eliminate "useless" legs. # ⇒ # ⇒ When the two identities cannot be applied any more, the ghost leg is proven to be exactly the same as the Ghost Leg constructed by
bubble sort Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the input list element by element, comparing the current element with the one after it, swapping their values if needed. These passes ...
, thus bubblization can reduce Ghost Legs to primes.


Randomness

Since, as mentioned above, an odd number of legs produces an
odd permutation In mathematics, when ''X'' is a finite set with at least two elements, the permutations of ''X'' (i.e. the bijective functions from ''X'' to ''X'') fall into two classes of equal size: the even permutations and the odd permutations. If any total or ...
and an even number of legs produces an even permutation, a given number of legs can produce a maximum of half the total possible permutations (less than half if the number of legs is small relative to the number of tracks, reaching half as the number of legs increases beyond a certain critical number). If the legs are drawn randomly (for reasonable definitions of "drawn randomly"), the evenness of the distribution of permutations increases with the number of legs. If the number of legs is small relative to number of tracks, the probabilities of different attainable permutations may vary greatly; for large numbers of legs the probabilities of different attainable permutations approach equality.


In popular culture

The 1981 arcade game ''
Amidar ''Amidar'' is a video game developed by Konami and released in arcades in 1981 by Stern. The format is similar to that of ''Pac-Man'': the player moves around a fixed rectilinear lattice, attempting to visit each location on the board while a ...
'', programmed by
Konami , is a Japanese Multinational corporation, multinational video game company, video game and entertainment company headquartered in Chūō, Tokyo, Chūō, Tokyo, it also produces and distributes trading cards, anime, tokusatsu, pachinko machin ...
and published by
Stern The stern is the back or aft-most part of a ship or boat, technically defined as the area built up over the sternpost, extending upwards from the counter rail to the taffrail. The stern lies opposite the bow, the foremost part of a ship. Ori ...
, uses the same lattice as a maze. The game took its name from Amidakuji. and most of the enemy movement conformed to the game's rules. An early
Sega Master System The is an 8-bit third-generation home video game console manufactured by Sega. It was originally a remodeled export version of the Sega Mark III, the third iteration of the SG-1000 series of consoles, which was released in Japan in 1985 and ...
game called ''
Psycho Fox ''Psycho Fox'' is a platform video game published by Sega for the Master System. In Brazil, Tectoy released the game as (translated as "Xulé Frog: Invaders of the Swamp"), in which Psycho Fox and his friends were replaced by Sapo Xulé (a Brazil ...
'' uses the mechanics of an Amidakuji board as a means to bet a bag of coins on a chance at a prize at the top of the screen. Later
Sega Genesis The Sega Genesis, known as the outside North America, is a 16-bit Fourth generation of video game consoles, fourth generation home video game console developed and sold by Sega. It was Sega's third console and the successor to the Master Syst ...
games based on the same game concept
DecapAttack ''Decap Attack'' is a 1991 platform game developed by Vic Tokai and published by Sega for the Genesis. The game is a westernized version of the 1990 Japanese Mega Drive game '' Magical Hat no Buttobi Tābo! Daibōken'', with the art, plot, music, a ...
and its Japanese predecessor "Magical Hat no Buttobi Tabo! Daibōken" follow the same game mechanics, including the Amidakuji bonus levels. '' Super Mario Land 2: 6 Golden Coins'' features an Amidakuji-style bonus game that rewards the player with a power-up. ''
New Super Mario Bros. is a platform video game developed and published by Nintendo for the Nintendo DS. It was first released in May 2006 in North America and Japan, and in PAL regions on June 2006. It is the first installment in the '' New Super Mario Bros.'' sub ...
'' and '' Wario: Master of Disguise'' feature an Amidakuji-style minigame in which the player uses the
stylus A stylus (plural styli or styluses) is a writing utensil or a small tool for some other form of marking or shaping, for example, in pottery. It can also be a computer accessory that is used to assist in navigating or providing more precision w ...
to trace lines that will lead the character down the right path. In ''
Mario Party is a party video game series featuring characters from the ''Mario (franchise), Mario'' franchise in which up to four local players or computer-controlled characters (called "CPU (gaming), CPUs") compete in a board game interspersed with mi ...
'' there is a mini game where one of the four players pours money into an Amidakuji made out of pipes. The goal is to try to choose the path leading to the character controlled by the player. The BoSpider in ''
Mega Man X is a series of action platform video games released by Capcom. It is a sub-series of the ''Mega Man'' franchise. The first game was released on December 17, 1993 in Japan (January 1994 in North America) on the Super NES/Super Famicom; most of ...
'' and '' Maverick Hunter X'' descends onto the player via an Amidakuji path. In ''
Mega Man Zero 3 ''Mega Man Zero 3'' is a video game developed by Inti Creates and published by Capcom for the Game Boy Advance (GBA) handheld game console. It is the third video game in the ''Mega Man Zero'' series of '' Mega Man'' video games. The European versio ...
'', an Amidakuji-like mini game can be unlocked, requiring the player to guide five colored jewels to the right colored beaker. In ''
Super Monkey Ball 2 is a platform party video game developed by Amusement Vision and published by Sega in 2002 for the GameCube. It is the second installment in the ''Super Monkey Ball'' series, and the first installment to have a storyline and to be exclusively r ...
'', there is a level in the Advanced-Extra difficulty named "Amida Lot" (Advanced-EX 7) that features a floor resembling an Amidakuji board, which bumper travels around the way and may knock off the player if they happen to hit them. The goal only travels through one of the vertical lines and the player must reach the goal using the ghost legs while avoiding the bumpers to not fall out. In ''
Digimon World is a video game by Bandai on the PlayStation, released in 1999, about the Digimon virtual pets. It was followed by various sequels released for the PlayStation and other platforms. The story focuses on a human brought to File City on File Islan ...
'' the player must travel through the Amida Forest, the Forest being a Amidakuji. Travelling the correct paths will eventually see them recruit Centarumon. Travelling the incorrect paths however will cause their Digimon damage (multiple times for each wrong path taken). In '' WarioWare, Inc.: Mega Microgames!'', the microgame "Noodle Cup" features Amidakuji-style gameplay. Azalea Gym in ''Pokémon HeartGold'' and ''SoulSilver'' was redesigned with an Amidakuji-based system of carts to cross. The correct choices lead to the gym leader; the wrong ones lead to other trainers to fight. ''
Phantasy Star Online 2 is a free-to-play online action role-playing game in the ''Phantasy Star'' series, developed and published by Sega. It was created as a successor to '' Phantasy Star Online'' and ''Phantasy Star Universe'', ''Phantasy Star Online 2'' features ...
'' uses the principle of Amidakuji for a randomly appearing bomb-defusing minigame. One must trace an Amidakuji path around each bomb to determine which button defuses it; incorrect selections knock players away for a few seconds, wasting time. In the manga ''
Liar Game ''Liar Game'' (stylized as ''LIAR GAME'') is a Japanese manga series written and illustrated by Shinobu Kaitani. It was serialized in Shueisha's ''seinen'' manga magazine ''Weekly Young Jump'' from February 2005 to January 2015. It was adap ...
'' (vol 17), an Amidakuji is used for determinate the rank of each participant to the penultimate stage of the game. In the Japanese drama ''
Don Quixote is a Spanish epic novel by Miguel de Cervantes. Originally published in two parts, in 1605 and 1615, its full title is ''The Ingenious Gentleman Don Quixote of La Mancha'' or, in Spanish, (changing in Part 2 to ). A founding work of Wester ...
'' (episode 10), the character Shirota (
Shota Matsuda is a Japanese actor. Matsuda is best known for his roles in the ''Hana Yori Dango'' series, the ''Liar Game'' series, and '' Love Shuffle''. Personal life Matsuda was born on September 10, 1985 in Suginami, Tokyo, Japan, to Yūsaku Matsuda, a ...
) uses Amidakuji to help decide between candidate families for an adoption. In '' Raging Loop'', a "ghost leg lottery" is described as an analogy for the selection of roles across a village for a ceremony that is central to the game's plot.


Notes


External links

* https://web.archive.org/web/20091023070628/http://geocities.com/Athens/Acropolis/7247/amidakuji.html
Ladders: A Research Paper by David Senft
(PDF) * Man-Kit Ho, Hoi-Kwan Lau, Ting-Fai Man, Shek Yeung (2012). "Ghost Leg", ''Hang Lung Mathematics Awards Collection of Winning Papers, 2004''. International Press. {{ISBN, 978-1-57146-254-1. Mathematical games Permutations Japanese games Amitābha Buddha