### Abstract

A square factorization of a string w is a factorization of w in which each factor is a square. Dumitran et al. [SPIRE 2015, pp. 54-66] showed how to find a square factorization of a given string of length n in O(n log n) time, and they posed a question whether it can be done in O(n) time. In this paper, we answer their question positively, showing an O(n)-time algorithm for square factorization in the standard word RAM model with machine word size ω = Ω(log n). We also show an O(n + (n log^{2} n)/ω)-time (respectively, O(n log n)-time) algorithm to find a square factorization which contains the maximum (respectively, minimum) number of squares.

Original language | English |
---|---|

Title of host publication | 27th Annual Symposium on Combinatorial Pattern Matching, CPM 2016 |

Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |

Pages | 27.1-27.12 |

Volume | 54 |

ISBN (Electronic) | 9783959770125 |

DOIs | |

Publication status | Published - Jun 1 2016 |

Event | 27th Annual Symposium on Combinatorial Pattern Matching, CPM 2016 - Tel Aviv, Israel Duration: Jun 27 2016 → Jun 29 2016 |

### Other

Other | 27th Annual Symposium on Combinatorial Pattern Matching, CPM 2016 |
---|---|

Country | Israel |

City | Tel Aviv |

Period | 6/27/16 → 6/29/16 |

### Fingerprint

### All Science Journal Classification (ASJC) codes

- Software

### Cite this

*27th Annual Symposium on Combinatorial Pattern Matching, CPM 2016*(Vol. 54, pp. 27.1-27.12). Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing. https://doi.org/10.4230/LIPIcs.CPM.2016.27