首页 > 最新文献

Fun with Algorithms最新文献

英文 中文
Making Change in 2048 在2048年做出改变
Pub Date : 2018-04-01 DOI: 10.4230/LIPIcs.FUN.2018.21
D. Eppstein
The 2048 game involves tiles labeled with powers of two that can be merged to form bigger powers of two; variants of the same puzzle involve similar merges of other tile values. We analyze the maximum score achievable in these games by proving a min-max theorem equating this maximum score (in an abstract generalized variation of 2048 that allows all the moves of the original game) with the minimum value that causes a greedy change-making algorithm to use a given number of coins. A widely-followed strategy in 2048 maintains tiles that represent the move number in binary notation, and a similar strategy in the Fibonacci number variant of the game (987) maintains the Zeckendorf representation of the move number as a sum of the fewest possible Fibonacci numbers; our analysis shows that the ability to follow these strategies is intimately connected with the fact that greedy change-making is optimal for binary and Fibonacci coinage. For variants of 2048 using tile values for which greedy change-making is suboptimal, it is the greedy strategy, not the optimal representation as sums of tile values, that controls the length of the game. In particular, the game will always terminate whenever the sequence of allowable tile values has arbitrarily large gaps between consecutive values.
《2048》的游戏包含标有2次幂的贴图,它们可以合并成更大的2次幂;相同谜题的变体包含其他贴图值的类似合并。我们通过证明最小-最大定理来分析这些游戏中可实现的最大分数(在2048的抽象广义变体中,允许原始游戏的所有移动)与导致贪婪改变算法使用给定数量的硬币的最小值相等。在《2048》中,一种被广泛采用的策略是用二进制符号来表示移动数,而在游戏的斐波那契数变体(987)中,一种类似的策略是将移动数的Zeckendorf表示维持为最少可能的斐波那契数的总和;我们的分析表明,遵循这些策略的能力与贪婪的变化是二进制和斐波那契造币的最佳选择这一事实密切相关。对于使用贴图值的《2048》变体来说,贪婪的改变是次优的,控制游戏长度的是贪婪策略,而不是贴图值总和的最优表示。特别是,当允许的贴图值序列在连续值之间有任意大的间隙时,游戏总是会终止。
{"title":"Making Change in 2048","authors":"D. Eppstein","doi":"10.4230/LIPIcs.FUN.2018.21","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2018.21","url":null,"abstract":"The 2048 game involves tiles labeled with powers of two that can be merged to form bigger powers of two; variants of the same puzzle involve similar merges of other tile values. We analyze the maximum score achievable in these games by proving a min-max theorem equating this maximum score (in an abstract generalized variation of 2048 that allows all the moves of the original game) with the minimum value that causes a greedy change-making algorithm to use a given number of coins. A widely-followed strategy in 2048 maintains tiles that represent the move number in binary notation, and a similar strategy in the Fibonacci number variant of the game (987) maintains the Zeckendorf representation of the move number as a sum of the fewest possible Fibonacci numbers; our analysis shows that the ability to follow these strategies is intimately connected with the fact that greedy change-making is optimal for binary and Fibonacci coinage. For variants of 2048 using tile values for which greedy change-making is suboptimal, it is the greedy strategy, not the optimal representation as sums of tile values, that controls the length of the game. In particular, the game will always terminate whenever the sequence of allowable tile values has arbitrarily large gaps between consecutive values.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"11 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2018-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130161431","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 3
Computational Complexity of Generalized Push Fight 广义推斗的计算复杂度
Pub Date : 2018-03-01 DOI: 10.4230/LIPIcs.FUN.2018.11
Jeffrey Bosboom, E. Demaine, Mikhail Rudoy
We analyze the computational complexity of optimally playing the two-player board game Push Fight, generalized to an arbitrary board and number of pieces. We prove that the game is PSPACE-hard to decide who will win from a given position, even for simple (almost rectangular) hole-free boards. We also analyze the mate-in-1 problem: can the player win in a single turn? One turn in Push Fight consists of up to two "moves" followed by a mandatory "push". With these rules, or generalizing the number of allowed moves to any constant, we show mate-in-1 can be solved in polynomial time. If, however, the number of moves per turn is part of the input, the problem becomes NP-complete. On the other hand, without any limit on the number of moves per turn, the problem becomes polynomially solvable again.
我们分析了最优玩双人棋盘游戏Push Fight的计算复杂性,将其推广到任意棋盘和棋子数量。我们证明游戏PSPACE-hard决定谁将赢得从一个给定的位置,即使是简单的(几乎矩形)芳香族溶剂。我们还分析了配对问题:玩家能否在一个回合中获胜?在《推斗》中,一个回合包含两个“移动”,然后是一个强制性的“推”。有了这些规则,或者将允许的移动次数推广到任何常数,我们证明了mate-in-1可以在多项式时间内解决。然而,如果每回合的移动次数是输入的一部分,那么问题就变成了np完备。另一方面,如果不限制每回合的移动次数,问题又会变成多项式可解。
{"title":"Computational Complexity of Generalized Push Fight","authors":"Jeffrey Bosboom, E. Demaine, Mikhail Rudoy","doi":"10.4230/LIPIcs.FUN.2018.11","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2018.11","url":null,"abstract":"We analyze the computational complexity of optimally playing the two-player board game Push Fight, generalized to an arbitrary board and number of pieces. We prove that the game is PSPACE-hard to decide who will win from a given position, even for simple (almost rectangular) hole-free boards. We also analyze the mate-in-1 problem: can the player win in a single turn? One turn in Push Fight consists of up to two \"moves\" followed by a mandatory \"push\". With these rules, or generalizing the number of allowed moves to any constant, we show mate-in-1 can be solved in polynomial time. If, however, the number of moves per turn is part of the input, the problem becomes NP-complete. On the other hand, without any limit on the number of moves per turn, the problem becomes polynomially solvable again.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"14 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2018-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117148852","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Analyzing and Comparing On-Line News Sources via (Two-Layer) Incremental Clustering 基于(两层)增量聚类的在线新闻源分析与比较
Pub Date : 2016-06-08 DOI: 10.4230/LIPIcs.FUN.2016.9
Francesco Cambi, P. Crescenzi, L. Pagli
In this paper, we analyse the contents of the web site of two Italian news agencies and of four of the most popular Italian newspapers, in order to answer questions such as what are the most relevant news, what is the average life of news, and how much different are different sites. To this aim, we have developed a web-based application which hourly collects the articles in the main column of the six web sites, implements an incremental clustering algorithm for grouping the articles into news, and finally allows the user to see the answer to the above questions. We have also designed and implemented a two-layer modification of the incremental clustering algorithm and executed some preliminary experimental evaluation of this modification: it turns out that the two-layer clustering is extremely efficient in terms of time performances, and it has quite good performances in terms of precision and recall.
在本文中,我们分析了两家意大利新闻机构和四家最受欢迎的意大利报纸的网站内容,以回答诸如什么是最相关的新闻,新闻的平均寿命是什么,以及不同网站的差异有多大等问题。为此,我们开发了一个基于web的应用程序,该应用程序每小时收集六个网站主栏中的文章,并实现增量聚类算法将文章分组为新闻,最后让用户看到上述问题的答案。我们还设计并实现了增量聚类算法的两层修改,并对该修改进行了一些初步的实验评估:结果表明,两层聚类在时间性能上是非常高效的,在精度和召回率方面也有相当好的性能。
{"title":"Analyzing and Comparing On-Line News Sources via (Two-Layer) Incremental Clustering","authors":"Francesco Cambi, P. Crescenzi, L. Pagli","doi":"10.4230/LIPIcs.FUN.2016.9","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2016.9","url":null,"abstract":"In this paper, we analyse the contents of the web site of two Italian news agencies and of four \u0000of the most popular Italian newspapers, in order to answer questions such as what are the most \u0000relevant news, what is the average life of news, and how much different are different sites. To this \u0000aim, we have developed a web-based application which hourly collects the articles in the main \u0000column of the six web sites, implements an incremental clustering algorithm for grouping the \u0000articles into news, and finally allows the user to see the answer to the above questions. We have \u0000also designed and implemented a two-layer modification of the incremental clustering algorithm \u0000and executed some preliminary experimental evaluation of this modification: it turns out that \u0000the two-layer clustering is extremely efficient in terms of time performances, and it has quite \u0000good performances in terms of precision and recall.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"271 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-06-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116056195","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 2
Building a Better Mouse Maze 建立一个更好的老鼠迷宫
Pub Date : 2016-06-08 DOI: 10.4230/LIPIcs.FUN.2016.15
J. Enright, John D. Faben
Mouse Maze is a Flash game about Squeaky, a mouse who has to navigate a subset of the grid using a simple deterministic rule, which naturally generalises to a game on arbitrary graphs with some interesting chaotic dynamics. We present the results of some evolutionary algorithms which generate graphs which effectively trap Squeaky in the maze for long periods of time, and some theoretical results on how long he can be trapped. We then discuss what would happen to Squeaky if he couldn't count, and present some open problems in the area.
《Mouse Maze》是一款关于Squeaky的Flash游戏,这是一只老鼠,它必须使用简单的确定性规则在网格子集中导航,这自然会推广到带有一些有趣的混乱动态的任意图形的游戏中。我们展示了一些进化算法的结果,这些算法生成的图形有效地将Squeaky困在迷宫中很长一段时间,以及一些关于他可以被困多长时间的理论结果。然后我们讨论如果吱吱不会数数会发生什么,并提出了该领域的一些开放问题。
{"title":"Building a Better Mouse Maze","authors":"J. Enright, John D. Faben","doi":"10.4230/LIPIcs.FUN.2016.15","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2016.15","url":null,"abstract":"Mouse Maze is a Flash game about Squeaky, a mouse who has to navigate a subset of the grid using a simple deterministic rule, which naturally generalises to a game on arbitrary graphs with some interesting chaotic dynamics. We present the results of some evolutionary algorithms which generate graphs which effectively trap Squeaky in the maze for long periods of time, and some theoretical results on how long he can be trapped. We then discuss what would happen to Squeaky if he couldn't count, and present some open problems in the area.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"19 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-06-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115287622","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
The Fewest Clues Problem 最少线索问题
Pub Date : 2016-06-01 DOI: 10.4230/LIPIcs.FUN.2016.12
E. Demaine, Fermi Ma, Ariel Schvartzman, Erik Waingarten, S. Aaronson
When analyzing the computational complexity of well-known puzzles, most papers consider the algorithmic challenge of solving a given instance of (a generalized form of) the puzzle. We take a different approach by analyzing the computational complexity of designing a "good" puzzle. We assume a puzzle maker designs part of an instance, but before publishing it, wants to ensure that the puzzle has a unique solution. Given a puzzle, we introduce the FCP (fewest clues problem) version of the problem: Given an instance to a puzzle, what is the minimum number of clues we must add in order to make the instance uniquely solvable? We analyze this question for the Nikoli puzzles Sudoku, Shakashaka, and Akari. Solving these puzzles is NP-complete, and we show their FCP versions are Sigma_2^P-complete. Along the way, we show that the FCP versions of 3SAT, 1-in-3SAT, Triangle Partition, Planar 3SAT, and Latin Square are all Sigma_2^P-complete. We show that even problems in P have difficult FCP versions, sometimes even Sigma_2^P-complete, though "closed under cluing" problems are in the (presumably) smaller class NP; for example, FCP 2SAT is NP-complete.
在分析众所周知的谜题的计算复杂性时,大多数论文考虑的是解决谜题的给定实例(广义形式)的算法挑战。我们通过分析设计一个“好”谜题的计算复杂性采取了不同的方法。我们假设谜题制作者设计了一个实例的一部分,但在发布它之前,他希望确保谜题有一个独特的解决方案。给定一个谜题,我们引入这个问题的FCP(最少线索问题)版本:给定一个谜题实例,为了使该实例唯一可解,我们必须添加的最少线索数量是多少?我们以数独、Shakashaka和Akari为例来分析这个问题。求解这些谜题是np完全的,我们证明了它们的FCP版本是Sigma_2^ p完全的。在此过程中,我们证明了3SAT、1-in-3SAT、三角分割、平面3SAT和拉丁正方形的FCP版本都是Sigma_2^ p完备的。我们证明了P中的偶数问题有困难的FCP版本,有时甚至是Sigma_2^P完全,尽管“在线索下封闭”的问题是在(大概)较小的NP类中;例如,FCP 2SAT是np完全的。
{"title":"The Fewest Clues Problem","authors":"E. Demaine, Fermi Ma, Ariel Schvartzman, Erik Waingarten, S. Aaronson","doi":"10.4230/LIPIcs.FUN.2016.12","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2016.12","url":null,"abstract":"When analyzing the computational complexity of well-known puzzles, most papers consider the algorithmic challenge of solving a given instance of (a generalized form of) the puzzle. We take a different approach by analyzing the computational complexity of designing a \"good\" puzzle. We assume a puzzle maker designs part of an instance, but before publishing it, wants to ensure that the puzzle has a unique solution. Given a puzzle, we introduce the FCP (fewest clues problem) version of the problem: \u0000 \u0000Given an instance to a puzzle, what is the minimum number of clues we must add in order to make the instance uniquely solvable? \u0000 \u0000We analyze this question for the Nikoli puzzles Sudoku, Shakashaka, and Akari. Solving these puzzles is NP-complete, and we show their FCP versions are Sigma_2^P-complete. Along the way, we show that the FCP versions of 3SAT, 1-in-3SAT, Triangle Partition, Planar 3SAT, and Latin Square are all Sigma_2^P-complete. We show that even problems in P have difficult FCP versions, sometimes even Sigma_2^P-complete, though \"closed under cluing\" problems are in the (presumably) smaller class NP; for example, FCP 2SAT is NP-complete.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"18 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125570053","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 5
The Complexity of Snake 蛇的复杂性
Pub Date : 2016-06-01 DOI: 10.4230/LIPIcs.FUN.2016.11
M. D. Biasi, Tim Ophelders
Snake and Nibbler are two well-known video games in which a snake slithers through a maze and grows as it collects food. During this process, the snake must avoid any collision with its tail. Various goals can be associated with these video games, such as avoiding the tail as long as possible, or collecting a certain amount of food, or reaching some target location. Unfortunately, like many other motion-planning problems, even very restricted variants are computationally intractable. In particular, we prove the NP--hardness of collecting all food on solid grid graphs; as well as its PSPACE-completeness on general grid graphs. Moreover, given an initial and a target configuration of the snake, moving from one configuration to the other is PSPACE-complete, even on grid graphs without food, or with an initially short snake. Our results make use of the nondeterministic constraint logic framework by Hearn and Demaine, which has been used to analyze the computational complexity of many games and puzzles. We extend this framework for the analysis of puzzles whose initial state is chosen by the player.
《Snake》和《Nibbler》是两款著名的电子游戏,在这两款游戏中,蛇在迷宫中爬行,并在收集食物的过程中成长。在这个过程中,蛇必须避免与尾巴碰撞。这些电子游戏可以与各种目标相关联,例如尽可能长时间地避开尾巴,或收集一定数量的食物,或到达某个目标位置。不幸的是,像许多其他运动规划问题一样,即使是非常有限的变体在计算上也是难以处理的。特别地,我们证明了在实体网格图上收集所有食物的NP—硬度;以及它在一般网格图上的pspace完备性。此外,给定蛇的初始配置和目标配置,即使在没有食物或初始较短的蛇的网格图上,从一种配置移动到另一种配置也是pspace完全的。我们的结果利用了由Hearn和Demaine提出的非确定性约束逻辑框架,该框架已被用于分析许多游戏和谜题的计算复杂性。我们将这一框架扩展到由玩家选择初始状态的谜题分析中。
{"title":"The Complexity of Snake","authors":"M. D. Biasi, Tim Ophelders","doi":"10.4230/LIPIcs.FUN.2016.11","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2016.11","url":null,"abstract":"Snake and Nibbler are two well-known video games in which a snake slithers through a maze and grows as it collects food. During this process, the snake must avoid any collision with its tail. Various goals can be associated with these video games, such as avoiding the tail as long as possible, or collecting a certain amount of food, or reaching some target location. Unfortunately, like many other motion-planning problems, even very restricted variants are computationally intractable. In particular, we prove the NP--hardness of collecting all food on solid grid graphs; as well as its PSPACE-completeness on general grid graphs. Moreover, given an initial and a target configuration of the snake, moving from one configuration to the other is PSPACE-complete, even on grid graphs without food, or with an initially short snake. \u0000Our results make use of the nondeterministic constraint logic framework by Hearn and Demaine, which has been used to analyze the computational complexity of many games and puzzles. We extend this framework for the analysis of puzzles whose initial state is chosen by the player.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"30 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131532406","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 2
Super Mario Bros. is Harder/Easier Than We Thought 《超级马里奥兄弟》比我们想象的要难/简单
Pub Date : 2016-06-01 DOI: 10.4230/LIPIcs.FUN.2016.13
E. Demaine, G. Viglietta, A. Williams
Mario is back! In this sequel, we prove that solving a generalized level of Super Mario Bros. is PSPACE-complete, strengthening the previous NP-hardness result (FUN 2014). Both our PSPACE-hardness and the previous NP-hardness use levels of arbitrary dimensions and require either arbitrarily large screens or a game engine that remembers the state of off-screen sprites. We also analyze the complexity of the less general case where the screen size is constant, the number of on-screen sprites is constant, and the game engine forgets the state of everything substantially off-screen, as in most, if not all, Super Mario Bros. video games. In this case we prove that the game is solvable in polynomial time, assuming levels are explicitly encoded; on the other hand, if levels can be represented using run-length encoding, then the problem is weakly NP-hard (even if levels have only constant height, as in the video games). All of our hardness proofs are also resilient to known glitches in Super Mario Bros., unlike the previous NP-hardness proof.
马里奥回来了!在这个续集中,我们证明了解决超级马里奥兄弟的一个广义关卡是pspace完全的,加强了之前的np -硬度结果(FUN 2014)。我们的pspace -硬度和之前的np -硬度都使用了任意维度的关卡,并且需要任意大的屏幕或能够记住屏幕外精灵状态的游戏引擎。我们还分析了屏幕尺寸不变,屏幕上精灵数量不变,游戏引擎忘记屏幕外所有东西的状态的不太常见情况的复杂性,就像大多数(如果不是全部的话)《超级马里奥兄弟》电子游戏。在这种情况下,我们证明了游戏是在多项式时间内可解的,假设关卡是显式编码的;另一方面,如果关卡可以使用运行长度编码来表示,那么这个问题就是弱np困难(即使关卡只有恒定的高度,就像电子游戏一样)。与之前的np硬度证明不同,我们所有的硬度证明也适用于《超级马里奥兄弟》中的已知故障。
{"title":"Super Mario Bros. is Harder/Easier Than We Thought","authors":"E. Demaine, G. Viglietta, A. Williams","doi":"10.4230/LIPIcs.FUN.2016.13","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2016.13","url":null,"abstract":"Mario is back! In this sequel, we prove that solving a generalized level of Super Mario Bros. is PSPACE-complete, strengthening the previous NP-hardness result (FUN 2014). Both our PSPACE-hardness and the previous NP-hardness use levels of arbitrary dimensions and require either arbitrarily large screens or a game engine that remembers the state of off-screen sprites. We also analyze the complexity of the less general case where the screen size is constant, the number of on-screen sprites is constant, and the game engine forgets the state of everything substantially off-screen, as in most, if not all, Super Mario Bros. video games. In this case we prove that the game is solvable in polynomial time, assuming levels are explicitly encoded; on the other hand, if levels can be represented using run-length encoding, then the problem is weakly NP-hard (even if levels have only constant height, as in the video games). All of our hardness proofs are also resilient to known glitches in Super Mario Bros., unlike the previous NP-hardness proof.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"82 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124560032","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 21
How Brokers Can Optimally Abuse Traders 经纪人如何最有效地滥用交易者
Pub Date : 2016-04-08 DOI: 10.4230/LIPIcs.FUN.2022.18
Manuel Lafond
Traders buy and sell financial instruments in hopes of making profit, and brokers are responsible for the transaction. There are several hypotheses and conspiracy theories arguing that in some situations, brokers want their traders to lose money. For instance, a broker may want to protect the positions of a privileged customer. Another example is that some brokers take positions opposite to their traders', in which case they make money whenever their traders lose money. These are reasons for which brokers might manipulate prices in order to maximize the losses of their traders. In this paper, our goal is to perform this shady task optimally -- or at least to check whether this can actually be done algorithmically. Assuming total control over the price of an asset (ignoring the usual aspects of finance such as market conditions, external influence or stochasticity), we show how in quadratic time, given a set of trades specified by a stop-loss and a take-profit price, a broker can find a maximum loss price movement. We also look at an online trade model where broker and trader exchange turns, each trying to make a profit. We show in which condition either side can make a profit, and that the best option for the trader is to never trade.
交易者买卖金融工具,希望从中获利,而经纪人则负责交易。有一些假设和阴谋论认为,在某些情况下,经纪人希望他们的交易者亏损。例如,经纪人可能希望保护特权客户的头寸。另一个例子是,有些经纪商的头寸与交易者的头寸相反,在这种情况下,只要交易者亏损,他们就赚钱。这些都是经纪商操纵价格以最大限度地减少交易者损失的原因。在本文中,我们的目标是以最优方式完成这项不光彩的任务--或者至少检验一下是否真的可以通过算法完成。假定完全控制了资产的价格(忽略了市场条件、外部影响或随机性等金融学的通常方面),我们展示了如何在二次方时间内,给定一组由止损价和止盈价指定的交易,经纪人可以找到最大亏损的价格变动。我们还研究了一个在线交易模型,在这个模型中,经纪人和交易者轮流交换,双方都试图获利。我们展示了在哪种情况下双方都能获利,而交易者的最佳选择是永不交易。
{"title":"How Brokers Can Optimally Abuse Traders","authors":"Manuel Lafond","doi":"10.4230/LIPIcs.FUN.2022.18","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2022.18","url":null,"abstract":"Traders buy and sell financial instruments in hopes of making profit, and brokers are responsible for the transaction. There are several hypotheses and conspiracy theories arguing that in some situations, brokers want their traders to lose money. For instance, a broker may want to protect the positions of a privileged customer. Another example is that some brokers take positions opposite to their traders', in which case they make money whenever their traders lose money. These are reasons for which brokers might manipulate prices in order to maximize the losses of their traders. In this paper, our goal is to perform this shady task optimally -- or at least to check whether this can actually be done algorithmically. Assuming total control over the price of an asset (ignoring the usual aspects of finance such as market conditions, external influence or stochasticity), we show how in quadratic time, given a set of trades specified by a stop-loss and a take-profit price, a broker can find a maximum loss price movement. We also look at an online trade model where broker and trader exchange turns, each trying to make a profit. We show in which condition either side can make a profit, and that the best option for the trader is to never trade.","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"04 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-04-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129470848","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Large Peg-Army Maneuvers 大型联合军演习
Pub Date : 2016-03-02 DOI: 10.4230/LIPIcs.FUN.2016.18
Luciano Gualà, S. Leucci, Emanuele Natale, R. Tauraso
Despite its long history, the classical game of peg solitaire continues to attract the attention of the scientific community. In this paper, we consider two problems with an algorithmic flavour which are related with this game, namely Solitaire-Reachability and Solitaire-Army. In the first one, we show that deciding whether there is a sequence of jumps which allows a given initial configuration of pegs to reach a target position is NP-complete. Regarding Solitaire-Army, the aim is to successfully deploy an army of pegs in a given region of the board in order to reach a target position. By solving an auxiliary problem with relaxed constraints, we are able to answer some open questions raised by Cs'ak'any and Juh'asz (Mathematics Magazine, 2000). To appreciate the combinatorial beauty of our solutions, we recommend to visit the gallery of animations provided at this http URL
尽管有着悠久的历史,经典的纸牌游戏仍然吸引着科学界的注意。在本文中,我们考虑了与该游戏相关的两个带有算法味道的问题,即Solitaire-Reachability和Solitaire-Army。在第一个例子中,我们证明了决定是否存在一个跳跃序列,使得给定的初始配置的挂钩到达目标位置是np完全的。关于Solitaire-Army,目标是成功地在棋盘的给定区域部署一支军队,以达到目标位置。通过求解一个具有宽松约束的辅助问题,我们能够回答Cs'ak'any和Juh'asz提出的一些开放性问题(数学杂志,2000)。为了欣赏我们的解决方案的组合之美,我们建议访问这个http URL提供的动画库
{"title":"Large Peg-Army Maneuvers","authors":"Luciano Gualà, S. Leucci, Emanuele Natale, R. Tauraso","doi":"10.4230/LIPIcs.FUN.2016.18","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2016.18","url":null,"abstract":"Despite its long history, the classical game of peg solitaire continues to attract the attention of the scientific community. In this paper, we consider two problems with an algorithmic flavour which are related with this game, namely Solitaire-Reachability and Solitaire-Army. In the first one, we show that deciding whether there is a sequence of jumps which allows a given initial configuration of pegs to reach a target position is NP-complete. Regarding Solitaire-Army, the aim is to successfully deploy an army of pegs in a given region of the board in order to reach a target position. By solving an auxiliary problem with relaxed constraints, we are able to answer some open questions raised by Cs'ak'any and Juh'asz (Mathematics Magazine, 2000). To appreciate the combinatorial beauty of our solutions, we recommend to visit the gallery of animations provided at this http URL","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"29 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-03-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122019807","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 5
Selenite Towers Move Faster Than Hanoï Towers, But Still Require Exponential Time 亚硒酸盐塔比Hanoï塔移动得快,但仍然需要指数时间
Pub Date : 2016-02-12 DOI: 10.4230/LIPIcs.FUN.2016.5
Jérémy Félix Barbay
The Hanoi Tower problem is a classic exercise in recursive programming: the solution has a simple recursive definition, and its complexity and the matching lower bound correspond to the solution of a simple recursive function (the solution is so simple that most students memorize it and regurgitate it at exams without truly understanding it). We describe how some minor change in the rules of the Hanoi Tower yields various increases of difficulty in the solution, so that to require a deeper mastery of recursion than the classical Hanoi Tower problem. In particular, we analyze the Selenite Tower problem, where just changing the insertion and extraction positions from the top to the middle of the tower results in a surprising increase in the intricacy of the solution: such a tower of n disks can be optimally moved in 3^(n/2) moves for n even (i.e. less than a Hanoi Tower of same height), via 5 recursive functions (or, equivalently, one recursion function with five states following three distinct patterns).
河内塔问题是递归编程中的一个经典练习:解决方案有一个简单的递归定义,它的复杂度和匹配的下界对应于一个简单递归函数的解决方案(解决方案非常简单,以至于大多数学生在考试时背它,而没有真正理解它)。我们描述了河内塔规则的一些微小变化如何在解决方案中产生各种难度的增加,因此需要比经典的河内塔问题更深入地掌握递归。特别地,我们分析了Selenite Tower问题,其中只需将插入和提取位置从塔的顶部更改为塔的中间,就会导致解决方案复杂性的惊人增加:这样的n个磁盘的塔可以通过5个递归函数(或者,相当于一个递归函数,具有五个状态,以下三个不同的模式)以3^(n/2)次移动n偶数(即小于相同高度的河内塔)。
{"title":"Selenite Towers Move Faster Than Hanoï Towers, But Still Require Exponential Time","authors":"Jérémy Félix Barbay","doi":"10.4230/LIPIcs.FUN.2016.5","DOIUrl":"https://doi.org/10.4230/LIPIcs.FUN.2016.5","url":null,"abstract":"The Hanoi Tower problem is a classic exercise in recursive programming: the solution has a simple recursive definition, and its complexity and the matching lower bound correspond to the solution of a simple recursive function (the solution is so simple that most students memorize it and regurgitate it at exams without truly understanding it). We describe how some minor change in the rules of the Hanoi Tower yields various increases of difficulty in the solution, so that to require a deeper mastery of recursion than the classical Hanoi Tower problem. In particular, we analyze the Selenite Tower problem, where just changing the insertion and extraction positions from the top to the middle of the tower results in a surprising increase in the intricacy of the solution: such a tower of n disks can be optimally moved in 3^(n/2) moves for n even (i.e. less than a Hanoi Tower of same height), via 5 recursive functions (or, equivalently, one recursion function with five states following three distinct patterns).","PeriodicalId":293763,"journal":{"name":"Fun with Algorithms","volume":"2013 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-02-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133755966","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
期刊
Fun with Algorithms
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1