100% found this document useful (3 votes)
57 views

Algorithmic combinatorics on partial words 1st Edition Francine Blanchet-Sadri download pdf

partial

Uploaded by

theniemepani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
57 views

Algorithmic combinatorics on partial words 1st Edition Francine Blanchet-Sadri download pdf

partial

Uploaded by

theniemepani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

Visit https://ebookgate.

com to download the full version and


explore more ebooks

Algorithmic combinatorics on partial words 1st


Edition Francine Blanchet-Sadri

_____ Click the link below to download _____


https://ebookgate.com/product/algorithmic-
combinatorics-on-partial-words-1st-edition-francine-
blanchet-sadri/

Explore and download more ebooks at ebookgate.com


Here are some recommended products that might interest you.
You can download now and explore!

Twenty Lectures on Algorithmic Game Theory 1st Edition Tim


Roughgarden

https://ebookgate.com/product/twenty-lectures-on-algorithmic-game-
theory-1st-edition-tim-roughgarden/

ebookgate.com

Green Networking 1st Edition Francine Krief

https://ebookgate.com/product/green-networking-1st-edition-francine-
krief/

ebookgate.com

The War on Words Michael T. Gilmore

https://ebookgate.com/product/the-war-on-words-michael-t-gilmore/

ebookgate.com

Algorithmic architecture 1st Edition Kostas Terzidis

https://ebookgate.com/product/algorithmic-architecture-1st-edition-
kostas-terzidis/

ebookgate.com
Introductory Combinatorics 5th Edition Brualdi

https://ebookgate.com/product/introductory-combinatorics-5th-edition-
brualdi/

ebookgate.com

Words on Fire The Unfinished Story of Yiddish 1st Edition


Dovid Katz

https://ebookgate.com/product/words-on-fire-the-unfinished-story-of-
yiddish-1st-edition-dovid-katz/

ebookgate.com

Combinatorics 2nd ed Edition Russell Merris

https://ebookgate.com/product/combinatorics-2nd-ed-edition-russell-
merris/

ebookgate.com

Combinatorics An Introduction 1st Edition Theodore G.


Faticoni

https://ebookgate.com/product/combinatorics-an-introduction-1st-
edition-theodore-g-faticoni/

ebookgate.com

A Primer in Combinatorics 1st Edition Alexander Kheyfits

https://ebookgate.com/product/a-primer-in-combinatorics-1st-edition-
alexander-kheyfits/

ebookgate.com
DISCRETE MATHEMATICS AND ITS APPLICATIONS
Series Editor KENNETH H. ROSEN

Algorithmic Combinatorics on

Pa r t i a l Wo r d s
DISCRETE
MATHEMATICS
and
ITS APPLICATIONS
Series Editor
Kenneth H. Rosen, Ph.D.

Juergen Bierbrauer, Introduction to Coding Theory


Francine Blanchet-Sadri, Algorithmic Combinatorics on Partial Words
Elias Camouzis and G. Ladas, Dynamics of Third-Order Rational Difference Equations with
Open Problems and Conjectures
Kun-Mao Chao and Bang Ye Wu, Spanning Trees and Optimization Problems
Charalambos A. Charalambides, Enumerative Combinatorics
Henri Cohen, Gerhard Frey, et al., Handbook of Elliptic and Hyperelliptic Curve Cryptography
Charles J. Colbourn and Jeffrey H. Dinitz, Handbook of Combinatorial Designs, Second Edition
Martin Erickson and Anthony Vazzana, Introduction to Number Theory
Steven Furino, Ying Miao, and Jianxing Yin, Frames and Resolvable Designs: Uses,
Constructions, and Existence
Randy Goldberg and Lance Riek, A Practical Handbook of Speech Coders
Jacob E. Goodman and Joseph O’Rourke, Handbook of Discrete and Computational Geometry,
Second Edition
Jonathan L. Gross, Combinatorial Methods with Computer Applications
Jonathan L. Gross and Jay Yellen, Graph Theory and Its Applications, Second Edition
Jonathan L. Gross and Jay Yellen, Handbook of Graph Theory
Darrel R. Hankerson, Greg A. Harris, and Peter D. Johnson, Introduction to Information
Theory and Data Compression, Second Edition
Daryl D. Harms, Miroslav Kraetzl, Charles J. Colbourn, and John S. Devitt, Network Reliability:
Experiments with a Symbolic Algebra Environment
Leslie Hogben, Handbook of Linear Algebra
Derek F. Holt with Bettina Eick and Eamonn A. O’Brien, Handbook of Computational Group Theory
David M. Jackson and Terry I. Visentin, An Atlas of Smaller Maps in Orientable and
Nonorientable Surfaces
Richard E. Klima, Neil P . Sigmon, and Ernest L. Stitzinger, Applications of Abstract Algebra
with Maple™ and MATLAB®, Second Edition
Patrick Knupp and Kambiz Salari, Verification of Computer Codes in Computational Science
and Engineering
Continued Titles
William Kocay and Donald L. Kreher, Graphs, Algorithms, and Optimization
Donald L. Kreher and Douglas R. Stinson, Combinatorial Algorithms: Generation Enumeration
and Search
Charles C. Lindner and Christopher A. Rodgers, Design Theory
Hang T. Lau, A Java Library of Graph Algorithms and Optimization
Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone, Handbook of Applied
Cryptography
Richard A. Mollin, Algebraic Number Theory
Richard A. Mollin, Codes: The Guide to Secrecy from Ancient to Modern Times
Richard A. Mollin, Fundamental Number Theory with Applications
Richard A. Mollin, An Introduction to Cryptography, Second Edition
Richard A. Mollin, Quadratics
Richard A. Mollin, RSA and Public-Key Cryptography
Carlos J. Moreno and Samuel S. Wagstaff, Jr., Sums of Squares of Integers
Dingyi Pei, Authentication Codes and Combinatorial Designs
Kenneth H. Rosen, Handbook of Discrete and Combinatorial Mathematics
Douglas R. Shier and K.T. Wallenius, Applied Mathematical Modeling: A Multidisciplinary
Approach
Jörn Steuding, Diophantine Analysis
Douglas R. Stinson, Cryptography: Theory and Practice, Third Edition
Roberto Togneri and Christopher J. deSilva, Fundamentals of Information Theory and
Coding Design
W. D. Wallis, Introduction to Combinatorial Designs, Second Edition
Lawrence C. Washington, Elliptic Curves: Number Theory and Cryptography
DISCRETE MATHEMATICS AND ITS APPLICATIONS
Series Editor KENNETH H. ROSEN

Algorithmic Combinatorics on

Partial Words

F r an c i n e Bl an c he t-S Adri
Chapman & Hall/CRC
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487‑2742
© 2008 by Taylor & Francis Group, LLC
Chapman & Hall/CRC is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works


Printed in the United States of America on acid‑free paper
10 9 8 7 6 5 4 3 2 1

International Standard Book Number‑13: 978‑1‑4200‑6092‑8 (Hardcover)

This book contains information obtained from authentic and highly regarded sources. Reprinted
material is quoted with permission, and sources are indicated. A wide variety of references are
listed. Reasonable efforts have been made to publish reliable data and information, but the author
and the publisher cannot assume responsibility for the validity of all materials or for the conse‑
quences of their use.

No part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any
electronic, mechanical, or other means, now known or hereafter invented, including photocopying,
microfilming, and recording, or in any information storage or retrieval system, without written
permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.
copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC)
222 Rosewood Drive, Danvers, MA 01923, 978‑750‑8400. CCC is a not‑for‑profit organization that
provides licenses and registration for a variety of users. For organizations that have been granted a
photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.

Library of Congress Cataloging‑in‑Publication Data

Blanchet‑Sadri, Francine.
Algorithmic combinatorics on partial words / Francine Blanchet‑Sadri.
p. cm. ‑‑ (Discrete mathematics and its applications)
Includes bibliographical references and index.
ISBN 978‑1‑4200‑6092‑8 (hardback : alk. paper)
1. Computer algorithms. 2. Computer science‑‑Mathematics. 3. Combinatorial
analysis. I. Title. II. Series.

QA76.9.A43B53 2007
005.1‑‑dc22 2007031486

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com

T&F_LOC_A_Master.indd 1 8/3/07 7:15:07 AM


Dedication

To my children: Ahmad, Hamid and Mariamme

1
Contents

Preface 13
I BASICS 23
1 Preliminaries on Partial Words 25
1.1 Alphabets, letters, and words . . . . . . . . . . . . . . . . . . 25
1.2 Partial functions and partial words . . . . . . . . . . . . . . 27
1.3 Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.4 Factorizations of partial words . . . . . . . . . . . . . . . . . 32
1.5 Recursion and induction on partial words . . . . . . . . . . . 35
1.6 Containment and compatibility . . . . . . . . . . . . . . . . . 36
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 40
Programming exercises . . . . . . . . . . . . . . . . . . . . . 41
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 42

2 Combinatorial Properties of Partial Words 43


2.1 Conjugacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.1.1 The equation xz = zy . . . . . . . . . . . . . . . . . 43
2.1.2 The equation xz ↑ zy . . . . . . . . . . . . . . . . . . 44
2.2 Commutativity . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.2.1 The equation xy = yx . . . . . . . . . . . . . . . . . 48
2.2.2 The equation xy ↑ yx . . . . . . . . . . . . . . . . . . 48
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 57
Programming exercises . . . . . . . . . . . . . . . . . . . . . 58
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 59

II PERIODICITY 61
3 Fine and Wilf ’s Theorem 63
3.1 The case of zero or one hole . . . . . . . . . . . . . . . . . . 63
3.2 The case of two or three holes . . . . . . . . . . . . . . . . . 64
3.3 Special partial words . . . . . . . . . . . . . . . . . . . . . . 67
3.3.1 p = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.3.2 p > 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

3
3.4 Graphs associated with partial words . . . . . . . . . . . . . 73
3.5 The main result . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.6 Related results . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 88
Programming exercises . . . . . . . . . . . . . . . . . . . . . 89
Websites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 90

4 Critical Factorization Theorem 93


4.1 Orderings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.2 The zero-hole case . . . . . . . . . . . . . . . . . . . . . . . . 96
4.3 The main result: First version . . . . . . . . . . . . . . . . . 98
4.4 The main result: Second version . . . . . . . . . . . . . . . . 104
4.5 Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 113
Programming exercises . . . . . . . . . . . . . . . . . . . . . 114
Websites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 115

5 Guibas and Odlyzko’s Theorem 117


5.1 The zero-hole case . . . . . . . . . . . . . . . . . . . . . . . . 117
5.2 The main result . . . . . . . . . . . . . . . . . . . . . . . . . 120
5.3 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 152
Programming exercises . . . . . . . . . . . . . . . . . . . . . 153
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 154

III PRIMITIVITY 155


6 Primitive Partial Words 157
6.1 Testing primitivity on partial words . . . . . . . . . . . . . . 158
6.2 Counting primitive partial words . . . . . . . . . . . . . . . . 162
6.3 Exact periods . . . . . . . . . . . . . . . . . . . . . . . . . . 164
6.4 First counting method . . . . . . . . . . . . . . . . . . . . . . 170
6.5 Second counting method . . . . . . . . . . . . . . . . . . . . 174
6.5.1 The one-hole case . . . . . . . . . . . . . . . . . . . . 178
6.5.2 The two-hole case . . . . . . . . . . . . . . . . . . . . 181
6.6 Existence of primitive partial words . . . . . . . . . . . . . . 187
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 196
Programming exercises . . . . . . . . . . . . . . . . . . . . . 196
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 197

7 Unbordered Partial Words 199


7.1 Concatenations of prefixes . . . . . . . . . . . . . . . . . . . 200
7.2 More results on concatenations of prefixes . . . . . . . . . . . 207
7.3 Critical factorizations . . . . . . . . . . . . . . . . . . . . . . 213
7.4 Conjugates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 219
Programming exercises . . . . . . . . . . . . . . . . . . . . . 220
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 221

IV CODING 223
8 Pcodes of Partial Words 225
8.1 Binary relations . . . . . . . . . . . . . . . . . . . . . . . . . 225
8.2 Pcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
8.2.1 The class F . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.2 The class G . . . . . . . . . . . . . . . . . . . . . . . . 234
8.3 Pcodes and monoids . . . . . . . . . . . . . . . . . . . . . . . 236
8.4 Prefix and suffix orderings . . . . . . . . . . . . . . . . . . . 239
8.5 Border ordering . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.6 Commutative ordering . . . . . . . . . . . . . . . . . . . . . 244
8.7 Circular pcodes . . . . . . . . . . . . . . . . . . . . . . . . . 249
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 254
Programming exercises . . . . . . . . . . . . . . . . . . . . . 254
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 255

9 Deciding the Pcode Property 257


9.1 First algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 257
9.2 Second algorithm . . . . . . . . . . . . . . . . . . . . . . . . 264
9.2.1 Domino technique on words . . . . . . . . . . . . . . . 264
9.2.2 Domino technique on partial words . . . . . . . . . . . 267
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 276
Programming exercises . . . . . . . . . . . . . . . . . . . . . 277
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 277

V FURTHER TOPICS 279


10 Equations on Partial Words 281
10.1 The equation xm ↑ y n . . . . . . . . . . . . . . . . . . . . . 281
10.2 The equation x2 ↑ y m z . . . . . . . . . . . . . . . . . . . . . 287
10.3 The equation xm y n ↑ z p . . . . . . . . . . . . . . . . . . . . 290
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 293
Programming exercises . . . . . . . . . . . . . . . . . . . . . 294
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 295

11 Correlations of Partial Words 297


11.1 Binary and ternary correlations . . . . . . . . . . . . . . . . 297
11.2 Characterizations of correlations . . . . . . . . . . . . . . . . 299
11.3 Distributive lattices . . . . . . . . . . . . . . . . . . . . . . . 305
11.3.1 ∆n is a distributive lattice . . . . . . . . . . . . . . . 309
11.3.2 ∆0n is a distributive lattice . . . . . . . . . . . . . . . 309
11.4 Irreducible period sets . . . . . . . . . . . . . . . . . . . . . . 315
11.5 Counting correlations . . . . . . . . . . . . . . . . . . . . . . 318
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 322
Programming exercises . . . . . . . . . . . . . . . . . . . . . 323
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 323

12 Unavoidable Sets of Partial Words 325


12.1 Unavoidable sets . . . . . . . . . . . . . . . . . . . . . . . . . 325
12.2 Classifying unavoidable sets of size two . . . . . . . . . . . . 328
12.3 The case where k = 1 and l = 1 . . . . . . . . . . . . . . . 330
12.4 The case where k = 1 and l = 2 . . . . . . . . . . . . . . . 331
12.5 Larger values of k and l . . . . . . . . . . . . . . . . . . . . . 339
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Challenging exercises . . . . . . . . . . . . . . . . . . . . . . 341
Programming exercises . . . . . . . . . . . . . . . . . . . . . 342
Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Bibliographic notes . . . . . . . . . . . . . . . . . . . . . . . 342

Solutions to Selected Exercises 345


References 369
Index 379
List of Tables

3.1 Optimal lengths for weak periodicity. . . . . . . . . . . . . . . 82


3.2 Optimal lengths for strong periodicity. . . . . . . . . . . . . . 86

4.1 Percentage of partial words without critical factorizations. . . 112


4.2 Average values for the indices k0 , l0 , k1 , l1 . . . . . . . . . . . . 113

6.1 Values for alphabet of size k = 2 and h ∈ {0, 1}. . . . . . . . . 164


6.2 Values for alphabet of size k = 2 and h ∈ {2, 3}. . . . . . . . . 165
6.3 Values for alphabet of size k = 3 and h = 0. . . . . . . . . . . 165
6.4 Values for alphabet of size k = 3 and h = 1. . . . . . . . . . . 166
6.5 Values for alphabet of size k = 3 and h ∈ {2, 3}. . . . . . . . . 166
6.6 Partial words in N1,2 (8): “1” refers to length of proot is 1; “2p”
to length of primitive proot is 2; “2n” to length of nonprimitive
proot is 2; “4p0” (respectively, “4p1”) to length of primitive
full (respectively, one-hole) proot is 4; and “4n” to length of
nonprimitive proot is 4. . . . . . . . . . . . . . . . . . . . . . 175

11.1 Number of primitive sets of integers less than n. . . . . . . . 320


11.2 The partial word ternary correlations of ∆06 . . . . . . . . . . . 321

7
List of Figures

1.1 A picture of a partial function. . . . . . . . . . . . . . . . . . 28

2.1 An example of the conjugacy equation. . . . . . . . . . . . . . 47


2.2 The construction of seq6,8 (0). . . . . . . . . . . . . . . . . . . 50
2.3 An example of the commutativity equation. . . . . . . . . . . 53

3.1 A (2, p, q)-special binary partial word. . . . . . . . . . . . . . 66


