Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Moshe Lewenstein is active.

Publication


Featured researches published by Moshe Lewenstein.


symposium on discrete algorithms | 2000

Faster algorithms for string matching with k mismatches

Amihood Amir; Moshe Lewenstein; Ely Porat

The string matching with mismatches problem is that of finding the number of mismatches between a pattern P of length m and every length m substring of the text T. Currently, the fastest algorithms for this problem are the following. The Galil-Giancarlo algorithm finds all locations where the pattern has at most k errors (where k is part of the input) in time O(nk). The Abrahamson algorithm finds the number of mismatches at every location in time O(n√ m log m). We present an algorithm that is faster than both. Our algorithm finds all locations where the pattern has at most k errors in time O(n√k log k). We also show an algorithm that solves the above problem in time O((n + (nk3)/m) log k).


Journal of the ACM | 2005

Approximation algorithms for asymmetric TSP by decomposing directed regular multigraphs

Haim Kaplan; Moshe Lewenstein; Nira Shafrir; Maxim Sviridenko

A directed multigraph is said to be d-regular if the indegree and outdegree of every vertex is exactly d. By Halls theorem, one can represent such a multigraph as a combination of at most n2 cycle covers, each taken with an appropriate multiplicity. We prove that if the d-regular multigraph does not contain more than ⌊d/2⌋ copies of any 2-cycle then we can find a similar decomposition into n2 pairs of cycle covers where each 2-cycle occurs in at most one component of each pair. Our proof is constructive and gives a polynomial algorithm to find such a decomposition. Since our applications only need one such a pair of cycle covers whose weight is at least the average weight of all pairs, we also give an alternative, simpler algorithm to extract a single such pair.This combinatorial theorem then comes handy in rounding a fractional solution of an LP relaxation of the maximum Traveling Salesman Problem (TSP) problem. The first stage of the rounding procedure obtains two cycle covers that do not share a 2-cycle with weight at least twice the weight of the optimal solution. Then we show how to extract a tour from the 2 cycle covers, whose weight is at least 2/3 of the weight of the longest tour. This improves upon the previous 5/8 approximation with a simpler algorithm. Utilizing a reduction from maximum TSP to the shortest superstring problem, we obtain a 2.5-approximation algorithm for the latter problem, which is again much simpler than the previous one.For minimum asymmetric TSP, the same technique gives two cycle covers, not sharing a 2-cycle, with weight at most twice the weight of the optimum. Assuming triangle inequality, we then show how to obtain from this pair of cycle covers a tour whose weight is at most 0.842 log2 n larger than optimal. This improves upon a previous approximation algorithm with approximation guarantee of 0.999 log2 n. Other applications of the rounding procedure are approximation algorithms for maximum 3-cycle cover (factor 2/3, previously 3/5) and maximum asymmetric TSP with triangle inequality (factor 10/13, previously 3/4).


Discrete Applied Mathematics | 2000

New results on induced matchings

Martin Charles Golumbic; Moshe Lewenstein

A matching in a graph is a set of edges no two of which share a common vertex. A matching M is an induced matching if no edge connects two edges of M. The problem of finding a maximum induced matching is known to be NP-Complete in general and specifically for bipartite graphs and for 3-regular planar graphs. The problem has been shown to be polynomial for several classes of graphs. In this paper we generalize the results to wider classes of graphs, and improve the time complexity of previously known results.


Journal of Algorithms | 2000

Text Indexing and Dictionary Matching with One Error

Amihood Amir; Dmitry Keselman; Gad M. Landau; Moshe Lewenstein; Noa Lewenstein; Michael Rodeh

The indexing problem is where a text is preprocessed and subsequent queries of the form “Find all occurrences of pattern P in the text” are answered in time proportional to the length of the query and the number of occurrences. In the dictionary matching problem a set of patterns is preprocessed and subsequent queries of the form “Find all occurrences of dictionary patterns in text T” are answered in time proportional to the length of the text and the number of occurrences.There exist efficient worst-case solutions for the indexing problem and the dictionary matching problem, but none that find approximate occurrences of the patterns, i.e., where the pattern is within a bound edit (or Hamming) distance from the appropriate text location.In this paper we present a uniform deterministic solution to both the indexing and the general dictionary matching problem with one error. We preprocess the data in time O(nlog2n), where n is the text size in the indexing problem and the dictionary size in the dictionary matching problem. Our query time for the indexing problem is O(mlognloglogn+tocc), where m is the query string size and tocc is the number of occurrences. Our query time for the dictionary matching problem is O(nlog3dloglogd+tocc), where n is the text size and d the dictionary size. The time bounds above apply to both bounded and unbounded alphabets.


Journal of Algorithms | 2000

Pattern Matching with Swaps

Amihood Amir; Yonatan Aumann; Gad M. Landau; Moshe Lewenstein; Noa Lewenstein

Let a text string T of n symbols and a pattern string P of m symbols from alphabet ? be given. A swapped version T? of T is a length n string derived from T by a series of local swaps (i.e., t???t?+1 and t??+1?t?), where each element can participate in no more than one swap. The pattern matching with swaps problem is that of finding all locations i for which there exists a swapped version T? of T with an exact matching of P in location i of T?. It has been an open problem whether swapped matching can be done in less than O(nm) time. In this paper we show the first algorithm that solves the pattern matching with swaps problem in time o(nm). We present an algorithm whose time complexity is O(nm1/3logmlog?) for a general alphabet ?, where ?=min(m,???).


international colloquium on automata languages and programming | 2003

Function matching: algorithms, applications, and a lower bound

Amihood Amir; Yonatan Aumann; Richard Cole; Moshe Lewenstein; Ely Porat

We introduce a new matching criterion - function matching - that captures several different applications. The function matching problem has as its input a text T of length n over alphabet ΣT and a pattern P = P[1]P[2] ... P[m] of length m over alphabet ΣP. We seek all text locations i for which, for some function f : ΣP → ΣT (f may also depend on i), the m-length substring that starts at i is equal to f(P[1])f(P[2]) ... f(P[m]). We give a randomized algorithm which, for any given constant k, solves the function matching problem in time O(n log n) with probability 1/nk of declaring a false positive. We give a deterministic algorithm whose time is O(n|ΣP| logm) and show that it is almost optimal in the newly formalized convolutions model. Finally, a variant of the third problem is solved by means of two-dimensional parameterized matching, for which we also give an efficient algorithm.


ACM Transactions on Algorithms | 2007

Approximate parameterized matching

Carmit Hazay; Moshe Lewenstein; Dina Sokol

Two equal length strings <i>s</i> and <i>s</i>′, over alphabets Σ<sub><i>s</i></sub> and Σ<sub><i>s</i></sub>′, <i>parameterize match</i> if there exists a bijection π : Σ<sub><i>s</i></sub> → Σ<sub><i>s</i></sub>′ such that π (<i>s</i>) = <i>s</i>′, where π (<i>s</i>) is the renaming of each character of <i>s</i> via π. <i>Parameterized matching</i> is the problem of finding all parameterized matches of a pattern string <i>p</i> in a text <i>t</i>, and <i>approximate parameterized matching</i> is the problem of finding at each location a bijection π that maximizes the number of characters that are mapped from <i>p</i> to the appropriate |<i>p</i>|-length substring of <i>t</i>. Parameterized matching was introduced as a model for software duplication detection in software maintenance systems and also has applications in image processing and computational biology. For example, approximate parameterized matching models image searching with variable color maps in the presence of errors. We consider the problem for which an error threshold, <i>k</i>, is given, and the goal is to find all locations in <i>t</i> for which there exists a bijection π which maps <i>p</i> into the appropriate |<i>p</i>|-length substring of <i>t</i> with at most <i>k</i> mismatched mapped elements. Our main result is an algorithm for this problem with <i>O</i>(<i>nk</i><sup>1.5</sup> + <i>mk</i> log <i>m</i>) time complexity, where <i>m</i> = |<i>p</i>| and <i>n</i>=|<i>t</i>|. We also show that when |<i>p</i>| = |<i>t</i>| = <i>m</i>, the problem is equivalent to the maximum matching problem on graphs, yielding a <i>O</i>(<i>m</i> + <i>k</i><sup>1.5</sup>) solution.


Information Processing Letters | 2009

Improved algorithms for the k simple shortest paths and the replacement paths problems

Zvi Gotthilf; Moshe Lewenstein

Given a directed, non-negatively weighted graph G=(V,E) and s,t@?V, we consider two problems. In the k simple shortest paths problem, we want to find the k simple paths from s to t with the k smallest weights. In the replacement paths problem, we want the shortest path from s to t that avoids e, for every edge e in the original shortest path from s to t. The best known algorithm for the k simple shortest paths problem has a running of O(k(mn+n^2logn)). For the replacement paths problem the best known result is the trivial one running in time O(mn+n^2logn). In this paper we present two simple algorithms for the replacement paths problem and the k simple shortest paths problem in weighted directed graphs (using a solution of the All Pairs Shortest Paths problem). The running time of our algorithm for the replacement paths problem is O(mn+n^2loglogn). For the k simple shortest paths we will perform O(k) iterations of the second simple shortest path (each in O(mn+n^2loglogn) running time) using a useful property of Roditty and Zwick [L. Roditty, U. Zwick, Replacement paths and k simple shortest paths in unweighted directed graphs, in: Proc. of International Conference on Automata, Languages and Programming (ICALP), 2005, pp. 249-260]. These running times immediately improve the best known results for both problems over sparse graphs. Moreover, we prove that both the replacement paths and the k simple shortest paths (for constant k) problems are not harder than APSP (All Pairs Shortest Paths) in weighted directed graphs.


Operations Research Letters | 2005

An improved upper bound for the TSP in cubic 3-edge-connected graphs

David Gamarnik; Moshe Lewenstein; Maxim Sviridenko

We consider the travelling salesman problem (TSP) problem on (the metric completion of) 3-edge-connected cubic graphs. These graphs are interesting because of the connection between their optimal solutions and the subtour elimination LP relaxation. Our main result is an approximation algorithm better than the 3/2-approximation algorithm for TSP in general.


international colloquium on automata, languages and programming | 2014

On Hardness of Jumbled Indexing

Amihood Amir; Timothy M. Chan; Moshe Lewenstein; Noa Lewenstein

Jumbled indexing is the problem of indexing a text T for queries that ask whether there is a substring of T matching a pattern represented as a Parikh vector, i.e., the vector of frequency counts for each character. Jumbled indexing has garnered a lot of interest in the last four years; for a partial list see [2,6,13,16,17,20,22,24,26,30,35,36]. There is a naive algorithm that preprocesses all answers in O(n 2|Σ|) time allowing quick queries afterwards, and there is another naive algorithm that requires no preprocessing but has O(nlog|Σ|) query time. Despite a tremendous amount of effort there has been little improvement over these running times.

Collaboration


Dive into the Moshe Lewenstein's collaboration.

Top Co-Authors

Avatar

Amihood Amir

Johns Hopkins University

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Researchain Logo
Decentralizing Knowledge