JuliaMath / JuliaMath/Combinatorics.jl

isrimhook is incorrect?

Open
#52 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Julia
Stars
230
Forks
62
PR merge metrics
No merged PRs in 30d

Description

While working on my own code for YoungDiagrams I encountered this:

```julia
λ = [5,3,2,2,1]
μ = [2,2,1]

m, n = length(λ), length(μ)
l = maximum(λ)
youngdiagram=zeros(Int, m, l)
for i=1:n
youngdiagram[i, μ[i]+1:λ[i]]=1
end
for i=n+1:m
youngdiagram[i, 1:λ[i]]=1
end
youngdiagram
```
produces
```
5×5 Array{Int64,2}:
0 0 1 1 1
0 0 1 0 0
0 1 0 0 0
1 1 0 0 0
1 0 0 0 0
```
which is clearly not a rimhook (it's disconnected). however `Combinatorics.isrimhook((λ, μ))` returns `true`.

Am I missing something obvious?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.