• No results found

Pattern Popularity in Γ1 − Non Deranged Permutations: An Algebraic and Algorithmic Approach

N/A
N/A
Protected

Academic year: 2020

Share "Pattern Popularity in Γ1 − Non Deranged Permutations: An Algebraic and Algorithmic Approach"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

P

P

A

A

T

T

T

T

E

E

R

R

N

N

P

P

O

O

P

P

U

U

L

L

A

A

R

R

I

I

T

T

Y

Y

I

I

N

N

Γ

Γ

11

N

N

O

O

N

N

D

D

E

E

R

R

A

A

N

N

G

G

E

E

D

D

P

P

E

E

R

R

M

M

U

U

T

T

A

A

T

T

I

I

O

O

N

N

S

S

:

:

A

A

N

N

A

A

L

L

G

G

E

E

B

B

R

R

A

A

I

I

C

C

A

A

N

N

D

D

A

A

L

L

G

G

O

O

R

R

I

I

T

T

H

H

M

M

I

I

C

C

A

A

P

P

P

P

R

R

O

O

A

A

C

C

H

H

K

K

.

.

O

O

.

.

A

A

r

r

e

e

m

m

u

u

,

,

A

A

.

.

H

H

.

.

I

I

b

b

r

r

a

a

h

h

i

i

m

m

,

,

S

S

.

.

B

B

u

u

o

o

r

r

o

o

,

,

F

F

.

.

A

A

.

.

A

A

k

k

i

i

n

n

o

o

l

l

a

a

Department of Mathematics, Usmanu Danfodiyo University Sokoto, P.M.B. 2346, Sokoto, Nigeria

Corresponding author: K. O. Aremu, [email protected]

ABSTRACT: Given a permutation pattern say

1... k Sk

  

  and permutation

  

1... nSn, we say that

contains the pattern

if there exist

1

1   i ... ik n such thatred( i1... ik) . Each subsequence in

is known as an occurrence of the pattern

. Conversely, if there exist no occurrence of

in

, then we say that the permutation

avoids the pattern

. The popularity of a pattern

is the total number of copies of

within all permutations of a set. In this work, we address popularity of length-3 patterns in

1

  non deranged permutations in two approaches; algebraically and algorithmically. We first establish algebraically that pattern

1 is the most popular and

pattern

3,

4 and

5 are equipopular in 1

p

G . We further

provide efficient algorithms that also report same results on popularity and equipopularity of patterns of length-3 in

1

p

G as obtained by the algebraic approach.

KEYWORDS: Permutation, Pattern, Popularity, Equipopularity, Sorting.

1. INTRODUCTION

Permutation is a mathematical concept, which appears in various mathematical and practical problems. For example, sorting, ordering, matching and so on can be described as permutation problem. Permutation did not simply spring into existence, but rather, it is the culmination of a long period of mathematical investigation. Patterns in permutations have been studied over a long period of time; it has been an active field of research with over hundreds of articles published in the past few decades. There are several notable survey papers on this subject, a few includes ([Zha14, Rud13, Ste10]).

There are several notions of patterns in different combinatorial objects, e.g. permutations, graphs, matrices, words, compositions, etc. Permutation patterns include; classical patterns, barred patterns, vincular patterns, bivincular patterns and partial ordered patterns. The classical patterns was introduced by Knuth in 1968 but was much studied by Simon and Schmist in 1985. The notion was

further extended to word by Burstein in 1998 and later generalised for word by Burstein & Mansour in 2002. The Barred pattern was introduced for permutation by West in 1990. In 2002, the Vincular pattern (Generalized patterns) was introduced for permutation by Babson and Steingrimsson. This pattern (Vincular) was extended to word by Bustein & Mansour in 2003. The Bivincular pattern was introduced for permutations by Bousquet-Melou, Claesson, Dukes, and Kitaev in 2010. Kitaev introduced partially ordered patterns for permutations in 2003. The pattern (bivincular) was later extended to word by Kitaev & Mansour. [Kit11]

With no doubt, patterns in permutations have been well studied for over a century. As seems to be the case, these patterns were studied on permutations arbitrarily. The Symmetric group Sn is the set of all permutations of a set of cardinality n. There are several types of other smaller permutation groups (Subgroup ofSn) of set, a notable one among them is the alternating groupAn. Recently, [Are16] proposed a permutation group called the 1- non deranged permutation group denoted as 1

p

G . A permutation in this group is expressed as a sequence of 1 and numbers of integer modulo p where p is a prime and greater than or equal to 5. More precisely, this work will be centred on the 1- non deranged permutations as the notion of pattern popularity has never been studied on this set of permutations. In this present work, a review of length-3 classical patterns in 1

p

G is presented. 1

p

G is examined for certain properties (namely, containment and avoidance). In truth, it would be more correct to say that the approach of this research is both algebraic and algorithmic techniques, which accidentally obtain interesting results.

A permutation

on the set { ,

1 ,

n} is a sequence of distinct letters

(1),

( )n such that

1

( ) { ,i , n}

(2)

1, 2, n

a a a

 is of the form

(1 ) (1 2 ) (1 ( 1) )

i i mp i mp p i mp

      where n

= p and p is a prime greater than or equal to 5. [Are17]. An occurrence of a pattern

in a permutation

is a subsequence in

whose letters are in the same relative order as those in

. So, a

- avoiding permutation is a permutation that does not contain the pattern

. The popularity PS( )

of a pattern

in a set Sof permutations [Rud13]

( ) ( , )

S

S

P f

  

2. EQUIPOPULARITY OF PATTERNS IN 1-

NON DERANGED PERMUTATIONS

When two patterns occur equally in a set of permutation, we say that these patterns are equipopular. In particular, this subsection addresses length-3 patterns that are equally popular in 1

p

G . To prove some of the results in this section, we introduce some new notions on permutations. Definition 2.1

A permutation

  

 (1) (2)... ( )

n is increasing if ( )i

 and

(i1)are two successive element such that

( )i

(i1) and decreasing if

( )i (i 1)

 . Let

and be two non-negative integers such that

is the number of times of all increment and  number of times of decrement in

, we then define

as a

 

 sequence: i. completely increasing if  = 0 ii. completely decreasing if

= 0

iii. equally increasing and decreasing if    iv. almost increasing if   

v. almost decreasing if  

Example 2.1 Consider the permutations

1 = 1234567,

2= 1357246 and

4 = 1526374. Then,

1

is a completely increasing sequence,

2 is an almost increasing sequence and

4 is an equally increasing and decreasing sequence.

Definition 2.2. A permutation

is said to contain a break in sequence if there exists any two successive elements of

such that

|

( )i

(i 1) | 1

Remark 2.2. For simplicity, we let

1= 123,

2= 132,

3

= 213,

4= 231,

5= 312,

6= 321 be all length-3

patterns. By the above definition, we see that

3,

4,

5, have breaks while

1,

2,

6 have no break.

Lemma 2.3. Let 1

i p

G . Then every

ieand

1

i p

  has a break between

i( )j and

i(j1).

Proof. Since every 1

i p

G is an arithmetic progression of modulo p,

i( )j and

i(j1) will not be in the equivalence classes [j] and [j + 1] modulo p respectively, and hence,

|

i( )j

i(j 1) | 1

Definition 2.3. A pair in a permutation

is a subsequence ( ( ) ( ))

 

i j of

, such that i < j. Lemma 2.4. Let

i, j 1

p

G and P[

i]denote the set of pairs of

i. Then the following hold after deleting 1, the fix point of any

i:

i. 1

[ i] [ i ]

P P  

ii. ( [P

i]P[

i1])( [P

j]P[

j1])  iii. | [P

i]P[

i1] | | [ P

j]P[

j1] | Example 2.5. Let P[ ] { :

P ii  } be the set of pairs of

. The length-3 containments of

are given as { (1)Pi Pj:Pi(1)Pj(1),ij}

Remark 2.6. Every containment of a pattern in a permutation can be expressed as subsequences of increasing and/or decreasing pairs. Equivalently, pairs of a permutation can be concatenated to form any length k containment.

The next result shows the length-3 patterns that are equipopular in 1

p

G which is also validated by an algorithm.

Theorem 2.7. Let

i be a permutation in 1

p

G and and 1  i 6) be a pattern of length-3. If

1 ( )i

P

G is the popularity of a pattern

iin

1

p

G , then

1( 3) 1( 4) 1( 5).

p p p

PG   PG  PG 

Proof. We want to show that

1( 3) 1( 4) 1( 5)

p p p

PG   PG   PG  m such that

. The pattern

1and

6 have no breaks and thus their pairs are completely increasing and completely decreasing subsequences respectively. Therefore, by Lemma 2.3, 1( 6) .

p

PG   m Also by Lemma 2.3 and

Remark 2.6, 1( )1 ,

p

(3)

1,

3,

4 and

5 avoidp1. Hence, since each of

3,

4 and

5 has a break,

1( 3) 1( 4) 1( 5)

p p p

P   P   P  m

G G G holds by

definition 2.3 and remark 2.6.

Remark 2.8. Suppose

A { ,

     

1 2, 3, 4, 5, 6}is the set of all length-3 patterns, the pattern

3,

4 and

5

are equipopular in 1

p

G . We write

3 4 5

{ , , }

E

  

to be set of equipopular patterns which is subset of

A. For convenience, we represent the equipopular patterns with

E throughout the rest of this work.

Definition 2.4. A permutation

contains another permutation

as a pattern (denoted

 

) if the plot of

contains a subset which is equivalent to the plot of

. The number of occurrences of

in

(denotedV( )

) is the number of such subsets.

Algorithm 1: Algorithm to show that the pattern

3,

4

and

5 are equally popular in 1

p

G

Input: Input any

 1

p

G i nt o an array

Output: Number of occurrence of the pattern

3,

4 and

5

1: Begin

2: Set integer c = 0 3: for i = 1 to n − 1

4: for j = i + 1 to n − 2

5: for k = j + 1 to n

6: Case I: τ3

7: if a[k] > a[i]

8: if a[i] > a[j]

9: Case II: τ4

10: if a[i] > a[k]

11: if a[j] > a[i]

12: Case III: τ5

13: ifa[i] > a[k]

14: if a[k] > a[j]

15: Increment c by 1 16: end if

17: end if 18: end for 19: end for 20: end for 21: End

The algorithm above helps to show that for every 1,

i p

G

3( i) 4( i) 5( i)

V  V  V

Implementing the algorithm validates Theorem 2.7

Table 1: Popularity of

3,

4and

5 in 1

p

G

1

p

G

3

4

5

5 2 2 2

7 16 16 16

11 168 168 168

13 382 382 382

17 1320 1320 1320

19 2184 2184 2184

23 5096 5096 5096

3. POPULARITY OF PATTERNS IN 1- NON DERANGED PERMUTATION

The popularity of a pattern

is the total number of copies of \tau within all permutation of a set. [Rud13]. We begin this section, with some basic results on which the main result of this section is built.

Lemma 3.1. Every

1 and 1 1

p p

 G , are completely increasing and almost decreasing sequences.

Proposition 3.2. Suppose 1

i p

G such that i = 1, p - 1 and if

E represents the equipopular patterns

then ( ) 0

E i

V  

Proof. Since every 1

i p

G such that i = 1, p - 1 are completely increasing and almost decreasing sequences respectively, therefore, a subsequence that is an almost decreasing sequence does not exist in a completely increasing and almost decreasing sequence respectively. Thus, ( ) 0

E i

V  

1, 1

i p

   . Hence the result.

Lemma 3.3. Let j and

kbe two patterns such that

j

 has fixed at the first element,

khas no fixed and both do not avoid 1

i p

G . Then ( ) ( )

j i k i

V

V

Theorem 3.4. Let 1

p

G be a set 1- non deranged permutations, then the pattern

1 is the most popular pattern in 1

p

G .

Proof. To prove that the pattern

1 is the most

popular pattern of

Ain 1

p

G , we only need to show that 1( )1

p

PG  is greater than any other 1( )

p i

PG  . First,

we show that 1( )1 1( )

p p E

PG   PG  and

1( 2) 1( )

p p E

PG   PG  . Since the first entry of every

1

i p

(4)

occurrences of the equipopular patterns in 1

p

G

compared to

1 and

2 by Lemma 3.3. Thus,

1( )1

p

PG  and 1( 2)

p

PG  strictly greater than 1( )

p E

PG  .

Since

1 and p1 avoid pattern

E by proposition 3.2, therefore, 1( 6) 1( )

p p E

PG  PG  . Next we show

that 1( 2) 1( 6)

p p

PG  PG  . Since pattern

2 fixes 1

then this holds by Lemma 3.3. Note again that 1( )1 1( 2)

p p

PG   PG  because the pattern

1 and

every

1are completely increasing sequences and have no break. Therefore, pattern

1 is the most popular pattern in 1

p

G . Hence the result.

Theorem 3.5. Let 1

p

G be a set of 1- non deranged permutations, and

E is the equipopular pattern. Then

Eis the least popular pattern in 1.

p

G

Proof. It is immediate from the proof of theorem 3.4

and lemma 3.3.

Lemma 3.6. Suppose 1

i p

G then the popularity of the patterns forms a chain

1( ) 1( 6) 1( 2) 1( )1

p E p p p

PG   PG   PG   PG 

Proof. Since the first entry of the pattern

2 fixes 1,

then by Lemma 3.3 1( 2) 1( 6)

p p

PG  PG  . Also since

1

is the most popular by theorem 3.4 and

Eis the least popular by theorem 3.5 in 1

p

G , hence the result. In what follows, we provide an algorithm that analyses all length-3 patterns in 1

p

G where

5 p 23.

Algorithm 2: Algorithm to show that the number of

occurrence of

A in 1

p

G

Input: Input any 1

i p

G into an array Output: Number of occurrence of

A in

i 1: Begin

2: Set integer c = 0 3: for i = 1 to n − 1

4: for j = i + 1 to n − 2

5: for k = j + 1 to n

6: Case I: τ3

7: if a[k] > a[i]

8: if a[i] > a[j]

9: Case II: τ4

10: ifa[i] > a[k]

11: if a[j] > a[i]

12: Case III: τ5

13: ifa[i] > a[k]

14: if a[k] > a[j]

15: Case IV: τ1

16: if a[j] < a[k]

17: if a[i] < a[j]

18: Case V: τ2

19: if a[j] > a[k]

20: if a[k] > a[i]

21: Case VI: τ6

22: ifa[i] > a[j]

23: if a[j] > a[k]

24: Increment c by 1

25: end if

26: end if 27: end for 28: end for 29: end for 30: End

Hereafter, we implemented the above algorithm and observed that the pattern

1 is the most popular pattern and

Eis the least popular patterns in 1

p

G .

The algorithm validates theorem 3.4, theorem 3.5 and lemma 3.6.

Table 2: Pattern popularity in 1

p

G for prim size 5 to 23

1

p

G

1

2

6

4

5

3

5 16 14 4 2 2 2

7 73 61 28 16 16 16 11 489 393 264 168 168 168 13 952 778 556 382 382 382 17 2800 2280 1840 1320 1320 1320 19 4353 3561 2976 2184 2184 2184 23 9289 7637 6748 5096 5096 5096

Lemma 3.7. Let 1

i Gp

. Then

i and 1

i

 have equal number of increasing pairs and equivalently, equal number of decreasing pairs.

Proof . Let

1

1 2 ...

.

(1) (2) ... ( ) p

p

p

 

  G

The inverse of

is given as

1

(1) (2) ... ( )

,

1 2 ... p

p

p

 

 

(5)

whenever

(1)

(2) ...

( )p . From above we have that

( )j comes after ( ) i as an image in the inverse permutation whenever

( ( ))j ( ( ))i

 

 

Since 1

[ i] [ i ]

P P   by lemma 2.4(i),

1 1

( [P

i]P[

i ])( [P

j]P[

j ])  by lemma 2.4(ii) and by

( ( ))j ( ))i

 

the result follows.

Proposition 3.8. Suppose 1

i p

G then,

1 ( i) ( i )

V  V 

Proof. Since every containment of any pattern is a

concatenation of increasing and/or decreasing pairs by remark 2.6, and also

i and i1 have equal number of increasing pairs and equivalently, equal number of decreasing pairs by lemma 2.4, then the proposition follows.

Proposition 3.9. Suppose 1

i p

G ,

1( p 1) 0

V

Proof. Every 1

1

p p

 G is an almost decreasing sequence and the pattern

1 is a completely increasing sequence. Thus, there does not exist a subsequence that is almost increasing in an almost decreasing sequence. Therefore,

1( p 1) 0.

V   

Hence the result.

 Below is an algorithm that validates proposition 3.9.

Algorithm 3: Algorithm to show that the involution of

