Opened 3 years ago

Closed 3 years ago

#28160 closed enhancement (fixed)

Subword Complementaries

Reported by: nadialafreniere Owned by:
Priority: major Milestone: sage-8.9
Component: combinatorics Keywords: words, fpsac2019, subwords
Cc: enadeau Merged in:
Authors: Nadia Lafrenière Reviewers: Émile Nadeau
Report Upstream: N/A Work issues:
Branch: 324e6d0 (Commits, GitHub, GitLab) Commit: 324e6d0f130e6bc62c6d650f6cee636ef5650bbc
Dependencies: Stopgaps:

Status badges

Description (last modified by nadialafreniere)

If u is a subword of w, then the complimentary of u in w is the subword made of all the letters from w after removing the ones of u. There might be more than one way to do so.

For example, rice is a subword of vertices and vets is its only complimentary. However, an in banana has 3 occurrences and the 3 complimentaries are bana, bana and bnaa.

I added a function to get all the complimentaries of a subword in a word.

Change History (7)

comment:1 Changed 3 years ago by nadialafreniere

  • Branch set to u/nadialafreniere/subword_complementary

comment:2 Changed 3 years ago by nadialafreniere

  • Authors set to Nadia Lafrenière
  • Cc enadeau added
  • Commit set to 30a634f94e6afac2ecc898abbf527dbed2f193cc
  • Description modified (diff)
  • Keywords words fpsac2019 subwords added
  • Status changed from new to needs_review

New commits:

30a634fAdded a function to get the complementaries of a subword in a word

comment:3 Changed 3 years ago by nadialafreniere

  • Component changed from PLEASE CHANGE to combinatorics
  • Description modified (diff)
  • Type changed from PLEASE CHANGE to enhancement

comment:4 Changed 3 years ago by git

  • Commit changed from 30a634f94e6afac2ecc898abbf527dbed2f193cc to 4a72215b406b4eb81affc78ae05072fe61f38a19

Branch pushed to git repo; I updated commit sha1. New commits:

4a72215Fixed line size, changed slightly list comprehension in subword_complementaries

comment:5 Changed 3 years ago by enadeau

  • Branch changed from u/nadialafreniere/subword_complementary to u/enadeau/subword_complementary

comment:6 Changed 3 years ago by enadeau

  • Commit changed from 4a72215b406b4eb81affc78ae05072fe61f38a19 to 324e6d0f130e6bc62c6d650f6cee636ef5650bbc
  • Reviewers set to Émile Nadeau
  • Status changed from needs_review to positive_review

I've just removed some trailing spaces. Otherwise, it looks good to me.

New commits:

699306cMerge branch 'u/nadialafreniere/subword_complementary' of git:// into t/28160/subword_complementary
324e6d0Removed trailing spaces.

comment:7 Changed 3 years ago by vbraun

  • Branch changed from u/enadeau/subword_complementary to 324e6d0f130e6bc62c6d650f6cee636ef5650bbc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.