/
description
28 lines (15 loc) Β· 1.94 KB
/
description
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Letter Partners Game
In a fun game, every letter in English alphabet has a partner. The first thirteen letters of the English alphabet are called pre-partners and the next thirteen letters are called post-partners. That is βaβ is the pre-partner and the corressponding post-partner is βnβ, βbβ is the pre-partner and the corressponding post partner is βoβ ....βmβ is the pre-partner and βzβ is the post-partner.
In this game, players will be asked to take a lot with a string βwβ and they are said to won the game if the following conditions are satisfied by the letters in βwβ:
(i) The string may be mixed with pre-partners and post-partners but all pre-partners should have a post-partner
(ii) A pre-partner should come before itβs corressponding post-partner
(iii) For a pre-partner that is in position βiβ itβs post-partner
(a) Shall come immediately at posititon βi+1β
or
(b) Should come before all corressponding post-partners of pre-partners that is in positions < i and after all corressponding post-partners of pre-partners that is in position > i.
And the player has lost the game otherwise.
For example, if the word in the lot taken is βabonβ then the player has won the game. All pre-partners come before the post-partner and condition (iii) is also satisfied as follows:
1) βoβ comes immediately after its pre-partner βbβ, and as per condition (a) of (iii) it is acceptable
2) βnβ comes after its prepartner βaβ and it comes after the post-partners of pre-partners that has come after βaβ and as per condition (b) of (iii) it is acceptable
Whereas if the word in the lot taken is βabnoβ then the player has lost the game as the post-partener βnβ for pre-partner βaβ has come before the post-partner of the pre-partner βbβ, violates condition (iii).
And if the word in the lot is βaerfsbonβ then also the player has won