any Γ1 non-deranged permutation avoids

1

Input: Input a n y 1 1

p p

 G i n t o a n a r ra y.

Output: Zero 1: Begin

2: Set integer c = 0 3: for i = 1 to n − 1

4: for j = i + 1 to n − 2

5: for k = j + 1 to n

6: if a[j] < a[k]

7: if a[i] < a[j]

8: Increment c by 1 9: end if

10: end if 11: end for 12: end for 13: end for 14: End

Proposition 3.10. Suppose 1

i p

G then,

2( 1) 0

V  

Proof. Given that every 1

1 p

G is a completely increasing sequence and the pattern

2is an almost increasing sequence. Then, there does not exist an almost increasing subsequence in a completely increasing sequence. Thus,

2( 1) 0

V   . Hence the

result.

 Below is an algorithm that validates proposition 3.10.

Algorithm 4: Algorithm to show every 1

1 p

G

avoids

2

Input: Input any 1

1 p

G into an array a Output: Zero

1: Begin

2: Set integer c = 0 3: for i = 1 to n − 1

4: for j = i + 1 to n − 2

5: for k = j + 1 to n

6: if a[j] > a[k]

7: if a[k] > a[i]

8: Increment c by 1

9: end for 10: end for

11: end for 12: end if 13: end if 14:End

A permutation ω is sortable through a system of stacks and queues if an identity permutation, 12...n could be obtained by passing ω through the system of stacks and queues exactly once, making very careful decisions in such away the order of the permutation is not made to be more disorderly. Theorem 3.11. [Knu73] A permutation is sortable through a single stack if and only if it avoids the pattern 231.

Lemma 3.12. Suppose 1

i p

G such that i = 1, p - 1. Then

1and p1are stack sortable.

Proof. To show that every

1and p1 in 1

p

G are

(6)

pattern

4. Since every

1 and 1 1

p p

 G are completely increasing and almost decreasing sequences. Then there cannot exist a subsequence that is an almost increasing sequence in a completely increasing and almost decreasing sequence respectively. Thus,

4( i)

V  will always be zero for i = 1 and p - 1. Hence, by Theorem 3.11, every

1 and p1 in 1

p

G are stack sortable. Hence the result.  We end this section by explicitly providing a summary of tables of the number of occurrence

E for 5 p 23 in 1

p

G (Tables 3 to 6).

Table 3: Number of occurrence of pattern

1 in 1-

non deranged permutations for prime size 5 to 23

1

5

G G7 G11 G13 G17 G19 G23

1

10 35 165 286 680 969 1771

2

3 13 70 125 308 444 825

3

3 6 55 76 235 290 623

4

0 13 55 50 140 309 561

5

6 15 61 155 309 426

6

0 70 21 235 119 561

7

22 125 155 221 330

8

22 61 36 164 623

9

15 76 308 45 265

10

0 50 121 444 330

11

21 65 221 66

12

0 121 164 825

13

140 290 353

14

65 100 426

15

36 100 140

16

0 119 353

17

45 170

18

0 265

19

170

20

140

21

66

22

0

TOTAL 16 73 489 952 2800 4353 9289

Table 4: Number of occurrence of

2 in 1 - non

deranged permutation of prime size 5 to 23

2

5

G G7 G11 G13 G17 G19 G23

1

0 0 0 0 0 0 0

2

4 10 35 56 120 165 286

3

4 13 40 70 140 203 336

4

6 10 40 76 160 200 350

5

13 50 74 158 200 375

6

15 35 80 140 230 350

7

49 56 158 218 389

8

49 74 168 227 336

9

50 70 120 228 396

10

45 76 164 165 389

11

80 170 218 385

12

66 164 227 286

13

160 203 386

14

170 233 375

15

168 233 399

16

120 230 386

17

228 401

18

153 396

19

401

20

399

21

385

22

231

(7)

Table 5: Number of occurrence of

E in 1 - non

deranged permutation of prime size 5 to 23

E

5

G G7 G11 G13 G17 G19 G23

1

0 0 0 0 0 0 0

2

1 4 20 35 84 120 220

3

1 4 22 40 95 140 252

4

0 4 22 40 100 140 260

5

4 20 41 101 140 270

6

0 20 35 95 140 260

7

22 35 101 146 272

8

