1. Trang chủ
  2. » Giáo án - Bài giảng

pattern matching algorithms apostolico galill 1997 05 29 Cấu trúc dữ liệu và giải thuật

394 66 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 394
Dung lượng 19,87 MB

Nội dung

DuongThanCong.com Pattern Matching Algorithms CuuDuongThanCong.com This page intentionally left blank CuuDuongThanCong.com Pattern Matching Algorithms Edited by Alberto Apostolico Zvi Galil New York Oxford Oxford University Press 1997 CuuDuongThanCong.com Oxford University Press Oxford New York Athens Auckland Bangkok Bogota Bombay Buenos Aires Calcutta Cape Town Dar es Salaam Delhi Florence Hong Kong Istanbul Karachi Kuala Lumpur Madras Madrid Melbourne Mexico City Nairobi Paris Singapore Taipei Tokyo Toronto and associated companies in Berlin Ibadan Copyright © 1997 by Alberto Apostolico & Zvi Galil Published by Oxford University Press, Inc 198 Madison Avenue, New York, New York 10016 Oxford is a registered trademark of Oxford University Press All rights reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior permission of Oxford University Press Library of Congress Cataloging-in-Publication Data Apostolico, Alberto, 1948Pattern matching algorithms / edited by A Apostolico, Zvi Galil p cm Includes bibliographical references and index ISBN 0-19-511367-5 Computer algorithms Combinatorial analysis I Galil, Zvi II Title QA76.9.A43A66 1997 006.4—dc21 96-49602 Printed in the United States of America on acid-free paper CuuDuongThanCong.com Preface Issues of matching and searching on elementary discrete structures arise pervasively in Computer Science as well as in many of its applications Their relevance may be expected to grow even further in the near future as information is amassed, disseminated and shared at an increasing pace A number of algorithms have been discovered in recent years in response to these needs Along the way, a number of combinatorial structures and tools have been exposed that often carry intrinsic value and interest The main ideas that developed in this process concurred to distill the scope and flavor of Pattern Matching, now an established specialty of Algorithmics The lineage of Pattern Matching may be traced back for more than two decades, to a handful of papers such as "Rapid identification of repeated patterns in strings, trees, and arrays", by R.M Karp, R.E Miller and A.L Rosenberg, "Automata theory can be useful", by D.E Knuth and V.R Pratt, and, in a less direct way, S.A Cook's "Linear time simulation of deterministic two-way pushdown automata" The outgrowth of these powerful seeds is impressive: I Simon lists over 350 titles in the current version of his bibliography on string algorithms; A V Aho references over 140 papers in his recent survey of string-searching algorithms alone; and advanced workshops and schools, books and special issues of major journals have been already dedicated to the subject and more are planned for the future This book attempts a snapshot of the current state of the art in Pattern Matching as seen by specialists who have devoted several years of their study to the field Without pretending to be exhaustive, the book does cover most basic principles and presents material advanced enough to portray faithfully the current frontier of research in the field Our intention was to combine a textbook suitable for a graduate or advanced level course with an in-depth source for the specialist as well as the neophyte The appearance of this book marks, somewhat intentionally, the Tenth anniversary since "Combinatorial Algorithms on Words" We wish it an equally favorable reception, and possibly even more opportunities to serve, through the forthcoming years, the growth of its useful and fascinating subject a.a and z.g CuuDuongThanCong.com This page intentionally left blank CuuDuongThanCong.com Contributors Amihood Amir, Computer Science Department, Georgia Institute of Technology, Atlanta, GA 30332, USA Alberto Apostolico, Department of Computer Sciences, Purdue University, CS Building, West Lafayette, IN 47907, USA and Dipartimento di Elettronica e Informatica, Universita di Padova, Via Gradenigo 6/A, 35131 Padova, Italy Mikhail J Atallah, Department of Computer Sciences, Purdue University, CS Building, West Lafayette, IN 47907, USA Maxima Crochemore, Institut Gaspard Monge, Universite de Marne-laVallee, rue de la Butte Verte, F-93160 Noisy-le-Grand, France Martin Farach, DIM ACS, Rutgers University, CoRE Building, Busch Campus, P.O 1179, Piscataway, NJ 08855-1179, USA Zvi Galil, Department of Computer Science, Columbia University, New York, NY 10027, USA and Department of Computer Science, School of Mathematical Sciences, Tel Aviv University, Tel Aviv, 69978 Israel Raffaele Giancarlo, Dipartimento di Matematica ed Applicazioni, Universita di Palermo, Via Archirafi 34, 90123 Palermo, Italy Roberto Grossi, Dipartimento di Sistemi e Informatica, Universita di Firenze, Via Lombroso 6/17, 50134 Firenze, Italy Daniel S Hirschberg, Department of Information and Computer Science, University of California at Irvine, Irvine, CA 92717, USA Tao Jiang, Department of Computer Science, McMaster University, Hamilton, Ontario L8S 4K1, Canada Gad M Landau, Department of Computer Science, Polytechnic University, MetroTech, Brooklyn, NY 11201, USA Ming Li, Department of Computer Science, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada Dennis Shasha, Courant Institute of Mathematical Science, New York University, 251 Mercer Street, New York, NY 10012, USA Uzi Vishkin, Institute for Advanced Computer Studies and Electrical Engineering Department, University of Maryland, College Park, MD 20742, USA and Department of Computer Science, School of Mathematical Sciences, Tel Aviv University, Tel Aviv, 69978 Israel CuuDuongThanCong.com Ilan Yudkiewicz, Department of Computer Science, School of Mathematical Sciences, Tel Aviv University, Tel Aviv, 69978 Israel Kaizhong Zhang, Department of Computer Science, University of Western Ontario, London, Ontario N6A 5B7, Canada CuuDuongThanCong.com Contents Off-line Serial Exact String Searching M Crochemore 1.1 Searching for strings in texts 1.2 Sequential searches 1.2.1 String-Matching Automaton 1.2.2 Forward Prefix scan 1.2.3 Forward Subword scan 1.3 Practically fast searches 1.3.1 Reverse-Suffix scan 1.3.2 Reverse-Prefix scan 1.4 Space-economical methods 1.4.1 Constant-space searching algorithm 1.4.2 Computing a critical factorization 1.4.3 Computing the period of the pattern 1.5 Heuristics for practical implementations 1.6 Exercises 1.7 Bibliographic notes Off-line Parallel Exact String Searching Z Galil and I Yudkiewicz 2.1 Preliminaries 2.2 Application of sequential techniques 2.3 Periodicities and witnesses 2.3.1 Witnesses 2.3.2 Computing and using witnesses in O(log log m) time 2.3.3 A Lower Bound for the CRCW-PRAM 2.4 Deterministic Samples 2.4.1 Faster text search using DS 2.5 The fastest known CRCW-PRAM algorithm 2.5.1 Computing deterministic samples in constant time 2.5.2 Applying DS to obtain the fastest algorithms 2.5.3 A new method to compute witnesses : Pseudo-periods CuuDuongThanCong.com 1 5 19 24 24 32 35 36 40 42 44 46 47 55 55 57 59 61 64 64 67 70 71 72 74 74 ... [i t ,i .- ],F2[j t J t ]):=0; for p := s to m; A(Fi[i.,i p ],Fij t J t - ])i=A(F1[i.,i P -i],F2[jt,jt-i]) + A(Ti[ip],0 )-, for q := t to nj A(Fi[is, is-1],F2[jt,jq,]) := A(F1[i., i.-i], F2[jt,... forest-vldc(l(i) ii,l(j) ji) = forest.vldc(l(i) ii - 1, l(j )-. j ) + y(p[i ] -> A) (2) t[j1] is not touched by a line in M So, forest-vldc(l(i) ii,l(j) ji) = forest.vldc(l(i) i , l(j) ji - 1) +... between trees", / Algorithms, 11, pp.58 1-6 21 TAI, K.C [1979] "The tree-to-tree correction problem", J ACM, 26, pp.42 2-4 33 TANAKA, E AND K TANAKA [1988] "The tree-to-tree editing problem", International

Ngày đăng: 29/08/2020, 23:54

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN