Ask Your Question
1

remove_vertical_border_strip

asked 2018-11-25 20:40:52 -0600

MarioM gravatar image

updated 2018-11-26 11:33:48 -0600

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 05:51:42 -0600 )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 11:27:43 -0600 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2018-11-28 00:54:02 -0600

slelievre gravatar image

updated 2018-11-28 01:22:40 -0600

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 09:50:57 -0600 )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-25 20:40:52 -0600

Seen: 64 times

Last updated: Nov 28