PCI2012

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/261460614

Mathematical computer games based on modular arithmetic

Conference Paper · September 2012


DOI: 10.1109/ICPCI.2012.6486317

CITATIONS READS

0 302

3 authors:

Fidan Nuriyeva Asli Guler


Dokuz Eylul University Yasar University
19 PUBLICATIONS 95 CITATIONS 8 PUBLICATIONS 51 CITATIONS

SEE PROFILE SEE PROFILE

Deniz Tanir
Kafkas University
11 PUBLICATIONS 44 CITATIONS

SEE PROFILE

All content following this page was uploaded by Deniz Tanir on 02 July 2018.

The user has requested enhancement of the downloaded file.


zerbaljan National Ministry of Communications Ministry of Education Problem Council of
ademy of Sclences and Information Technologies of Azerbaijan Repubtic Cybernetics and Information
of Azerbaijan Republic Technology

ıstitute of Cybernetics Institute of Information National Academy Baku State University,


ıf Aze.rbajjan National Technology of Azerbaijan of Avlation Research Institute of
Acaderny of Sciences National Academy of Sclences Applied Mathematics of
Baku State University

Azerbaljan State Azerpaljan Azerbaljan University of


{il'
\ 1993
:7tr1t:4.N

Qafqaz University
E.
••

Oil Academy Technicaf University Architecture and Construction

Technical Sponsor: .,IEEE Institute of Electrical and


Electronics Eıızineerine

,
LV INTERNATIONAL CONFERENCE
"PROBLEMS OF CYBERNETıes AND INFORMATICS"

Volume i

September 12-14,2012
Baku, Azerbaijan
~-------
~----
,--~- . -.,.------ _.
-

10_ ...
- -, .•.----- ._., - -- _.
-
,

PROGRAM COMMITTEE

Co-Chairmen
Academician Mahmud KARIMOV - President of Azerbaijan National Academy
of Sciences
Acadernician Ali ABBASOV - Minister of Communication and Information Technologies of
Azerbaijan Republic
Professor Misir MARDANOV - Minister of Education of Azerbaijan Republic

Members

ABLAMEYKO, Sergey (Belarus) nuPING,Xu (China)


AFANASYEV, Alexander (Russia) KARlMAV, Sabit (Azerbaijan)
ALGULIYEV, Rasim (A zerbaij an) KlM, Che Soong (Korea)
ALTYEV, Fikret (Azerbaijan) KOROLYUK, Vladimir (Ukraine)
ALIYEV, Telınan (Azerbaijan) MALIKOV, Agasi (Azerbaijan)
AMIRGALIYEV, Yedilklıan (Kazakhstan) MAMMADOV, Firudin (Azerbaijan)
ANDRANAV, Alexander (Latvia) MAM1V1ADOV, Havar (A zerbaij an)
BASHAR, Tamer (USA) MEHDfYEV A, Galina (Azerbaijan)
BUTCRER John (New ZeaJand) MOESCHLIN,Otto (Switzerland)
CREN, Louis (Singapore) ORSINGHER, Enzo (Italy)
CHEPURIN, Yevgeniy (Russia) OZEKICl, Suleyınan (Turkey)
FORMANOV, Shakir (Uzbekistan) PETKOY, Petko (Bulgaria)
HAJIYEV, Akif (Azerbaijan) RYKOV, Vladimir (Russia)
HATIYEV, Asaf (Azerbaijan) SADYKHOV, Rauf (Belarus)
IBRAHIMOV, Ismayil (Azerbaijan) SANICH, Ahmed (Azerbaijan)
IBRAHIMOV, Vagif (Azerbaijan) SINGPURWALLA, Nozer (USA)
lMANOV, Gorkhınaz (Azerbaijarı) TITOV, Vitaly (Russia)
JIN, Jionghua (USA) TURKMAN, Feridun (Portugal)
USHAKOV Igor (USA)

Editor: Kamil AI DA-ZADE

SECTIONS
1. Information and Communication 5. Numerical Methods and Computational
Technologies Technology
2. Intellectual Technologyand Systems 6. Applied Stochastic Analysis
3. Seismic Devices, Systems anel Technology 7. Control and Optimization
4. Modeling and Identification 8. Decision Making for Social-
Economic Systems

ISBN 978-9952-434-39-2 © Institute of Information Technology of ANAS, 2012


ISBN 978~1-4673-4S0ı-9 © Institute of Electrical and Electrorıics Engineering (IEEE), 20
IV International Conference "Problems of Cybernetics and Informatics' (peI'20l2), September 12-14,2012
www.pcizü 12.science.azll IOO.pdf

ısrail Mammadov, Bayram Ibrahimov. Rescarehes of Methods of Noiseproof Reception of Optical Signals
at use WDM- Technology 175
Aleksey Brilevski. System of Support Logistics and Transport Control for Routes in a Distribution Network 178
Tamar Makasarashvili, Tinaiin Taiulashvili, Tea Khorguashvili. Formalization and Knowledge Gaining
Problems in Intellectual Systerns 182
Mirzayan Kamilov, Shavkat Fazilov, Nomaz Mirzaev, Sobirjon Radjabov. Estirnates Calculations
AIgorithms in Condition of Huge Dimensions of features' Space 184
Efendi Nasiboglu, Umit Kuvvetli. Mefhareı Ozkilcik, Ugur Eliiyi. Origin-Destinatiorı Matrix Generation
Using Srnart Card Data: Case Study for ızmir 188
Mirzaakbar Hudayberdiev, Gozel Judakova, Günler Landsmann. New Algorithm of Support Veeter
J Machine by the Bezier Curve ı92
Fidan Nuriyeva, Asli Gıder, Deniz Tanır. Mathernatica! Computer Games Based on Modular Arithmetic 194
Naila Allakhverdiyeva. Using Corrective Filters to Irnprove the Accuracy of Seismic Data ı97
Zarbaf Amiraslanova. Automation of Working Drawings and Calculation of Reinforcernent Weight in
Concrete Structures 200
Gela Besiashvili, Manana Khachidze, David Chokhonefidze. Applicarion of Adaptive Genetic AIgorithm
in Mining lndustry 204
Pavel Khrustalev. Process Optimization of Pointing of the Onboard Weapon of a Robotics Complex with
Use of Intellectual Optical-Electrorıic Station 207
Pavel Khrustalev. Self-Configured Optical-Electronic Station 210
Samir Rustamov, On an Understanding System that Supports Human-Computer Dialogue 213
Samir Rustamov. Application of Nemo-Fuzzy Model for Text and Speech Understanding Systems 217
Denis Varabin, Dmitry Bagaev. Autonomous System "Car Robot" 221
Nigar Ismayilova, Elviz Ismayilov. Re earch ofa Class of Smooth Mernbership Functions and Its
Application in Recognition Systems 223
Yuriy Zaychenko, Aydin Gasanov. Investigations of Caseade Neo-Fuzzy Neural Networks in the Problem
of Forecasting at the Stock Exchange 227
Evgenit Krasnov, Dmitry Bagaev. Conceptual Analysis of Fire Fighting Robots' Control Systems 230
Igor Frolov, Rauf Sadykhov. Pyramidal AIgorithm for SVM-Classification 233
Firudin Mamedov, Tamella Ahmedova. Provision of Throw-Over Manipulator and Step Conveyer with
Sensor Controls 237
Shabnam Abiyeva. On the Search System for Selection ofPlants According to Environrnent Conditions 240
Shafag Mutıalibova, Namik Pashayev, Rauf Ragimov. Valuing Processes ofFlood on the Coastal Regions
of the Kur on the Basis of Data Remote Sensing 242
Tofig Kazimov, Shafagat Mahmudova. Estimation of the lmpact of Geometrical Characteristics on the
Recognition to Identify a Human Face on the Basis of Photo Portraits 246
Fikraı Feyziyev, Lidiya Ramazanova. Mehrdad Arablu Babavand Aslan. Deseription of Encoding and
Decoding of Binary Cyclic Codes in aCiass Sequential Machines 249
Yegana Pashayeva. Processing of Electrocardiogram File in Mobile Phones on Symbian Operating System 252
Evgeny Wasserman Nikolay Kartashev. Automated Processing ofEEG Recorded during Dichotic
Listening Session: Problems ofSingle Response Recognition 254
Rauf Nabiyev. Results Analysis of Experirnental tudies of Correcting Filters 257
Yahar Ghasemi Habashi. Application of Neural Networks to Diagnostics ofPumping-Rod Units 259

v Baku, Azerbaijan
IV International Conference "Problems of Cybernetics and Informatics" (per2012), September 12-14,2012
www.pci2012.science.azJ2115.pdf

Mathematical Computer Games Based on Modular


Aritlımetic
Fidan Nuriyeva', Asli Guler", Deniz Tanır)
I.JEge University, ızmir, Turkey
2Yasar University, İzmir, Turkey
i nuriyevajidan@gmail.com, 2asli.guler@yasar.edu.tr, 3deniz _tanir _35@ho/mail.com

Abstract=- In this paper, computer aided games, whicb motivate __ L_~( __ ~( __ ~( __ ~_


and bring out the mathematical abilities of students, have been
Figure I. Grouping of the items
studied by inspiring "Bachct's Gamc", The winning stratcgies of
the games are based on modular arithrnetic. Winning algo rtthms
As it is seen in "Fig. 1", in order that the first player wins
and mathematical models are included in the puper.
the game, he should remove two items in his fırst turn. Therı,
Levels of the logical and math games which have been proved to he should make the number of items, that is removed by the
be beneficial for students in order to gain ability of appropriare opponent, up to three in the latter turns. In otlıer words, if his
selection and application of analytical technics and stratcgies in opponent removes one item, he should remove two items, or if
terms of problems could be applied in compliance with age group the opponent removes two items, he should remove one item.
ol students and be permanent during the academic life of the The second player must remove the last item, and lose tlıe
student as a result of its charactcr. gaıne in tlıis way.

Keywords-s- Computer g anıe, k/allı g anıe, Mind game, Modular i) Generalizatian of "Fifteen Items" Game
aritlımetic; Winniııg strategies, Logical straıegy gome, Computer Given n iterns, Two players can remove s items
g ame programming. (L:S; s :s; nı, m < n) respectively. The player who removes the
ı. INTRODUCTION last item loses,

Inspiring "Bachet' s Game", same games have been Let us arrange the iterns ın groups in a similar way as
produced in asimilar way:'N!:o-dular arithmetic has been used "Fifteen items" game.
for search ing mathernatical structures of the games [1]. In order n
to develop winning strategies and algorithrns, it is benefited
from techniques of Artifıcial Intelligence and Theory of (" ~--------~~~----------
'\
Algorithms [2,3]. The winning strategies of the games are
based on modular arithmetic. Mathematica! mode!s of tlıe - (-....-)(-...-) ...(-...-J-
games have been examined in detai! and winning strategies
(algorithms) have been proposed for different cases. Leve!s of ~~~ ~
the logical and math ganıes which have been proved to be k "'- m!T
m+l m+i)
beneficial for students in order to gain ability of appropriate
seleetion and application of analyrical technics and strategies in
y
terms of problems could be applied in compliance with age i
group of students and be perrnanent during the academic life of
the student as a result of its character. Figure 2. Grouping ofiteıns in the general game

II. yYpES OF BACHET'S GAME As it is seen in "Fig. 2", the first player should remove k
Bachet's Garne is a mathemarical game whose winning items in his fırst tum in order to win. In latter turns, the first
strategy is based on modular arithrnetic. The ganıe is played in player should remove (nı + ı- s) items when the second player
a competitive environment. There are N items on a table, and a removes s items (s :;;In). Therefore, the second player has to
player makes a move by removing at most S items from the remove the last item and loses,
table. The player who removes the last item loses the game.
We can see that this strategy is also valid for "fifteen iterns"
The gaıne is diversified by values of N and S [4].
garne. Since n = 15, in = 2 in the game, as in (1), k = 2 is
A. "Fifteen Items" Game obtained.
Fifteen items are given. Players can remove one or two
items in tum. The player who removes the last item loses the k=(n-ı)' n-IJ=ı4-'~J'3=14-4'3=2 (1)
game. Lm+l 3 L
Le! us arrange the items in groups as below. 2) Anather Version o/the Game

+.IEEE Baku, Azerbaijan


194
IV International Conference "Probtems ofCybernettes and Informatics" (pcrzoız), Septemoer IZ-l4, ZOLZ
www.pci20ı2.scienee.az/2I1S.pdf

In the above "n : m"game, the player who removes the last 12-11 = 1 (12)
item loses the game. Let us consider the game with a eondition
that if the player removes the last itern, he wins. In other The fırst player should teli the number i (one) to win this
words, given n iterns, rwo players can remove s items game. Then, he should make the number s, that is told by the
opponent, ( s :5 10), up to II in the latter turns. in this way, he
(ı ~ s ~ m, m < n) respectively. The player who removes the
last İtem wins. tells 12,23, 34, 45, 56, 67, 78, 89 and ı00 at last. Therefore,
the number i00 is told by the fırst player.
As it seen in "Fig. 3", we arrange the items in groups,
i) Generalizatian of "Hundred : ten" Game
The game İs played with two people. The fırst player tells
n
a number between 1 and m. The second player tells a new
( ------------~------------ "\
number by adding at least i at most m to the previous
number. The game contiııues like this; and the player who tells
- [- ... -)[- ... -) (_...-J the number n wins the game.

'---Y---J '---Y---J '---Y---J '---Y---J We use the formula (13) andfınd the number k.

k \... m+l m+! m+! ~ k =n -l~J(m+ i) (13)


y 111+1

The fırst pIayer should tell the number k at the beginning.


i Then, he should make the number s, that is (old by the
opponent, (s:5 nı), up to 171+1 in the latter turns. in other
Figure 3. Grouping of items in the new version words, he telIs (m + ı- s ) at each turn, so the number n is told
by the fırst player.
The first player should remove k items, k S m, by result (3)
in order to win. In latter tums, the first player should remove llL. DESIGNING COMPUTER PROGRAMS FOR BACHET'S
( m + i - s) items when the second player removes s iterns GAME
( s ~ m ). Therefore, there ternain (m + i ) items on the table at Inspiring so-called "Bachet's Game', some games have
step (I + 1 ) according to value i calculated by equation (2). The been produced in a similar way, then computer programs have
second player can remove at most m items; so the first player been proposed by making different generalizations of the
wins the game by removing the rest ofthem. ganıes [4]. Two of the produced programs are run by being
loaded to computer and the other one is pIayed on the Internet.

1=
n -1 J (2)
C# has been used for the first two of the games (ITEM and
L m+] NUMBER), and the other game (MODAR) has been designed
in JavaScript and HtmL.

k == n (mod (m + l)) (3 ) A. MODAR Game


B "Hundred : ten" Game MODAR ganıe takes its name from the union of thefırst
Ietters of the word s "Modular" and "Arithmetics", This game
The game is played with two people. The fırst player tells a
has been designed for ten items by JavaScript and Html with
number between i and ıo. The second player tells a new the name MODAR, and it can be played on
number by adding at least i at most to the previous number. ıo http://w.,l'w.mateoUkeom/oyım/nim/ [5J.
The game continues like this; and the player who tells the
number ı00 wins the game. MODAR game has been generated by using web
progranuning languages h0111and javascript. The game can be
The strategies mentioned before can be applied for this
played againsı the computer or a human opponerıt. When
game as welL.
playing against the computer, there are three levels of the
Here, 11 = i00, m = Lo and tn + i = IL. game. The computer uses all winning strategies at the most
difficult level. There are ten balls in the game. Choosing the
100-1l=89 (4) first player the game starts. The players can remove one or two
ba1ls respecıively. The player who removes the last balı wins
89-11=78 (5)
the game.
78-11=67 (6)
B. Programming Generalized Fifieen Iıems Game by C#
67-ll=56 (7) There are input units where we can change the total number
56-11=45 (8) of objects and the number of items that can be rernoved by
players in our program. If desired, the computer or we can start
45-11=34 (9) the game, The starting view of the program is like in "Fig.4".
34-J J=23 (10)
23-11=12 (ll)

.IEEE 195 Baku, Azerbaijan

-,'-';~- ,~i+- : • ~~~~

_ ~",-'::::.:;,,""T
-
IV Internasional Conference "Problems ofCyhernetics andInformaıtcs= (PCI'ZOI2), September 12-14 2012
www.pci2012.science.a7J2IlS.pdf '

uınlrollY19 Panel
Kontrol Por~ı; Geme Panel
Tota! objed Number
Ta!'}ll:t
MilXimum tak"" dem.
Increasr,g 1---..;1
ı..._,...__. ..:.......-1

New Increasing:
Figure 4. The starung view of the program

When pressing the Start bu tton , there will be definite


number of squares on the screen as in "Fig. 5" that we have
determined at the beginrıing. At each step, we alsa determine
that how maııy items we remove, theıı this number of squares
wiU disappear from the screen.

ii·
Figure 6. The starting vıew of the program

IV. CONCLUSION
Figure S. The view of items A combinatorio game has been considered in this paper,
moreover its generalizations and different versions have been
We can reach the information about how the game is played analysed by using modular aritlımetic. New logical games, that
by pressing the Help button. are not at the market, have been gerıerated, solution algorithms
If we lose the game a message box will be appeared on the have been proposed and computer programs have been
screen. designed. it is aimed that these programs will provide students
to use mathemaıics, mind and game strategies by several math
The computer plays according to the winning strategies games.
when playing against the computer.
lt has been seen that generating different new ga:mes is
C. Programıning Generalized "Hundred.Ten" Game by Ct: possible by changing the corıditions in mentioned games. Some
In the program, we determine the target number and the strategies have been proposed and algorithms have been
inereasing number ourselves by writing thern into "New desigrıed for solutions, Furthermore, the algorithm of a game
Target" and "New Increasing" boxes. that runs at an interactive web environment has been written by
javascript language.
The opponent (computer) or we can start the game. The
starting view of the program is like in "Fig. 6". lt has been shown that how mathematics can be used
effectively in garnes and a new activity has been added to
We can reach the information about how the game is played activities that can rnake students like mathematics.
by pressing the "Help" button.
The computer programs can be used for education in
When we press the "Start" button, the gaıne starts. schools. Mind games, whose main purpose is to help bringing
We write the number of iterns, that we wlll remove, into up individuals who think, questionize, reason and analyse,
"Increasing" box, the gaıne continues like this. provide students to meet analytic thinking techniques and to
improve these skills when spending enjoyable time.

REFERENCES
[ı i Alizade R., Ufuktepe. U, (2006), Finite Mathematics. Olyrnpiad
Questions and Solunons, TUBlTAK Publishing, Ankara, 273 p.
[2] Nabiyev VY, (2005), Artificial Intelligence, Problems-Methods-
Algorithms, Seekin Publishing, Ankara, 764 p.
13] Nabiyev V V (2007), Algonthms. From Theory To Applications,
Seekin Publishıng, Ankara, 799 p.
[4) http://hpl-ıncru/programmy!igry/igra-baslıe
[5] http://ww\\!.matcolık.com/oyıınfninı/

+,IEEE 196
Baku. Azerbaijan

View publication stats

You might also like