3.2 A word u with p = 1 and q = 5. . . . . . . . . . . . . . . . . . 68
3.3 Perspective view of a word u with p = 1 and q = 5. . . . . . . 68
3.4 Entire cylinder for the partial word in Example 3.4. . . . . . 69
3.5 Latter part of the cylinder for the pword in Example 3.4. . . 70
3.6 Entire cylinder for the partial word in Example 3.5. . . . . . 70
3.7 Perspective view of the cylinder for the partial word in Exam-
ple 3.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.8 G(2,5) (u3 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.9 Cylinder for u3 in Example 3.9. . . . . . . . . . . . . . . . . . 75
3.10 G0(6,8) (u4 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.11 G1(6,8) (u4 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.12 Both cylinders for u4 in Example 3.10. . . . . . . . . . . . . . 76
3.13 Cylinder for G0(6,8) (u4 ) in Example 3.10. . . . . . . . . . . . . 76
3.14 Cylinder for G1(6,8) (u4 ) in Example 3.10. . . . . . . . . . . . . 77
3.15 Cylinder for u(4,2,5) in Example 3.11. . . . . . . . . . . . . . . 81
3.16 Cylinder for u(5,2,5) in Example 3.12. . . . . . . . . . . . . . . 81

4.1 Internal square. . . . . . . . . . . . . . . . . . . . . . . . . . . 96


4.2 Left-external square. . . . . . . . . . . . . . . . . . . . . . . . 96
4.3 Right-external square. . . . . . . . . . . . . . . . . . . . . . . 97
4.4 Left- and right-external square. . . . . . . . . . . . . . . . . . 97
4.5 Internal square. . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.6 Left-external square. . . . . . . . . . . . . . . . . . . . . . . . 99
4.7 Right-external square. . . . . . . . . . . . . . . . . . . . . . . 100
4.8 Left- and right-external square. . . . . . . . . . . . . . . . . . 100

5.1 Type 1 factorization. . . . . . . . . . . . . . . . . . . . . . . . 121


5.2 Type 2 factorization. . . . . . . . . . . . . . . . . . . . . . . . 122
5.3 The case of Lemma 5.9(1). . . . . . . . . . . . . . . . . . . . . 124

9
10

5.4 The case of Lemma 5.9(2). . . . . . . . . . . . . . . . . . . . . 125


5.5 The case when r > h. . . . . . . . . . . . . . . . . . . . . . . 132
5.6 The case when h + r ≥ |vwi v|. . . . . . . . . . . . . . . . . . 133

6.1 Mapping f for w = abb. . . . . . . . . . . . . . . . . . . . 168


6.2 Representation of Case 2 when j ∈ Cd . . . . . . . . . . . . . . 183
6.3 Representation of Case 2 when j ∈ Dd (i1 ). . . . . . . . . . . . 183
6.4 Representation of Case 4. . . . . . . . . . . . . . . . . . . . . 184

7.1 An overlapping border. . . . . . . . . . . . . . . . . . . . . . . 199


7.2 A nonoverlapping border. . . . . . . . . . . . . . . . . . . . . 200
7.3 Overlap of Type 1. . . . . . . . . . . . . . . . . . . . . . . . . 213
7.4 Overlap of Type 2. . . . . . . . . . . . . . . . . . . . . . . . . 214
7.5 Overlap of Type 3. . . . . . . . . . . . . . . . . . . . . . . . . 214
7.6 Overlap of Type 4. . . . . . . . . . . . . . . . . . . . . . . . . 214

8.1 Two distinct factorizations. . . . . . . . . . . . . . . . . . . . 229


8.2 A nontrivial compatibility relation. . . . . . . . . . . . . . . . 230
8.3 Representation of stability. . . . . . . . . . . . . . . . . . . . 237
8.4 A circular pcode. . . . . . . . . . . . . . . . . . . . . . . . . . 250

9.1 Simplified domino graph and function of Y = {u1 , u2 , u3 , u4 }


where u1 = a, u2 = abbbbba, u3 = babab, and u4 = bbbb. . . . . 266
9.2 Neighborhood of vertex open in G(Z) where Z = {u1 , u2 , u3 , u4 }
with u1 = ab, u2 = aabbb, u3 = b, and u4 = ba. . . . . . . . 270
9.3 Neighborhood of vertex εb in G(Z). . . . . . . . . . . . . . . 270
9.4 Neighborhood of vertex close in G(Z). . . . . . . . . . . . . . 271
9.5 A path q of length at least three from open to close in G(Z). 272

10.1 An example of the good pair equation. . . . . . . . . . . . . . 286


10.2 An example of the good triple equation. . . . . . . . . . . . . 289

11.1 Meet semilattice (A3 , ⊂) where A = {a, b}. . . . . . . . . . . . 307


11.2 A representation of the lattice ∆6 . . . . . . . . . . . . . . . . 310
11.3 The associated nontrivial period sets of Figure 11.2. . . . . . 310
11.4 A representation of the lattice ∆05 . . . . . . . . . . . . . . . . 313
11.5 The associated nontrivial period and weak period sets of Fig-
ure 11.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
11.6 Bijective correspondence between ∆6 and Φ6 . . . . . . . . . . 317
11.7 A representation of the meet semilattice Φ6 . . . . . . . . . . . 317

12.1 Horizontal arrows. . . . . . . . . . . . . . . . . . . . . . . . . 333


12.2 Vertical arrows. . . . . . . . . . . . . . . . . . . . . . . . . . . 334
12.3 The table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
1 Picture for Lemma 1.2. . . . . . . . . . . . . . . . . . . . . . . 345
2 Conjugacy on full words is transitive. . . . . . . . . . . . . . . 346
11

3 The disconnected graph G(4,7) (u). . . . . . . . . . . . . . . . 350


4 A (3, p, q)-special binary partial word. . . . . . . . . . . . . . 350
Preface

Over the last few years the discrete mathematics and theoretical computer
science communities have witnessed an explosive growth in the area of algo-
rithmic combinatorics on words. Words, or strings of symbols over a finite
alphabet, are natural objects in several research areas including automata
and formal language theory, coding theory, and theory of algorithms. Molec-
ular biology has stimulated considerable interest in the study of partial words
which are strings that may contain a number of “do not know” symbols or
“holes.” The motivation behind the notion of a partial word is the comparison
of genes. Alignment of two such strings can be viewed as a construction of two
partial words that are said to be compatible in a sense that will be discussed
in Chapter 1. While a word can be described by a total function, a partial
word can be described by a partial function. More precisely, a partial word
of length n over a finite alphabet A is a partial function from {0, . . . , n − 1}
into A. Elements of {0, . . . , n − 1} without an image are called holes (a word
is just a partial word without holes). Research in combinatorics on partial
words is underway [10, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 105, 111, 124, 130, 131] and
promises a rich theory as well as substantial impact especially in molecular
biology, nano-technology, data communication, and DNA computing [104].
Partial words are currently being considered, in particular, for finding good
encodings for DNA computations. Courses, covering different sets of topics,
are already being taught at some universities. The time seems right for a book
that develops, in a clear manner, some of the central ideas and results of this
area, as well as sets the tone of research for the next several years. This book
on algorithmic combinatorics on partial words addresses precisely this need.
An effort has been made to ensure that this book is able to serve as a text-
book for a diversity of courses. It is intended as an upper-level undergraduate
or introductory graduate text in algorithms and combinatorics. It contains a
mathematical treatment of combinatorics on partial words designed around
algorithms and can be used for teaching and research. The chapters not only
cover topics in which definitive techniques have emerged for solving problems
related to partial words but also cover topics in which progress is desired
and expected over the next several years. The principal audience we have in
mind for this book are undergraduate or beginning graduate students from
the mathematical and computing sciences. This book will be of interest to
students, researchers, and practitioners in discrete mathematics and theoret-
ical computer science who want to learn about this new and exciting class

13
14 Preface

of partial words where many problems still lay unexplored. It will also be
of interest to students, researchers, and practitioners in bioinformatics, com-
putational molecular biology, DNA computing, and Mathematical Linguistics
seeking to understand this subject. We do assume that the reader has taken
some first course in discrete mathematics.

BOOK OVERVIEW

The book stresses major topics underlying the combinatorics of this emerg-
ing class of partial words. The contents of the book are summarized as follows:
• Part I concerns basics. In Chapter 1, we fix the terminology. In par-
ticular, we discuss compatibility of partial words. The compatibility
relation considers two strings over the same alphabet that are equal ex-
cept for a number of insertions and/or deletions of symbols. It is well
known that some of the most basic combinatorial properties of words,
like the conjugacy (xz = zy) and the commutativity (xy = yx), can be
expressed as solutions of word equations. In Chapter 2, we investigate
these equations in the context of partial words. When we speak about
such equations, we replace the notion of equality (=) with compatibility
(↑). There, we solve xz ↑ zy and xy ↑ yx.
• Part II which consists of Chapters 3, 4 and 5 focuses on three impor-
tant concepts of periodicity on partial words: one is that of period, an
other is that of weak period, and the last one is that of local period
which characterizes a local periodic structure at each position of the
word. These chapters discuss fundamental results concerning periodic-
ity of words and extend them in the framework of partial words. These
include: First, the well known and basic result of Fine and Wilf [77]
which intuitively determines how far two periodic events have to match
in order to guarantee a common period; Second, the well known and
fundamental critical factorization theorem [49] which intuitively states
that the minimal period (or global period) of a word of length at least
two is always locally detectable in at least one position of the word re-
sulting in a corresponding critical factorization; Third, the well known
and unexpected result of Guibas and Odlyzko [82] which states that the
set of all periods of a word is independent of the alphabet size.
• Part III covers primitivity. Primitive words, or strings that cannot be
written as a power of another string, play an important role in numer-
ous research areas including formal language theory, coding theory, and
combinatorics on words. Testing whether or not a word is primitive can
be done in linear time in the length of the word. Indeed, a word is prim-
itive if and only if it is not an inside factor of its square. In Chapter 6,
Preface 15

we describe in particular a linear time algorithm to test primitivity on


partial words. The algorithm is based on the combinatorial result that
under some condition, a partial word is primitive if and only if it is not
compatible with an inside factor of its square. The concept of speciality,
related to commutativity on partial words, is foundational in the design
of the algorithm. There, we also investigate the number of primitive
partial words of a fixed length over an alphabet of a fixed size. The
zero-hole case is well known and relates to the Möbius function. There
exists a particularly interesting class of primitive words, the unbordered
ones. An unbordered word is a string over a finite alphabet such that
none of its proper prefixes is one of its suffixes. In Chapter 7, we extend
results on unbordered words to unbordered partial words.
• Part IV relates to coding. Codes play an important role in the study
of the combinatorics on words. In Chapter 8, we introduce pcodes that
play a role in the study of combinatorics on partial words. Pcodes are
defined in terms of the compatibility relation. We revisit the theory
of codes of words starting from pcodes of partial words. We present
some important properties of pcodes, describe various ways of defining
and analyzing pcodes, and give several equivalent definitions of pcodes
and the monoids they generate. It turns out that many pcodes can be
obtained as antichains with respect to certain partial orderings. We
investigate in particular the Defect Theorem for partial words. We also
discuss two-element pcodes, complete pcodes, maximal pcodes, and the
class of circular pcodes. In Chapter 9, using two different techniques,
we show that the pcode property is decidable.
• Part V covers further topics.
Chapter 10 continues the study of equations on partial words, study that
was started in Chapter 2. As mentioned before, an important problem
is to decide whether or not a given equation on words has a solution.
For instance, the equation xm y n = z p has only periodic solutions in
a free monoid, that is, if xm y n = z p holds with integers m, n, p ≥ 2,
then there exists a word w such that x, y, z are powers of w. This
result, which received a lot of attention, was first proved by Lyndon and
Schützenberger [109] for free groups. In Chapter 10 we solve, among
other equations, xm y n ↑ z p for integers m ≥ 2, n ≥ 2, p ≥ 4.
Chapter 11 introduces the notions of binary and ternary correlations,
which are binary and ternary vectors indicating the periods and weak
periods of partial words. Extending the result of Guibas and Odlyzko
of Chapter 5, we characterize precisely which of these vectors represent
the period and weak period sets of partial words and prove that all
valid correlations may be taken over the binary alphabet. We show that
the sets of all such vectors of a given length form distributive lattices
under suitably defined relations. We also show that there is a well
16 Preface

defined minimal set of generators for any binary correlation of length


n and demonstrate that these generating sets are the primitive subsets
of {1, 2, ..., n − 1}. Lastly, we investigate the number of partial word
correlations of length n.
The notion of an unavoidable set of words appears frequently in the
fields of mathematics and theoretical computer science, in particular
with its connection to the study of combinatorics on words. The theory
of unavoidable sets has seen extensive study over the past twenty years.
In Chapter 12, we extend the definition of unavoidable sets of words
to unavoidable sets of partial words. We demonstrate the utility of the
notion of unavoidability on partial words by making use of it to identify
several new classes of unavoidable sets of full words. Along the way we
begin work on classifying the unavoidable sets of partial words of small
cardinality. We pose a conjecture, and show that affirmative proof of this
conjecture gives a sufficient condition for classifying all the unavoidable
sets of partial words of size two. Finally, we give a result which makes
the conjecture easy to verify for a significant number of cases.

KEY FEATURES

Key features of the book include:

• The style of presentation emphasizes the understanding of ideas. Clar-


ity is achieved by a very careful exposition, based on our experience
in teaching undergraduate and graduate students. Worked examples
and diagrams abound to illustrate these ideas. In the case of concept
definitions, we have used the convention that terms used throughout
the book are in boldface when they are first introduced in definitions.
Other terms appear in italics in their definition.

• Many of the algorithms are presented first through English sentences and
then in pseudo code format. In some cases the pseudo code provides a
level of detail that should help readers interested in implementation.

• There are links to many World Wide Web server interfaces that have
been established for automated use of programs related to this book.
The power of these internet resources will be demonstrated by applying
them throughout the book to understand the material and to solve some
of the exercises.

• Bibliographic notes appear at the end of each chapter.


Preface 17

• Exercises also appear at the end of each chapter. Practice through solv-
ing them is essential to learning the subject. In this book, the exercises
are organized into three main categories: exercises, challenging exer-
cises and programming exercises. The exercises review definitions and
concepts, while the challenging exercises require more ingenuity. This
wealth of exercises provides a good mix of algorithm tracing, algorithm
design, mathematical proof, and program implementation. Some of the
exercises are drills, while others make important points about the ma-
terial covered in the text or introduce concepts not covered there at all.
Several exercises are designed to prepare the reader for material covered
later in the book.
• At the end of the book, solutions or hints are provided to selected ex-
ercises to help readers achieve their goals. They are marked by the
symbols S and H respectively. Some solutions can be found in the
literature (the reference that solves the exercise is usually cited in the
bibliographic notes).
Sections of the book can be assigned for self study, some sections can be as-
signed in conjunction with projects, and other sections can be skipped without
danger of making later sections of the book incomprehensible to the reader.
The bibliographic notes also provide tips for further reading. The following
drawing depicts the interdependency of chapters.
18 Preface

WEBSITES

I believe that without collaboration with Ajay Chriscoe on the paper enti-
tled Local periods and binary partial words: an algorithm published in Theo-
retical Computer Science I would not be writing this preface, so I am thankful
to have had that opportunity. Ajay spent countless hours helping me design
the version of the algorithm that appears in Chapter 5. It is Ajay who decided
to establish a World Wide Web server interface at

http://www.uncg.edu/mat/AlgBin

for automated use of the program. Many other websites have been established
by Ajay and other students for research related to this book:

http://www.uncg.edu/mat/bintwo
http://www.uncg.edu/mat/border
http://www.uncg.edu/mat/cft
http://www.uncg.edu/mat/research/cft2
http://www.uncg.edu/mat/research/correlations
http://www.uncg.edu/mat/research/equations
http://www.uncg.edu/mat/research/finewilf
http://www.uncg.edu/mat/research/finewilf2
http://www.uncg.edu/mat/research/finewilf3
http://www.uncg.edu/mat/pcode
http://www.uncg.edu/mat/primitive
http://www.uncg.edu/mat/research/primitive2
http://www.uncg.edu/mat/research/unavoidablesets
http://www.uncg.edu/cmp/research/bordercorrelation
http://www.uncg.edu/cmp/research/correlations2
http://www.uncg.edu/cmp/research/finewilf4
http://www.uncg.edu/cmp/research/freeness
http://www.uncg.edu/cmp/research/tilingperiodicity
http://www.uncg.edu/cmp/research/unavoidablesets2

The bintwo website was designed by Brian Shirey; the border by Margaret
Moorefield; the cft by Ajay Chriscoe; cft2 by Nathan Wetzler; correlations
by Joshua Gafni and Kevin Wilson; equations by Dakota Blair, Craig Gjel-
tema, Rebeca Lewis and Margaret Moorefield; finewilf by Kevin Corcoran;
finewilf2 by Taktin Oey and Tim Rankin; finewilf3 by Deepak Bal and
Gautam Sisodia; pcode by Margaret Moorefield; primitive by Arundhati
Anavekar and Margaret Moorefield; primitive2 by Brent Rudd; finewilf4
by Travis Mandel and Gautam Sisodia; unavoidablesets by Justin Palumbo;
bordercorrelation by Emily Clader and Olivia Simpson; correlations2
Preface 19

by Justin Fowler and Gary Gramajo; freeness by Robert Mercaş and Ge-
offrey Scott; tilingperiodicity by Lisa Bromberg and Karl Zipple; and
unavoidablesets2 by Tracy Weyand and Andy Kalcic. Other websites re-
lated to material in this book are emerging even as I write this.
An accompanying website has been designed by Brian Shirey at
http://www.uncg.edu/mat/research/partialwords
that contains information on partial words. In addition, a website at
http://www.uncg.edu/mat/reu
has been designed by Margaret Moorefield for my NSF supported project
Algorithmic Combinatorics on Words.
I also received invaluable expert technical support from Richard Cheek and
Brian Shirey. It is Brian who helped with the drawing of most of the figures
in the book. In addition, Shashi Kumar’s help with LATEX typesetting is much
appreciated.

COMMENTS/SUGGESTIONS

If you find any errors, or have any suggestions for improvement, I will be
glad to hear from you. Please send any comments to me at
[email protected],

or at
Francine Blanchet-Sadri,
Department of Computer Science,
University of North Carolina,
P.O. Box 26170,
Greensboro, NC 27402-6170,
USA
I thank in advance all readers interested in helping me make this a better
book.

ACKNOWLEDGEMENTS

I have been fortunate to have been awarded several grants from the Na-
tional Science Foundation. The material in this book is based upon work
supported by NSF under Grant No. CCR–9700228 RUI: Decipherability of
20 Preface

Codes and Applications, Grant No. CCF–0207673 RUI: Computing Patterns


in Strings, and Grant No. DMS–0452020 REU Site: Algorithmic Combina-
torics on Words.
The present book started its life thanks to: Jean-Eric Pin from LIAFA:
Laboratoire d’Informatique Algorithmique: Fondements et Applications of
University Paris 7, Paris, France who provided a lot of encouragement and
a stimulating work environment during my stays in 2000, 2004 and 2005,
and Pál Dömösi from the University of Debrecen, Debrecen, Hungary who
was very kind in sending me the book of Shyr Free Monoids and Languages,
some sections of my book being heavily based on, and in giving me a draft
of his book Primitive Words and Context-Free Languages during my stay in
Debrecen in 2005. Many thanks also to Yulia Gamzova in giving me research
papers during her visit to UNCG in 2005. I wish to thank Carlos Martin
Vide for the opportunity of lecturing on partial words during the 1st term of
the 5th International PhD School in Formal Languages and Applications in
Tarragona, Spain (May 12–13, 2006). The following people were very kind in
sending me research papers: Peter Leupold, Gerhard Lischke, Robert Mercaş,
and Arseny Shur.
Research Assignments in 2000 and 2005 from the University of North Car-
olina at Greensboro are gratefully acknowledged. It is UNCG that provided
research assistantships to Robert Hegstrom, Phuongchi Thi Le, Donald Luh-
mann, and Brian Shirey to work with me on various research projects. I also
wish to thank many colleagues, in particular Paul Duvall, Nancy Green and
Shan Suthaharan who have given me assistance with my first REU summer on
Algorithmic Combinatorics on Words and with several theses related to this
book. I am grateful to my students who helped me proofread an early draft
and helped me in several ways: Charles Batts, Jonathan Britton, Archana
Dattatreya, Malcolm Gethers, Craig Gjeltema, Zhiyong Guo, Robert Mercaş,
John Mitaka, Robert Misior, Ji-Young Oh, Aparna Pisharody, Stephanie Red-
nour, Charles Renn, and Adrian Rudd. Special thanks are due to Charles
Renn who helped me with Chapters 1, 2 and 3. In addition, he made many
figures and provided several helpful comments and suggestions. I had many
helpful discussions with Stephanie and Robert, who also provided crucial as-
sistance in LATEX typesetting matters. Archana and Aparna also made many
contributions, some of which have been incorporated into the exercises.
My research assistants Mihai Cucuringu, Crystal Davis, Robert Mercaş,
Margaret Moorefield, and Gautam Sisodia provided invaluable ideas that have
expanded many parts of this book. I also wish to thank other research assis-
tants who helped me in different research projects related to combinatorics
on words: Steve Adkins, Pheadra Agius, Arundhati Anavekar, Jerry Barnes,
Cheng-Tao Chen, Ajay Chriscoe, Stacy Duncan, Dale Gaddis, Firdouse Gama,
Robert Hegstrom, Tracey Howell, Bobbie Jobe, Phuongchi Thi Le, Donald
Luhmann, Liem Mai, Crystal Morgan, Baouyen Phan, Brian Shirey, Steven
Wicker, Lili Zhang, and Xin-Hong Zhang.
I thank my co-authors: Arundhati Anavekar, Deepak Bal, Dakota Blair,
Preface 21

Jonathan Britton, Lisa Bromberg, Naomi Brownstein, Cheng-Tao Chen, Ajay


Chriscoe, Emily Clader, Kevin Corcoran, Mihai Cucuringu, Crystal Davis,
Joel Dodge, Stacy Duncan, Justin Fowler, Joshua Gafni, Gary Gramajo,
Robert Hegstrom, Andy Kalcic, Rebeca Lewis, Donald Luhmann, Travis Man-
del, Robert Mercaş, Margaret Moorefield, Jenell Nyberg, Taktin Oey, Justin
Palumbo, Tim Rankin, Geoffrey Scott, Brian Shirey, Olivia Simpson, Gautam
Sisodia, Nathan Wetzler, Tracy Weyand, Kevin Wilson, Jeffery Zhang, and
Karl Zipple. Many of them provided data that appear throughout the book:
Ajay Chriscoe, Mihai Cucuringu, Joshua Gafni, Margaret Moorefield, Nathan
Wetzler, and Kevin Wilson.
Finally, I wish to thank my husband Fereidoon and my children Ahmad,
Hamid and Mariamme, for providing the support without which this book
could not have been written.

Francine Blanchet-Sadri September 27, 2007


Part I

BASICS

23
Chapter 1
Preliminaries on Partial Words

In this chapter, we give a short review of some basic notions on partial words
that will be used throughout the book.

1.1 Alphabets, letters, and words


Let A be a nonempty finite set of symbols, which we call an alphabet. An
element a ∈ A is called a letter. A word over the alphabet A is a finite sequence
of elements of A.

Example 1.1
The following sets are alphabets:

A = {a, b, c, n}

B = {0, 1}
The sequence of letters banana is a word over the alphabet A, as well as the
word cbancb. Over the alphabet B, the sequences 0, 1, and 01010111110 are
words.

For any word u, α(u) is defined as the set of distinct letters in u. We allow
for the possibility that a word consists of no letters. It is called the empty
word and is denoted by ε.

Example 1.2
Consider the words u = banana, v = aaccaaa, and the empty word ε. Then,

α(u) = {a, b, n}

α(v) = {a, c}
α(ε) = ∅

25
26 Algorithmic Combinatorics on Partial Words

The set of all words over A is denoted by A∗ and is equipped with the
associative operation defined by the concatenation of two sequences. We use
multiplicative notation for concatenation. For example, if u = aaa and v =
bbb are words over an alphabet A, they are members of A∗ , and the word
uv = aaabbb is also a member of A∗ . The empty word is the neutral element
for concatenation, as any word u concatenated with the empty word is simply
itself again (uε = εu = u).
The set of nonempty words over A is denoted by A+ . Thus we have A+ =

A \ {ε}.
Notice that for any two words u and v in either A∗ or A+ , their product
uv is also in the same set. The only difference between these sets is that the
empty word ε is an element of A∗ and not A+ . We note that the set A+ is
equipped with the structure of a semigroup. It is called the free semigroup
over A. The set A∗ , with its inclusion of the empty word, is equipped with
the structure of a monoid. It is called the free monoid over A.1
For a word u, we can write the i-power of u, where

ui = uuu
| {z. . . u}
i times

We can also define ui recursively with the following definition:



i ε if i = 0
u =
uui−1 if i ≥ 1

Example 1.3
Let a and b be letters in an alphabet A. Then,

a6 = aaaaaa

(aba)3 = (aba)(aba)(aba) = abaabaaba

At this point, we define a word u to be primitive if there exists no word v


such that u = v i with i ≥ 2.

Example 1.4
The word u = abaaba is not primitive, as shown here:

u = abaaba = (aba)2 = v 2 where v = aba

1A semigroup is a nonempty set together with a binary associative operation. A monoid is


a semigroup with identity.
Preliminaries on Partial Words 27

The word aaaaa = a5 is also clearly not primitive, whereas the word aaaab is
primitive.
We also note here that the empty word ε is not primitive, for
ε = εi for all i

1.2 Partial functions and partial words


To students of mathematical sciences, the concept of a function is a familiar
one. We refine that concept with the following definition.

DEFINITION 1.1 Let f be a function on a set X. If f is not necessarily


defined for all x ∈ X, then f is a partial function. The domain of f , D(f ),
is defined as
D(f ) = {x ∈ X | f (x) is defined}
A partial function where D(f ) = X is a total function.

The “usual” idea of a function is captured in the definition of total function


above, because we typically state a function only on a set of input values for
which the function is defined. With the notion of a partial function, we allow
for the possibility that for certain values the function may not be defined.

Example 1.5
In Figure 1.1, we have a graphical representation of a partial function f on
the set {0, 1, 2, 3, 4} to the set {a, b, c}. Note that D(f ) = {0, 1, 3}.

In the context of our discussion about words, total functions allow us to refer
to specific letter positions within a given word in the following manner. A word
of length n over A can be defined by a total function u : {0, . . . , n − 1} → A
and is usually represented as
u = a0 a1 . . . an−1 with ai ∈ A

Example 1.6
Let u : {0, 1, 2, 3} → {a, b, c} be the total function defined below:
u(0) = a
u(1) = c
u(2) = a
u(3) = b
28 Algorithmic Combinatorics on Partial Words

FIGURE 1.1: A picture of a partial function.

The word described by this function is therefore u = acab. Also, note that
the letter indices of a word begin at zero.

Partial functions allow us to extend the above definition to words that are
“incomplete,” that is, words that have missing letters. For example, suppose
that u is a word of length 5 over an alphabet A, but that the letters in the
second and fourth positions are unknown. Using a partial function, we can
define a function u : {0, 1, 2, 3, 4} → A and then acknowledge that u(2) and
u(4) are undefined. We make the following definition.

DEFINITION 1.2 A partial word (or, pword) of length n over A is


a partial function u : {0, . . . , n − 1} → A. For 0 ≤ i < n, if u(i) is defined,
we say that i belongs to the domain of u (denoted by i ∈ D(u)). Otherwise
we say that i belongs to the set of holes of u (denoted by i ∈ H(u)).

Just as every total function is a partial function, every total word is itself
a partial word with an empty set of holes. For clarity, we sometimes refer to
words as full words. For any partial word u over A, |u| denotes its length.
Clearly, |ε| = 0.

Example 1.7
Let the function u : {0, 1, 2, 3, 4} → A be a partial function where u(2) and
u(4) are undefined. Therefore,

D(u) = {0, 1, 3} and H(u) = {2, 4}


Preliminaries on Partial Words 29

It follows that u is a partial word with holes in the second and fourth positions
and |u| = 5. Example 1.5 and Figure 1.1 are examples of such a partial
function.

Example 1.8
Let the word u be given by Example 1.6. Then |u| = 4,

D(u) = {0, 1, 2, 3} and H(u) = ∅

and u is clearly a full word.

We denote by W0 (A) the set A∗ , and for i ≥ 1, by Wi (A) the set of partial
words over A with at most i holes. This leads to the nested sequence of sets,

W0 (A) ⊂ W1 (A) ⊂ W2 (A) ⊂ · · · ⊂ Wi (A) ⊂ · · ·


S
We put W (A) = i≥0 Wi (A), the set of all partial words over A with an
arbitrary number of holes.
Now that we have defined the notion of a partial word, we are in need of a
method to represent partial words. In particular, we need a way to represent
the positions of the holes of a partial word. In order to do this, we introduce
a new symbol, , and make the following definition.

DEFINITION 1.3 If u is a partial word of length n over A, then the


companion of u, denoted by u , is the total function u : {0, . . . , n − 1} →
A ∪ {} defined by

u(i) if i ∈ D(u)
u (i) =
 otherwise

We extend our definition of α(u) for any partial word u over an alphabet
A in the following way:

α(u) = {a ∈ A | u(i) = a for some i ∈ D(u)}

It is important to remember that the symbol  is not a letter of the alphabet


A. Rather, it is viewed as a “do not know” symbol, and its inclusion allows
us to now define a partial word in terms of the total function u given in the
definition.

Example 1.9
The word u = abbbcb is the companion of the partial word u of length 8
where D(u) = {0, 1, 2, 4, 6, 7} and H(u) = {3, 5}. Note that

u (1) = u(1) = b because 1 ∈ D(u) and


30 Algorithmic Combinatorics on Partial Words

u (3) =  while u(3) is undefined


α(u) = {a, b, c}

The bijectivity of the map u 7→ u allows us to define for partial words


concepts such as concatenation and powers in a trivial way. More specifically,
for partial words u, v, the concatenation of u and v is defined by (uv) = u v ,
and the i-power of u is defined by (ui ) = (u )i .

Example 1.10
Let u and v be partial words, with their companions u = a and v = bc.
The partial word uv is formed in terms of the companions in the expected
way:
(uv) = u v = abc
Similarly, powers are formed in terms of the companions as well,

(u3 ) = (u )3 = (a)3 = aaa

With the operation now defined for partial words, the set W (A) becomes a
monoid under the concatenation of partial words (ε serves as identity). For
convenience, we often drop the word “companion” from our discussion, and we
consider a partial word over A as a word over the enlarged alphabet A ∪ {},
where the additional symbol  plays a special role. Thus, we say for instance
“the partial word abb” instead of “the partial word with companion abb.”

1.3 Periodicity
Periodicity is an important concept related to partial words, and we intro-
duce two formulations of periodicity in this section.

DEFINITION 1.4 A (strong) period of a partial word u over A is


a positive integer p such that u(i) = u(j) whenever i, j ∈ D(u) and i ≡
j mod p. 2 In such a case, we call u p-periodic.

2 Throughout the book, i mod p denotes the remainder when dividing i by p using ordinary
integer division. We also write i ≡ j mod p to mean that i and j have the same remainder
when divided by p; in other words, that p divides i − j (for instance, 12 ≡ 7 mod 5 but
12 6= 7 mod 5 (2 = 7 mod 5)).
Preliminaries on Partial Words 31

Notice that nothing in the definition precludes a partial word from having
more than one period. The set of all periods of u will be denoted by P(u).
However, we will often want to refer to the minimal period of a partial word.
We represent this minimal period by p(u).

Example 1.11
Consider these examples of partial words and their periods:

u = ababab is 6-periodic, 4-periodic, and 2-periodic, and p(u) = 2


v = aab is 6-periodic, 4-periodic, and 3-periodic, and p(v) = 3
w = bbb is 4-, 3-, 2-, and 1-periodic, and p(w) = 1

As seen above, any partial word u is trivially |u|-periodic, showing P(u) is


never empty.

Frequently, it is much easier to determine if a partial word u is p-periodic


by writing, in order, the letters of u into p columns. If every letter in each
column is the same, ignoring holes, then u is p-periodic.

Example 1.12
We use the partial words of the previous example and disregard the trivial
period. We see that u is indeed 4-periodic and 2-periodic by writing

ab
abab
and ab
ab
ab

Similarly, we verify that v is 4-periodic and 3-periodic:

aa a
and
b ab

In partial words, the presence of holes gives us an opportunity to define


another type of periodic behavior.

DEFINITION 1.5 A weak period of u is a positive integer p such that


u(i) = u(i + p) whenever i, i + p ∈ D(u). In such a case, we call u weakly
p-periodic. We denote the set of all weak periods of u by P 0 (u) and the
minimal weak period of u by p0 (u).

As before, it is much easier to identify if a partial word u is weakly p-periodic


by writing u into p columns. However, now we only require that letters in a
32 Algorithmic Combinatorics on Partial Words

column be the same if there is no hole between them in that column. Letters
in columns with holes need to be the same if they are consecutive.

Example 1.13
Let u = abbbbcbb. We write
abb
bb
c bb
The partial word u is weakly 3-periodic but is not 3-periodic (this is because
a occurs in position 0 while c occurs in position 6).

It is clear that if a partial word u is p-periodic, then u is weakly p-periodic,


and hence P(u) ⊂ P 0 (u) for any partial word u. The converse of this statement
holds only for full words, however, and thus we see that for full words there
is no distinction between periods and weak periods.

Example 1.14
In Example 1.11, we determined that for v = aab,

P(v) = {3, 4, 6}

This partial word v is also weakly 1-periodic, and therefore,

P 0 (v) = {1, 3, 4, 6} and

p(v) = 3 and p0 (v) = 1

Another difference between full words and partial words that is worth noting
is the fact that even if the length of a partial word u is a multiple of a weak
period of u, then u is not necessarily a power of a shorter partial word.

Example 1.15
For the full word, v = ababab, v is clearly 2-periodic and v = (ab)3 . However,
recall the weakly 3-periodic word u from Example 1.13, u = abbbbcbb. The
partial word u is not the power of a shorter partial word.

1.4 Factorizations of partial words


Given two subsets X, Y of W (A), we define
Preliminaries on Partial Words 33

XY = {uv | u ∈ X and v ∈ Y }
We sometimes write X < Y if X ⊂ Y but X 6= Y . For a subset X of W (A),
we use the notation kXk for the cardinality of X.

Example 1.16
Let X = {ε, a, ac} and Y = {b, bb}. Then XY is the following set,
{b, bb, ab, abb, acb, acbb}
Note that this “set product” is not commutative, as Y X equals
{b, bb, ba, bba, bac, bbac}

Given a subset X of W (A), we can apply the previous idea and form the
set product of a set with itself.

Example 1.17
Let X = {a, b}. We can then construct the following sequence of sets:
X = X 1 = {a, b}
XX = X 2 = {aa, ab, ba, bb}
XXX = X 3 = {aaa, aab, aba, abb, baa, bab, bba, bbb}
..
.
For completion, we define X 0 = {ε}.

In general, for a subset X of W (A) and integer i ≥ 0, we denote by X i the


set
{u1 u2 . . . ui | u1 , . . . , ui ∈ X}
We denote by X ∗ the submonoid of W (A) generated by X, or X ∗ = i≥0 X i
S

and by X + the subsemigroup of W (A) generated by X, or X + = i>0 X i .


S

DEFINITION 1.6 A factorization of a partial word u is any sequence


u1 , u2 , . . . , ui of partial words such that u = u1 u2 . . . ui . We write this fac-
torization as (u1 , u2 , . . . , ui ). A partial word u is a factor of a partial word
v if there exist partial words x, y (possibly equal to ε) such that v = xuy.
The factor u is proper if u 6= ε and u 6= v. The partial word u is a prefix
(respectively, suffix) of v if x = ε (respectively, y = ε).3 We occasionally use

3 Notation:
If the partial word x is a prefix of y, we sometimes write x p y or simply x  y.
We can write x ≺ y when x 6= y.
34 Algorithmic Combinatorics on Partial Words

the notation u[i..j) to represent the factor of the partial word u starting at
position i and ending at position j − 1. Likewise, u[0..i) is the prefix of the
partial word u of length i, and u[j..|u|) is the suffix of u of length |u| − j.

Factors of a partial word u are sometimes called substrings of u. It is


immediately seen that there may be numerous factorizations for a given partial
word.

Example 1.18
Let v = abcab. The following are two factorizations of v:

(ab, c, a, b)
(a, bc, ab)

In addition, we call the factorizations (ε, abcab) and (abcab, ε) trivial. The
prefixes of v are ε, a, ab, abc, abc, abca, and abcab. Likewise, the suffixes
of v are ε, b, ab, ab, cab, bcab, and abcab.

For partial words u and v, the unique maximal common prefix of u and v
is denoted by pre(u, v).

Example 1.19
Let u = abcb and v = abbab. The common prefixes of u and v are
ε, a, a, ab, the latter being pre(u, v).

By definition, each partial word u in X ∗ admits at least one factorization


u1 , u2 , . . . , ui whose elements are all in X. Such a factorization is called an
X-factorization.
For a subset X of W (A), we denote by F (X) the set of all factors of elements
in X. More specifically,

F (X) = {u | u ∈ W (A) and there exist x, y ∈ W (A) such that xuy ∈ X}

We denote by P (X) the set of all prefixes of elements in X and by S(X) the
set of suffixes of elements in X:

P (X) = {u | u ∈ W (A) and there exists x ∈ W (A) such that ux ∈ X}


S(X) = {u | u ∈ W (A) and there exists x ∈ W (A) such that xu ∈ X}

If X is the singleton {u}, then P (X) (respectively, S(X)) will be abbreviated


by P (u) (respectively, S(u)).
Preliminaries on Partial Words 35

1.5 Recursion and induction on partial words


We begin this section with the concept of the reversal of a partial word,
and use this concept to illustrate recursion and induction with partial words.

DEFINITION 1.7 If u ∈ A∗ , then the reversal of the word u =


a0 a1 . . . an−1 is rev(u) = an−1 . . . a1 a0 where ai ∈ A for all i. The rever-
sal of a partial word u is rev(u) where (rev(u)) = rev(u ). The reversal of
a set X ⊂ W (A) is the set rev(X) = {rev(u) | u ∈ X}.

Example 1.20
If u = abd, then rev(u) = dba.

Recursively, the reversal of a partial word is described in the following way:


1. rev(ε) = ε, and
2. rev(xa) = arev(x)
where x ∈ A∗ and a ∈ A.
In a similar fashion, we provide a recursive description of A∗ , the set of all
words over an alphabet A:
1. ε ∈ A∗
2. If x ∈ A∗ and a ∈ A, then xa ∈ A∗ .
It is often very useful to use mathematical induction in order to prove results
related to partial words. Below we provide an example of using induction on
the length of a partial word to prove a result related to the reversal of the
product of two words.

Example 1.21
Let x, y be words over an alphabet A. Show that

rev(xy) = rev(y)rev(x)

As stated, we prove this by induction on |y|. First, suppose |y| = 0 or y = ε.


Clearly,

rev(xy) = rev(x)
= εrev(x)
= rev(ε)rev(x)
= rev(y)rev(x)
36 Algorithmic Combinatorics on Partial Words

Now assume that our result holds for all words y where |y| = n for some
nonnegative integer n. According to the process of induction, it remains for
us to show that the result holds for words of length n + 1.
Let |y| = n and a ∈ A. Then ya is a word of length n + 1. Now,
rev(x(ya)) = rev((xy)a)
= arev(xy) by definition
= arev(y)rev(x) by inductive hypothesis
= rev(ya)rev(x)
Thus, the result holds for all words ya of length n + 1, and consequently the
result is proved for all words x, y in A∗ .

REMARK 1.1 The previous result can be generalized easily to partial


words by applying the same argument to the companions of partial words x
and y.

1.6 Containment and compatibility


We define equality of partial words in the following way.

DEFINITION 1.8 The partial words u and v are equal if u and v are
of equal length (that is, |u| = |v|), and
D(u) = D(v) and u(i) = v(i) for all i ∈ D(u)(= D(v))

For full words, the equality of two words is straightforward, namely, letters
in corresponding positions must be equal. However, for partial words contain-
ing holes, the notion of equality is only part of the picture. This is because
the symbol  is not an element of our alphabet, but a placeholder symbol for
a letter we do not know. So although the partial words ab and ab are
not equal by our definition, they may very well be equal, if we only had more
information. To sharpen our understanding of this possibility, we introduce
and discuss two alternative methods of relating partial words: containment
and compatibility.

DEFINITION 1.9 If u and v are two partial words of equal length, then
u is said to be contained in v, denoted by u ⊂ v, if all elements in D(u) are
in D(v) and u(i) = v(i) for all i ∈ D(u). We sometimes write u < v if u ⊂ v
but u 6= v.

Containment can be restated in the following equivalent way:


Preliminaries on Partial Words 37

For partial words u and v, u ⊂ v if everything that is known about the letters
of u is repeated in v. In this sense, the relation is “one-way,” from u to v.
In general, u ⊂ v does not imply that v ⊂ u.

Example 1.22
Let u = ab. We can easily compare u to other partial words by writing u
above and checking our conditions. For v1 = ab, we write,
u=a b 
↓ 6↓
v1 = a   b
We can now easily see that D(u) 6⊂ D(v1 ), and therefore u 6⊂ v1 . For v2 =
aab, we see
u=a b 
↓ 6↓
v2 = a  a b
Because u(2) 6= v2 (2), u 6⊂ v2 . Lastly, for v3 = abb,
u=ab
↓ ↓
v3 = a  b b
and u ⊂ v3 . Notice the fact that v3 (3) is defined implies that v3 6⊂ u.

We can extend the notion of a word being primitive to a partial word being
primitive as follows:
A partial word u is primitive if there exists no word v such that u ⊂ v i with
i≥2

Example 1.23
The partial word u = aab is not primitive, because for v = ab, u ⊂ v 2 .
However, the partial word abb is primitive.

REMARK 1.2 Note that if v is primitive and v ⊂ u, then u is primitive


as well. The proof of this fact is left as an exercise.

Whereas the containment relation may be thought of as a nonsymmetric,


“one-way” relation between two partial words, we now define a new, symmet-
ric relation on partial words called compatibility.

DEFINITION 1.10 The partial words u and v are called compatible,


denoted by u ↑ v, if there exists a partial word w such that u ⊂ w and v ⊂ w.
Equivalently, u ↑ v if
38 Algorithmic Combinatorics on Partial Words

u(i) = v(i) for every i ∈ D(u) ∩ D(v)

It is obvious that u ↑ v implies v ↑ u.

Typically it is easier to test for the compatibility of two partial words by


writing them one above the other and applying the second formulation of the
definition, that is, if two letters “line up,” then they must be equal.

Example 1.24
Let x = aba and y = acbb. We write

x=aba
y=acbb

and because x(4) 6= y(4), x 6 ↑ y. Now, let u = abbc and v = bbc. We see
that u ↑ v:
u=abbc
v=bbc

For compatible words, we can construct a partial word w that contains both
u and v such that the domain of w is exactly the union of the domains of u
and v. In other words, the letters of w are defined “only when they need to
be” in order to contain u and v. For this reason, we call w the least upper
bound of u and v and denote w as u ∨ v.

DEFINITION 1.11 Let u and v be partial words such that u ↑ v. The


least upper bound of u and v is the partial word u ∨ v, where

u ⊂ u ∨ v and v ⊂ u ∨ v, and
D(u ∨ v) = D(u) ∪ D(v)

Example 1.25
Let u = abaa and v = aba. Writing them over one another, we see u ↑ v
and also how u ∨ v is constructed:
u =abaa
v =aba
u∨v = a b a b  a

For a subset X of W (A), we denote by C(X) the set of all partial words
compatible with elements of X. More specifically,
Preliminaries on Partial Words 39

C(X) = {u | u ∈ W (A) and there exists v ∈ X such that u ↑ v}

If X = {u}, then we denote C({u}) simply by C(u). We call a subset X


of W (A) pairwise noncompatible if no distinct partial words u, v ∈ X satisfy
u ↑ v. In other words, X is pairwise non compatible if for all u ∈ X, X ∩
C(u) = {u}.
The following rules are useful for computing with partial words.

LEMMA 1.1
Let u, v, w, x, y be partial words.

Multiplication: If u ↑ v and x ↑ y, then ux ↑ vy.

Simplification: If ux ↑ vy and |u| = |v|, then u ↑ v and x ↑ y.

Weakening: If u ↑ v and w ⊂ u, then w ↑ v.

We end this section with the following lemma.

LEMMA 1.2
Let u, v, x, y be partial words such that ux ↑ vy.

• If |u| ≥ |v|, then there exist pwords w, z such that u = wz, v ↑ w, and
y ↑ zx.

• If |u| ≤ |v|, then there exist pwords w, z such that v = wz, u ↑ w, and
x ↑ zy.

PROOF The proof is left as an exercise.

COROLLARY 1.1
Let u, v, x, y be full words. If ux = vy and |u| ≥ |v|, then u = vz and y = zx
for some word z.

Throughout the rest of the book, A denotes a fixed alphabet.

Exercises

1.1 The root of a full word u, denoted by u, is defined as the unique
primitive
√ word v such that u = v n for some positive integer n. What is
u if u = ababab? What if u = ababba?
Random documents with unrelated
content Scribd suggests to you:
astonishment when, a little after nine o’clock, we came close upon
another fine sheet of fresh, blue water. It was a great satisfaction to
me, in the state I was in, that we encamped at so early an hour on
its northern border, where some serrákh afforded a tolerable shade.
I was busy drying my clothes, arms, saddle-cloths, and journals,
when there appeared certain indications of an approaching storm;
and in order to avoid being wetted twice in the same day, I got my
tent pitched. After a curious gale the rain poured down, and about a
dozen of my companions took refuge in my small, frail dwelling; but
all were not so fortunate as to escape a wetting, for the rain, being
very heavy, came in at the door. The storm lasted more than an
hour; and everything, including horses and camels, being thoroughly
soaked, it was decided to remain here for the night.
Sunday, Sept. 28.—For some reason or another, but chiefly in
order to slaughter the other ox, divide it, and cut it up into “gedíd,”
we remained here the whole morning; and the sun had long passed
into zawál (past noon) when we started through the sandy and
slightly undulating country full of herbage, principally of the plant
called “nesí,” besides bú rékkebah or Avena Forskalii, the bur-
feathered prickle (Pennisetum distichum), and various kinds of
mimosa, chiefly consisting of the talha, and úm-el-barka (Mimosa
Nilotica.) Our companions found several ostrich-eggs, and met a
large troop of gazelles. The country then became more thickly
wooded, and, where we encamped for the night, presented a very
interesting character; but the danger from wild beasts was
considerable, and the roar of a lion was heard throughout the
greater part of the night.
Monday, Sept. 29.—Started early: the character of the country
continued the same as yesterday, and presented beautiful specimens
of the mimosa, here breaking down from age, at another place
interwoven with creepers, one species of which produces the red
juicy fruit called “fito” by the Kanúri, and has been mentioned by me
before. It was nearly eight o’clock when, proceeding in groups, two
of our horsemen, on passing near a very large and thick gherret,
suddenly halted, and with loud cries hastened back to us. We
approached the spot, and saw a very large snake hanging in a
threatening attitude from the branches of the tree; on seeing us it
tried to hide itself; but after firing several balls, it fell down, and we
cut off its head. It measured 18 ft. 7 in. in length, and at the
thickest part 5 in. in diameter, and was of a beautifully variegated
colour. Two natives, who had attached themselves to our troop the
day before, cut it open and took out the fat, which they said was
excellent.
The ride was truly interesting; but by degrees it became too much
for me, and after seven hours’ march I was so utterly exhausted as
to be obliged to halt, and lie down. Most of the Arabs remained with
us; others, with ʿAli ben ʿAisa, went on to the well. When we
pursued our march in the afternoon, the country for the first three
hours was more level, but then became very hilly; and at five o’clock
we ascended a considerable elevation to our left, the highest point in
the whole country, but perhaps not more than six or seven hundred
feet above the level of the Tsád. From here we crossed two very
pretty valleys, or dells, especially the second one, where there were
very curious hilly projections of a calcareous stone. But these valleys
were very poor indeed, in comparison with the valley or hénderi
Fóyo, situated at some distance from the well where we encamped
for the night; for its bottom presented one uninterrupted mass of
vegetation, impenetrable in many spots. Here the botanist might be
sure to find some new species, although the principal trees were the
kúrna (Cornus), serrákh, úm-el-barka or Mimosa Nilotica, hajilíj or
Balanites, and the talha (M. ferruginea), but all interwoven with
creepers, and offering the most delightful shade. These valleys,
which afford the only watering-places, must of course be very
dangerous during the night, on account of the wild beasts,
principally lions, of which there are great numbers hereabouts. Here
our companions received a messenger from Ghét, the young chief of
the Welád Slimán.
Tuesday, Sept. 30.—We remained in the forenoon and during the
heat of the day in our encampment. While stretched out in the
shade of a fine mimosa, I obtained some valuable information
regarding the various tribes dwelling in Kánem, and the districts of
their settlements. But it will be better, instead of inserting it here, to
collect all the information I received at different times into one
general account, which shall be given in the Appendix.
In the afternoon the camels and the heavier portion of the troop
were allowed to start in advance, and the horsemen followed about
half-an-hour afterwards, after having watered the horses; but
instead of taking care to follow the footsteps of the camels in a wild
country where there was no regular path, they rode on negligently,
and soon became aware that they had missed the track. There now
began a very disorderly riding in all directions. This fatigued me
greatly, for nothing is so vexing to a weak man as to ramble about
without knowing when he is likely to reach the place of repose so
much looked for. After sending scout after scout, we at length found
the track, and reached our men in the dark.
Wednesday, Oct. 1.—Having set out early, after nearly two hours
ride we were met by a single horseman coming towards us from the
encampment of the Welád Slimán, and bidding us welcome to their
wild country. They kept starting up from the thicket on our right and
left, firing their muskets and saluting us with their usual war-cry, “Yá
riyáb, yá riyáb.” Having thus advanced for about half-an-hour, we
came to a halt, in order to receive in a more solemn form the warlike
compliments of a larger troop of horsemen, led on by a person of
some importance.
The dust raised by the horsemen having subsided a little, and the
country being clearer of wood, we now saw before us the whole
cavalry of the Welád Slimán drawn up in a line in their best attire,
their chief Ghét the son of Séf el Nasr ben Ghét, and his uncle
ʿOmár the son of Ghét and brother of ʿAbd el Jelíl, in the midst of
them. This stately reception, not having been anticipated by
Overweg and myself, made a great impression upon us; but we were
not left to gaze long, but were desired by our Arab companions to
ride in advance of the line in compliment to the chiefs. We
accordingly put our steeds into a gallop, and riding straight up to our
new friends, saluted them with our pistols. Having answered our
compliments, and bidding us welcome to their wild abode, the young
Ghét galloping along at the head of his squadrons, his sword drawn,
and with the continuous cry “Yá riyáb, yá riyáb,” they led us to the
encampment, and we had a place shown to us where we might pitch
our tents.
CHAPTER XL.
THE HORDE OF THE WELÁD SLIMÁN.

We had now joined our fate with that of this band of robbers,
who, in consequence of their restless habits, having been driven
from their original dwelling places in the Syrtis, after a great variety
of events have at length established themselves in this border region
between the desert and the fertile regions of Negroland, under the
guidance of Mohammed the son of ʿAbd el Jelíl, on the ruins of the
old kingdom of Kánem, very much in the same way as in the west
the Welád Ammer (Ludamar) have established themselves on the
ruins of the empire of Mélle. At that time they mustered a
considerable force, and being joined by a great many adventurers
from all the Arab tribes from the Ríf as far as Fezzán, were able to
bring into the field from nine hundred to one thousand horsemen.
They then turned their attention towards our friends the Kél-owí,
and began to seize upon their camels, which came to Bilma for the
salt-trade; these, as the reader has seen from my previous account,
are always proceeding in large caravans; but it is almost impossible
to give implicit credit to the statement which was made to us by
several individuals, that the Welád Slimán had taken from the Tuarek
more than thirty thousand camels in the course of two or three
years.
If they had continued in this way for a short time, they would
have brought about an immense revolution in the whole of Central
Africa; for the Kél-owí would of course not have been able to provide
Háusa with salt, after having lost their camels, and thus, having no
salt for bartering, would have remained without the most necessary
articles of subsistence: they would accordingly have been obliged
either to starve or to emigrate into, and take possession by force of,
the more fertile districts of Sudán. But before they were driven to
this extreme, they made one energetic effort against their enemies,
and succeeded; for, having summoned the contingents of all the
different tribes inhabiting Aír or Asben, they collected a host of at
least seven thousand men, chiefly mounted on camels, but
comprising also a considerable number of horsemen, and proceeded
to attack the lion in his den, in the beginning of the year 1850.
I am almost inclined to suspect that the people of Bórnu had a
hand in this affair; at least, the existence of such a warlike and
restless horde of men, and mustering considerable forces, as the
Welád Slimán were then, under the guidance of Mohammed, and in
such a neighbourhood, could not be wholly indifferent to any ruler of
Bórnu possessed of prudence and foresight. Of course, since its
power had decreased to such a degree that it could not of itself
make the necessary resistance against the daily encroachments of
the Tuarek, it was of great service to Bórnu to have such a strong
and energetic auxiliary to keep them down. But, be this as it may,
the Arabs left their very strong entrenchments at Késkawa (which, at
the first news of the intended expedition, they had formed on the
border of the Tsád, and which the Tuarek themselves confessed to
me they would never have been able to conquer), and separated,
not thinking that their enemies were able to carry out their intention;
for all those tribes which had come to join them, as the Gedádefa,
the Ferján, the Urfílla, the Ftáim, Swási, Temáma, and Dhóhob, after
having enriched themselves with the spoils of the Tuarek, were
anxious to carry away their booty in safety, and proceeded on their
home-journey by way of Kúffara. They were just encamped in the
Wady ʿAlála, where my readers will soon have to accompany me,
when a scout brought the news that a very large host of the Tuarek
was close at hand; but they say that his report did not find credit,
and that on this account the Arabs had no time to make any
preparations, but were all on a sudden surrounded on all sides by
the numerous host of their enemy. It is moreover to be understood
that the greater part of this band were merely armed with guns,
which are very useful in a skirmish of horsemen, who can retreat
after having fired them off, but of very little use in close combat; few
of them were armed with pistols, and still fewer with swords. But the
Kél-owí, in addition to their numbers, had also the advantage of
superior arms, having spear, sword, and dagger, even if we do not
take into account their muskets, which they rarely know how to use.
The consequence was, that the Arabs, after having killed a small
number of their enemies in the foremost lines, were soon
overpowered and massacred, not half of them succeeding in making
their escape. Their chief Mohammed himself made his way through
the host very severely wounded, and was slain, according to report,
shortly after by a Tébu woman who recognized him. Sáid, the most
valiant of all the Welád Slimán, but also the most violent, was killed
on the spot, together with the bravest champions of the little horde;
and a very considerable booty was made by the Tuarek, not only in
camels and slaves, but also in silver, the chiefs having amassed a
great deal of property. Thus the flower of this troop was destroyed,
and only the least brave and youngest were left.
The vizier of Bórnu then took the young man, to whom very little
power and property were left, under his special protection, entering
with him and the remaining part of the tribe into a contract, to the
effect that he would furnish them with horses and muskets, as far as
they should stand in need of them, on condition of their delivering to
him a certain share of their booty in every expedition. Of course,
such a troop of swift horsemen armed with muskets, if kept in strict
subjection and subordination, might have proved exceedingly useful
on the northern borders of Bórnu, on the one side as a check upon
the Tuarek, on the other upon Wadáy. But the great difficulty, which
the vizier appears not to have overcome, was to subject the
predatory excursions of such a set of people to some sort of political
rule.
With this view he sent the young chief, who was scarcely more
than twenty years of age, to Kánem with all that were left of the
Welád Slimán, keeping back in Kúkawa, as hostages for his
proceedings, his mother and the wives and little children of some of
the principal men. But from the beginning there was a strong party
against the young chief, who had not yet achieved any exploit, and
whose sole merit consisted in his being the nearest relation of ʿAbd
el Jelíl. ʿOmár, his uncle, who from his youth had given himself up to
a life of devotion, and was called a Merábet, had a considerable
party; and there were, besides, several men who thought
themselves of as much importance as their chief. In the absence of
individual authority in a small band like this, which only numbered
two hundred and fifty horsemen, no great results could be produced.
All the tribes settled in Kánem and the adjacent districts were their
natural enemies: the Nóreá or Nuwárma, and the Shendákóra and
Médema, the Sákerda and Karda in the Bahar el Ghazál, the Búltu,
the Woghda, the Welád Ráshid, the Díggana or Dághana, the Welád
Hamíd, the Hommer and the Máhamíd in Khúrma, all were bent
upon their destruction, while none but the Lasálá or el Asálʿa
beyond Kárká, and the Kánembú tribe of the Fugábú, were attached
to them. All the tribes around call them only by the name
Mínnemínne, or Menémené (“the Eaters”), which name, although it
seems to have arisen in the real gluttony of these Arabs, might be
referred appropriately to their predatory habits.
In the course of these broils and petty intrigues the most
respectable among them took to commerce, while others formed the
design of returning; and when I left Bórnu in May 1855, the rest of
the little band had separated into two distinct camps, and the
dissolution or ruin of their community was fast approaching. This
was the horde with which, in order to carry out the objects of our
mission to the utmost of our power, Mr. Overweg and I were obliged
to associate our fate; but, unfortunately, we were unprovided with
that most essential article for exciting a more than common interest
in ourselves personally, or the objects of our mission, namely,
valuable presents.
While our people pitched our tents, Mr. Overweg and I went to
pay our compliments to Sheikh Ghét and ʿOmár, and to have a
friendly talk with them before we proceeded to more serious
business. They seemed to expect this compliment, having lain down
in the shade of a tree at a short distance from our place of
encampment. Ghét, who was smoking a long pipe, was a tolerably
handsome young man; but his pronunciation was, very defective,
and he had nothing very commanding in his manner. Having
exchanged a few compliments, and asked some general questions,
we withdrew, and soon after received a present of dates and milk. A
great many of the Arabs paid us a visit; and a renegade Tripolitan
Jew, ʿAbdallah, with the surname “el Musulmáni,” who would not
leave us for a moment, kept telling us of his adventures and his
importance, and assuring us of his most disinterested affection for
us. Though his former religion differed from ours, and he had again
exchanged this for another from mere worldly motives, he
nevertheless thought himself entitled to the claim of brotherhood,
and was gracious enough to call us sometimes his cousins (welád
ʿamí). There was another man who tried to make himself as
agreeable as possible to us, and endeavoured to obtain our
friendship; this was an Egyptian named Ibrahím, a fine tall man who
evidently belonged originally to a good family; but he had run away
from home, and was now leading, in company with this little horde,
a restless, remorseful, and wearisome life.
When the heat of the day had a little abated, we prepared the
small present we had to give to Sheikh Ghét, and which consisted of
a red cloth bernús of good workmanship, a pound of cloves, a pound
of jáwi or benzoin, and a razor. We were well aware that it was
rather a trifling gift, considering the assistance we required from
these people to carry out our object; but we knew also that it was
rather a favour bestowed upon us by the vizier of Bórnu, who
regarded these people as in his service. Referring therefore to the
friendship which existed of old between their tribe, when still in their
old settlements in the Syrtis, and the English consul in Tripoli, and
delivering a letter from Mr. Frederick Warrington, who was personally
well known to the chief men, we openly professed that the object of
our coming was to try, with their assistance, to visit the eastern
shore of the lake, and especially the Bahar el Ghazál, which had
formed a remarkable object of curiosity in our country for some
time. But Sheikh Ghét without hesitation declared it was impossible
for them to take us to that place, the most dangerous locality in all
these quarters, on account of the many predatory expeditions which
were made to that spot from different quarters, and by tribes hostile
to them. After some commonplace talk about the English, we left
him, and went to his uncle with a present of precisely the same kind,
and began here to urge the distinct object of our coming in a more
positive way. I expressed the opinion that, as they would render
acceptable service to the British Government, if they were to enable
us to investigate the connection between the Bahar el Ghazál and
the lake, so, on the other hand, a great portion of the blame, if we
should not be able to carry out our design, would certainly fall upon
them, inasmuch as they had always professed to be under great
obligations towards the English. ʿOmár ben Ghét ben Séf eʾ Nasr
acknowledged all this; but he doubted very much if the band, in its
present reduced state, would be able to carry us to those quarters,
which were entirely under the sway of Wadáy. The Bahar el Ghazál
having given an opportunity of speaking about the river-system
between the Tsád and the Nile, our friend came forward with a most
confused statement, which it would not be worth while to explain.
But with regard to that large wady itself we found that he, as well as
the experienced men among these Arabs, asserted that it took its
course not towards, but from the lake.
We then took our leave of ʿOmár, and returned to our tents. The
place of the encampment was a fine, open, sandy, undulating level,
commanding the vale, where are the wells Yongo or Bú-Halíma,
covered with verdure, and richly adorned with scattered mimosas.
The tents and sheds of the Arabs were spread over a great space;
and no precaution was taken to obtain some degree of security by
means of fences and stockades. The sun having set, I lay down
outside my tent to enjoy the coolness and tranquillity of the evening
after a hot and troublesome day. All seemed calm and tranquil, when
suddenly a terrible screaming and crying arose from the women in
the west part of the encampment. We hurried to our arms, thinking
that an enemy had entered the place. The cry “ʿAlá eʾ dhahar! ʿalá
eʾ dhahar” (“Mount! mount!”)—properly speaking, “In the saddle! in
the saddle!”—sounded from all sides, and the horsemen hurried past
us; but it was only a small party of freebooters, who, in the twilight
of the evening, had made an attack upon the camels, and after
having put to flight two or three men and killed a horseman, had
driven off a part of the herd. Our friends pursued the robbers at full
speed, and soon overtook them, when they retreated into the
thicket, and gave up their booty. In this way we had a specimen of
the character of our present expedition the very first day we had
joined this little horde; and the lamentations of the females, on
account of the man who had been slain, sounded wofully through
the night, and brought before our minds the fate which, in a very
short time, might befall ourselves. Late in the night, when the alarm
had subsided, Sheikh Ghét sent us a heifer as a present.
Thursday, Oct. 2.—We remained quietly in our encampment, and
obtained a great deal of valuable information respecting the south-
eastern part of the lake and the districts adjacent. Thus the day
passed by most pleasantly. Nothing remarkable happened to us on
the following day, except the arrival of the important news that the
Agíd of Wadáy, who had resided in Máwó, on the report of an attack
intended to be made by the Arabs upon that town, had fled. This
news, if it proved true, held out, of course, a feeble ray of hope that
we might be able to penetrate to the eastern shore of the lake; and
the Arabs formed schemes accordingly. As Háj ʿAbbás, who had
come with us in order to raise from the Arabs Háj Beshír’s share in
the spoil of their last predatory excursions, was to return to Kúkawa
in a few days, I wrote a letter to the vizier concerning the prospect
we had of probably not being able to accomplish the whole of our
design. The rest of the day I enjoyed in comfort, stretched quietly in
the shade of a tree; but my tranquillity was a little disturbed by
disputes that arose amongst my men.
Saturday, Oct. 4.—Very early in the morning, when all was quiet, I
was aroused from my sleep by the mournful song of an Arab, who,
between the different stanzas of his dirge, seemed to give vent to
his tears. The impression made by this song, which was full of deep
feeling, among such a horde of lawless people, where generally only
the meanest side of man was exhibited, was charming; but as the
singer was at some distance from my tent, I could not distinctly
make out what was the cause of his grief, neither was I able to learn
it afterwards: the thoughts of the Arabs were taken up by another
affair. The most handsome among the female slaves who composed
part of the spoil that was to be taken to the vizier by his officer Háj
ʿAbbás, had made her escape during the night; they were eagerly
searching from dawn of day, but could not find her. At length they
discovered her necklace and clothes, and the remains of her bones,
—evident proofs that she had fallen a prey to the wild beasts. She
belonged to the Yédiná or Búdduma, and was represented as having
been possessed of considerable charms; and it was supposed that
her loss would affect the vizier greatly, who, as I have before
observed, was rather fond of an ethnological variety of female
beauty. There was a great deal of unpleasant conversation about
this affair, the girl not yet having been delivered up to Háj ʿAbbás
when she made her escape.
But there were many other causes of discord among this little
horde, and when the vizier’s officer set out, a great many more of
the Arabs made use of this opportunity to go to Kúkawa than had
been agreed upon. The most serious loss to us was certainly the
departure of Sheikh ʿOmár, Ghét’s uncle, who, on account of his
experience and knowledge of the English, which much exceeded that
of his youthful nephew, might have been of considerable service to
us. At any rate he ought to have informed us of his intention to
leave, as by his accepting our present, it was understood that he
undertook the obligation of assisting us in carrying out our project;
and having nothing to spare, we felt rather disappointed. But
although our prospects were not too flattering, at least we had
hopes of moving a little onwards, as our departure from this place
was fixed for the following day.
Sunday, Oct. 5.—When the camels, guarded by the men on foot,
had left in the morning, we went first with the other horsemen to
the well, in order to water our horses. We had not visited it before,
as it was at some distance from our tents. The vale was of that
general wild and luxuriant character which distinguishes the valleys
of Kánem; but it was even more wild and picturesque than usual,
and a chill draught of air met us proceeding from the richly wooded
dale, where the sun’s rays never penetrated. There were several
wells, which exhibited a busy and interesting scene, the horsemen in
their picturesque attire (a mixed dress of their native abode and
their present adopted home) thronging around these sources and
centres of life, in order to water their poor-looking but persevering
nags. When we returned to the place of our former encampment all
was desolate, and loneliness and silence had succeeded to the
animated dwelling-place of a quarrelsome multitude of people. We
hurried on over undulating sandy ground, richly overgrown with
trees, and soon overtook our camels: the place of our destination
was not far off; and at noon we were already encamped on a fine
sandy level, rising over another luxuriant hollow or vale especially
rich in kúrna-trees, whence the well “Bír el Kúrna” has received its
name. It was a spacious encampment, with Arabs and Tébu
intermixed, and could not but be very salubrious, although we found
afterwards, just in this elevated position, the difference between the
cold of the night and the heat of the day extraordinary. Our appetite
being rather keen, we indulged in the luxury of some turtle-soup: for
turtles are by no means a rarity in these districts, although in
general they seem to be of a rather small size. I do not remember to
have seen or heard in this quarter of such large specimens as seem
to be common in the country round Aír.
Monday, Oct. 6.—The day of the ʿAíd el kebír. I went in the
morning, as soon as the sun began to shine forth, to a place in a
cool shade a little south from our encampment, without knowing
that this was the very spot which the Arabs had chosen for their
holiday prayers. In general only a few of them were praying; but to-
day the leading persons among them, who came here with Sheikh
Ghét, offered up their prayer with solemnity and apparent fervour.
This proved an unlucky day to us, and very unfavourable to our
design to penetrate into those dangerous districts on the east side of
the lake; for a considerable portion of the tribe (one hundred and
fifty men with about seventy horses) left that day for Kúkawa, to our
great surprise and mortification, and, as it would seem, also to the
mortification of the young chief, a circumstance of which we became
fully aware when we paid him a visit about noon. Of course, with our
very small means, and the poor and insignificant character of our
mission, we could not expect that this unsettled horde should have a
scrupulous regard to our wishes and designs in arranging their
affairs. It was quite evident that their proceeding was the mere
effect of a stubborn sense of independence and jealousy; and it
seemed to be done in open opposition to the wish of their young
chief. About one o’clock in the afternoon they left; and we forwarded
a short note with them expressive of our dissatisfaction at this state
of things, which filled us with the saddest forebodings as to the
success of our mission. But while thus disappointed in more
important matters, we felt tolerably well off in material comforts; for
in the morning a party of Fugábú arrived with a number of sheep for
sale, selling two for a dollar, and thus enabled us to gratify the
religious longing of our servants for an extra dish on this their
holiday. In the course of the evening, a numerous caravan of oxen
laden with grain, or rather Negro millet, arrived from Bórnu, which
made provisions a little cheaper. The grain grown in the country, in
its present wild and desolate state, is not sufficient for the
population, though so greatly reduced; and the last season had been
rather an unfavourable one. In consequence of the arrival of this
caravan, we not only had the opportunity of buying corn at a
cheaper rate, but we also got some from the chief as a present.
Everything in Kánem is bought with the common white Bórnu
shirts, which form the general dress of the people, black tobes being
worn only by richer persons. Even the general dress of the Arabs
settled here in Kánem consists of these white tobes and a háík made
of the same stuff, only the wealthier individuals being able to buy a
woollen plaid. The dress of the females, too, is made of these very
tobes, which are cut into the regular oblong pieces of which they
consist, and sewn together lengthwise.
Tuesday, Oct. 7.—Being obliged to remain here without the certain
prospect of doing anything worth while, we at least thought we had
some right to the hospitality of our hosts; and we expressed our
desire to obtain a little more milk, as we ourselves possessed neither
cows nor she-camels. Our request was complied with. Thus we
accustomed ourselves entirely to camel’s milk, and found it by
degrees more palatable and wholesome than the milk of cows. I
attribute the recovery of my strength principally to this sort of diet.
There was always some milk brought into the encampment by the
daughters of the Bení Hassan; but this was generally milk in an
unpleasant intermediate state between sweet and sour, and the
vessels (the kórió, made of the leaves of the palm-tree) in which it
was carried had usually a bad smell, which they communicated to
the milk. As the renegade Jew ʿAbdallah (el Musulmáni) was the
medium through which all our business with the chief was
transacted, I made him to-day a present of a red sash, and
continued to keep him in good humour by occasional small presents.
This man was a curious specimen of a Jewish adventurer. He was by
birth a Tripolitan, but had been obliged to leave his native home on
account of a murder which he had committed. He then betook
himself to the tribe of the Welád Slimán, exchanging his Jewish
creed for that of Mohammed, and obtained protection. When he had
gained a good deal of property as a silversmith, his new companions
stripped him of his treasures: he then for a time separated from
them, and in company with two other renegade Jews, Músa and
Ibrahím, made a journey to Negroland—a memorable event, as they
were the first of their nation who trod this road. On his receiving
news of the prosperity of the Welád Slimán in Kánem, he once more
joined them, and became a freebooter. He was a very good
horseman; but that was all, his horsemanship but badly supplying
his want of courage. However he was useful to us in many respects,
although we had to take care that the people did not confound us
with these Jewish adventurers.
I began this day my little vocabulary of the Tébu language, or
rather the “módi Tedá,” and provisionally that dialect of this
language which is spoken by the inhabitants of Búrgu, and which
varies considerably from the language as it is spoken by the
inhabitants of Bilma, and in the south of Fezzán. Already at that
early period I became aware that this language is nearly related to
the Kanúri, while it has scarcely any link whatever which externally
connects it with the Berber language.
Wednesday, Oct. 8.—The only thing which happened this day
worth mentioning was the arrival of Hallúf, a warlike Tébu chieftain,
with seventeen horsemen of the Fugábú Tébu, who rode up in a
very spirited manner to the tent of Sheikh Ghét. Hallúf, a man of
great bodily size and strength, and renowned in these quarters on
account of his valour, had formerly been the enemy of Bórnu, but
had now been won over to its interest. However, he was still too
much afraid of the Bórnu people to join the Welád Slimán, as long as
Háj ʿAbbás the vizier’s messenger was present; but he came as
soon as he heard that he was gone. He was not a very scrupulous
man, as I soon convinced myself, when he with the Fugábú called
upon us, and as soon as he had introduced himself began begging
for poison. We of course cut his demand short. He then sat quietly
down with his companions, and took great delight in the
performances of my musical box, which I really found, together with
the watch, the most useful instrument for demonstrating to the
people the great superiority of European genius and handicraft.
These people were not without sympathy for those lively airs which
the little instrument was capable of performing, and would sit down
quietly for a great length of time enjoying this mysterious music. The
rumour soon spread, and Sheikh Ghét likewise desired to be made
acquainted with the mysterious little box. But the day did not end so
harmlessly; for bad tidings arrived. Háj ʿAbbás, on his way to Bórnu,
had seen a troop of Kindín near Ngégimi, and warned the Arabs to
beware of a sudden attack. Thus uneasiness and anxiety spread
through the encampment, and scouts were sent out to scour the
country in every direction.
Friday, Oct. 10.—News having been brought in the morning that
three Tuarek on horseback, and five on camels, had been seen at a
neighbouring well, an alarm was raised immediately. All the Arabs
mounted; and we followed their example, though I felt extremely
weak, while my horse, having had rest and good food for several
days, and seeing so many companions galloping and capering about,
was almost unmanageable. The whole encampment presented a
very warlike appearance; but it turned out to be a false alarm. We
therefore returned into the encampment, and began to arrange our
luggage, as we were to leave here the heaviest part of our things,
and take only as little as possible with us in our progress further
eastward; for the Arabs had conceived the hope of plunder, the news
having been brought that the Khalífa of Wadáy had left his residence
Mʿawó, and that nobody was there to defend that quarter against
their inroads. At the same time, our friends cast a longing look
towards Báteli, the celebrated pasture-grounds in the northern
course of the Bahar el Ghazál, two days’ march beyond Egé, where
numbers of camels were reported to be collected at the time. Of
course they did not want it to become known where they intended
to direct their foray, and therefore spoke now of this, then of that
quarter, as likely to be the object of their expedition.
CHAPTER XLI.
SHITÁTI.—THE EASTERN, MORE FAVOURED,
VALLEYS OF KÁNEM.

Saturday, Oct. 11.—With the rest of our people, and with the
remaining two camels carrying the smaller part of our luggage, we
accompanied the following day the more active part of the horde,
while the older men were left behind for the defence of the
encampment, with their families and property. The country through
which our way led was entirely of the same character as that which I
have already described, a sandy level adorned with trees of
moderate size, almost all of the genus Mimosa, and in favourable
seasons well adapted for the cultivation of Indian corn—now and
then broken by deep hollows of larger or smaller extent, generally
with a sufficient supply of water to produce fine plantations or
cornfields, and overgrown with more luxuriant vegetation. We
crossed a fine vale of this description about eight miles from our
starting-point, and chose our camping-ground on the higher level
commanding the “Bír el Ftáim.” The hollow, however, which contains
this well is rather of a peculiar kind; for, unlike the other basins,
which afford sufficient space for cultivation, it is extremely narrow,
while the encompassing slopes, at least that on the north side, rise
to a greater altitude than the general level of the country. I made a
sketch of it.
On this commanding point there was a village of the Fugábú
Kóbber; and Overweg and I, before we went to our encampment,
which was chosen on the southern slope, paid these people a visit,
dismounting under a tree at some distance from their light huts, and
were well received. They brought us immediately a dish made of the
meal of Indian corn and sour milk, and sat down cheerfully,
questioning us as to the difference between their country and ours,
and asking, with regard to the politics of England, whether we were
the friends or enemies of Dár-Fúr and Wadáy (which countries,
together with Bórnu, comprised their political horizon), and
expressed great astonishment at our instruments. They brought us a
lion’s skin, and soon after another very palatable dish of deshíshe
made of wheat, with very good butter, which had nothing of that
nasty taste peculiar to the butter of Bórnu and the surrounding
countries: the dish was seasoned with dates.
It would have been far more instructive and agreeable to us to be
in the constant company and under the protection of these people,
the natives of the country, who would have made us acquainted with
its characteristic features so much better than that band of lawless
robbers who took no real interest in it, except as regarded the booty
which it afforded them. But they had neither power nor authority;
and we were satisfied that where the Arabs were not able to conduct
us, these people never could. Notwithstanding their alliance with the
Arabs, they are treated with contempt by the latter, and the Arabs
never omit to add a sneer when they speak of the “damned” (“ám
bú”) Keráda; for so they call the Fugábú. Of course the intercourse
of these two different people can neither be sincere nor intimate,
and the natives were only waiting for their day of revenge. A storm
gathering and threatening to burst upon us, we hastened away from
this spot; but there was only a little rain. In the evening there
arrived two Shúwa from the villages of the Woghda, and were
thrown into irons, in order not to betray the approach of the Arabs.
Sunday, Oct. 12.—We went on a short distance to another well
situated in a considerable hollow or basin, which might afford, and
has once afforded, a splendid place for cultivation, but which at
present was entirely blocked up and made really impassable by rank
and wild vegetation. With great trouble we penetrated with the first
horsemen to the well. Nobody had made use of it for a long period.
The water was very bad and unwholesome. The Arabs had not
encamped at this place for at least seven years; hence there was a
rich abundance of excellent food for the camels; but the danger
from beasts of prey was also very great. The ground was full of
elephants’ dung; and wild pigeons were hovering about in great
numbers.
The place for our encampment was chosen on the level
commanding the rich basin on the eastern side, and descending into
it by a steep slope of from three hundred to four hundred feet. Here
I laid myself down in the cool shade of a luxuriant serrákh not far
from the slope, and surveyed the trains of the Fugábú, who in the
course of the day arrived with their little movable household, having
left their former residence near Bír el Ftáím. In the evening we paid
a visit to the sheikh, and as usual were obliged to give him and his
companions some account of European matters, though it would
have been far more interesting for us to listen to their own stories,
so full of incidents of a wild restless life.
Monday, Oct. 13.—The weather was cool, and a strong north wind
made it rather chilly. Having been told that we were not to leave the
next day, I purchased a ram, with a white tobe which I had bought
for about forty rotl in Kúkawa, receiving, besides the ram, one sʿaa
or zékka of Guinea-corn to complete the bargain. I afterwards got a
fine fat goat, which we slaughtered to-day, and found its meat pretty
good. Hallúf came while I was lying in the shade of my serrákh of
the preceding day, which I had nicely cleaned, and sat down to a
chat; he assured me that he was able to bring us to Kárká or
Kargha, the swampy country in the south-east corner of the lake,
which forms an archipelago of small islands, and would offer his
services for that purpose, but that he was afraid of Sheikh Ghét’s
jealousy. He then went with me over my little Tébu vocabulary, and
corrected some slight mistakes. He was quite a sociable man; but
Overweg, as well as I, doubted much whether he could be trusted.
Having consulted what course to take, we went to the sheikh and
asked him whether he really thought Hallúf would be able to take us
with any degree of safety to Kárká. He did not hesitate to declare
that Hallúf was unable to accomplish what he had boasted of, and
begged us to have patience till news should arrive from Bórnu,
where he had sent to ask for advice with regard to our design of
visiting the eastern side of the lake, and respecting his own
proceedings. We rather imagined that the vizier had given him
orders, at the same time that he sent us out to Kánem, to assist us
in carrying out our project in every respect; and we could scarcely
hope for any favourable result by their asking advice at such a
distance. We therefore complained to ʿAbdallah of the sheikh’s
lukewarmness; and presuming that he was not content to leave us
under the protection of Hallúf because he expected that the latter
would get some handsome present from us, we told him that even if
we were to go with Hallúf, we should regard ourselves as still under
the protection of the sheikh, to whom we were entirely indebted for
Hallúf’s acquaintance, and would make him a valuable present if we
should not fail in our enterprise. This seemed to take effect; and we
received the satisfactory message in the evening, that we should be
allowed to go with Hallúf, but that we must make a handsome
present to the sheikh, besides the large tent which I had prepared
for myself in Tripoli. Being willing to make any sacrifice in order to
carry out the express wish of the Government who had sent us, and
elated by the prospect that something might be done, we paid
another visit to Sheikh Ghét in the evening, but could not arrive at
any definite arrangement. There was a great deal of talk about a
certain Keghámma, who alone had the power to take us to Kárká,
while Hallúf at best was said to be able to conduct us to Máwó; but
at that time we could not make out distinctly who this Keghámma
was, except that we learnt that he resided in a place called Kárafu,
in the direction of Máwó.
Tuesday, Oct. 14.—The strong wind making it rather
uncomfortable outside, I remained in my tent studying the Tébu
language, and conversing with the fáki ʿOthmán, a man who, by his
mild conduct, formed a curious contrast to the lawless and
quarrelsome character of this band of robbers, besides being
possessed of less prejudice and superstition. In the afternoon
several Fugábú paid us a visit; they all behaved well, and were not
troublesome. It was at length decided that we should leave the
second day following, with Hallúf, for the Bahar el Ghazál and Kárká;
and although we were sorry at not having brought the affair to a
more definite conclusion, we yet indulged in the hope that we should
be able to attain our object, when suddenly in the evening we
received information that Hallúf had receded from his engagement,
and that therefore no further idea of our going with him could be
entertained. What the reason was for this sudden change of
proceeding I cannot say; but all our arguments, of course, were
faulty, as we were unable to give them sufficient weight by good
presents. That the tidings of the carrying off of three herds of cattle
from a village at a few miles’ distance from Yó, by the Tuarek, which
arrived this evening, could have had any influence upon this course
of policy was rather improbable.
Wednesday, Oct. 15.—I was so happy as to collect a good deal of
information about the country of Shitáti, which we had now entered,
once densely inhabited in large and populous cities, and passed the
day quietly and usefully. We heard, to our great joy, that we were to
go on the next day with the whole expedition.
Thursday, Oct. 16.—We had scarcely left the place of our
encampment when we fell in with an elephants’ track, apparently
leading to the well, and followed it for a long distance; it was well
trodden, and was an undoubted proof that these huge animals
abounded in this wild deserted region, where man had left scarcely
any trace of his presence. Having proceeded at a swift rate, we
crossed, at the distance of about six miles, a very fine hollow or vale
stretching south and north, and capable of producing everything,
and even at that time exhibiting a few vestiges of human activity
and industry in a small field of wheat, irrigated from those wells
called “kháttatír” by the Arabs, which name is given by them also to
the spot irrigated in this way. Its native name, if I am not mistaken,
is “Yakállogo.”
We then came to another hollow, formed like an ancient circus,
and having its soil richly impregnated with natron; it is called
Bérendé. After a short halt here, we continued our march; and
Overweg and I, while our men and camels followed the direct road,
turned off towards the south, and visited another hollow, called
“Bóro,” in whose deep bottom a lake is formed, which, according to
the season and to the quantity of water it contains, like several other
water-basins round the lake, may be termed a fresh or brackish-
water lake.
During the last rainy season but very little rain had fallen in
Kánem; and consequently this lake was of rather small extent, being
about one mile and a half round, and limited to the more deeply
depressed southern corner of the basin, while its northern corner,
which is rarely inundated, was thickly wooded. There was formerly
much cultivation here, and a small village stood on the border of the
lake. Now all is desolate; and our Kánemma guide, Músa Bedé,
unwilling to make a longer stay in such a spot, hurried on, ascending
the steep eastern slope, which is at least three hundred feet high.
Here we obtained a view over a great extent of country; but it was
all one desolate wilderness, and nothing particular to be seen,
excepting a party of five men watching our movements, and keeping
parallel with us. We therefore returned to our troop and informed
them of the circumstance; and a body of horsemen were sent in
pursuit. We then, about half an hour before noon, crossed another
hollow or vale, called Towáder, with the dry basin of a lake in its
southernmost part, on whose border were several wells; the ground
was thickly overgrown with underwood. Continuing our march, we
reached, after noon, a more extensive and extremely beautiful vale,
richly clothed with vegetation, but not in so wild a state, and not of
the same impenetrable character, as many of those which we had
seen; the reason seemed to be, that it was less deep, being only
about one hundred and fifty feet under the higher level.
Here the troop halted during the heat of the day, the groups being
scattered over the whole extent of the hollow; but it was not a fit
spot for a night’s encampment, as well on account of the wild
beasts, as of the danger of a sudden attack from hostile men. Sweet
as repose was here in the cool shade of a luxuriant serrákh or a
kúrna, the ground was full of scorpions; and my bodyguard, Bú-Zéd,
was severely stung by one. Accordingly, when the dhohor had
passed by, the order was given for decamping, and we kept along
the vale and ascended the eastern slope, when, on an entirely open
ground almost bare of trees, we chose a place for our night’s
encampment. The Arabs here brought us a young ostrich which they
had caught in the valley; and we had a long unprofitable
conversation with them in endeavouring to obtain their goodwill.
Friday, Oct. 17.—We started very early, for a long day’s fatiguing
ride; for, notwithstanding all the care I took of myself, I could not
recover from my sickly state, and was extremely sensitive of fatigue.
The country in the beginning of our march was less adorned with
trees than usual; but it became more densely wooded after we had
passed the vale called Asfúra. This hollow, of small extent, and
enclosed all around by steep slopes, is provided with a great number
of wells of excellent water; but its bottom, being in most parts stony,
is almost bare of vegetation, with the exception of here and there a
dúm-bush. While the men made a short halt for taking in a supply of
water, I went a little in advance with Abdallah; but I soon found that
he did not know the road at all, keeping far too much to the south,
and I thought it wiser to return to our people, and march along with
them.
The country here offers a great variety in its configuration; and,
instead of an extensive level, as before, hill and dale succeed each
other. Having passed several smaller concavities, we reached a more
considerable valley, called Jená ú Shelúkko, which contained corn, or
rather durra fields, but they were entirely destroyed by the
elephants. Grain had also been cultivated at the foot of the slope;
but it had failed entirely, on account of the scarcity of rain. There
were no vestiges of human habitations.
Our people had begun to make themselves comfortable in this fine
valley for passing the heat of the day, when suddenly orders were
given for continuing our march. The country now became more hilly.
Having passed en route a hollow provided with wells and called
Aghó, once one of the most famous places of Kánem, we made,
after noon, a short halt in the flat dell called Núndul, in which are
several kháttatír, or draw-wells, and stubble-fields, in order to
provide ourselves with water, and also to water our horses. There
was a great bustle and confusion, everybody wanting to get first to
the wells, and proceed with the principal troop, as we were now
approaching a hostile territory. My she-camel, which was a very fine
little animal, but rather too heavily laden for such an expedition, was
among the last that arrived; and, starting after the others, was soon
left behind the whole troop; and I endeavoured in vain to bring her
up.
The country here was more level than it had been in the latter
part of our route; and we left on our right only one vale, which is
called Maínasa. Fortunately for me, the whole host made a longer
halt at two o’clock in the afternoon, in one long line, in order to
exhort the little band to valour, and to give them some instructions
in case of a conflict with the enemy. No quarter was to be given, and
any one of them who should lose his horse or camel was to be
indemnified for the loss. But a great deal was proclaimed besides,
which, as I was at the very end of the line, I could not make out.
Two horsemen were galloping along the line and brandishing white
banners, such as I had not observed before. There was a good deal
of parade in the whole scene; and at the end of it several small
troops of horsemen galloped out in advance of the line as “imán,”
that is to say, as bound by an oath either to be victorious or to die.
At length we pursued our course, the line breaking up into small
irregular detachments, as chance or attachment grouped the people
together; but we soon came to another halt, and much conversation
ensued, in consequence of which, three of the Fugábú horsemen
were despatched to the south, to bring up an experienced guide.
Having at length resumed our march through a fine undulating and
well-wooded country, we chose about sunset an open place for our
encampment, where we were told we should rest till the moon had
risen. Strict orders were given not to light a fire, in order that the
enemy might not become aware of our approach. But as soon as it
became dark, very large fires were seen to the south-east, forming
one magnificent line of flame; and as it was clear that these were
not common fires for domestic use, but appeared rather to be
beacons, it was conjectured that the enemy had tidings of our
coming, and were calling together their people. An order was
therefore immediately given to proceed; but scarcely were the loads
put upon the camels, and everything ready for the march, when a
counter-order was received, that we were to remain. We then began
to make ourselves comfortable, when a third order was given to load
immediately and to pursue the march.
This ordering and countermanding seemed to arise rather from
the bad organization of a band subject to no strict authority, but
where every man of any experience and a little valour had
something to say, than with the intention of misleading a lurking
spy; but, whatever the cause, it was rather trying, and my two men,
Bú-Zéd and Ahmed, neither of whom was very energetic, could
scarcely be persuaded to load a second time, while all the people
were getting ready with great expedition, and marched off as soon
as they were ready. We therefore remained behind from the
beginning. Unfortunately the load was so badly adjusted that several
things soon fell down and had to be replaced; and this happening
more than once, the distance between us and the host became so
great, that at last not even the slightest noise could be heard of the
troop before us to direct our course; but having once noticed the
direction by the stars, I was able to guide my servants. To make
matters worse, the ground was covered with high grass, and it was
not easy to proceed at a rapid rate. Trees were very scanty here.
At length the Arabs became aware of my having been left at a
great distance behind, and about midnight made a halt, when I
overtook them. After having lightened my camel, we proceeded with
expedition through the dark night, illuminated only by the distant
fires, which gave a painful idea of the resistance we were to meet
with, till after two o’clock in the morning of the 18th, when we
reached a rising ground, and, dismounting, lay down near our
wearied horses to get an hour’s rest.
We then continued our march with great alacrity for an hour, when
we came to a halt on undulating sandy ground thickly covered with
bushes. The horsemen galloped on in advance, while Overweg and I
remained with the train, consisting of from sixty to seventy camels
mounted by young men, and boys not more than ten years old, who
were looking forward with such avidity for prey that they could
scarcely be kept back. At length we began to proceed slowly, but
soon came to another halt, as till now we had not heard a single
shot; but when the day dawned, the greedy multitude could not be
kept back any longer, and on we went.
We here obtained a faint view of an irregular valley-formation
ahead of us, adorned with a few palm-trees, which, in the dubious
light of the dawn, gave to the country an interesting and entirely
new appearance. Crossing this valley-plain, we gradually ascended
higher ground, and reached a small deserted village, consisting of
large spacious huts. But though we turned off from it to the north, in
order to prevent our little troop from dispersing to make booty, the
best-mounted and most daring of them started off on their light
mehára to see if something might not have been left to suit them.
Some little cultivation was to be seen around the village; but in
general the country continued to bear the most evident traces of
desolation. At length its dreary aspect became relieved, and we
descended into a regularly formed valley called Gésgi, about five
hundred yards broad, and enclosed between high cliffs of sandstone.
This was the first regular valley-formation which we saw on our
journey to Kánem; for as yet all depressions in the ground presented
rather the character of hollows without a regular shelving or sloping
in any direction. This valley, on the contrary, extending from north to
south, was apparently the occasional channel of a small torrent, and,
on account of the moisture extending over the whole of it, was
adorned with several groups of palm-trees, and in several places
with cornfields.
But while this valley presented great attraction to the European
traveller, it was not less attractive to the covetous Arab freebooter;
and all order ceasing in our little troop, the young inexperienced lads
who composed our cortége dispersed in all directions. Some small
flocks of sheep had been observed in the valley; and they were now
pursued by part of our companions, while others ransacked the huts
of a small hamlet situated on the western brow of the vale. It was
very fortunate for us that no natives were lurking hereabouts, as
they might have done immense mischief to our troop, scattered as it
was about the country. Overweg and I were almost left alone, when,
after having looked about in vain for traces of the footsteps of the
horsemen who had gone in advance, we ascended the eastern
slope, which was extremely steep and very difficult for the camels.
Gradually our companions, fearing to expose themselves by staying
behind, collected around us, and we proceeded in a south-easterly
direction, when we soon came to another and more favoured valley,
called Hénderí Síggesí, its bottom adorned with a thicker grove of
date-trees and with beautiful cornfields—that is to say, fields of
wheat with their golden stalks waving in the wind—while the high
ground, being elevated above the bottom of the valley about one
hundred and twenty feet, was planted near the brow with fields of
millet, which was just ripe, but not yet reaped. What with the rich
vegetation, the steep cliffs, the yellowish crop, the burning hamlet,
and the people endeavouring to make their escape, it formed a very
interesting scene.
Keeping along the western brow, which in some places, where the
rock lay bare, was extremely steep, we observed that several
natives, including even two or three horsemen, had taken refuge in
the thickest part of the date-grove, watching our motions. A small
hamlet of straw huts of a peculiar shape, not unlike those of the
Koyám described on a former occasion, and lying at the very brink of
the steep rocky declivity, had been set on fire. Our wild, lawless
companions now began to descend into the valley at a spot where
the slope was more gradual, raising a war-cry in order to frighten
those people who were hid in the grove. Five good horsemen would
have sufficed to overthrow this whole troop of young unbearded
lads, who were snapping their firelocks without being in general
provided with balls. It was very lucky, indeed, that Overweg and I
with our people kept well together in the foremost part of the train,
for the natives, rushing suddenly out from their hiding place upon
the stragglers, laid hold of two camels, with which they immediately
made good their retreat, their young riders, who a moment before
had shown such courage, having betimes jumped off their animals
and run away. Our companions were now full of gesticulations and
warlike threats; but nobody dared to attack the small body of men,
and dispute with them their booty. We soon reached the level on the
eastern side of the valley; but if we had hesitated before what
course to pursue, we were now quite puzzled to find the
whereabouts of the horsemen. Wandering thus up and down without
any distinct direction, we of course, as it was not safe for us to
dismount and take a moment’s rest, suffered great fatigue, after a
whole day and night’s journey. Meanwhile the sun had almost
reached the zenith, and I felt extremely weak and exhausted.
At length some of the horsemen were seen, at a great distance
beyond a more shallow dell, driving before them a herd of cattle;
and rescued at length from the dangerous position in which we had
been, destitute as we were of any sufficient protection, we hastened
to cross the valley, and to join our more warlike and experienced
friends. Falling in with them, we went together to a place a little
further down this wide flat valley, where there were a small hamlet
and stubble-fields. Here at length I hoped to get a little rest, and lay
down in the scanty shade of a talha; but unfortunately there was no
well here, and after a very short halt and a consultation, the order
was given to proceed. I was scarcely able to mount my horse again
and to follow the troop. The Arabs called this valley, which was very
flat and produced no date-trees, Wády el Ghazál, but what its real
name is I did not learn; it has of course nothing to do with the
celebrated and larger valley of this name. The well was not far off, in
another fine valley, or rather hollow, deeper than Wády el Ghazál,
but much flatter than either Síggesí or Gésgí, and called Msállat or
Amsállat. It was adorned with a wild profusion of mimosa, and in its
deepest part provided with “kháttatír” or draw-wells, irrigating a fine
plantation of cotton, the first we had yet seen in Kánem.
The Arabs had not made a very considerable booty, the Woghda
having received intelligence of their approach and saved what they
could. The whole result of the expedition was fifteen camels, a little
more than three hundred head of cattle, and about fifteen hundred
sheep and goats. The Arabs were for some time in great anxiety
about Ghét, and a party of horsemen who had gone with him to a
greater distance; but he joined us here, driving before him a large
flock of sheep. We were busy watering our horses, and providing
ourselves with this necessary element. But there was not much
leisure; for scarcely had we begun to draw water, when the alarm
was given that the Woghda were attacking us, and three bodies of
horsemen were formed in order to protect the train and the booty.
The main body rushed out of the valley on the south-east side, and
drove the enemy back to a considerable distance; but the intention
of encamping on the slope near this well was given up as too
dangerous, and it was decided to go to a greater distance, though
the intention of penetrating to Mʿawó seemed not as yet entirely to
be abandoned. It took us a considerable time to get out of this
wooded valley, the Arabs being afraid of being attacked and losing
their booty.
At length, the cattle and flocks having been driven in advance, we
started, and, leaving the vale, ascended elevated rocky ground, from
which, following a south-westerly direction, we descended, a little
before two o’clock in the afternoon, into the narrower eastern part
of a deep and beautiful valley, which here is adorned by a pretty
grove of date-trees, while its western part expands into fine
cultivated ground. Here we made a halt of about half an hour, in
order to water the animals and replenish our skins; for not even here
was it thought advisable to encamp, as it is regarded as a very
inauspicious place, this being the spot where, in 1850, the Kél-owí
fell upon the Welád Slimán and almost exterminated them. After so
short a halt we again pursued our march. I was now so totally
exhausted that I was obliged to dismount at short intervals and lie
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookgate.com

You might also like