Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
-1

How to get the Area of a Dyck path

asked 0 years ago

mathstudent gravatar image

updated 0 years ago

Max Alekseyev gravatar image

Given a Dyck path π, the Area(π) is the set of boxes (i,j) such that i<j and (i,j) is under π.

How to get the area of a given Dyck path from some given DyckWord pi ?

Preview: (hide)

Comments

Somehow the latex is not rendering correctly, hope someone fixes it.

mathstudent gravatar imagemathstudent ( 0 years ago )
1

Didn't you read documentation? Or what is your concern? https://doc.sagemath.org/html/en/refe...

Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )

sage has area and area_sequence. area is the cardinality of the set Area. I want the set Area, not its cardinality.

mathstudent gravatar imagemathstudent ( 0 years ago )

What is the reason for downvote!

mathstudent gravatar imagemathstudent ( 0 years ago )

Sounds like a homework problem.

Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 0 years ago

Max Alekseyev gravatar image

One can get easily get cells under the path from to_area_sequence(). For example:

dw = DyckWord([1,1,1,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0])
A = [ (j,i) for i,J in enumerate(dw.to_area_sequence()) for j in range(J) ]
assert len(A) == dw.area()
print(A)

gives

[(0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (0, 4), (1, 4), (2, 4), (0, 5), (1, 5), (2, 5), (3, 5), (0, 6), (1, 6), (0, 7), (1, 7), (2, 7), (0, 8), (1, 8)]
Preview: (hide)
link

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: 0 years ago

Seen: 267 times

Last updated: Oct 09 '24