Ask Your Question
1

remove_vertical_border_strip

asked 2018-11-26 03:40:52 +0100

MarioM gravatar image

updated 2018-11-26 18:33:48 +0100

Hello, I'm interested to know if there is a way to define the analoge of remove_horizontal_border_strip(k) which returns the partitions obtained from self by removing an horizontal border strip of length k.

For example:

Partition([5,3,1]).remove_horizontal_border_strip(1).list()
 [[5, 3], [5, 2, 1], [4, 3, 1]]

but for vertical border strip.

edit retag flag offensive close merge delete

Comments

1

What is remove_horizontal_border_strip? What is a "border strip"? What is IntegerListLex? And what is that $k$? Please insert the framework, an example - best coming with working code for it, and any details that may elucidate the problem. It is always a good idea to imagine how the answer would look like and give details in a length corresponding to this answer. Potential answerers may see connections with own work, this is then profitable for the community. In this second i have no point to start.

dan_fulea gravatar imagedan_fulea ( 2018-11-26 12:51:42 +0100 )edit

When you use partitions a "border strip" is a partition which diagram has no two cell in the same column(horizontal) or not in the same row(vertical). In Sage with partitions you can do remove_horizontal_border_strip which returns the partitions obtained from self by removing an horizontal border strip of length k. For example Partition([5,3,1]).remove_horizontal_border_strip(1).list() [[5, 3], [5, 2, 1], [4, 3, 1]]

MarioM gravatar imageMarioM ( 2018-11-26 18:27:43 +0100 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2018-11-28 07:54:02 +0100

slelievre gravatar image

updated 2018-11-28 08:22:40 +0100

One way to do that is using the conjugate partition.

For any partition, the conjugate partition is the one whose lines are the columns of p; analogue to the transpose for matrices.

Here is how to use it to remove vertical border strip.

sage: p = Partition([5,3,1])
sage: p
[5, 3, 1]
sage: unicode_art(p)
┌┬┬┬┬┐
├┼┼┼┴┘
├┼┴┘
└┘
sage: h = p.remove_horizontal_border_strip(1).list()
sage: h
[[5, 3], [5, 2, 1], [4, 3, 1]]
sage: unicode_art(q)
⎡         ┌┬┬┬┬┐  ┌┬┬┬┐ ⎤
⎢ ┌┬┬┬┬┐  ├┼┼┴┴┘  ├┼┼┼┘ ⎥
⎢ ├┼┼┼┴┘  ├┼┘     ├┼┴┘  ⎥
⎣ └┴┴┘  , └┘    , └┘    ⎦
sage: pc = p.conjugate()
sage: pc
[3, 2, 2, 1, 1]
sage: unicode_art(pc)
┌┬┬┐
├┼┼┘
├┼┤
├┼┘
├┤
└┘
sage: qq = [q.conjugate() for q in pc.remove_horizontal_border_strip(1)]
sage: qq
[[4, 3, 1], [5, 2, 1], [5, 3]]
sage: unicode_art(qq)
⎡ ┌┬┬┬┐  ┌┬┬┬┬┐         ⎤
⎢ ├┼┼┼┘  ├┼┼┴┴┘  ┌┬┬┬┬┐ ⎥
⎢ ├┼┴┘   ├┼┘     ├┼┼┼┴┘ ⎥
⎣ └┘   , └┘    , └┴┴┘   ⎦

One can define a corresponding function:

def remove_vertical_border_strip(p, k):
    r"""
    Return the partitions obtained from ``p`` by removing
    a vertical border strip of length ``k``.

    EXAMPLE::

        sage: p = Partition([5, 3, 1])
        sage: remove_vertical_border_strip(p, 1)
        [[4, 3, 1], [5, 2, 1], [5, 3]]
    """
    pc = p.conjugate()
    return [q.conjugate() for q in pc.remove_horizontal_border_strip(k)]

and then just use that function:

sage: p = Partition([5, 3, 1])
sage: qq = remove_vertical_border_strip(p, 1)
sage: qq
[[4, 3, 1], [5, 2, 1], [5, 3]]
sage: unicode_art(qq)
⎡ ┌┬┬┬┐  ┌┬┬┬┬┐         ⎤
⎢ ├┼┼┼┘  ├┼┼┴┴┘  ┌┬┬┬┬┐ ⎥
⎢ ├┼┴┘   ├┼┘     ├┼┼┼┴┘ ⎥
⎣ └┘   , └┘    , └┴┴┘   ⎦
edit flag offensive delete link more

Comments

Thank you Samuel, that should work.

MarioM gravatar imageMarioM ( 2018-11-29 16:50:57 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-11-26 03:40:52 +0100

Seen: 304 times

Last updated: Nov 28 '18