22 41 84 146 252

9

20 40 84 120 270

10

0 40 101 120 272

11

35 95 146 220

12

0 101 146 220

13

100 140 272

14

95 140 270

15

84 140 252

16

0 140 272

17

120 260

18

0 270

19

260

20

252

21

220

22

0

TOTAL 2 0 2 382 1320 1702 5096

Table 6: Number of occurrence of

6 in 1 - non

deranged permutation of prime size 5 to 23

6

G5 G7 G11 G13 G17 G19 G23

1

0 0 0 0 0 0 0

2

0 0 0 0 0 0 0

3

0 4 4 20 20 56 56

4

4 0 4 40 80 40 80

5

4 40 28 64 40 160

6

20 0 80 20 200 80

7

28 0 64 92 236

8

28 28 224 140 56

9

40 20 0 336 300

10

120 40 92 0 236

11

80 160 92 660

12

220 92 140 0

13

80 56 216

14

160 216 160

15

224 216 476

16

560 200 216

17

336 420

18

816 300

19

420

20

476

21

660

22

1540

(8)

4. CONCLUSION

In this research, we introduced algorithms to examine all length-3 classical patterns in 1

p

G .

Implementing the algorithms, we have shown that pattern

3,

4 and

5 are equipopular. We have experimentally determined the popularity of all patterns of length-3 in 1

p

G by computing the occurrence of all patterns of length-3 in 1- non deranged permutation. We computed for prime size 5 to 23 and observed that pattern

1is the most popular while the least popular are the equipopular patterns in 1

p

G . The algorithm further shows that for

any 1

i p

G , the number of occurrence of a pattern in

i will be equal to the number of occurrence of the same pattern in its inverse. Based on the facts obtained after implementing the algorithm, it is sufficient to conclude that the entire results coincide algebraically.

REFRENCES

[AEA17] Aremu K. O., Ejima O., Abdullahi M. S. - On the fuzzy 1-non deranged

permutation group 1

p

G , Asian Journal of Mathematics and Computer Research, 18(4) 2017, pp. 152-157.

[AOA16] Aminu I. A., Ojonugwa E., Aremu K. O. - On the Representations of 1- Non

deranged Permutation Group Gp ,

Advances in Pure Mathematics, 2016, 6, (09), pp. 608-614.

[Kit11] Kitaev S. - Patterns in permutations

and words. Springer Science &

Business Media, 2011.

[Knu73] Knuth D. E. - Fundamental algorithms: the art of computer

programming. 1973.

[Rud13] Rudolph K. - Pattern popularity in

132-avoiding permutations, The

Electronic Journal of Combinatorics 20(1). 2013.

[Ste10] Steingrımsson E. - Generalized

permutation patterns-a short survey,

Permutation patterns Steve Linton, Nik Ruškuc and Vincent Vatter, Ed. Cambridge University Press 2010, 376, pp. 137-152.

[Zha14] Zhao A. F. - Pattern Popularity in

Multiply Restricted Permutations,

Figure

Table 1: Popularity of ,3
Table 2: Pattern popularity in
Table 5: Number of occurrence of E

References

Related documents

Seattle Area Exercise Programs  Cancer Lifeline  ( www.cancerlifeline.org ) ‐Stretch and Strengthen, Yoga, Lebed  Team Survivor Northwest

S.M.: E-mail: [email protected], F.C.: E-mail: [email protected], B.A.: E-mail: [email protected], A.H.: E-mail: [email protected]... detection that does not

This action also authorizes the chief executive officer to execute a contract with Recommind for the purchase of the Recommind eDiscovery Suite software and related implementation and

Mostly, the research is emphatic that good teaching comes from hard work and thoughtfulness about student needs, stimulation and challenge coupled with support, active engagement

ment should be revised in order to limit the unintended im- pacts of biofuel expansion, whereby the displacement of food crops by energy crops not only leads to direct land use

For those of you not familiar with Box Tops for Education, there are several products our school is able to earn money on just because we purchase those items.. Mary’s receives

As a professional educator, weaver, and shibori dyer, I have successfully used acid dyes, fiber reactive dyes, vat dyes, and disperse dyes for many years.. But when my dye

The scheme seems secure if the watermark copy attack is not possible and if one proves that the key remain secret while the opponent observes more and more pieces of content signed