Ask Your Question
-1

How to get the Area of a Dyck path

asked 2024-10-08 17:25:34 +0100

mathstudent gravatar image

updated 2024-10-08 18:25:45 +0100

Max Alekseyev gravatar image

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

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

edit retag flag offensive close merge delete

Comments

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

mathstudent gravatar imagemathstudent ( 2024-10-08 17:27:43 +0100 )edit
1

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

Max Alekseyev gravatar imageMax Alekseyev ( 2024-10-08 18:27:46 +0100 )edit

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 ( 2024-10-09 06:46:12 +0100 )edit

What is the reason for downvote!

mathstudent gravatar imagemathstudent ( 2024-10-09 08:20:29 +0100 )edit

Sounds like a homework problem.

Max Alekseyev gravatar imageMax Alekseyev ( 2024-10-09 18:03:24 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-10-09 18:06:37 +0100

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)]
edit flag offensive delete link more

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: 2024-10-08 17:25:34 +0100

Seen: 196 times

Last updated: Oct 09